xforms-1.0.93sp1/0000755000175000017500000000000011377311603012230 5ustar jensjensxforms-1.0.93sp1/autom4te.cache/0000755000175000017500000000000011377311600015031 5ustar jensjensxforms-1.0.93sp1/autom4te.cache/traces.10000644000175000017500000015354011377311600016404 0ustar jensjensm4trace:aclocal.m4:992: -1- m4_include([acinclude.m4]) m4trace:configure.ac:4: -1- AC_INIT([xforms], [1.0.93sp1], [xforms-development@nongnu.org]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:4: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:4: -1- AC_SUBST([SHELL]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([SHELL]) m4trace:configure.ac:4: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:4: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_NAME]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_STRING]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_URL]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([exec_prefix]) m4trace:configure.ac:4: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:4: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([prefix]) m4trace:configure.ac:4: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:4: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([program_transform_name]) m4trace:configure.ac:4: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:4: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([bindir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:4: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([sbindir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:4: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([libexecdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:4: -1- AC_SUBST([datarootdir], ['${prefix}/share']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([datarootdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:4: -1- AC_SUBST([datadir], ['${datarootdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([datadir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:4: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([sysconfdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:4: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([sharedstatedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:4: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([localstatedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:4: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([includedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:4: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([oldincludedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:4: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([docdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:4: -1- AC_SUBST([infodir], ['${datarootdir}/info']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([infodir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:4: -1- AC_SUBST([htmldir], ['${docdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([htmldir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:4: -1- AC_SUBST([dvidir], ['${docdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([dvidir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:4: -1- AC_SUBST([pdfdir], ['${docdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([pdfdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:4: -1- AC_SUBST([psdir], ['${docdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([psdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:4: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([libdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:4: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([localedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:4: -1- AC_SUBST([mandir], ['${datarootdir}/man']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([mandir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ @%:@undef PACKAGE_NAME]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ @%:@undef PACKAGE_TARNAME]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ @%:@undef PACKAGE_VERSION]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ @%:@undef PACKAGE_STRING]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ @%:@undef PACKAGE_BUGREPORT]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ @%:@undef PACKAGE_URL]) m4trace:configure.ac:4: -1- AC_SUBST([DEFS]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([DEFS]) m4trace:configure.ac:4: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:4: -1- AC_SUBST([ECHO_C]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([ECHO_C]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:4: -1- AC_SUBST([ECHO_N]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([ECHO_N]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:4: -1- AC_SUBST([ECHO_T]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([ECHO_T]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:4: -1- AC_SUBST([LIBS]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:4: -1- AC_SUBST([build_alias]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([build_alias]) m4trace:configure.ac:4: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:4: -1- AC_SUBST([host_alias]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([host_alias]) m4trace:configure.ac:4: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:4: -1- AC_SUBST([target_alias]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([target_alias]) m4trace:configure.ac:4: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:5: -1- AC_CONFIG_AUX_DIR([config]) m4trace:configure.ac:7: -1- AC_SUBST([PACKAGE], [$PACKAGE_NAME]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([PACKAGE]) m4trace:configure.ac:7: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:7: -1- AC_SUBST([VERSION], [$PACKAGE_VERSION]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([VERSION]) m4trace:configure.ac:7: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:7: -1- AC_SUBST([FL_VERSION]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([FL_VERSION]) m4trace:configure.ac:7: -1- m4_pattern_allow([^FL_VERSION$]) m4trace:configure.ac:7: -1- AC_SUBST([FL_REVISION]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([FL_REVISION]) m4trace:configure.ac:7: -1- m4_pattern_allow([^FL_REVISION$]) m4trace:configure.ac:7: -1- AC_SUBST([FL_FIXLEVEL]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([FL_FIXLEVEL]) m4trace:configure.ac:7: -1- m4_pattern_allow([^FL_FIXLEVEL$]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([DEVEL_VERSION]) m4trace:configure.ac:7: -1- m4_pattern_allow([^DEVEL_VERSION$]) m4trace:configure.ac:7: -1- AH_OUTPUT([DEVEL_VERSION], [/* Define if you are building a development version of xforms */ @%:@undef DEVEL_VERSION]) m4trace:configure.ac:9: -1- AC_CANONICAL_TARGET m4trace:configure.ac:9: -1- AC_CANONICAL_HOST m4trace:configure.ac:9: -1- AC_CANONICAL_BUILD m4trace:configure.ac:9: -1- AC_REQUIRE_AUX_FILE([config.sub]) m4trace:configure.ac:9: -1- AC_REQUIRE_AUX_FILE([config.guess]) m4trace:configure.ac:9: -1- AC_SUBST([build], [$ac_cv_build]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([build]) m4trace:configure.ac:9: -1- m4_pattern_allow([^build$]) m4trace:configure.ac:9: -1- AC_SUBST([build_cpu], [$[1]]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([build_cpu]) m4trace:configure.ac:9: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.ac:9: -1- AC_SUBST([build_vendor], [$[2]]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([build_vendor]) m4trace:configure.ac:9: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.ac:9: -1- AC_SUBST([build_os]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([build_os]) m4trace:configure.ac:9: -1- m4_pattern_allow([^build_os$]) m4trace:configure.ac:9: -1- AC_SUBST([host], [$ac_cv_host]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([host]) m4trace:configure.ac:9: -1- m4_pattern_allow([^host$]) m4trace:configure.ac:9: -1- AC_SUBST([host_cpu], [$[1]]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([host_cpu]) m4trace:configure.ac:9: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.ac:9: -1- AC_SUBST([host_vendor], [$[2]]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([host_vendor]) m4trace:configure.ac:9: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.ac:9: -1- AC_SUBST([host_os]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([host_os]) m4trace:configure.ac:9: -1- m4_pattern_allow([^host_os$]) m4trace:configure.ac:9: -1- AC_SUBST([target], [$ac_cv_target]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([target]) m4trace:configure.ac:9: -1- m4_pattern_allow([^target$]) m4trace:configure.ac:9: -1- AC_SUBST([target_cpu], [$[1]]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([target_cpu]) m4trace:configure.ac:9: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.ac:9: -1- AC_SUBST([target_vendor], [$[2]]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([target_vendor]) m4trace:configure.ac:9: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.ac:9: -1- AC_SUBST([target_os]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([target_os]) m4trace:configure.ac:9: -1- m4_pattern_allow([^target_os$]) m4trace:configure.ac:10: -1- AC_CONFIG_HEADERS([lib/config.h]) m4trace:configure.ac:11: -1- AM_INIT_AUTOMAKE([$PACKAGE_NAME], [$PACKAGE_VERSION]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:11: -1- AM_AUTOMAKE_VERSION([1.11]) m4trace:configure.ac:11: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:11: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) m4trace:configure.ac:11: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:11: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) m4trace:configure.ac:11: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:11: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([INSTALL_DATA]) m4trace:configure.ac:11: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:11: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([am__isrc]) m4trace:configure.ac:11: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:11: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:11: -1- AC_SUBST([CYGPATH_W]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([CYGPATH_W]) m4trace:configure.ac:11: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:11: -1- AC_SUBST([PACKAGE], [$PACKAGE_NAME]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([PACKAGE]) m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:11: -1- AC_SUBST([VERSION], [$PACKAGE_VERSION]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([VERSION]) m4trace:configure.ac:11: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:11: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:11: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ @%:@undef PACKAGE]) m4trace:configure.ac:11: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) m4trace:configure.ac:11: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:11: -1- AH_OUTPUT([VERSION], [/* Version number of package */ @%:@undef VERSION]) m4trace:configure.ac:11: -1- AC_REQUIRE_AUX_FILE([missing]) m4trace:configure.ac:11: -1- AC_SUBST([ACLOCAL]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([ACLOCAL]) m4trace:configure.ac:11: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:11: -1- AC_SUBST([AUTOCONF]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([AUTOCONF]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:11: -1- AC_SUBST([AUTOMAKE]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([AUTOMAKE]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:11: -1- AC_SUBST([AUTOHEADER]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([AUTOHEADER]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:11: -1- AC_SUBST([MAKEINFO]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([MAKEINFO]) m4trace:configure.ac:11: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:11: -1- AC_SUBST([install_sh]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([install_sh]) m4trace:configure.ac:11: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:11: -1- AC_SUBST([STRIP]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([STRIP]) m4trace:configure.ac:11: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:11: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:11: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:11: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:11: -1- AC_SUBST([MKDIR_P]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([MKDIR_P]) m4trace:configure.ac:11: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:11: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([mkdir_p]) m4trace:configure.ac:11: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:11: -1- AC_SUBST([AWK]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([AWK]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:11: -1- AC_SUBST([SET_MAKE]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.ac:11: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:11: -1- AC_SUBST([am__leading_dot]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([am__leading_dot]) m4trace:configure.ac:11: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:11: -1- AC_SUBST([AMTAR]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([AMTAR]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:11: -1- AC_SUBST([am__tar]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([am__tar]) m4trace:configure.ac:11: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:11: -1- AC_SUBST([am__untar]) m4trace:configure.ac:11: -1- AC_SUBST_TRACE([am__untar]) m4trace:configure.ac:11: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:12: -1- AM_MAINTAINER_MODE m4trace:configure.ac:12: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) m4trace:configure.ac:12: -1- AC_SUBST([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:12: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) m4trace:configure.ac:12: -1- AC_SUBST([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:12: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) m4trace:configure.ac:12: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:12: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:12: -1- AC_SUBST([MAINT]) m4trace:configure.ac:12: -1- AC_SUBST_TRACE([MAINT]) m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINT$]) m4trace:configure.ac:16: -1- AC_SUBST([SO_VERSION], ["2:0:0"]) m4trace:configure.ac:16: -1- AC_SUBST_TRACE([SO_VERSION]) m4trace:configure.ac:16: -1- m4_pattern_allow([^SO_VERSION$]) m4trace:configure.ac:28: -1- AM_CONDITIONAL([USE_BWC_BS_HACK], [test x$enable_bwc_bs_hack = xyes]) m4trace:configure.ac:28: -1- AC_SUBST([USE_BWC_BS_HACK_TRUE]) m4trace:configure.ac:28: -1- AC_SUBST_TRACE([USE_BWC_BS_HACK_TRUE]) m4trace:configure.ac:28: -1- m4_pattern_allow([^USE_BWC_BS_HACK_TRUE$]) m4trace:configure.ac:28: -1- AC_SUBST([USE_BWC_BS_HACK_FALSE]) m4trace:configure.ac:28: -1- AC_SUBST_TRACE([USE_BWC_BS_HACK_FALSE]) m4trace:configure.ac:28: -1- m4_pattern_allow([^USE_BWC_BS_HACK_FALSE$]) m4trace:configure.ac:28: -1- _AM_SUBST_NOTMAKE([USE_BWC_BS_HACK_TRUE]) m4trace:configure.ac:28: -1- _AM_SUBST_NOTMAKE([USE_BWC_BS_HACK_FALSE]) m4trace:configure.ac:31: -1- AM_CONDITIONAL([BUILD_DEMOS], [test x$enable_demos = xyes]) m4trace:configure.ac:31: -1- AC_SUBST([BUILD_DEMOS_TRUE]) m4trace:configure.ac:31: -1- AC_SUBST_TRACE([BUILD_DEMOS_TRUE]) m4trace:configure.ac:31: -1- m4_pattern_allow([^BUILD_DEMOS_TRUE$]) m4trace:configure.ac:31: -1- AC_SUBST([BUILD_DEMOS_FALSE]) m4trace:configure.ac:31: -1- AC_SUBST_TRACE([BUILD_DEMOS_FALSE]) m4trace:configure.ac:31: -1- m4_pattern_allow([^BUILD_DEMOS_FALSE$]) m4trace:configure.ac:31: -1- _AM_SUBST_NOTMAKE([BUILD_DEMOS_TRUE]) m4trace:configure.ac:31: -1- _AM_SUBST_NOTMAKE([BUILD_DEMOS_FALSE]) m4trace:configure.ac:34: -1- AM_CONDITIONAL([BUILD_DOCS], [test x$enable_docs = xyes]) m4trace:configure.ac:34: -1- AC_SUBST([BUILD_DOCS_TRUE]) m4trace:configure.ac:34: -1- AC_SUBST_TRACE([BUILD_DOCS_TRUE]) m4trace:configure.ac:34: -1- m4_pattern_allow([^BUILD_DOCS_TRUE$]) m4trace:configure.ac:34: -1- AC_SUBST([BUILD_DOCS_FALSE]) m4trace:configure.ac:34: -1- AC_SUBST_TRACE([BUILD_DOCS_FALSE]) m4trace:configure.ac:34: -1- m4_pattern_allow([^BUILD_DOCS_FALSE$]) m4trace:configure.ac:34: -1- _AM_SUBST_NOTMAKE([BUILD_DOCS_TRUE]) m4trace:configure.ac:34: -1- _AM_SUBST_NOTMAKE([BUILD_DOCS_FALSE]) m4trace:configure.ac:38: -1- AC_SUBST([CC]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- AC_SUBST([CFLAGS]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:38: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:38: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:38: -1- AC_SUBST([LIBS]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:38: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:38: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:38: -1- AC_SUBST([CC]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- AC_SUBST([CC]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- AC_SUBST([CC]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- AC_SUBST([CC]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.ac:38: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:38: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([EXEEXT]) m4trace:configure.ac:38: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:38: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([OBJEXT]) m4trace:configure.ac:38: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:38: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([DEPDIR]) m4trace:configure.ac:38: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:38: -1- AC_SUBST([am__include]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([am__include]) m4trace:configure.ac:38: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:38: -1- AC_SUBST([am__quote]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([am__quote]) m4trace:configure.ac:38: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:38: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:38: -1- AC_SUBST([AMDEP_TRUE]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([AMDEP_TRUE]) m4trace:configure.ac:38: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:38: -1- AC_SUBST([AMDEP_FALSE]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([AMDEP_FALSE]) m4trace:configure.ac:38: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:38: -1- AC_SUBST([AMDEPBACKSLASH]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) m4trace:configure.ac:38: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:38: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([CCDEPMODE]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:38: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:38: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) m4trace:configure.ac:38: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:38: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) m4trace:configure.ac:38: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:38: -1- AC_DEFINE_TRACE_LITERAL([WITH_WARNINGS]) m4trace:configure.ac:38: -1- m4_pattern_allow([^WITH_WARNINGS$]) m4trace:configure.ac:38: -1- AH_OUTPUT([WITH_WARNINGS], [/* Define this if you want to see the warning directives put here and there by the developpers to get attention */ @%:@undef WITH_WARNINGS]) m4trace:configure.ac:39: -1- AC_SUBST([CPP]) m4trace:configure.ac:39: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.ac:39: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:39: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:39: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:39: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:39: -1- AC_SUBST([CPP]) m4trace:configure.ac:39: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.ac:39: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:41: -1- AC_SUBST([SET_MAKE]) m4trace:configure.ac:41: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.ac:41: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:42: -1- AC_SUBST([RANLIB]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([RANLIB]) m4trace:configure.ac:42: -1- m4_pattern_allow([^RANLIB$]) m4trace:configure.ac:45: -1- _m4_warn([obsolete], [The macro `AC_ISC_POSIX' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:464: AC_ISC_POSIX is expanded from... configure.ac:45: the top level]) m4trace:configure.ac:46: -1- _m4_warn([obsolete], [The macro `AC_AIX' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:454: AC_AIX is expanded from... configure.ac:46: the top level]) m4trace:configure.ac:46: -1- AC_SUBST([GREP]) m4trace:configure.ac:46: -1- AC_SUBST_TRACE([GREP]) m4trace:configure.ac:46: -1- m4_pattern_allow([^GREP$]) m4trace:configure.ac:46: -1- AC_SUBST([EGREP]) m4trace:configure.ac:46: -1- AC_SUBST_TRACE([EGREP]) m4trace:configure.ac:46: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:46: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:46: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TYPES_H]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_STAT_H]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_MEMORY_H]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRINGS_H]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INTTYPES_H]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDINT_H]) m4trace:configure.ac:46: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_SOURCE]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_POSIX_SOURCE$]) m4trace:configure.ac:46: -1- AH_OUTPUT([_POSIX_SOURCE], [/* Define to 1 if you need to in order for `stat\' and other things to work. */ @%:@undef _POSIX_SOURCE]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_1_SOURCE]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_POSIX_1_SOURCE$]) m4trace:configure.ac:46: -1- AH_OUTPUT([_POSIX_1_SOURCE], [/* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ @%:@undef _POSIX_1_SOURCE]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([_MINIX]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_MINIX$]) m4trace:configure.ac:46: -1- AH_OUTPUT([_MINIX], [/* Define to 1 if on MINIX. */ @%:@undef _MINIX]) m4trace:configure.ac:46: -1- AH_OUTPUT([USE_SYSTEM_EXTENSIONS], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([__EXTENSIONS__]) m4trace:configure.ac:46: -1- m4_pattern_allow([^__EXTENSIONS__$]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([_ALL_SOURCE]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_ALL_SOURCE$]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([_GNU_SOURCE]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_GNU_SOURCE$]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_PTHREAD_SEMANTICS]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$]) m4trace:configure.ac:46: -1- AC_DEFINE_TRACE_LITERAL([_TANDEM_SOURCE]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_TANDEM_SOURCE$]) m4trace:configure.ac:59: -1- AC_PROG_LIBTOOL m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1474: AC_ARG_ENABLE is expanded from... acinclude.m4:2302: AC_ENABLE_SHARED is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1474: AC_ARG_ENABLE is expanded from... acinclude.m4:2341: AC_ENABLE_STATIC is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1474: AC_ARG_ENABLE is expanded from... acinclude.m4:2380: AC_ENABLE_FAST_INSTALL is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1493: AC_ARG_WITH is expanded from... acinclude.m4:2521: AC_PROG_LD is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_SUBST([SED]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([SED]) m4trace:configure.ac:59: -1- m4_pattern_allow([^SED$]) m4trace:configure.ac:59: -1- AC_SUBST([LN_S], [$as_ln_s]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([LN_S]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LN_S$]) m4trace:configure.ac:59: -1- AC_SUBST([ECHO]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([ECHO]) m4trace:configure.ac:59: -1- m4_pattern_allow([^ECHO$]) m4trace:configure.ac:59: -1- AC_SUBST([AR]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([AR]) m4trace:configure.ac:59: -1- m4_pattern_allow([^AR$]) m4trace:configure.ac:59: -1- AC_SUBST([RANLIB]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([RANLIB]) m4trace:configure.ac:59: -1- m4_pattern_allow([^RANLIB$]) m4trace:configure.ac:59: -1- AC_SUBST([STRIP]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([STRIP]) m4trace:configure.ac:59: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:59: -1- AC_SUBST([DSYMUTIL]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([DSYMUTIL]) m4trace:configure.ac:59: -1- m4_pattern_allow([^DSYMUTIL$]) m4trace:configure.ac:59: -1- AC_SUBST([NMEDIT]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([NMEDIT]) m4trace:configure.ac:59: -1- m4_pattern_allow([^NMEDIT$]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1474: AC_ARG_ENABLE is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1493: AC_ARG_WITH is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2674: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:620: AS_IF is expanded from... ../../lib/autoconf/general.m4:2018: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2039: AC_CACHE_CHECK is expanded from... acinclude.m4:822: _LT_AC_LOCK is expanded from... acinclude.m4:1442: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from... acinclude.m4:3054: _LT_AC_LANG_C_CONFIG is expanded from... acinclude.m4:3053: AC_LIBTOOL_LANG_C_CONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_SUBST([DLLTOOL]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([DLLTOOL]) m4trace:configure.ac:59: -1- m4_pattern_allow([^DLLTOOL$]) m4trace:configure.ac:59: -1- AC_SUBST([AS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([AS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^AS$]) m4trace:configure.ac:59: -1- AC_SUBST([OBJDUMP]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([OBJDUMP]) m4trace:configure.ac:59: -1- m4_pattern_allow([^OBJDUMP$]) m4trace:configure.ac:59: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_DLFCN_H]) m4trace:configure.ac:59: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H]) m4trace:configure.ac:59: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) m4trace:configure.ac:59: -1- _LT_AC_TAGCONFIG m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1493: AC_ARG_WITH is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: tag name \"$tagname\" already exists], [acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_SUBST([CXX]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([CXX]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXX$]) m4trace:configure.ac:59: -1- AC_SUBST([CXXFLAGS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([CXXFLAGS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXXFLAGS$]) m4trace:configure.ac:59: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:59: -1- AC_SUBST([LIBS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:59: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:59: -1- AC_SUBST([CXX]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([CXX]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXX$]) m4trace:configure.ac:59: -1- AC_SUBST([ac_ct_CXX]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([ac_ct_CXX]) m4trace:configure.ac:59: -1- m4_pattern_allow([^ac_ct_CXX$]) m4trace:configure.ac:59: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([CXXDEPMODE]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXXDEPMODE$]) m4trace:configure.ac:59: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:59: -1- AC_SUBST([am__fastdepCXX_TRUE]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) m4trace:configure.ac:59: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) m4trace:configure.ac:59: -1- AC_SUBST([am__fastdepCXX_FALSE]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) m4trace:configure.ac:59: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) m4trace:configure.ac:59: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) m4trace:configure.ac:59: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) m4trace:configure.ac:59: -1- AC_SUBST([CXXCPP]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([CXXCPP]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXXCPP$]) m4trace:configure.ac:59: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:59: -1- AC_SUBST([CXXCPP]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([CXXCPP]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXXCPP$]) m4trace:configure.ac:59: -1- AC_SUBST([F77]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([F77]) m4trace:configure.ac:59: -1- m4_pattern_allow([^F77$]) m4trace:configure.ac:59: -1- AC_SUBST([FFLAGS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([FFLAGS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^FFLAGS$]) m4trace:configure.ac:59: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:59: -1- AC_SUBST([LIBS]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:59: -1- AC_SUBST([F77]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([F77]) m4trace:configure.ac:59: -1- m4_pattern_allow([^F77$]) m4trace:configure.ac:59: -1- AC_SUBST([ac_ct_F77]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([ac_ct_F77]) m4trace:configure.ac:59: -1- m4_pattern_allow([^ac_ct_F77$]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [../../lib/autoconf/lang.m4:148: AC_LANG_SAVE is expanded from... acinclude.m4:4448: _LT_AC_LANG_GCJ_CONFIG is expanded from... acinclude.m4:4447: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [../../lib/autoconf/lang.m4:157: AC_LANG_RESTORE is expanded from... acinclude.m4:4448: _LT_AC_LANG_GCJ_CONFIG is expanded from... acinclude.m4:4447: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [../../lib/autoconf/lang.m4:148: AC_LANG_SAVE is expanded from... acinclude.m4:4508: _LT_AC_LANG_RC_CONFIG is expanded from... acinclude.m4:4507: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [../../lib/autoconf/lang.m4:157: AC_LANG_RESTORE is expanded from... acinclude.m4:4508: _LT_AC_LANG_RC_CONFIG is expanded from... acinclude.m4:4507: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_SUBST([LIBTOOL]) m4trace:configure.ac:59: -1- AC_SUBST_TRACE([LIBTOOL]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LIBTOOL$]) m4trace:configure.ac:63: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: \"$dir\" is not a directory], [acinclude.m4:222: XFORMS_LOOP_DIR is expanded from... configure.ac:63: the top level]) m4trace:configure.ac:68: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: \"$dir\" is not a directory], [acinclude.m4:222: XFORMS_LOOP_DIR is expanded from... configure.ac:68: the top level]) m4trace:configure.ac:73: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: \"$dir\" is not a directory], [acinclude.m4:222: XFORMS_LOOP_DIR is expanded from... configure.ac:73: the top level]) m4trace:configure.ac:78: -1- AC_DEFINE_TRACE_LITERAL([const]) m4trace:configure.ac:78: -1- m4_pattern_allow([^const$]) m4trace:configure.ac:78: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ @%:@undef const]) m4trace:configure.ac:79: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.ac:79: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:79: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ @%:@undef pid_t]) m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([size_t]) m4trace:configure.ac:80: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:80: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ @%:@undef size_t]) m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the `m\' library (-lm). */ @%:@undef HAVE_LIBM]) m4trace:configure.ac:85: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM]) m4trace:configure.ac:85: -1- m4_pattern_allow([^HAVE_LIBM$]) m4trace:configure.ac:86: -1- AH_OUTPUT([HAVE_LIBC], [/* Define to 1 if you have the `c\' library (-lc). */ @%:@undef HAVE_LIBC]) m4trace:configure.ac:86: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBC]) m4trace:configure.ac:86: -1- m4_pattern_allow([^HAVE_LIBC$]) m4trace:configure.ac:89: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SELECT_H]) m4trace:configure.ac:89: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_SELECT_H]) m4trace:configure.ac:89: -1- m4_pattern_allow([^HAVE_SYS_SELECT_H$]) m4trace:configure.ac:97: -1- AM_CONDITIONAL([BUILD_GL], [test x$enable_gl != xno]) m4trace:configure.ac:97: -1- AC_SUBST([BUILD_GL_TRUE]) m4trace:configure.ac:97: -1- AC_SUBST_TRACE([BUILD_GL_TRUE]) m4trace:configure.ac:97: -1- m4_pattern_allow([^BUILD_GL_TRUE$]) m4trace:configure.ac:97: -1- AC_SUBST([BUILD_GL_FALSE]) m4trace:configure.ac:97: -1- AC_SUBST_TRACE([BUILD_GL_FALSE]) m4trace:configure.ac:97: -1- m4_pattern_allow([^BUILD_GL_FALSE$]) m4trace:configure.ac:97: -1- _AM_SUBST_NOTMAKE([BUILD_GL_TRUE]) m4trace:configure.ac:97: -1- _AM_SUBST_NOTMAKE([BUILD_GL_FALSE]) m4trace:configure.ac:104: -1- AC_SUBST([XMKMF]) m4trace:configure.ac:104: -1- AC_SUBST_TRACE([XMKMF]) m4trace:configure.ac:104: -1- m4_pattern_allow([^XMKMF$]) m4trace:configure.ac:104: -1- AC_DEFINE_TRACE_LITERAL([X_DISPLAY_MISSING]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_DISPLAY_MISSING$]) m4trace:configure.ac:104: -1- AH_OUTPUT([X_DISPLAY_MISSING], [/* Define to 1 if the X Window System is missing or not being used. */ @%:@undef X_DISPLAY_MISSING]) m4trace:configure.ac:104: -1- AC_SUBST([X_CFLAGS]) m4trace:configure.ac:104: -1- AC_SUBST_TRACE([X_CFLAGS]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_CFLAGS$]) m4trace:configure.ac:104: -1- AC_SUBST([X_PRE_LIBS]) m4trace:configure.ac:104: -1- AC_SUBST_TRACE([X_PRE_LIBS]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_PRE_LIBS$]) m4trace:configure.ac:104: -1- AC_SUBST([X_LIBS]) m4trace:configure.ac:104: -1- AC_SUBST_TRACE([X_LIBS]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_LIBS$]) m4trace:configure.ac:104: -1- AC_SUBST([X_EXTRA_LIBS]) m4trace:configure.ac:104: -1- AC_SUBST_TRACE([X_EXTRA_LIBS]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_EXTRA_LIBS$]) m4trace:configure.ac:105: -1- AC_SUBST([XPM_LIB]) m4trace:configure.ac:105: -1- AC_SUBST_TRACE([XPM_LIB]) m4trace:configure.ac:105: -1- m4_pattern_allow([^XPM_LIB$]) m4trace:configure.ac:105: -1- AC_DEFINE_TRACE_LITERAL([XPM_H_LOCATION]) m4trace:configure.ac:105: -1- m4_pattern_allow([^XPM_H_LOCATION$]) m4trace:configure.ac:105: -1- AH_OUTPUT([XPM_H_LOCATION], [/* define this to the location of xpm.h to be used with #include, e.g. */ @%:@undef XPM_H_LOCATION]) m4trace:configure.ac:106: -1- AC_SUBST([JPEG_LIB]) m4trace:configure.ac:106: -1- AC_SUBST_TRACE([JPEG_LIB]) m4trace:configure.ac:106: -1- m4_pattern_allow([^JPEG_LIB$]) m4trace:configure.ac:109: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:754: AC_TYPE_SIGNAL is expanded from... configure.ac:109: the top level]) m4trace:configure.ac:109: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) m4trace:configure.ac:109: -1- m4_pattern_allow([^RETSIGTYPE$]) m4trace:configure.ac:109: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ @%:@undef RETSIGTYPE]) m4trace:configure.ac:111: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE_IS_VOID]) m4trace:configure.ac:111: -1- m4_pattern_allow([^RETSIGTYPE_IS_VOID$]) m4trace:configure.ac:111: -1- AH_OUTPUT([RETSIGTYPE_IS_VOID], [/* Define if the return type of signal handlers is void */ @%:@undef RETSIGTYPE_IS_VOID]) m4trace:configure.ac:113: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the `snprintf\' function. */ @%:@undef HAVE_SNPRINTF]) m4trace:configure.ac:113: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */ @%:@undef HAVE_STRCASECMP]) m4trace:configure.ac:113: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ @%:@undef HAVE_STRERROR]) m4trace:configure.ac:113: -1- AH_OUTPUT([HAVE_USLEEP], [/* Define to 1 if you have the `usleep\' function. */ @%:@undef HAVE_USLEEP]) m4trace:configure.ac:113: -1- AH_OUTPUT([HAVE_NANOSLEEP], [/* Define to 1 if you have the `nanosleep\' function. */ @%:@undef HAVE_NANOSLEEP]) m4trace:configure.ac:113: -1- AH_OUTPUT([HAVE_VSNPRINTF], [/* Define to 1 if you have the `vsnprintf\' function. */ @%:@undef HAVE_VSNPRINTF]) m4trace:configure.ac:113: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the `sigaction\' function. */ @%:@undef HAVE_SIGACTION]) m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_DECL_SNPRINTF], [/* Define if you have the prototype for function `snprintf\' */ @%:@undef HAVE_DECL_SNPRINTF]) m4trace:configure.ac:114: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SNPRINTF]) m4trace:configure.ac:114: -1- m4_pattern_allow([^HAVE_DECL_SNPRINTF$]) m4trace:configure.ac:115: -1- AH_OUTPUT([HAVE_DECL_VSNPRINTF], [/* Define if you have the prototype for function `vsnprintf\' */ @%:@undef HAVE_DECL_VSNPRINTF]) m4trace:configure.ac:115: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_VSNPRINTF]) m4trace:configure.ac:115: -1- m4_pattern_allow([^HAVE_DECL_VSNPRINTF$]) m4trace:configure.ac:116: -1- AH_OUTPUT([HAVE_DECL_SIGACTION], [/* Define if you have the prototype for function `sigaction\' */ @%:@undef HAVE_DECL_SIGACTION]) m4trace:configure.ac:116: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SIGACTION]) m4trace:configure.ac:116: -1- m4_pattern_allow([^HAVE_DECL_SIGACTION$]) m4trace:configure.ac:130: -1- AC_SUBST([X_LIBS]) m4trace:configure.ac:130: -1- AC_SUBST_TRACE([X_LIBS]) m4trace:configure.ac:130: -1- m4_pattern_allow([^X_LIBS$]) m4trace:configure.ac:131: -1- AC_SUBST([X_PRE_LIBS]) m4trace:configure.ac:131: -1- AC_SUBST_TRACE([X_PRE_LIBS]) m4trace:configure.ac:131: -1- m4_pattern_allow([^X_PRE_LIBS$]) m4trace:configure.ac:135: -1- AH_OUTPUT([00001], [ /* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* \\file config.h * * This is the compilation configuration file for xforms. * It was generated by autoconfs configure. * You might want to change some of the defaults if something goes wrong * during the compilation. */ #ifndef CONFIG_H #define CONFIG_H ]) m4trace:configure.ac:168: -1- AH_OUTPUT([zzzz2], [ #endif /* NOT CONFIG_H */ ]) m4trace:configure.ac:174: -1- AC_CONFIG_FILES([Makefile \ xforms.spec \ lib/include/AAA.h \ config/Makefile \ lib/Makefile \ lib/bitmaps/Makefile \ lib/fd/Makefile \ lib/include/Makefile \ lib/private/Makefile \ image/Makefile gl/Makefile \ fdesign/Makefile \ fdesign/fd/Makefile \ fdesign/fd4test/Makefile \ fdesign/notes/Makefile \ fdesign/spec/Makefile \ fdesign/xpm/Makefile \ fd2ps/Makefile \ fd2ps/test/Makefile \ demos/Makefile \ demos/fd/Makefile \ doc/Makefile ]) m4trace:configure.ac:198: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:198: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:198: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([LTLIBOBJS]) m4trace:configure.ac:198: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:198: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:198: -1- AC_SUBST([am__EXEEXT_TRUE]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) m4trace:configure.ac:198: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:198: -1- AC_SUBST([am__EXEEXT_FALSE]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) m4trace:configure.ac:198: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:198: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:198: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([top_builddir]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([top_build_prefix]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([srcdir]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([abs_srcdir]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([top_srcdir]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([abs_top_srcdir]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([builddir]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([abs_builddir]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([abs_top_builddir]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([INSTALL]) m4trace:configure.ac:198: -1- AC_SUBST_TRACE([MKDIR_P]) xforms-1.0.93sp1/autom4te.cache/requests0000644000175000017500000002614411377311603016641 0ustar jensjens# This file was generated by Autom4te Wed Jul 29 06:45:47 UTC 2009. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', '/usr/share/aclocal-1.11/amversion.m4', '/usr/share/aclocal-1.11/auxdir.m4', '/usr/share/aclocal-1.11/cond.m4', '/usr/share/aclocal-1.11/depend.m4', '/usr/share/aclocal-1.11/depout.m4', '/usr/share/aclocal-1.11/init.m4', '/usr/share/aclocal-1.11/install-sh.m4', '/usr/share/aclocal-1.11/lead-dot.m4', '/usr/share/aclocal-1.11/maintainer.m4', '/usr/share/aclocal-1.11/make.m4', '/usr/share/aclocal-1.11/missing.m4', '/usr/share/aclocal-1.11/mkdirp.m4', '/usr/share/aclocal-1.11/options.m4', '/usr/share/aclocal-1.11/runlog.m4', '/usr/share/aclocal-1.11/sanity.m4', '/usr/share/aclocal-1.11/silent.m4', '/usr/share/aclocal-1.11/strip.m4', '/usr/share/aclocal-1.11/substnot.m4', '/usr/share/aclocal-1.11/tar.m4', 'acinclude.m4', 'configure.ac' ], { 'XFORMS_PATH_XPM' => 1, 'AM_ENABLE_STATIC' => 1, 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, '_LT_AC_SHELL_INIT' => 1, 'AC_DEFUN' => 1, 'AC_PROG_LIBTOOL' => 1, '_LT_AC_LANG_CXX_CONFIG' => 1, 'AM_PROG_MKDIR_P' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AM_SUBST_NOTMAKE' => 1, 'AM_MISSING_PROG' => 1, 'XFORMS_PROG_CC' => 1, 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, '_LT_AC_LANG_C_CONFIG' => 1, 'AM_PROG_INSTALL_STRIP' => 1, '_m4_warn' => 1, 'XFORMS_LOOP_DIR' => 1, 'AC_LIBTOOL_OBJDIR' => 1, 'AM_SANITY_CHECK' => 1, 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, '_LT_AC_CHECK_DLFCN' => 1, '_AM_PROG_TAR' => 1, 'AC_LIBTOOL_GCJ' => 1, '_LT_AC_LANG_F77' => 1, 'AC_LIBTOOL_CONFIG' => 1, 'XFORMS_CHECK_LIB_JPEG' => 1, '_AM_SUBST_NOTMAKE' => 1, '_AM_AUTOCONF_VERSION' => 1, 'AM_DISABLE_SHARED' => 1, 'AM_PROG_LIBTOOL' => 1, '_LT_AC_LANG_CXX' => 1, '_LT_AC_FILE_LTDLL_C' => 1, 'AM_PROG_LD' => 1, 'AU_DEFUN' => 1, 'AC_PROG_NM' => 1, 'AC_LIBTOOL_DLOPEN' => 1, 'AC_PROG_LD' => 1, 'AC_ENABLE_FAST_INSTALL' => 1, 'AC_PROG_LD_GNU' => 1, '_AM_SET_OPTION' => 1, '_LT_LINKER_BOILERPLATE' => 1, 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, 'AC_LIBTOOL_PROG_CC_C_O' => 1, 'XFORMS_CHECK_ERRORS' => 1, 'XFORMS_CHECK_VERSION' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AC_DEFUN_ONCE' => 1, '_LT_AC_LANG_GCJ' => 1, 'AC_LIBTOOL_RC' => 1, 'AC_DISABLE_FAST_INSTALL' => 1, '_LT_AC_PROG_ECHO_BACKSLASH' => 1, 'AM_SILENT_RULES' => 1, 'include' => 1, '_LT_AC_TRY_DLOPEN_SELF' => 1, '_LT_AC_SYS_LIBPATH_AIX' => 1, 'LT_AC_PROG_SED' => 1, 'AM_ENABLE_SHARED' => 1, '_LT_AC_LANG_GCJ_CONFIG' => 1, 'AC_ENABLE_SHARED' => 1, 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, '_LT_REQUIRED_DARWIN_CHECKS' => 1, 'AC_ENABLE_STATIC' => 1, '_LT_AC_TAGVAR' => 1, 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, 'AM_CONDITIONAL' => 1, 'AM_PROG_INSTALL_SH' => 1, 'm4_include' => 1, 'AC_PROG_EGREP' => 1, 'AC_PATH_MAGIC' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'AM_MAKE_INCLUDE' => 1, '_LT_AC_TAGCONFIG' => 1, 'm4_pattern_forbid' => 1, 'AC_LIBTOOL_COMPILER_OPTION' => 1, 'AC_DISABLE_SHARED' => 1, '_LT_COMPILER_BOILERPLATE' => 1, 'AC_LIBTOOL_WIN32_DLL' => 1, 'AC_LIBTOOL_SETUP' => 1, 'XFORMS_LIB_ERROR' => 1, 'AC_PROG_LD_RELOAD_FLAG' => 1, 'AM_MISSING_HAS_RUN' => 1, 'AC_LIBTOOL_DLOPEN_SELF' => 1, 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, 'AC_LIBTOOL_LINKER_OPTION' => 1, 'XFORMS_ADD_INC_DIR' => 1, 'LT_AC_PROG_RC' => 1, 'AC_LIBTOOL_CXX' => 1, 'LT_AC_PROG_GCJ' => 1, 'AM_DEP_TRACK' => 1, 'AM_DISABLE_STATIC' => 1, '_LT_AC_PROG_CXXCPP' => 1, 'XFORMS_ERROR' => 1, '_AC_PROG_LIBTOOL' => 1, '_AM_IF_OPTION' => 1, 'AC_PATH_TOOL_PREFIX' => 1, 'm4_pattern_allow' => 1, 'AC_LIBTOOL_F77' => 1, 'AM_SET_LEADING_DOT' => 1, '_AM_DEPENDENCIES' => 1, 'AC_LIBTOOL_LANG_C_CONFIG' => 1, 'XFORMS_WITH_DIR' => 1, '_LT_AC_SYS_COMPILER' => 1, 'AM_PROG_NM' => 1, 'CHECK_WITH_CYGWIN' => 1, 'AC_LIBLTDL_CONVENIENCE' => 1, 'AC_DEPLIBS_CHECK_METHOD' => 1, 'jm_MAINTAINER_MODE' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, 'AC_LIBLTDL_INSTALLABLE' => 1, 'XFORMS_ADD_LIB_DIR' => 1, 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, 'AM_INIT_AUTOMAKE' => 1, 'XFORMS_CHECK_DECL' => 1, 'AC_DISABLE_STATIC' => 1, 'AM_MAINTAINER_MODE' => 1, '_LT_AC_LOCK' => 1, '_LT_AC_LANG_RC_CONFIG' => 1, 'XFORMS_WARNING' => 1, 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, 'AM_AUX_DIR_EXPAND' => 1, '_LT_AC_LANG_F77_CONFIG' => 1, 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, '_AM_SET_OPTIONS' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AM_RUN_LOG' => 1, 'AC_LIBTOOL_PICMODE' => 1, 'AC_CHECK_LIBM' => 1, 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, '_AM_MANGLE_OPTION' => 1, 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, 'AM_SET_DEPDIR' => 1, '_LT_CC_BASENAME' => 1 } ], 'Autom4te::Request' ), bless( [ '1', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.ac' ], { '_LT_AC_TAGCONFIG' => 1, 'AM_PROG_F77_C_O' => 1, 'AC_INIT' => 1, 'm4_pattern_forbid' => 1, '_AM_COND_IF' => 1, 'AC_CANONICAL_TARGET' => 1, 'AC_SUBST' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_FC_SRCEXT' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_PROG_LIBTOOL' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'LT_CONFIG_LTDL_DIR' => 1, 'AC_REQUIRE_AUX_FILE' => 1, 'AC_CONFIG_LINKS' => 1, 'm4_sinclude' => 1, 'LT_SUPPORTED_TAG' => 1, 'AM_MAINTAINER_MODE' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, '_m4_warn' => 1, 'AM_PROG_CXX_C_O' => 1, '_AM_COND_ENDIF' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AM_SILENT_RULES' => 1, 'AC_CONFIG_FILES' => 1, 'include' => 1, 'LT_INIT' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_LIBSOURCE' => 1, 'AM_PROG_FC_C_O' => 1, 'AC_CANONICAL_BUILD' => 1, 'AC_FC_FREEFORM' => 1, 'AH_OUTPUT' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'sinclude' => 1, 'AM_PROG_CC_C_O' => 1, 'm4_pattern_allow' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_CONDITIONAL' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'm4_include' => 1, '_AM_COND_ELSE' => 1, 'AC_SUBST_TRACE' => 1 } ], 'Autom4te::Request' ) ); xforms-1.0.93sp1/autom4te.cache/traces.00000644000175000017500000157032611377311600016411 0ustar jensjensm4trace:/usr/share/aclocal-1.11/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) m4trace:/usr/share/aclocal-1.11/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) m4trace:/usr/share/aclocal-1.11/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) m4trace:/usr/share/aclocal-1.11/cond.m4:15: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) m4trace:/usr/share/aclocal-1.11/depend.m4:28: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) m4trace:/usr/share/aclocal-1.11/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) m4trace:/usr/share/aclocal-1.11/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) m4trace:/usr/share/aclocal-1.11/depout.m4:14: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ]) m4trace:/usr/share/aclocal-1.11/depout.m4:75: -1- 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"]) ]) m4trace:/usr/share/aclocal-1.11/init.m4:26: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) m4trace:/usr/share/aclocal-1.11/init.m4:126: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) m4trace:/usr/share/aclocal-1.11/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) m4trace:/usr/share/aclocal-1.11/lead-dot.m4:12: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) m4trace:/usr/share/aclocal-1.11/maintainer.m4:19: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ]) m4trace:/usr/share/aclocal-1.11/maintainer.m4:39: -1- AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) m4trace:/usr/share/aclocal-1.11/maintainer.m4:39: -1- AC_DEFUN([jm_MAINTAINER_MODE], [AC_DIAGNOSE([obsolete], [The macro `jm_MAINTAINER_MODE' is obsolete. You should run autoupdate.])dnl AM_MAINTAINER_MODE]) m4trace:/usr/share/aclocal-1.11/make.m4:14: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) m4trace:/usr/share/aclocal-1.11/missing.m4:14: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) m4trace:/usr/share/aclocal-1.11/missing.m4:24: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) m4trace:/usr/share/aclocal-1.11/mkdirp.m4:11: -1- AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) m4trace:/usr/share/aclocal-1.11/options.m4:13: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) m4trace:/usr/share/aclocal-1.11/options.m4:19: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) m4trace:/usr/share/aclocal-1.11/options.m4:25: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) m4trace:/usr/share/aclocal-1.11/options.m4:31: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) m4trace:/usr/share/aclocal-1.11/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) m4trace:/usr/share/aclocal-1.11/sanity.m4:14: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( 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)]) m4trace:/usr/share/aclocal-1.11/silent.m4:14: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) m4trace:/usr/share/aclocal-1.11/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4trace:/usr/share/aclocal-1.11/substnot.m4:14: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) m4trace:/usr/share/aclocal-1.11/substnot.m4:19: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) m4trace:/usr/share/aclocal-1.11/tar.m4:24: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) m4trace:acinclude.m4:10: -1- AC_DEFUN([XFORMS_CHECK_VERSION], [ AC_SUBST(PACKAGE, $PACKAGE_NAME) AC_SUBST(VERSION, $PACKAGE_VERSION) [eval] `echo $PACKAGE_VERSION | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/FL_VERSION=\1; FL_REVISION=\2; FL_FIXLEVEL=\3/'` AC_SUBST(FL_VERSION) AC_SUBST(FL_REVISION) AC_SUBST(FL_FIXLEVEL) echo "configuring xforms version $VERSION" xforms_devel_version=no case $VERSION in dnl ( *.[[5-9]][[0-9]]) xforms_devel_version=yes AC_DEFINE(DEVEL_VERSION, 1, Define if you are building a development version of xforms) echo "WARNING: This is a development version. Expect bugs." ;; esac]) m4trace:acinclude.m4:27: -1- AC_DEFUN([XFORMS_CHECK_LIB_JPEG], [ ### Check for Jpeg library AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, JPEG_LIB="-ljpeg", [XFORMS_LIB_ERROR(libjpeg,jpeg)]) AC_SUBST(JPEG_LIB) ]) m4trace:acinclude.m4:35: -1- AC_DEFUN([XFORMS_PATH_XPM], [ ### Check for Xpm library SAVE_LIBS="$LIBS" LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage, XPM_LIB="-lXpm", [XFORMS_LIB_ERROR(libXpm,Xpm)]) AC_SUBST(XPM_LIB) LIBS="$SAVE_LIBS" ### Check for Xpm headers SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" xforms_cv_xpm_h_location="" AC_CHECK_HEADER(X11/xpm.h,[ ac_cv_header_xpm_h=yes xforms_cv_xpm_h_location=""],[ AC_CHECK_HEADER(xpm.h,[],[ XFORMS_LIB_ERROR(xpm.h,Xpm)])]) AC_DEFINE_UNQUOTED(XPM_H_LOCATION,$xforms_cv_xpm_h_location, [define this to the location of xpm.h to be used with #include, e.g. ]) CPPFLAGS="$SAVE_CPPFLAGS" ### Test for the header version if test $ac_cv_header_xpm_h = yes; then AC_CACHE_CHECK([xpm header version],xforms_cv_xpmversion, [ cat > conftest.$ac_ext <&5 | \ grep '^"%%%"' 2>/dev/null | \ sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'` case "$xforms_cv_xpmr" in changequote(,) [0-9]) xformsxpmr_alpha=`echo $xforms_cv_xpmr |tr 123456789 abcdefghi` xformsxpmv_alpha=" (aka 3.$xforms_cv_xpmv$xformsxpmr_alpha)";; changequote([,]) *) ;; esac xforms_cv_xpmversion="$xforms_cv_xpmv.$xforms_cv_xpmr$xformsxpmv_alpha" rm -f conftest*]) XPM_VERSION=${xforms_cv_xpmversion} case "$xforms_cv_xpmr" in changequote(,) [789]|[0-9][0-9]*) ;; changequote([,]) *) XFORMS_WARNING([Version $xforms_cv_xpmversion of the Xpm library is a bit old. If you experience strange crashes with xforms, try to upgrade to at least version 4.7 (aka 3.4g). If you have installed a newer version of the library, check whether you have an old xpm.h header file in your include path.]);; esac fi]) m4trace:acinclude.m4:95: -1- AC_DEFUN([XFORMS_ERROR], [ xforms_error_txt="$xforms_error_txt ** $1 " xforms_error=yes]) m4trace:acinclude.m4:104: -1- AC_DEFUN([XFORMS_WARNING], [ xforms_warning_txt="$xforms_warning_txt == $1 " xforms_warning=yes]) m4trace:acinclude.m4:113: -1- AC_DEFUN([XFORMS_LIB_ERROR], [ XFORMS_ERROR([Cannot find $1. Please check that the $2 library is correctly installed on your system.])]) m4trace:acinclude.m4:120: -1- AC_DEFUN([XFORMS_CHECK_ERRORS], [ if test x$xforms_error = xyes; then cat </dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then $1="${$1} -Wl[,]-R$2" else $1="${$1} -R$2" fi fi]) m4trace:acinclude.m4:250: -1- AC_DEFUN([XFORMS_ADD_INC_DIR], [$1="${$1} -I$2 "]) m4trace:acinclude.m4:261: -1- AC_DEFUN([XFORMS_CHECK_DECL], [XFORMS_AH_CHECK_DECL($1) for ac_header in $2 do AC_MSG_CHECKING([if $1 is declared by header $ac_header]) AC_EGREP_HEADER($1, $ac_header, [AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_DECL_$1)) break], [AC_MSG_RESULT(no)]) done]) m4trace:acinclude.m4:296: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote AM_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or AM_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])]) m4trace:acinclude.m4:331: -1- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ]) m4trace:acinclude.m4:351: -1- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ]) m4trace:acinclude.m4:497: -1- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ]) m4trace:acinclude.m4:514: -1- AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) m4trace:acinclude.m4:531: -1- AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ]) m4trace:acinclude.m4:545: -1- AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ]) m4trace:acinclude.m4:557: -1- AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS], [ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) m4trace:acinclude.m4:634: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ]) m4trace:acinclude.m4:655: -1- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ]) m4trace:acinclude.m4:668: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])]) m4trace:acinclude.m4:822: -1- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ]) m4trace:acinclude.m4:979: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ]) m4trace:acinclude.m4:1024: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ]) m4trace:acinclude.m4:1060: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ]) m4trace:acinclude.m4:1178: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ]) m4trace:acinclude.m4:1186: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ]) m4trace:acinclude.m4:1276: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ]) m4trace:acinclude.m4:1390: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ]) m4trace:acinclude.m4:1442: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ]) m4trace:acinclude.m4:1468: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ]) m4trace:acinclude.m4:1486: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ]) m4trace:acinclude.m4:1526: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ]) m4trace:acinclude.m4:1557: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ]) m4trace:acinclude.m4:2179: -1- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ]) m4trace:acinclude.m4:2285: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ]) m4trace:acinclude.m4:2293: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ]) m4trace:acinclude.m4:2302: -1- AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ]) m4trace:acinclude.m4:2331: -1- AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ]) m4trace:acinclude.m4:2341: -1- AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ]) m4trace:acinclude.m4:2370: -1- AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ]) m4trace:acinclude.m4:2380: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ]) m4trace:acinclude.m4:2409: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ]) m4trace:acinclude.m4:2419: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ]) m4trace:acinclude.m4:2443: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ]) m4trace:acinclude.m4:2506: -1- AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ]) m4trace:acinclude.m4:2521: -1- AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--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([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])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 $CC]) 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. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname 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(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ]) m4trace:acinclude.m4:2843: -1- AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ]) m4trace:acinclude.m4:2895: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ]) m4trace:acinclude.m4:2924: -1- AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ]) m4trace:acinclude.m4:2950: -1- AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ]) m4trace:acinclude.m4:2977: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ]) m4trace:acinclude.m4:2984: -1- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ]) m4trace:acinclude.m4:2992: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ]) m4trace:acinclude.m4:3005: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ]) m4trace:acinclude.m4:3012: -1- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ]) m4trace:acinclude.m4:3021: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ]) m4trace:acinclude.m4:3028: -1- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ]) m4trace:acinclude.m4:3042: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ]) m4trace:acinclude.m4:3053: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) m4trace:acinclude.m4:3054: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ]) m4trace:acinclude.m4:3134: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) m4trace:acinclude.m4:3135: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" 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]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ]) m4trace:acinclude.m4:4141: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ]) m4trace:acinclude.m4:4338: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) m4trace:acinclude.m4:4339: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ]) m4trace:acinclude.m4:4447: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) m4trace:acinclude.m4:4448: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ]) m4trace:acinclude.m4:4507: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) m4trace:acinclude.m4:4508: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ]) m4trace:acinclude.m4:4552: -1- AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ]) m4trace:acinclude.m4:5048: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ]) m4trace:acinclude.m4:5066: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) m4trace:acinclude.m4:5269: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) m4trace:acinclude.m4:5831: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=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't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi 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]].*|aix[[5-9]]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; 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. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ]) m4trace:acinclude.m4:6776: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ]) m4trace:acinclude.m4:6815: -1- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) m4trace:acinclude.m4:6819: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) m4trace:acinclude.m4:6820: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) m4trace:acinclude.m4:6821: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) m4trace:acinclude.m4:6822: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) m4trace:acinclude.m4:6823: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) m4trace:acinclude.m4:6824: -1- AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) m4trace:acinclude.m4:6825: -1- AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) m4trace:acinclude.m4:6830: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) m4trace:acinclude.m4:6836: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) m4trace:acinclude.m4:6874: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) m4trace:acinclude.m4:6931: -1- AC_DEFUN([CHECK_WITH_CYGWIN], [ case $host_os in cygwin* | mingw* | pw32* ) if test "$GCC" = yes; then # Ensure MSVC-compatible struct packing convention. # Depends on GCC version. gcc2 uses -fnative-struct while # gcc3 uses -mms-bitfields. # msnative_struct='' AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) case `$CC --version | sed -e 's,\..*,.,' -e q` in 2.) if $CC -v --help 2>/dev/null | grep fnative-struct > /dev/null; then msnative_struct='-fnative-struct' fi ;; *) if $CC -v --help 2>/dev/null | grep ms-bitfields > /dev/null; then msnative_struct='-mms-bitfields' fi ;; esac if test x"$msnative_struct" = x; then AC_MSG_RESULT([no way]) AC_MSG_WARN([produced libraries might be incompatible with MSVC libs]) else CXXFLAGS="$CXXFLAGS $msnative_struct" AC_MSG_RESULT([${msnative_struct}]) fi fi # Export all symbols to Win32 DLL using MinGW 2.0 ld. WIN32_LD_EXPORT_ALL_SYMBOLS='' AC_MSG_CHECKING([whether ld accepts --export-all-symbols]) if $LD --help 2>&1 | egrep 'export-all-symbols' > /dev/null; then WIN32_LD_EXPORT_ALL_SYMBOLS='-Wl,--export-all-symbols' AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi if test x"$WIN32_LD_EXPORT_ALL_SYMBOLS" != x; then LDFLAGS="$LDFLAGS $WIN32_LD_EXPORT_ALL_SYMBOLS" fi ;; esac ]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:4: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:4: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:7: -1- XFORMS_CHECK_VERSION m4trace:configure.ac:7: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^FL_VERSION$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^FL_REVISION$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^FL_FIXLEVEL$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^DEVEL_VERSION$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^build$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^build_os$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^host$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^host_os$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^target$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^target_os$]) m4trace:configure.ac:11: -1- AM_INIT_AUTOMAKE([$PACKAGE_NAME], [$PACKAGE_VERSION]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:11: -1- AM_SET_CURRENT_AUTOMAKE_VERSION m4trace:configure.ac:11: -1- AM_AUTOMAKE_VERSION([1.11]) m4trace:configure.ac:11: -1- _AM_AUTOCONF_VERSION([2.64]) m4trace:configure.ac:11: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:11: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:11: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:11: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) m4trace:configure.ac:11: -2- _AM_MANGLE_OPTION([no-define]) m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:11: -1- AM_SANITY_CHECK m4trace:configure.ac:11: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) m4trace:configure.ac:11: -1- AM_MISSING_HAS_RUN m4trace:configure.ac:11: -1- AM_AUX_DIR_EXPAND m4trace:configure.ac:11: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:11: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:11: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:11: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:11: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) m4trace:configure.ac:11: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:11: -1- AM_PROG_INSTALL_SH m4trace:configure.ac:11: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:11: -1- AM_PROG_INSTALL_STRIP m4trace:configure.ac:11: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:11: -1- AM_PROG_MKDIR_P m4trace:configure.ac:11: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:11: -1- AM_SET_LEADING_DOT m4trace:configure.ac:11: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:11: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) m4trace:configure.ac:11: -2- _AM_MANGLE_OPTION([tar-ustar]) m4trace:configure.ac:11: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) m4trace:configure.ac:11: -2- _AM_MANGLE_OPTION([tar-pax]) m4trace:configure.ac:11: -1- _AM_PROG_TAR([v7]) m4trace:configure.ac:11: -1- AM_MISSING_PROG([AMTAR], [tar]) m4trace:configure.ac:11: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:11: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:11: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) m4trace:configure.ac:11: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.ac:11: -1- _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])]) m4trace:configure.ac:11: -2- _AM_MANGLE_OPTION([silent-rules]) m4trace:configure.ac:12: -1- AM_MAINTAINER_MODE m4trace:configure.ac:12: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) m4trace:configure.ac:12: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:12: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINT$]) m4trace:configure.ac:16: -1- m4_pattern_allow([^SO_VERSION$]) m4trace:configure.ac:28: -1- AM_CONDITIONAL([USE_BWC_BS_HACK], [test x$enable_bwc_bs_hack = xyes]) m4trace:configure.ac:28: -1- m4_pattern_allow([^USE_BWC_BS_HACK_TRUE$]) m4trace:configure.ac:28: -1- m4_pattern_allow([^USE_BWC_BS_HACK_FALSE$]) m4trace:configure.ac:28: -1- _AM_SUBST_NOTMAKE([USE_BWC_BS_HACK_TRUE]) m4trace:configure.ac:28: -1- _AM_SUBST_NOTMAKE([USE_BWC_BS_HACK_FALSE]) m4trace:configure.ac:31: -1- AM_CONDITIONAL([BUILD_DEMOS], [test x$enable_demos = xyes]) m4trace:configure.ac:31: -1- m4_pattern_allow([^BUILD_DEMOS_TRUE$]) m4trace:configure.ac:31: -1- m4_pattern_allow([^BUILD_DEMOS_FALSE$]) m4trace:configure.ac:31: -1- _AM_SUBST_NOTMAKE([BUILD_DEMOS_TRUE]) m4trace:configure.ac:31: -1- _AM_SUBST_NOTMAKE([BUILD_DEMOS_FALSE]) m4trace:configure.ac:34: -1- AM_CONDITIONAL([BUILD_DOCS], [test x$enable_docs = xyes]) m4trace:configure.ac:34: -1- m4_pattern_allow([^BUILD_DOCS_TRUE$]) m4trace:configure.ac:34: -1- m4_pattern_allow([^BUILD_DOCS_FALSE$]) m4trace:configure.ac:34: -1- _AM_SUBST_NOTMAKE([BUILD_DOCS_TRUE]) m4trace:configure.ac:34: -1- _AM_SUBST_NOTMAKE([BUILD_DOCS_FALSE]) m4trace:configure.ac:38: -1- XFORMS_PROG_CC m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:38: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.ac:38: -1- AM_SET_DEPDIR m4trace:configure.ac:38: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:38: -1- AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.ac:38: -1- AM_MAKE_INCLUDE m4trace:configure.ac:38: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:38: -1- AM_DEP_TRACK m4trace:configure.ac:38: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:38: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:38: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:38: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:38: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:38: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:38: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:38: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:38: -1- m4_pattern_allow([^WITH_WARNINGS$]) m4trace:configure.ac:39: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:39: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:39: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:41: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^RANLIB$]) m4trace:configure.ac:45: -1- _m4_warn([obsolete], [The macro `AC_ISC_POSIX' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:464: AC_ISC_POSIX is expanded from... configure.ac:45: the top level]) m4trace:configure.ac:46: -1- _m4_warn([obsolete], [The macro `AC_AIX' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:454: AC_AIX is expanded from... configure.ac:46: the top level]) m4trace:configure.ac:46: -1- AC_PROG_EGREP m4trace:configure.ac:46: -1- m4_pattern_allow([^GREP$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_POSIX_SOURCE$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_POSIX_1_SOURCE$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_MINIX$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^__EXTENSIONS__$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_ALL_SOURCE$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_GNU_SOURCE$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$]) m4trace:configure.ac:46: -1- m4_pattern_allow([^_TANDEM_SOURCE$]) m4trace:configure.ac:49: -1- CHECK_WITH_CYGWIN m4trace:configure.ac:58: -1- AC_LIBTOOL_WIN32_DLL m4trace:configure.ac:59: -1- AM_PROG_LIBTOOL m4trace:configure.ac:59: -1- AC_PROG_LIBTOOL m4trace:configure.ac:59: -1- _AC_PROG_LIBTOOL m4trace:configure.ac:59: -1- AC_LIBTOOL_SETUP m4trace:configure.ac:59: -1- AC_ENABLE_SHARED m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1474: AC_ARG_ENABLE is expanded from... acinclude.m4:2302: AC_ENABLE_SHARED is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_ENABLE_STATIC m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1474: AC_ARG_ENABLE is expanded from... acinclude.m4:2341: AC_ENABLE_STATIC is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_ENABLE_FAST_INSTALL m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1474: AC_ARG_ENABLE is expanded from... acinclude.m4:2380: AC_ENABLE_FAST_INSTALL is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_PROG_LD m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1493: AC_ARG_WITH is expanded from... acinclude.m4:2521: AC_PROG_LD is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- LT_AC_PROG_SED m4trace:configure.ac:59: -1- m4_pattern_allow([^SED$]) m4trace:configure.ac:59: -1- AC_PROG_LD_GNU m4trace:configure.ac:59: -1- AC_PROG_LD_RELOAD_FLAG m4trace:configure.ac:59: -1- AC_PROG_NM m4trace:configure.ac:59: -1- m4_pattern_allow([^LN_S$]) m4trace:configure.ac:59: -1- AC_DEPLIBS_CHECK_METHOD m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_MAX_CMD_LEN m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_OBJDIR m4trace:configure.ac:59: -1- _LT_AC_SYS_COMPILER m4trace:configure.ac:59: -1- _LT_AC_PROG_ECHO_BACKSLASH m4trace:configure.ac:59: -1- _LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ]) m4trace:configure.ac:59: -1- m4_pattern_allow([^ECHO$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^AR$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^RANLIB$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:59: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.ac:59: -1- AC_PATH_MAGIC m4trace:configure.ac:59: -1- AC_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) m4trace:configure.ac:59: -1- AC_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) m4trace:configure.ac:59: -1- _LT_REQUIRED_DARWIN_CHECKS m4trace:configure.ac:59: -1- m4_pattern_allow([^DSYMUTIL$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^NMEDIT$]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1474: AC_ARG_ENABLE is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1493: AC_ARG_WITH is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_LIBTOOL_LANG_C_CONFIG m4trace:configure.ac:59: -1- _LT_AC_LANG_C_CONFIG m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([objext], []) m4trace:configure.ac:59: -1- _LT_AC_SYS_COMPILER m4trace:configure.ac:59: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_LINKER_BOILERPLATE m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_COMPILER_NO_RTTI([]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_COMPILER_PIC([]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([lt_cv_prog_compiler_pic_works], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, ) works], [lt_cv_prog_compiler_pic_works], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, )ifelse([],[],[ -DPIC],[ifelse([],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, ) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, )=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, )" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, )= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, )=no]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([lt_cv_prog_compiler_static_works], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, )=]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_CC_C_O([]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -4- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([]) m4trace:configure.ac:59: -1- _LT_AC_LOCK m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2674: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:620: AS_IF is expanded from... ../../lib/autoconf/general.m4:2018: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2039: AC_CACHE_CHECK is expanded from... acinclude.m4:822: _LT_AC_LOCK is expanded from... acinclude.m4:1442: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from... acinclude.m4:3054: _LT_AC_LANG_C_CONFIG is expanded from... acinclude.m4:3053: AC_LIBTOOL_LANG_C_CONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- m4_pattern_allow([^DLLTOOL$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^AS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^OBJDUMP$]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_LD_SHLIBS([]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.ac:59: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([fix_srcfile_path], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([reload_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([runpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_LIB_STRIP m4trace:configure.ac:59: -1- AC_LIBTOOL_DLOPEN_SELF m4trace:configure.ac:59: -1- _LT_AC_CHECK_DLFCN m4trace:configure.ac:59: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) m4trace:configure.ac:59: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=no], [lt_cv_dlopen_self=cross]) m4trace:configure.ac:59: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=no], [lt_cv_dlopen_self_static=cross]) m4trace:configure.ac:59: -1- AC_LIBTOOL_CONFIG([]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([CC], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postinstall_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postuninstall_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([fix_srcfile_path], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([GCC], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.ac:59: -1- _LT_AC_TAGCONFIG m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:230: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1493: AC_ARG_WITH is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: tag name \"$tagname\" already exists], [acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_LIBTOOL_LANG_CXX_CONFIG m4trace:configure.ac:59: -1- _LT_AC_LANG_CXX_CONFIG([CXX]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXX$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXXFLAGS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXX$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^ac_ct_CXX$]) m4trace:configure.ac:59: -1- _AM_DEPENDENCIES([CXX]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXXDEPMODE$]) m4trace:configure.ac:59: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:59: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) m4trace:configure.ac:59: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) m4trace:configure.ac:59: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) m4trace:configure.ac:59: -1- _LT_AC_PROG_CXXCPP m4trace:configure.ac:59: -1- m4_pattern_allow([^CXXCPP$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^CXXCPP$]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([objext], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_SYS_COMPILER m4trace:configure.ac:59: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_LINKER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.ac:59: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.ac:59: -1- AC_PROG_LD m4trace:configure.ac:59: -1- AC_PROG_LD_GNU m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([GCC], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_POSTDEP_PREDEP([CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_COMPILER_PIC([CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([lt_cv_prog_compiler_pic_works], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX) works], [lt_cv_prog_compiler_pic_works_CXX], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)ifelse([CXX],[],[ -DPIC],[ifelse([CXX],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, CXX)=no]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([lt_cv_prog_compiler_static_works], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_CXX], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, CXX)=]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_CC_C_O([CXX]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -4- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_LD_SHLIBS([CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([runpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_CONFIG([CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([CC], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postinstall_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postuninstall_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([fix_srcfile_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([GCC], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_LANG_F77_CONFIG m4trace:configure.ac:59: -1- _LT_AC_LANG_F77_CONFIG([F77]) m4trace:configure.ac:59: -1- m4_pattern_allow([^F77$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^FFLAGS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^F77$]) m4trace:configure.ac:59: -1- m4_pattern_allow([^ac_ct_F77$]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([objext], [F77]) m4trace:configure.ac:59: -1- _LT_AC_SYS_COMPILER m4trace:configure.ac:59: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_LINKER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.ac:59: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([GCC], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_COMPILER_PIC([F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([lt_cv_prog_compiler_pic_works], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77) works], [lt_cv_prog_compiler_pic_works_F77], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)ifelse([F77],[],[ -DPIC],[ifelse([F77],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, F77)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, F77)=no]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([lt_cv_prog_compiler_static_works], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_F77], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, F77)=]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_CC_C_O([F77]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -4- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_LD_SHLIBS([F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.ac:59: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([fix_srcfile_path], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([reload_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([runpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_CONFIG([F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([CC], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postinstall_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postuninstall_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([fix_srcfile_path], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([GCC], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.ac:59: -1- AC_LIBTOOL_LANG_GCJ_CONFIG m4trace:configure.ac:59: -1- _LT_AC_LANG_GCJ_CONFIG([GCJ]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [../../lib/autoconf/lang.m4:148: AC_LANG_SAVE is expanded from... acinclude.m4:4448: _LT_AC_LANG_GCJ_CONFIG is expanded from... acinclude.m4:4447: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([objext], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_SYS_COMPILER m4trace:configure.ac:59: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_LINKER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.ac:59: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_COMPILER_NO_RTTI([GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, GCJ)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, GCJ) -fno-rtti -fno-exceptions"]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_COMPILER_PIC([GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([lt_cv_prog_compiler_pic_works], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ) works], [lt_cv_prog_compiler_pic_works_GCJ], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)ifelse([GCJ],[],[ -DPIC],[ifelse([GCJ],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, GCJ)=no]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([lt_cv_prog_compiler_static_works], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_GCJ], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, GCJ)=]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_CC_C_O([GCJ]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -4- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -6- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_LD_SHLIBS([GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.ac:59: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([fix_srcfile_path], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([reload_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -2- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([runpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.ac:59: -1- AC_LIBTOOL_CONFIG([GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([CC], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postinstall_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postuninstall_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([fix_srcfile_path], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([GCC], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [../../lib/autoconf/lang.m4:157: AC_LANG_RESTORE is expanded from... acinclude.m4:4448: _LT_AC_LANG_GCJ_CONFIG is expanded from... acinclude.m4:4447: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- AC_LIBTOOL_LANG_RC_CONFIG m4trace:configure.ac:59: -1- _LT_AC_LANG_RC_CONFIG([RC]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [../../lib/autoconf/lang.m4:148: AC_LANG_SAVE is expanded from... acinclude.m4:4508: _LT_AC_LANG_RC_CONFIG is expanded from... acinclude.m4:4507: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([objext], [RC]) m4trace:configure.ac:59: -1- _LT_AC_SYS_COMPILER m4trace:configure.ac:59: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_LINKER_BOILERPLATE m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.ac:59: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.ac:59: -1- AC_LIBTOOL_CONFIG([RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([CC], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postinstall_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postuninstall_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([fix_srcfile_path], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([GCC], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([LD], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predep_objects], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdep_objects], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([predeps], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([postdeps], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_dirs], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([allow_undefined_flag], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([no_undefined_flag], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_action], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_direct], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_minus_L], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([hardcode_automatic], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([link_all_deplibs], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([always_export_symbols], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([exclude_expsyms], [RC]) m4trace:configure.ac:59: -1- _LT_AC_TAGVAR([include_expsyms], [RC]) m4trace:configure.ac:59: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [../../lib/autoconf/lang.m4:157: AC_LANG_RESTORE is expanded from... acinclude.m4:4508: _LT_AC_LANG_RC_CONFIG is expanded from... acinclude.m4:4507: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... acinclude.m4:2179: _LT_AC_TAGCONFIG is expanded from... acinclude.m4:351: AC_LIBTOOL_SETUP is expanded from... acinclude.m4:331: _AC_PROG_LIBTOOL is expanded from... acinclude.m4:296: AC_PROG_LIBTOOL is expanded from... acinclude.m4:6819: AM_PROG_LIBTOOL is expanded from... configure.ac:59: the top level]) m4trace:configure.ac:59: -1- m4_pattern_allow([^LIBTOOL$]) m4trace:configure.ac:59: -1- AC_LIBTOOL_CXX m4trace:configure.ac:59: -1- _LT_AC_LANG_CXX m4trace:configure.ac:59: -1- _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) m4trace:configure.ac:59: -1- AC_LIBTOOL_F77 m4trace:configure.ac:59: -1- _LT_AC_LANG_F77 m4trace:configure.ac:59: -1- _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) m4trace:configure.ac:62: -1- XFORMS_WITH_DIR([extra-lib], [extra library directory], [extra_lib], [NONE]) m4trace:configure.ac:63: -2- XFORMS_ADD_LIB_DIR([xforms_ldflags], [$dir]) m4trace:configure.ac:63: -1- XFORMS_LOOP_DIR([$xforms_cv_extra_lib], [ xforms_ldflags="${xforms_ldflags} -L$dir" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then xforms_ldflags="${xforms_ldflags} -Wl,-R$dir" else xforms_ldflags="${xforms_ldflags} -R$dir" fi fi]) m4trace:configure.ac:63: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: \"$dir\" is not a directory], [acinclude.m4:222: XFORMS_LOOP_DIR is expanded from... configure.ac:63: the top level]) m4trace:configure.ac:67: -1- XFORMS_WITH_DIR([extra-inc], [extra include directory], [extra_inc], [NONE]) m4trace:configure.ac:68: -2- XFORMS_ADD_INC_DIR([xforms_cppflags], [$dir]) m4trace:configure.ac:68: -1- XFORMS_LOOP_DIR([$xforms_cv_extra_inc], [xforms_cppflags="${xforms_cppflags} -I$dir "]) m4trace:configure.ac:68: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: \"$dir\" is not a directory], [acinclude.m4:222: XFORMS_LOOP_DIR is expanded from... configure.ac:68: the top level]) m4trace:configure.ac:72: -1- XFORMS_WITH_DIR([extra-prefix], [extra lib+include directory], [extra_prefix], [NONE], [${prefix}]) m4trace:configure.ac:73: -1- XFORMS_LOOP_DIR([$xforms_cv_extra_prefix], [ XFORMS_ADD_INC_DIR(CPPFLAGS,$dir/include) XFORMS_ADD_LIB_DIR(LDFLAGS,$dir/lib)]) m4trace:configure.ac:73: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: \"$dir\" is not a directory], [acinclude.m4:222: XFORMS_LOOP_DIR is expanded from... configure.ac:73: the top level]) m4trace:configure.ac:73: -1- XFORMS_ADD_INC_DIR([CPPFLAGS], [$dir/include]) m4trace:configure.ac:73: -1- XFORMS_ADD_LIB_DIR([LDFLAGS], [$dir/lib]) m4trace:configure.ac:78: -1- m4_pattern_allow([^const$]) m4trace:configure.ac:79: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:80: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:85: -1- m4_pattern_allow([^HAVE_LIBM$]) m4trace:configure.ac:86: -1- m4_pattern_allow([^HAVE_LIBC$]) m4trace:configure.ac:89: -1- m4_pattern_allow([^HAVE_SYS_SELECT_H$]) m4trace:configure.ac:97: -1- AM_CONDITIONAL([BUILD_GL], [test x$enable_gl != xno]) m4trace:configure.ac:97: -1- m4_pattern_allow([^BUILD_GL_TRUE$]) m4trace:configure.ac:97: -1- m4_pattern_allow([^BUILD_GL_FALSE$]) m4trace:configure.ac:97: -1- _AM_SUBST_NOTMAKE([BUILD_GL_TRUE]) m4trace:configure.ac:97: -1- _AM_SUBST_NOTMAKE([BUILD_GL_FALSE]) m4trace:configure.ac:104: -1- m4_pattern_allow([^XMKMF$]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_DISPLAY_MISSING$]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_CFLAGS$]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_PRE_LIBS$]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_LIBS$]) m4trace:configure.ac:104: -1- m4_pattern_allow([^X_EXTRA_LIBS$]) m4trace:configure.ac:105: -1- XFORMS_PATH_XPM m4trace:configure.ac:105: -1- XFORMS_LIB_ERROR([libXpm], [Xpm]) m4trace:configure.ac:105: -1- XFORMS_ERROR([Cannot find libXpm. Please check that the Xpm library is correctly installed on your system.]) m4trace:configure.ac:105: -1- m4_pattern_allow([^XPM_LIB$]) m4trace:configure.ac:105: -1- XFORMS_LIB_ERROR([xpm.h], [Xpm]) m4trace:configure.ac:105: -1- XFORMS_ERROR([Cannot find xpm.h. Please check that the Xpm library is correctly installed on your system.]) m4trace:configure.ac:105: -1- m4_pattern_allow([^XPM_H_LOCATION$]) m4trace:configure.ac:105: -1- XFORMS_WARNING([Version $xforms_cv_xpmversion of the Xpm library is a bit old. If you experience strange crashes with xforms, try to upgrade to at least version 4.7 (aka 3.4g). If you have installed a newer version of the library, check whether you have an old xpm.h header file in your include path.]) m4trace:configure.ac:106: -1- XFORMS_CHECK_LIB_JPEG m4trace:configure.ac:106: -1- XFORMS_LIB_ERROR([libjpeg], [jpeg]) m4trace:configure.ac:106: -1- XFORMS_ERROR([Cannot find libjpeg. Please check that the jpeg library is correctly installed on your system.]) m4trace:configure.ac:106: -1- m4_pattern_allow([^JPEG_LIB$]) m4trace:configure.ac:109: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:754: AC_TYPE_SIGNAL is expanded from... configure.ac:109: the top level]) m4trace:configure.ac:109: -1- m4_pattern_allow([^RETSIGTYPE$]) m4trace:configure.ac:111: -1- m4_pattern_allow([^RETSIGTYPE_IS_VOID$]) m4trace:configure.ac:114: -1- XFORMS_CHECK_DECL([snprintf], [stdio.h]) m4trace:configure.ac:114: -1- m4_pattern_allow([^HAVE_DECL_SNPRINTF$]) m4trace:configure.ac:115: -1- XFORMS_CHECK_DECL([vsnprintf], [stdio.h]) m4trace:configure.ac:115: -1- m4_pattern_allow([^HAVE_DECL_VSNPRINTF$]) m4trace:configure.ac:116: -1- XFORMS_CHECK_DECL([sigaction], [signal.h]) m4trace:configure.ac:116: -1- m4_pattern_allow([^HAVE_DECL_SIGACTION$]) m4trace:configure.ac:130: -1- m4_pattern_allow([^X_LIBS$]) m4trace:configure.ac:131: -1- m4_pattern_allow([^X_PRE_LIBS$]) m4trace:configure.ac:198: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:198: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:198: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:198: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:198: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:198: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:198: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:198: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) m4trace:configure.ac:198: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.ac:206: -1- XFORMS_CHECK_ERRORS xforms-1.0.93sp1/autom4te.cache/output.10000644000175000017500000264762511377311600016501 0ustar jensjens@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.64 for xforms 1.0.93sp1. @%:@ @%:@ Report bugs to . @%:@ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @%:@ Foundation, Inc. @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: xforms-development@nongnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set $? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global $as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error ERROR [LINENO LOG_FD] @%:@ --------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in @%:@( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xforms' PACKAGE_TARNAME='xforms' PACKAGE_VERSION='1.0.93sp1' PACKAGE_STRING='xforms 1.0.93sp1' PACKAGE_BUGREPORT='xforms-development@nongnu.org' PACKAGE_URL='' ac_unique_file="lib/forms.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIB@&t@OBJS JPEG_LIB XPM_LIB X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF BUILD_GL_FALSE BUILD_GL_TRUE LIBTOOL ac_ct_F77 FFLAGS F77 CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX OBJDUMP AS DLLTOOL NMEDIT DSYMUTIL AR ECHO LN_S SED EGREP GREP RANLIB CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC BUILD_DOCS_FALSE BUILD_DOCS_TRUE BUILD_DEMOS_FALSE BUILD_DEMOS_TRUE USE_BWC_BS_HACK_FALSE USE_BWC_BS_HACK_TRUE SO_VERSION MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build FL_FIXLEVEL FL_REVISION FL_VERSION VERSION PACKAGE target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_bwc_bs_hack enable_demos enable_docs enable_dependency_tracking enable_warnings enable_debug enable_optimization enable_shared enable_static enable_fast_install with_gnu_ld enable_libtool_lock with_pic with_tags with_extra_lib with_extra_inc with_extra_prefix enable_gl with_x ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures xforms 1.0.93sp1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/xforms@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR 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 case $ac_init_help in short | recursive ) echo "Configuration of xforms 1.0.93sp1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-bwc-bs-hack Enable backward compatiblity hack for browser, scrollbar and tabfolder objects --enable-demos Build demo programs --enable-docs Build documentation --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-warnings tell the compiler to display more warnings --enable-debug enable debug information --enable-optimization=value enable compiler optimisation default=-O --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ --enable-fast-install@<:@=PKGS@:>@ optimize for fast installation @<:@default=yes@:>@ --disable-libtool-lock avoid locking (might break parallel builds) --disable-gl Do not build GL support library 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-pic try to use only PIC/non-PIC objects @<:@default=use both@:>@ --with-tags@<:@=TAGS@:>@ include additional configurations @<:@automatic@:>@ --with-extra-lib specify extra library directory --with-extra-inc specify extra include directory --with-extra-prefix specify extra lib+include directory --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF xforms configure 1.0.93sp1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_try_link LINENO @%:@ ----------------------- @%:@ Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## -------------------------------------------- ## ## Report this to xforms-development@nongnu.org ## ## -------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.$ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_check_func LINENO FUNC VAR @%:@ ---------------------------------- @%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } @%:@ ac_fn_c_check_func @%:@ ac_fn_cxx_try_compile LINENO @%:@ ---------------------------- @%:@ Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_cxx_try_compile @%:@ ac_fn_cxx_try_cpp LINENO @%:@ ------------------------ @%:@ Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_cxx_try_cpp @%:@ ac_fn_cxx_try_link LINENO @%:@ ------------------------- @%:@ Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_cxx_try_link @%:@ ac_fn_f77_try_compile LINENO @%:@ ---------------------------- @%:@ Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_f77_try_compile @%:@ ac_fn_f77_try_link LINENO @%:@ ------------------------- @%:@ Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_f77_try_link @%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES @%:@ ------------------------------------------- @%:@ Tests whether TYPE exists after having included INCLUDES, setting cache @%:@ variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } @%:@ ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by xforms $as_me 1.0.93sp1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION eval `echo $PACKAGE_VERSION | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/FL_VERSION=\1; FL_REVISION=\2; FL_FIXLEVEL=\3/'` echo "configuring xforms version $VERSION" xforms_devel_version=no case $VERSION in *.[5-9][0-9]) xforms_devel_version=yes $as_echo "@%:@define DEVEL_VERSION 1" >>confdefs.h echo "WARNING: This is a development version. Expect bugs." ;; esac # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # 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}- ac_config_headers="$ac_config_headers lib/config.h" am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @%:@ Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ### This defines the version number of the installed .so files ### using libtool's versioning system. SO_VERSION="2:0:0" # fix the value of the prefixes. test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ### Set the execute permissions of the various scripts correctly for file in config/install-sh config/mkinstalldirs ; do chmod 755 ${srcdir}/${file} done @%:@ Check whether --enable-bwc_bs_hack was given. if test "${enable_bwc_bs_hack+set}" = set; then : enableval=$enable_bwc_bs_hack; fi if test x$enable_bwc_bs_hack = xyes; then USE_BWC_BS_HACK_TRUE= USE_BWC_BS_HACK_FALSE='#' else USE_BWC_BS_HACK_TRUE='#' USE_BWC_BS_HACK_FALSE= fi @%:@ Check whether --enable-demos was given. if test "${enable_demos+set}" = set; then : enableval=$enable_demos; fi if test x$enable_demos = xyes; then BUILD_DEMOS_TRUE= BUILD_DEMOS_FALSE='#' else BUILD_DEMOS_TRUE='#' BUILD_DEMOS_FALSE= fi @%:@ Check whether --enable-docs was given. if test "${enable_docs+set}" = set; then : enableval=$enable_docs; fi if test x$enable_docs = xyes; then BUILD_DOCS_TRUE= BUILD_DOCS_FALSE='#' else BUILD_DOCS_TRUE='#' BUILD_DOCS_FALSE= fi ### Check for programs DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ### We might want to get or shut warnings. @%:@ Check whether --enable-warnings was given. if test "${enable_warnings+set}" = set; then : enableval=$enable_warnings; else if test $xforms_devel_version = yes && test $ac_cv_c_compiler_gnu = yes ; then enable_warnings=yes; else enable_warnings=no; fi; fi if test x$enable_warnings = xyes ; then xforms_flags="$xforms_flags warnings" $as_echo "@%:@define WITH_WARNINGS 1" >>confdefs.h fi ### We might want to disable debug @%:@ Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; else if test $xforms_devel_version = yes && test $ac_cv_c_compiler_gnu = yes ; then enable_debug=yes; else enable_debug=no; fi; fi ### set up optimization @%:@ Check whether --enable-optimization was given. if test "${enable_optimization+set}" = set; then : enableval=$enable_optimization; else enable_optimization=yes; fi case $enable_optimization in yes) xforms_opt=-O;; no) xforms_opt=;; *) xforms_opt=${enable_optimization};; esac # set the debug flags correctly. if test x$GCC = xyes; then if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS else CFLAGS="$xforms_opt" if test x$enable_debug = xyes ; then CFLAGS="-g $CFLAGS" fi fi if test x$enable_warnings = xyes ; then CFLAGS="$CFLAGS -W -Wall" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi ### check for special systems { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then : break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "@%:@define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h ### Check for some Cygwin-specific details. case $host_os in cygwin* | mingw* | pw32* ) if test "$GCC" = yes; then # Ensure MSVC-compatible struct packing convention. # Depends on GCC version. gcc2 uses -fnative-struct while # gcc3 uses -mms-bitfields. # msnative_struct='' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get MSVC-compatible struct packing" >&5 $as_echo_n "checking how to get MSVC-compatible struct packing... " >&6; } case `$CC --version | sed -e 's,\..*,.,' -e q` in 2.) if $CC -v --help 2>/dev/null | grep fnative-struct > /dev/null; then msnative_struct='-fnative-struct' fi ;; *) if $CC -v --help 2>/dev/null | grep ms-bitfields > /dev/null; then msnative_struct='-mms-bitfields' fi ;; esac if test x"$msnative_struct" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no way" >&5 $as_echo "no way" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: produced libraries might be incompatible with MSVC libs" >&5 $as_echo "$as_me: WARNING: produced libraries might be incompatible with MSVC libs" >&2;} else CXXFLAGS="$CXXFLAGS $msnative_struct" { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${msnative_struct}" >&5 $as_echo "${msnative_struct}" >&6; } fi fi # Export all symbols to Win32 DLL using MinGW 2.0 ld. WIN32_LD_EXPORT_ALL_SYMBOLS='' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld accepts --export-all-symbols" >&5 $as_echo_n "checking whether ld accepts --export-all-symbols... " >&6; } if $LD --help 2>&1 | egrep 'export-all-symbols' > /dev/null; then WIN32_LD_EXPORT_ALL_SYMBOLS='-Wl,--export-all-symbols' { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$WIN32_LD_EXPORT_ALL_SYMBOLS" != x; then LDFLAGS="$LDFLAGS $WIN32_LD_EXPORT_ALL_SYMBOLS" fi ;; esac # Work around a problem in automake 1.4: when invoking install-strip, # INSTALL_PROGRAM is changed to 'install -s', and since # INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0 # which returns an error condition when stripping fails. INSTALL_SCRIPT='${INSTALL}' ### Setup libtool @%:@ Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi @%:@ Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi @%:@ Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${lt_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 $as_echo "$SED" >&6; } @%:@ Check whether --with-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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5 $as_echo_n "checking for BSD-compatible nm... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC @%:@ Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line __oline__ "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; *-*-cygwin* | *-*-mingw* | *-*-pw32*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac need_locks="$enable_libtool_lock" for ac_header in dlfcn.h do : ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_DLFCN_H 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$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 if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # 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_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then : $as_echo_n "(cached) " >&6 else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes else ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=yes @%:@ Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes @%:@ Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 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't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; 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=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5 $as_echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" @%:@ Check whether --with-tags was given. if test "${with_tags+set}" = set; then : withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) as_fn_error "invalid tag name: $tagname" "$LINENO" 5 ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5 fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration @%:@ Check whether --with-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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" 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].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 $as_echo "$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=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't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; 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_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 $as_echo "$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5 $as_echo "$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 $as_echo "$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_GCJ" >&5 $as_echo "$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=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't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; 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_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_GCJ" >&5 $as_echo "$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_GCJ" >&5 $as_echo "$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_GCJ" >&5 $as_echo "$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5 ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5 fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion ### Add extra directories to check for libraries. @%:@ Check whether --with-extra-lib was given. if test "${with_extra_lib+set}" = set; then : withval=$with_extra_lib; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra library directory" >&5 $as_echo_n "checking for extra library directory... " >&6; } if test -z "$with_extra_lib"; then if test "${xforms_cv_extra_lib+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_lib=NONE fi else test "x$with_extra_lib" = xyes && with_extra_lib= xforms_cv_extra_lib="$with_extra_lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_lib" >&5 $as_echo "$xforms_cv_extra_lib" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_lib"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 xforms_ldflags="${xforms_ldflags} -L$dir" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then xforms_ldflags="${xforms_ldflags} -Wl,-R$dir" else xforms_ldflags="${xforms_ldflags} -R$dir" fi fi fi done IFS=$ac_save_ifs test ! x"$xforms_ldflags" = x && LDFLAGS="$xforms_ldflags $LDFLAGS" ### Add extra directories to check for include files. @%:@ Check whether --with-extra-inc was given. if test "${with_extra_inc+set}" = set; then : withval=$with_extra_inc; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra include directory" >&5 $as_echo_n "checking for extra include directory... " >&6; } if test -z "$with_extra_inc"; then if test "${xforms_cv_extra_inc+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_inc=NONE fi else test "x$with_extra_inc" = xyes && with_extra_inc= xforms_cv_extra_inc="$with_extra_inc" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_inc" >&5 $as_echo "$xforms_cv_extra_inc" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_inc"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 xforms_cppflags="${xforms_cppflags} -I$dir " fi done IFS=$ac_save_ifs test ! x"$xforms_cppflags" = x && CPPFLAGS="$xforms_cppflags $CPPFLAGS" ### Add both includes and libraries @%:@ Check whether --with-extra-prefix was given. if test "${with_extra_prefix+set}" = set; then : withval=$with_extra_prefix; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra lib+include directory" >&5 $as_echo_n "checking for extra lib+include directory... " >&6; } if test -z "$with_extra_prefix"; then if test "${xforms_cv_extra_prefix+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_prefix=NONE fi else test "x$with_extra_prefix" = xyes && with_extra_prefix=${prefix} xforms_cv_extra_prefix="$with_extra_prefix" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_prefix" >&5 $as_echo "$xforms_cv_extra_prefix" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_prefix"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 CPPFLAGS="${CPPFLAGS} -I$dir/include " LDFLAGS="${LDFLAGS} -L$dir/lib" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then LDFLAGS="${LDFLAGS} -Wl,-R$dir/lib" else LDFLAGS="${LDFLAGS} -R$dir/lib" fi fi fi done IFS=$ac_save_ifs # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "@%:@define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if test "${ac_cv_lib_m_sin+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fopen in -lc" >&5 $as_echo_n "checking for fopen in -lc... " >&6; } if test "${ac_cv_lib_c_fopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fopen (); int main () { return fopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_fopen=yes else ac_cv_lib_c_fopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_fopen" >&5 $as_echo "$ac_cv_lib_c_fopen" >&6; } if test "x$ac_cv_lib_c_fopen" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi # Checks for header files. for ac_header in sys/select.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" if test "x$ac_cv_header_sys_select_h" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_SELECT_H 1 _ACEOF fi done # Check whether we want to build the gl code @%:@ Check whether --enable-gl was given. if test "${enable_gl+set}" = set; then : enableval=$enable_gl; fi if test x$enable_gl != xno ; then ac_fn_c_check_header_mongrel "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "$ac_includes_default" if test "x$ac_cv_header_GL_glx_h" = x""yes; then : else enable_gl=no fi fi if test x$enable_gl != xno; then BUILD_GL_TRUE= BUILD_GL_FALSE='#' else BUILD_GL_TRUE='#' BUILD_GL_FALSE= fi # Check for X, XPM and JPEG { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } @%:@ Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "@%:@define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = x""yes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = x""yes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = x""yes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = x""yes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = x""yes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi ### Check for Xpm library SAVE_LIBS="$LIBS" LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreateBufferFromImage in -lXpm" >&5 $as_echo_n "checking for XpmCreateBufferFromImage in -lXpm... " >&6; } if test "${ac_cv_lib_Xpm_XpmCreateBufferFromImage+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XpmCreateBufferFromImage (); int main () { return XpmCreateBufferFromImage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xpm_XpmCreateBufferFromImage=yes else ac_cv_lib_Xpm_XpmCreateBufferFromImage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreateBufferFromImage" >&5 $as_echo "$ac_cv_lib_Xpm_XpmCreateBufferFromImage" >&6; } if test "x$ac_cv_lib_Xpm_XpmCreateBufferFromImage" = x""yes; then : XPM_LIB="-lXpm" else xforms_error_txt="$xforms_error_txt ** Cannot find libXpm. Please check that the Xpm library is correctly installed on your system. " xforms_error=yes fi LIBS="$SAVE_LIBS" ### Check for Xpm headers SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" xforms_cv_xpm_h_location="" ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : ac_cv_header_xpm_h=yes xforms_cv_xpm_h_location="" else ac_fn_c_check_header_mongrel "$LINENO" "xpm.h" "ac_cv_header_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_xpm_h" = x""yes; then : else xforms_error_txt="$xforms_error_txt ** Cannot find xpm.h. Please check that the Xpm library is correctly installed on your system. " xforms_error=yes fi fi cat >>confdefs.h <<_ACEOF @%:@define XPM_H_LOCATION $xforms_cv_xpm_h_location _ACEOF CPPFLAGS="$SAVE_CPPFLAGS" ### Test for the header version if test $ac_cv_header_xpm_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking xpm header version" >&5 $as_echo_n "checking xpm header version... " >&6; } if test "${xforms_cv_xpmversion+set}" = set; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <&5 | \ grep '^"%%%"' 2>/dev/null | \ sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'` case "$xforms_cv_xpmr" in [0-9]) xformsxpmr_alpha=`echo $xforms_cv_xpmr |tr 123456789 abcdefghi` xformsxpmv_alpha=" (aka 3.$xforms_cv_xpmv$xformsxpmr_alpha)";; *) ;; esac xforms_cv_xpmversion="$xforms_cv_xpmv.$xforms_cv_xpmr$xformsxpmv_alpha" rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_xpmversion" >&5 $as_echo "$xforms_cv_xpmversion" >&6; } XPM_VERSION=${xforms_cv_xpmversion} case "$xforms_cv_xpmr" in [789]|[0-9][0-9]*) ;; *) xforms_warning_txt="$xforms_warning_txt == Version $xforms_cv_xpmversion of the Xpm library is a bit old. If you experience strange crashes with xforms, try to upgrade to at least version 4.7 (aka 3.4g). If you have installed a newer version of the library, check whether you have an old xpm.h header file in your include path. " xforms_warning=yes;; esac fi ### Check for Jpeg library { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; } if test "${ac_cv_lib_jpeg_jpeg_CreateDecompress+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jpeg_CreateDecompress (); int main () { return jpeg_CreateDecompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_CreateDecompress=yes else ac_cv_lib_jpeg_jpeg_CreateDecompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; } if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = x""yes; then : JPEG_LIB="-ljpeg" else xforms_error_txt="$xforms_error_txt ** Cannot find libjpeg. Please check that the jpeg library is correctly installed on your system. " xforms_error=yes fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF @%:@define RETSIGTYPE $ac_cv_type_signal _ACEOF if test $ac_cv_type_signal = "void" ; then $as_echo "@%:@define RETSIGTYPE_IS_VOID 1" >>confdefs.h fi for ac_func in snprintf strcasecmp strerror usleep nanosleep vsnprintf sigaction do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stdio.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if snprintf is declared by header $ac_header" >&5 $as_echo_n "checking if snprintf is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "snprintf" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF @%:@define HAVE_DECL_SNPRINTF 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done for ac_header in stdio.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf is declared by header $ac_header" >&5 $as_echo_n "checking if vsnprintf is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "vsnprintf" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF @%:@define HAVE_DECL_VSNPRINTF 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done for ac_header in signal.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction is declared by header $ac_header" >&5 $as_echo_n "checking if sigaction is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sigaction" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF @%:@define HAVE_DECL_SIGACTION 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done ### Some information on what just happened VERSION_INFO="Configuration\n\ Host type: ${host}\n\ Special build flags: ${xforms_flags}\n\ C Compiler: ${CC}\n\ C Compiler flags: ${CFLAGS}\n\ Linker flags: ${LDFLAGS}\n" ### Not used for now. ### AC_SUBST(VERSION_INFO) ## Some config.h stuff ### Finish the work. ac_config_files="$ac_config_files Makefile xforms.spec lib/include/AAA.h config/Makefile lib/Makefile lib/bitmaps/Makefile lib/fd/Makefile lib/include/Makefile lib/private/Makefile image/Makefile gl/Makefile fdesign/Makefile fdesign/fd/Makefile fdesign/fd4test/Makefile fdesign/notes/Makefile fdesign/spec/Makefile fdesign/xpm/Makefile fd2ps/Makefile fd2ps/test/Makefile demos/Makefile demos/fd/Makefile doc/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_BWC_BS_HACK_TRUE}" && test -z "${USE_BWC_BS_HACK_FALSE}"; then as_fn_error "conditional \"USE_BWC_BS_HACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DEMOS_TRUE}" && test -z "${BUILD_DEMOS_FALSE}"; then as_fn_error "conditional \"BUILD_DEMOS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then as_fn_error "conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_GL_TRUE}" && test -z "${BUILD_GL_FALSE}"; then as_fn_error "conditional \"BUILD_GL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error ERROR [LINENO LOG_FD] @%:@ --------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set $? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global $as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in @%:@( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by xforms $as_me 1.0.93sp1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ xforms config.status 1.0.93sp1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "xforms.spec") CONFIG_FILES="$CONFIG_FILES xforms.spec" ;; "lib/include/AAA.h") CONFIG_FILES="$CONFIG_FILES lib/include/AAA.h" ;; "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/bitmaps/Makefile") CONFIG_FILES="$CONFIG_FILES lib/bitmaps/Makefile" ;; "lib/fd/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fd/Makefile" ;; "lib/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/include/Makefile" ;; "lib/private/Makefile") CONFIG_FILES="$CONFIG_FILES lib/private/Makefile" ;; "image/Makefile") CONFIG_FILES="$CONFIG_FILES image/Makefile" ;; "gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;; "fdesign/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/Makefile" ;; "fdesign/fd/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/fd/Makefile" ;; "fdesign/fd4test/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/fd4test/Makefile" ;; "fdesign/notes/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/notes/Makefile" ;; "fdesign/spec/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/spec/Makefile" ;; "fdesign/xpm/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/xpm/Makefile" ;; "fd2ps/Makefile") CONFIG_FILES="$CONFIG_FILES fd2ps/Makefile" ;; "fd2ps/test/Makefile") CONFIG_FILES="$CONFIG_FILES fd2ps/test/Makefile" ;; "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;; "demos/fd/Makefile") CONFIG_FILES="$CONFIG_FILES demos/fd/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # show version information echo printf "$VERSION_INFO" echo # Display a final warning if there has been a XFORMS_ERROR if test x$xforms_error = xyes; then cat <. @%:@ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @%:@ Foundation, Inc. @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: xforms-development@nongnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set $? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global $as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error ERROR [LINENO LOG_FD] @%:@ --------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in @%:@( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xforms' PACKAGE_TARNAME='xforms' PACKAGE_VERSION='1.0.93sp1' PACKAGE_STRING='xforms 1.0.93sp1' PACKAGE_BUGREPORT='xforms-development@nongnu.org' PACKAGE_URL='' ac_unique_file="lib/forms.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIB@&t@OBJS JPEG_LIB XPM_LIB X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF BUILD_GL_FALSE BUILD_GL_TRUE LIBTOOL ac_ct_F77 FFLAGS F77 CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX OBJDUMP AS DLLTOOL NMEDIT DSYMUTIL AR ECHO LN_S SED EGREP GREP RANLIB CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC BUILD_DOCS_FALSE BUILD_DOCS_TRUE BUILD_DEMOS_FALSE BUILD_DEMOS_TRUE USE_BWC_BS_HACK_FALSE USE_BWC_BS_HACK_TRUE SO_VERSION MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build FL_FIXLEVEL FL_REVISION FL_VERSION VERSION PACKAGE target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_bwc_bs_hack enable_demos enable_docs enable_dependency_tracking enable_warnings enable_debug enable_optimization enable_shared enable_static enable_fast_install with_gnu_ld enable_libtool_lock with_pic with_tags with_extra_lib with_extra_inc with_extra_prefix enable_gl with_x ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures xforms 1.0.93sp1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/xforms@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR 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 case $ac_init_help in short | recursive ) echo "Configuration of xforms 1.0.93sp1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-bwc-bs-hack Enable backward compatiblity hack for browser, scrollbar and tabfolder objects --enable-demos Build demo programs --enable-docs Build documentation --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-warnings tell the compiler to display more warnings --enable-debug enable debug information --enable-optimization=value enable compiler optimisation default=-O --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ --enable-fast-install@<:@=PKGS@:>@ optimize for fast installation @<:@default=yes@:>@ --disable-libtool-lock avoid locking (might break parallel builds) --disable-gl Do not build GL support library 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-pic try to use only PIC/non-PIC objects @<:@default=use both@:>@ --with-tags@<:@=TAGS@:>@ include additional configurations @<:@automatic@:>@ --with-extra-lib specify extra library directory --with-extra-inc specify extra include directory --with-extra-prefix specify extra lib+include directory --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF xforms configure 1.0.93sp1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_try_link LINENO @%:@ ----------------------- @%:@ Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## -------------------------------------------- ## ## Report this to xforms-development@nongnu.org ## ## -------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.$ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_check_func LINENO FUNC VAR @%:@ ---------------------------------- @%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } @%:@ ac_fn_c_check_func @%:@ ac_fn_cxx_try_compile LINENO @%:@ ---------------------------- @%:@ Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_cxx_try_compile @%:@ ac_fn_cxx_try_cpp LINENO @%:@ ------------------------ @%:@ Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_cxx_try_cpp @%:@ ac_fn_cxx_try_link LINENO @%:@ ------------------------- @%:@ Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_cxx_try_link @%:@ ac_fn_f77_try_compile LINENO @%:@ ---------------------------- @%:@ Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_f77_try_compile @%:@ ac_fn_f77_try_link LINENO @%:@ ------------------------- @%:@ Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } @%:@ ac_fn_f77_try_link @%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES @%:@ ------------------------------------------- @%:@ Tests whether TYPE exists after having included INCLUDES, setting cache @%:@ variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } @%:@ ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by xforms $as_me 1.0.93sp1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION eval `echo $PACKAGE_VERSION | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/FL_VERSION=\1; FL_REVISION=\2; FL_FIXLEVEL=\3/'` echo "configuring xforms version $VERSION" xforms_devel_version=no case $VERSION in *.[5-9][0-9]) xforms_devel_version=yes $as_echo "@%:@define DEVEL_VERSION 1" >>confdefs.h echo "WARNING: This is a development version. Expect bugs." ;; esac # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # 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}- ac_config_headers="$ac_config_headers lib/config.h" am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @%:@ Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ### This defines the version number of the installed .so files ### using libtool's versioning system. SO_VERSION="2:0:0" # fix the value of the prefixes. test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ### Set the execute permissions of the various scripts correctly for file in config/install-sh config/mkinstalldirs ; do chmod 755 ${srcdir}/${file} done @%:@ Check whether --enable-bwc_bs_hack was given. if test "${enable_bwc_bs_hack+set}" = set; then : enableval=$enable_bwc_bs_hack; fi if test x$enable_bwc_bs_hack = xyes; then USE_BWC_BS_HACK_TRUE= USE_BWC_BS_HACK_FALSE='#' else USE_BWC_BS_HACK_TRUE='#' USE_BWC_BS_HACK_FALSE= fi @%:@ Check whether --enable-demos was given. if test "${enable_demos+set}" = set; then : enableval=$enable_demos; fi if test x$enable_demos = xyes; then BUILD_DEMOS_TRUE= BUILD_DEMOS_FALSE='#' else BUILD_DEMOS_TRUE='#' BUILD_DEMOS_FALSE= fi @%:@ Check whether --enable-docs was given. if test "${enable_docs+set}" = set; then : enableval=$enable_docs; fi if test x$enable_docs = xyes; then BUILD_DOCS_TRUE= BUILD_DOCS_FALSE='#' else BUILD_DOCS_TRUE='#' BUILD_DOCS_FALSE= fi ### Check for programs DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ### We might want to get or shut warnings. @%:@ Check whether --enable-warnings was given. if test "${enable_warnings+set}" = set; then : enableval=$enable_warnings; else if test $xforms_devel_version = yes && test $ac_cv_c_compiler_gnu = yes ; then enable_warnings=yes; else enable_warnings=no; fi; fi if test x$enable_warnings = xyes ; then xforms_flags="$xforms_flags warnings" $as_echo "@%:@define WITH_WARNINGS 1" >>confdefs.h fi ### We might want to disable debug @%:@ Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; else if test $xforms_devel_version = yes && test $ac_cv_c_compiler_gnu = yes ; then enable_debug=yes; else enable_debug=no; fi; fi ### set up optimization @%:@ Check whether --enable-optimization was given. if test "${enable_optimization+set}" = set; then : enableval=$enable_optimization; else enable_optimization=yes; fi case $enable_optimization in yes) xforms_opt=-O;; no) xforms_opt=;; *) xforms_opt=${enable_optimization};; esac # set the debug flags correctly. if test x$GCC = xyes; then if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS else CFLAGS="$xforms_opt" if test x$enable_debug = xyes ; then CFLAGS="-g $CFLAGS" fi fi if test x$enable_warnings = xyes ; then CFLAGS="$CFLAGS -W -Wall" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi ### check for special systems { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then : break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "@%:@define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h ### Check for some Cygwin-specific details. case $host_os in cygwin* | mingw* | pw32* ) if test "$GCC" = yes; then # Ensure MSVC-compatible struct packing convention. # Depends on GCC version. gcc2 uses -fnative-struct while # gcc3 uses -mms-bitfields. # msnative_struct='' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get MSVC-compatible struct packing" >&5 $as_echo_n "checking how to get MSVC-compatible struct packing... " >&6; } case `$CC --version | sed -e 's,\..*,.,' -e q` in 2.) if $CC -v --help 2>/dev/null | grep fnative-struct > /dev/null; then msnative_struct='-fnative-struct' fi ;; *) if $CC -v --help 2>/dev/null | grep ms-bitfields > /dev/null; then msnative_struct='-mms-bitfields' fi ;; esac if test x"$msnative_struct" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no way" >&5 $as_echo "no way" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: produced libraries might be incompatible with MSVC libs" >&5 $as_echo "$as_me: WARNING: produced libraries might be incompatible with MSVC libs" >&2;} else CXXFLAGS="$CXXFLAGS $msnative_struct" { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${msnative_struct}" >&5 $as_echo "${msnative_struct}" >&6; } fi fi # Export all symbols to Win32 DLL using MinGW 2.0 ld. WIN32_LD_EXPORT_ALL_SYMBOLS='' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld accepts --export-all-symbols" >&5 $as_echo_n "checking whether ld accepts --export-all-symbols... " >&6; } if $LD --help 2>&1 | egrep 'export-all-symbols' > /dev/null; then WIN32_LD_EXPORT_ALL_SYMBOLS='-Wl,--export-all-symbols' { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$WIN32_LD_EXPORT_ALL_SYMBOLS" != x; then LDFLAGS="$LDFLAGS $WIN32_LD_EXPORT_ALL_SYMBOLS" fi ;; esac # Work around a problem in automake 1.4: when invoking install-strip, # INSTALL_PROGRAM is changed to 'install -s', and since # INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0 # which returns an error condition when stripping fails. INSTALL_SCRIPT='${INSTALL}' ### Setup libtool @%:@ Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi @%:@ Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi @%:@ Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${lt_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 $as_echo "$SED" >&6; } @%:@ Check whether --with-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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5 $as_echo_n "checking for BSD-compatible nm... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC @%:@ Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line __oline__ "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; *-*-cygwin* | *-*-mingw* | *-*-pw32*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac need_locks="$enable_libtool_lock" for ac_header in dlfcn.h do : ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_DLFCN_H 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$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 if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # 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_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then : $as_echo_n "(cached) " >&6 else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes else ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=yes @%:@ Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes @%:@ Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 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't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; 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=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5 $as_echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" @%:@ Check whether --with-tags was given. if test "${with_tags+set}" = set; then : withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) as_fn_error "invalid tag name: $tagname" "$LINENO" 5 ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5 fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration @%:@ Check whether --with-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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" 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].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 $as_echo "$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=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't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; 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_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 $as_echo "$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5 $as_echo "$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 $as_echo "$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_GCJ" >&5 $as_echo "$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=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't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; 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_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_GCJ" >&5 $as_echo "$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_GCJ" >&5 $as_echo "$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_GCJ" >&5 $as_echo "$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5 ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5 fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion ### Add extra directories to check for libraries. @%:@ Check whether --with-extra-lib was given. if test "${with_extra_lib+set}" = set; then : withval=$with_extra_lib; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra library directory" >&5 $as_echo_n "checking for extra library directory... " >&6; } if test -z "$with_extra_lib"; then if test "${xforms_cv_extra_lib+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_lib=NONE fi else test "x$with_extra_lib" = xyes && with_extra_lib= xforms_cv_extra_lib="$with_extra_lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_lib" >&5 $as_echo "$xforms_cv_extra_lib" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_lib"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 xforms_ldflags="${xforms_ldflags} -L$dir" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then xforms_ldflags="${xforms_ldflags} -Wl,-R$dir" else xforms_ldflags="${xforms_ldflags} -R$dir" fi fi fi done IFS=$ac_save_ifs test ! x"$xforms_ldflags" = x && LDFLAGS="$xforms_ldflags $LDFLAGS" ### Add extra directories to check for include files. @%:@ Check whether --with-extra-inc was given. if test "${with_extra_inc+set}" = set; then : withval=$with_extra_inc; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra include directory" >&5 $as_echo_n "checking for extra include directory... " >&6; } if test -z "$with_extra_inc"; then if test "${xforms_cv_extra_inc+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_inc=NONE fi else test "x$with_extra_inc" = xyes && with_extra_inc= xforms_cv_extra_inc="$with_extra_inc" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_inc" >&5 $as_echo "$xforms_cv_extra_inc" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_inc"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 xforms_cppflags="${xforms_cppflags} -I$dir " fi done IFS=$ac_save_ifs test ! x"$xforms_cppflags" = x && CPPFLAGS="$xforms_cppflags $CPPFLAGS" ### Add both includes and libraries @%:@ Check whether --with-extra-prefix was given. if test "${with_extra_prefix+set}" = set; then : withval=$with_extra_prefix; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra lib+include directory" >&5 $as_echo_n "checking for extra lib+include directory... " >&6; } if test -z "$with_extra_prefix"; then if test "${xforms_cv_extra_prefix+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_prefix=NONE fi else test "x$with_extra_prefix" = xyes && with_extra_prefix=${prefix} xforms_cv_extra_prefix="$with_extra_prefix" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_prefix" >&5 $as_echo "$xforms_cv_extra_prefix" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_prefix"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 CPPFLAGS="${CPPFLAGS} -I$dir/include " LDFLAGS="${LDFLAGS} -L$dir/lib" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then LDFLAGS="${LDFLAGS} -Wl,-R$dir/lib" else LDFLAGS="${LDFLAGS} -R$dir/lib" fi fi fi done IFS=$ac_save_ifs # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "@%:@define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if test "${ac_cv_lib_m_sin+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fopen in -lc" >&5 $as_echo_n "checking for fopen in -lc... " >&6; } if test "${ac_cv_lib_c_fopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fopen (); int main () { return fopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_fopen=yes else ac_cv_lib_c_fopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_fopen" >&5 $as_echo "$ac_cv_lib_c_fopen" >&6; } if test "x$ac_cv_lib_c_fopen" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi # Checks for header files. for ac_header in sys/select.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" if test "x$ac_cv_header_sys_select_h" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_SELECT_H 1 _ACEOF fi done # Check whether we want to build the gl code @%:@ Check whether --enable-gl was given. if test "${enable_gl+set}" = set; then : enableval=$enable_gl; fi if test x$enable_gl != xno ; then ac_fn_c_check_header_mongrel "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "$ac_includes_default" if test "x$ac_cv_header_GL_glx_h" = x""yes; then : else enable_gl=no fi fi if test x$enable_gl != xno; then BUILD_GL_TRUE= BUILD_GL_FALSE='#' else BUILD_GL_TRUE='#' BUILD_GL_FALSE= fi # Check for X, XPM and JPEG { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } @%:@ Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "@%:@define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = x""yes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = x""yes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = x""yes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = x""yes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = x""yes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi ### Check for Xpm library SAVE_LIBS="$LIBS" LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreateBufferFromImage in -lXpm" >&5 $as_echo_n "checking for XpmCreateBufferFromImage in -lXpm... " >&6; } if test "${ac_cv_lib_Xpm_XpmCreateBufferFromImage+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XpmCreateBufferFromImage (); int main () { return XpmCreateBufferFromImage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xpm_XpmCreateBufferFromImage=yes else ac_cv_lib_Xpm_XpmCreateBufferFromImage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreateBufferFromImage" >&5 $as_echo "$ac_cv_lib_Xpm_XpmCreateBufferFromImage" >&6; } if test "x$ac_cv_lib_Xpm_XpmCreateBufferFromImage" = x""yes; then : XPM_LIB="-lXpm" else xforms_error_txt="$xforms_error_txt ** Cannot find libXpm. Please check that the Xpm library is correctly installed on your system. " xforms_error=yes fi LIBS="$SAVE_LIBS" ### Check for Xpm headers SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" xforms_cv_xpm_h_location="" ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : ac_cv_header_xpm_h=yes xforms_cv_xpm_h_location="" else ac_fn_c_check_header_mongrel "$LINENO" "xpm.h" "ac_cv_header_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_xpm_h" = x""yes; then : else xforms_error_txt="$xforms_error_txt ** Cannot find xpm.h. Please check that the Xpm library is correctly installed on your system. " xforms_error=yes fi fi cat >>confdefs.h <<_ACEOF @%:@define XPM_H_LOCATION $xforms_cv_xpm_h_location _ACEOF CPPFLAGS="$SAVE_CPPFLAGS" ### Test for the header version if test $ac_cv_header_xpm_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking xpm header version" >&5 $as_echo_n "checking xpm header version... " >&6; } if test "${xforms_cv_xpmversion+set}" = set; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <&5 | \ grep '^"%%%"' 2>/dev/null | \ sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'` case "$xforms_cv_xpmr" in [0-9]) xformsxpmr_alpha=`echo $xforms_cv_xpmr |tr 123456789 abcdefghi` xformsxpmv_alpha=" (aka 3.$xforms_cv_xpmv$xformsxpmr_alpha)";; *) ;; esac xforms_cv_xpmversion="$xforms_cv_xpmv.$xforms_cv_xpmr$xformsxpmv_alpha" rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_xpmversion" >&5 $as_echo "$xforms_cv_xpmversion" >&6; } XPM_VERSION=${xforms_cv_xpmversion} case "$xforms_cv_xpmr" in [789]|[0-9][0-9]*) ;; *) xforms_warning_txt="$xforms_warning_txt == Version $xforms_cv_xpmversion of the Xpm library is a bit old. If you experience strange crashes with xforms, try to upgrade to at least version 4.7 (aka 3.4g). If you have installed a newer version of the library, check whether you have an old xpm.h header file in your include path. " xforms_warning=yes;; esac fi ### Check for Jpeg library { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; } if test "${ac_cv_lib_jpeg_jpeg_CreateDecompress+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jpeg_CreateDecompress (); int main () { return jpeg_CreateDecompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_CreateDecompress=yes else ac_cv_lib_jpeg_jpeg_CreateDecompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; } if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = x""yes; then : JPEG_LIB="-ljpeg" else xforms_error_txt="$xforms_error_txt ** Cannot find libjpeg. Please check that the jpeg library is correctly installed on your system. " xforms_error=yes fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF @%:@define RETSIGTYPE $ac_cv_type_signal _ACEOF if test $ac_cv_type_signal = "void" ; then $as_echo "@%:@define RETSIGTYPE_IS_VOID 1" >>confdefs.h fi for ac_func in snprintf strcasecmp strerror usleep nanosleep vsnprintf sigaction do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stdio.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if snprintf is declared by header $ac_header" >&5 $as_echo_n "checking if snprintf is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "snprintf" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF @%:@define HAVE_DECL_SNPRINTF 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done for ac_header in stdio.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf is declared by header $ac_header" >&5 $as_echo_n "checking if vsnprintf is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "vsnprintf" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF @%:@define HAVE_DECL_VSNPRINTF 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done for ac_header in signal.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction is declared by header $ac_header" >&5 $as_echo_n "checking if sigaction is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sigaction" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF @%:@define HAVE_DECL_SIGACTION 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done ### Some information on what just happened VERSION_INFO="Configuration\n\ Host type: ${host}\n\ Special build flags: ${xforms_flags}\n\ C Compiler: ${CC}\n\ C Compiler flags: ${CFLAGS}\n\ Linker flags: ${LDFLAGS}\n" ### Not used for now. ### AC_SUBST(VERSION_INFO) ## Some config.h stuff ### Finish the work. ac_config_files="$ac_config_files Makefile xforms.spec lib/include/AAA.h config/Makefile lib/Makefile lib/bitmaps/Makefile lib/fd/Makefile lib/include/Makefile lib/private/Makefile image/Makefile gl/Makefile fdesign/Makefile fdesign/fd/Makefile fdesign/fd4test/Makefile fdesign/notes/Makefile fdesign/spec/Makefile fdesign/xpm/Makefile fd2ps/Makefile fd2ps/test/Makefile demos/Makefile demos/fd/Makefile doc/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_BWC_BS_HACK_TRUE}" && test -z "${USE_BWC_BS_HACK_FALSE}"; then as_fn_error "conditional \"USE_BWC_BS_HACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DEMOS_TRUE}" && test -z "${BUILD_DEMOS_FALSE}"; then as_fn_error "conditional \"BUILD_DEMOS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then as_fn_error "conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_GL_TRUE}" && test -z "${BUILD_GL_FALSE}"; then as_fn_error "conditional \"BUILD_GL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error ERROR [LINENO LOG_FD] @%:@ --------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set $? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global $as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in @%:@( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by xforms $as_me 1.0.93sp1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ xforms config.status 1.0.93sp1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "xforms.spec") CONFIG_FILES="$CONFIG_FILES xforms.spec" ;; "lib/include/AAA.h") CONFIG_FILES="$CONFIG_FILES lib/include/AAA.h" ;; "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/bitmaps/Makefile") CONFIG_FILES="$CONFIG_FILES lib/bitmaps/Makefile" ;; "lib/fd/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fd/Makefile" ;; "lib/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/include/Makefile" ;; "lib/private/Makefile") CONFIG_FILES="$CONFIG_FILES lib/private/Makefile" ;; "image/Makefile") CONFIG_FILES="$CONFIG_FILES image/Makefile" ;; "gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;; "fdesign/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/Makefile" ;; "fdesign/fd/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/fd/Makefile" ;; "fdesign/fd4test/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/fd4test/Makefile" ;; "fdesign/notes/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/notes/Makefile" ;; "fdesign/spec/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/spec/Makefile" ;; "fdesign/xpm/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/xpm/Makefile" ;; "fd2ps/Makefile") CONFIG_FILES="$CONFIG_FILES fd2ps/Makefile" ;; "fd2ps/test/Makefile") CONFIG_FILES="$CONFIG_FILES fd2ps/test/Makefile" ;; "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;; "demos/fd/Makefile") CONFIG_FILES="$CONFIG_FILES demos/fd/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # show version information echo printf "$VERSION_INFO" echo # Display a final warning if there has been a XFORMS_ERROR if test x$xforms_error = xyes; then cat < int main(int argc, char *argv[]) @{ FL_FORM *form; FL_OBJECT *yes, *no, *but; fl_initialize(&argc, argv, "FormDemo", 0, 0); form = fl_bgn_form(FL_UP_BOX, 320, 120); fl_add_box(FL_NO_BOX, 160, 40, 0, 0, "Do you want to Quit?"); yes = fl_add_button(FL_NORMAL_BUTTON, 40, 70, 80, 30, "Yes"); no = fl_add_button(FL_NORMAL_BUTTON, 200, 70, 80, 30, "No"); fl_end_form(); fl_show_form(form, FL_PLACE_MOUSE, FL_TRANSIENT, "Question"); while ((but = fl_do_forms()) != yes) /* empty */ ; fl_finish(); return 0; @} @end example @noindent It creates a form with a simple text and two buttons. After displaying the form @code{@ref{fl_do_forms()}} is called. This routine returns the object being pushed. Simply checking whether this is object @code{yes} determines whether we should quit. @ifhtml @center @image{images/yesno} @end ifhtml @ifnothtml @center @image{images/yesno,6cm} @end ifnothtml As you see, the program starts by calling the routine @code{@ref{fl_initialize()}}. This routine should be called before any other calls to the library are made (except for @code{@ref{fl_set_defaults()}}). One of the things this routine does is to establish a connection to the X server and initialize a resource database used by the X resource manager. It also does many other things, such as parsing command line options and initializing internal Forms Library structures. For now, it suffices to know that by calling this routine, a program automatically recognizes the following command line options @multitable @columnfractions 0.3 0.3 0.4 @headitem Option @tab Value type @tab Meaning @item @item @code{-display} @i{host:dpy} @tab string @tab Remote host @item @code{-name} @i{appname} @tab string @tab change application name @item @code{-visual} @i{class} @tab string @tab TrueColor, PseudoColor etc. @item @code{-depth} @i{depth} @tab integer @tab Preferred visual depth @item @code{-private} @tab none @tab Force a private colormap @item @code{-shared} @tab none @tab Always share colormap @item @code{-stdcmap} @tab none @tab Use standard colormap @item @code{-fldebug} @i{level} @tab integer @tab Print some debug information @item @code{-flhelp} @tab none @tab Print out these options @item @code{-sync} @tab none @tab Force synchronous mode @end multitable Note that the executable name @code{argv[0]} should not contain period or @code{*}. @xref{Part V Overview of Main Functions, , Overview of Main Functions}, for further details. The above program can in fact be made a lot simpler, using the goodies described in @ref{Part I Goodies, , Goodies}. You can simply write: @example while (!fl_show_question("Do you want to Quit?", 0)) /* empty */ ; @end example @noindent It will have exactly the same effect. The above program only shows one of the event handling methods provided by the library. The direct method of event handling shown above is appropriate for simple programs. For reasonably complicated ones, however, utilizing object callback is strongly encouraged. We demonstrate the use of object callbacks using the previous example with some modifications so that event processing via callbacks is utilized. It is recommended and also typical of a good XForms application to separate the UI components and the application program itself. Typically the UI components are generated by the bundled GUI builder and the application program consists mostly of callbacks and some glue that combines the UI and the program. To use callbacks, a typical procedure would be to define all the callback functions first, then register them with the system using @code{@ref{fl_set_object_callback()}}. After the form is realized (shown), control is handed to Forms Library's main loop @code{@ref{fl_do_forms()}}, which responds to user events indefinitely and never returns. After modifications are made to utilize object callbacks, the simple question example looks as follows: @example #include #include #include void yes_callback(FL_OBJECT *obj, long user_data) @{ printf("Yes is pushed\n"); fl_finish(); exit(0); @} void no_callback(FL_OBJECT *obj, long user_data) @{ printf("No is pushed\n"); @} int main(int argc, char *argv[]) @{ FL_FORM *form; FL_OBJECT *obj; fl_initialize(&argc, argv, "FormDemo", 0, 0); form = fl_bgn_form(FL_UP_BOX, 320, 120); fl_add_box(FL_NO_BOX, 160, 40, 0, 0, "Do you want to Quit?"); obj = fl_add_button(FL_NORMAL_BUTTON, 40, 70, 80, 30,"Yes"); fl_set_object_callback(obj, yes_callback, 0); obj = fl_add_button(FL_NORMAL_BUTTON, 200, 70, 80, 30,"No"); fl_set_object_callback(obj, no_callback, 0); fl_end_form(); fl_show_form(form, FL_PLACE_MOUSE, FL_TRANSIENT, "Question"); fl_do_forms(); return 0; @} @end example In this example, callback routines for both the yes and no buttons are first defined. Then they are registered with the system using @code{@ref{fl_set_object_callback()}}. After the form is shown, the event handling is again handed to the main loop in Forms Library via @code{@ref{fl_do_forms()}}. In this case, whenever the buttons are pushed, the callback routine is invoked with the object being pushed as the first argument to the callback function, and @code{@ref{fl_do_forms()}} never returns. You might also notice that in this example, both buttons are made anonymous, that is, it is not possible to reference the buttons directly outside of the creation routine. This is often desirable when callback functions are bound to objects as the objects themselves will not be referenced except as callback arguments. By creating anonymous objects, a program avoids littering itself with useless identifiers. The callback model presented above is the preferred way of interaction for typical programs and it is strongly recommended that all programs using XForms be coded using object callbacks. @node Programming Model @section Programming Model To summarize, every Forms Library application program must perform several basic steps. These are @table @asis @item Initialize the Forms Library This step establishes a connection to the X server, allocates resources and otherwise initializes the Forms Library's internal structures, which include visual selection, font initialization and command line parsing. @item Defining forms Every program creates one or more forms and all the objects on them to construct the user interface. This step may also include callback registration and per object initialization such as setting bounds for sliders etc. @item Showing forms This step makes the designed user interface visible by creating and mapping the window (and subwindows) used by the forms. @item Main loop Most Forms Library applications are completely event-driven and are designed to respond to user events indefinitely. The Forms Library main loop, usually invoked by calling @code{@ref{fl_do_forms()}}, retrieves events from the X event queue, dispatches them to the appropriate objects and notifies the application of what action, if any, should be taken. The actual notification method depends on how the interaction is set up, which could be done by calling an object callback or by returning the object whose status has changed to the application program. @end table The following chapters will lead you through each step of the process with more details. xforms-1.0.93sp1/doc/part3_static_objects.texi0000644000175000017500000007300111376032000017770 0ustar jensjens@node Part III Static Objects @chapter Static Objects @ifnottex @menu * Box Object: Box Object * Frame Object: Frame Object * LabelFrame Object: LabelFrame Object * Text Object: Text Object * Bitmap Object: Bitmap Object * Pixmap Object: Pixmap Object * Clock Object: Clock Object * Chart Object: Chart Object @end menu @end ifnottex @node Box Object @section Box Object Boxes are simply used to give the dialogue forms a nicer appearance. They can be used to visually group other objects together. The bottom of each form is a box. @ifnottex @menu * Adding Box Objects: Adding Box Objects * Box Types: Box Types * Box Attributes: Box Attributes * Remarks: Box Remarks @end menu @end ifnottex @node Adding Box Objects @subsection Adding Box Objects To add a box to a form you use the routine @findex fl_add_box() @anchor{fl_add_box()} @example FL_OBJECT *fl_add_box(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is per default placed in the center of the box. @node Box Types @subsection Box Types The following types are available: @table @code @tindex FL_UP_BOX @anchor{FL_UP_BOX} @item FL_UP_BOX A box that comes out of the screen. @tindex FL_DOWN_BOX @anchor{FL_DOWN_BOX} @item @code{FL_DOWN_BOX} A box that goes down into the screen. @tindex FL_FLAT_BOX @anchor{FL_FLAT_BOX} @item FL_FLAT_BOX A flat box without a border. @tindex FL_BORDER_BOX @anchor{FL_BORDER_BOX} @item FL_BORDER_BOX A flat box with just a border. @tindex FL_FRAME_BOX @anchor{FL_FRAME_BOX} @item FL_FRAME_BOX A flat box with an engraved frame. @tindex FL_SHADOW_BOX @anchor{FL_SHADOW_BOX} @item FL_SHADOW_BOX A flat box with a shadow. @tindex FL_ROUNDED_BOX @anchor{FL_ROUNDED_BOX} @item FL_ROUNDED_BOX A rounded box. @tindex FL_RFLAT_BOX @anchor{FL_RFLAT_BOX} @item FL_RFLAT_BOX A rounded box without a border. @tindex FL_RSHADOW_BOX @anchor{FL_RSHADOW_BOX} @item FL_RSHADOW_BOX A rounded box with a shadow. @tindex FL_OVAL_BOX @anchor{FL_OVAL_BOX} @item FL_OVAL_BOX An elliptic box. @tindex FL_NO_BOX @anchor{FL_NO_BOX} @item FL_NO_BOX No box at all, only a centered label. @end table @node Box Attributes @subsection Box Attributes The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the box, the second (@code{col2}) is not used. @node Box Remarks @subsection Remarks No interaction takes place with boxes. Do not use @code{FL_NO_BOX} type if the label is to change during the execution of the program. @node Frame Object @section Frame Object Frames are simply used to give the dialogue forms a nicer appearance. They can be used to visually group other objects together. Frames are almost the same as a box, except that the interior of the bounding box is not filled. Use of frames can speed up drawing in certain situations. For example, to place a group of radio buttons within an @code{FL_ENGRAVED_FRAME}. If we were to use an @code{FL_FRAME_BOX} to group the buttons, visually they would look the same. However, the latter is faster as we don't have to fill the interior of the bounding box and can also reduce flicker. Frames are useful in decorating free objects and canvases. @ifnottex @menu * Adding Frame Objects: Adding Frame Objects * Frame Types: Frame Types * Frame Attributes: Frame Attributes * Remarks: Frame Remarks @end menu @end ifnottex @node Adding Frame Objects @subsection Adding Frame Objects To add a frame to a form you use the routine @example FL_OBJECT *fl_add_frame(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual except that the frame is drawn outside of the bounding box (so a flat box of the same size just fills the inside of the frame without any gaps). The label is by default placed centered inside the frame. @node Frame Types @subsection Frame Types The following types are available: @table @code @tindex FL_NO_FRAME @item FL_NO_FRAME Nothing is drawn. @tindex FL_UP_FRAME @item FL_UP_FRAME A frame appears coming out of the screen. @tindex FL_DOWN_FRAME @item FL_DOWN_FRAME A frame that goes down into the screen. @tindex FL_BORDER_FRAME @item FL_BORDER_FRAME A frame with a simple outline. @tindex FL_ENGRAVED_FRAME @item FL_ENGRAVED_FRAME A frame appears to be engraved. @tindex FL_EMBOSSED_FRAME @item FL_EMBOSSED_FRAME A frame appears embossed. @tindex FL_ROUNDED_FRAME @item FL_ROUNDED_FRAME A rounded frame. @tindex FL_OVAL_FRAME @item FL_OVAL_FRAME An elliptic box. @end table @node Frame Attributes @subsection Frame Attributes The first color argument (@code{col1}) of @code{@ref{fl_set_object_color()}} controls the color of the frame if applicable, the second (@code{col2}) is not used. The boxtype attribute does not apply to the frame class. @node Frame Remarks @subsection Remarks No interaction takes place with frames. It may be faster to use frames instead of boxes for text that is truly static. See @file{freedraw.c} for an example use of frame objects. @node LabelFrame Object @section LabelFrame Object A label frame is almost the same as a frame except that the label is placed on the frame (See Fig. 15.1) instead of inside or outside of the bounding box as in a regular frame. @ifnottex @menu * Adding LabelFrame Objects: Adding LabelFrame Objects * LabelFrame Types: LabelFrame Types * LabelFrame Attributes: LabelFrame Attributes * Remarks: LabelFrames Remarks @end menu @end ifnottex @node Adding LabelFrame Objects @subsection Adding LabelFrame Objects To add a labelframe to a form you use the routine @findex fl_add_labelframe() @anchor{fl_add_labelframe()} @example FL_OBJECT *fl_add_labelframe(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual except that the frame is drawn outside of the bounding box (so a flat box of the same size just fills the inside of the frame without any gaps). The label is by default placed on the upper left hand part of the frame. Its position can changed (within limits) via calls of @code{@ref{fl_set_object_lalign()}}. @ifhtml @center @image{images/labelframe} @end ifhtml @ifnothtml @center @image{images/labelframe,7cm} @end ifnothtml @node LabelFrame Types @subsection LabelFrame Types The following types are available: @table @code @tindex FL_NO_FRAME @item FL_NO_FRAME Nothing is drawn. @tindex FL_UP_FRAME @item FL_UP_FRAME A frame appears coming out of the screen. @tindex FL_DOWN_FRAME @item FL_DOWN_FRAME A frame that goes down into the screen. @tindex FL_BORDER_FRAME @item FL_BORDER_FRAME A frame with a simple outline. @tindex FL_ENGRAVED_FRAME @item FL_ENGRAVED_FRAME A frame appears to be engraved. @tindex FL_EMBOSSED_FRAME @item FL_EMBOSSED_FRAME A frame appears embossed. @tindex FL_ROUNDED_FRAME @item FL_ROUNDED_FRAME A rounded frame. @tindex FL_OVAL_FRAME @item FL_OVAL_FRAME An elliptic box. @end table @node LabelFrame Attributes @subsection Attributes The first color in the call of @code{@ref{fl_set_object_color()}} controls the color of the frame if applicable. The second color controls the background color of the label. Boxtype attribute does not apply to the labelframe class @node LabelFrames Remarks @subsection Remarks No interaction takes place with labelframes. You can not draw a label inside or outside of the frame box. If you try, say, by requesting @code{FL_ALIGN_CENTER}, the label is drawn using @code{FL_ALIGN_TOP_LEFT}. @node Text Object @section Text Object Text objects simply consist of a label possibly placed in a box. @ifnottex @menu * Adding Text Objects: Adding Text Objects * Text Types: Text Types * Text Attributes: Text Attributes * Remarks: Text Remarks @end menu @end ifnottex @node Adding Text Objects @subsection Adding Text Objects To add a text to a form you use the routine @findex fl_add_text() @anchor{fl_add_text()} @example FL_OBJECT *fl_add_text(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is by default placed flushed left in the bounding box. @node Text Types @subsection Text Types @tindex FL_NORMAL_TEXT Only one type of text exists: @code{FL_NORMAL_TEXT}. @node Text Attributes @subsection Text Attributes To set or change the text shown, use @code{@ref{fl_set_object_label()}}. Any boxtype can be used for text. The first color argument (@code{col1}) of @code{@ref{fl_set_object_color()}} controls the color of the box the text is placed into, the second (@code{col2}) is not used. The color of the text itself is controlled by calls of @code{@ref{fl_set_object_lcol()}} as usual. If the text is to change dynamically, boxtype @code{NO_BOX} should not be used for the object. @node Text Remarks @subsection Remarks No interaction takes place with text objects. Don't use boxtype @code{FL_NO_BOX} if the text is to change dynamically. Note that there is almost no difference between a box with a label and a text. The only difference lies in the position where the text is placed and the fact that text is clipped to the bounding box. Text is normally placed inside the box at the left side. This helps you putting different lines of text below each other. Labels inside boxes are default centered in the box. You can change the position of the text inside the box using the routine @code{@ref{fl_set_object_lalign()}}. In contrast to boxes different alignments for text always place the text inside the box rather than outside the box. @node Bitmap Object @section Bitmap Object A bitmap is a simple bitmap shown on a form. @ifnottex @menu * Adding Bitmap Objects: Adding Bitmap Objects * Bitmap Types: Bitmap Types * Bitmap Interaction: Bitmap Interaction * Other Bitmap Routines: Other Bitmap Routines * Bitmap Attributes: Bitmap Attributes * Remarks: Bitmap Remarks @end menu @end ifnottex @node Adding Bitmap Objects @subsection Adding Bitmap Objects To add a bitmap to a form you use the routine @findex fl_add_bitmap() @anchor{fl_add_bitmap()} @example FL_OBJECT *fl_add_bitmap(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example The meaning of the parameters is as usual. The label is by default placed below the bitmap. The bitmap is empty on creation. @node Bitmap Types @subsection Bitmap Types @tindex FL_NORMAL_BITMAP Only the type @code{FL_NORMAL_BITMAP} is available. @node Bitmap Interaction @subsection Bitmap Interaction No interaction takes place with a bitmap. For bitmaps that interact see @ref{Adding Button Objects}, on how to create a button with a bitmap on top of it. (You can also place a hidden button over it if you want something to happen when pressing the mouse on a static bitmap.) @node Other Bitmap Routines @subsection Other Bitmap Routines To set the actual bitmap being displayed use @findex fl_set_bitmap_data() @anchor{fl_set_bitmap_data()} @findex fl_set_bitmap_file() @anchor{fl_set_bitmap_file()} @example void fl_set_bitmap_data(FL_OBJECT *obj, int w, int h, unsigned char *bits); void fl_set_bitmap_file(FL_OBJECT *obj, const char *file); @end example @noindent @code{bits} contains the bitmap data as a character string. @code{file} is the name of the file that contains the bitmap data. A number of bitmaps can be found in @file{/usr/include/X11/bitmaps} or similar places. The X program @code{bitmap} can be used to create bitmaps. Two additional routines are provided to make a Bitmap from a bitmap file or data @findex fl_read_bitmapfile() @anchor{fl_read_bitmapfile()} @findex fl_create_from_bitmapdata() @anchor{fl_create_from_bitmapdata()} @example Pixmap fl_read_bitmapfile(Window win, const char *filename, unsigned *width, unsigned *height, int *hotx, int *hoty) Pixmap fl_create_from_bitmapdata(Window win, const char *data, int width, int height); @end example @noindent where @code{win} is any window ID in your application and the other parameters have the obvious meanings. If there is no window created yet, the return value of @code{@ref{fl_default_window()}} may be used. Note: bitmaps created by the above routines have a depth of 1 and should be displayed using @code{XCopyPlane()}. @node Bitmap Attributes @subsection Bitmap Attributes The label color as set by @code{@ref{fl_set_object_lcol()}} controls both the foreground color of the bitmap and the color of the label (i.e.@: they are always identical). The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} sets the background color of the bitmap (and the color of the box), the second (@code{col2}) is not used. @node Bitmap Remarks @subsection Remarks See @file{demo33.c} for a demo of a bitmap. @node Pixmap Object @section Pixmap Object A pixmap is a simple pixmap (color icon) shown on a form. @ifnottex @menu * Adding Pixmap Objects: Adding Pixmap Objects * Pixmap Types: Pixmap Types * Pixmap Interaction: Pixmap Interaction * Other Pixmap Routines: Other Pixmap Routines * Pixmap Attributes: Pixmap Attributes * Remarks: Pixmap Remarks @end menu @end ifnottex @node Adding Pixmap Objects @subsection Adding Pixmap Objects To add a pixmap to a form use the routine @findex fl_add_pixmap() @anchor{fl_add_pixmap()} @example FL_OBJECT *fl_add_pixmap(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @end example @noindent The meaning of the parameters is as usual. The label is by default placed below the pixmap. The pixmap is empty on creation. @node Pixmap Types @subsection Pixmap Types @tindex FL_NORMAL_PIXMAP Only the type @code{FL_NORMAL_PIXMAP} is available. @node Pixmap Interaction @subsection Pixmap Interaction No interaction takes place with a pixmap. For pixmap that interacts see @ref{Adding Button Objects}, on how to create a button with a pixmap on top of it. (You can also place a hidden button over it if you want something to happen when pressing the mouse on a static pixmap.) @node Other Pixmap Routines @subsection Other Pixmap Routines A pixmap file (usually with extension @code{.xpm}) is an ASCII file that contains the definition of the pixmap as a @code{char} pointer array that can be included directly into a C (or C++) source file. To set the actual pixmap being displayed, use one of the following routines: @findex fl_set_pixmap_file() @anchor{fl_set_pixmap_file()} @findex fl_set_pixmap_data() @anchor{fl_set_pixmap_data()} @example void fl_set_pixmap_file(FL_OBJECT *obj, const char *file); void fl_set_pixmap_data(FL_OBJECT *obj, char **data); @end example @noindent In the first routine, you specify the pixmap by the filename @code{file} that contains it. In the second routine, you @code{#include} the pixmap at compile time and use the pixmap data (an array of @code{char} pointers) directly. Note that both of these functions do not free the old pixmaps associated with the object. If you're writing a pixmap browser type applications, be sure to free the old pixmaps by calling @findex fl_free_pixmap_pixmap() @anchor{fl_free_pixmap_pixmap()} @example void fl_free_pixmap_pixmap(FL_OBJECT *obj); @end example @noindent on the pixmap object prior to calling these two routines. This function, in addition to freeing the pixmap and the mask, also frees the colors the pixmap allocated. To obtain the pixmap ID currently being displayed, the following routine can be used @findex fl_get_pixmap_pixmap() @anchor{fl_get_pixmap_pixmap()} @example Pixmap fl_get_pixmap_pixmap(FL_OBJECT *obj, Pixmap *id, Pixmap *mask); @end example @noindent In some situations, you might already have a pixmap resource ID, e.g.@: from @code{@ref{fl_read_pixmapfile()}} (see below in the "Remarks" subsection) you can use the following routine to change the the pixmap @findex fl_set_pixmap_pixmap() @anchor{fl_set_pixmap_pixmap()} @example void fl_set_pixmap_pixmap(FL_OBJECT *obj, Pixmap id, Pixmap mask); @end example @noindent where @code{mask} is used for transparency (see @code{@ref{fl_read_pixmapfile()}}). Use 0 for mask if no special clipping attributes are desired. This routine does not free the pixmap ID nor the mask already associated with the object. Thus if you no longer need the old pixmaps, they should be freed prior to changing the pixmaps using the function @code{@ref{fl_free_pixmap_pixmap()}}. Pixmaps are by default displayed centered inside the bounding box. However, this can be changed using the following routine @findex fl_set_pixmap_align() @anchor{fl_set_pixmap_align()} @example void fl_set_pixmap_align(FL_OBJECT *obj, int align, int dx, int dy); @end example @noindent where @code{align} is the same as that used for labels. @xref{Label Attributes and Fonts}, for a list. @code{dx} and @code{dy} are extra margins to leave in addition to the object border width. By default, @code{dx} and @code{dy} are set to 3. Note that although you can place a pixmap outside of the bounding box, it probably is not a good idea. @node Pixmap Attributes @subsection Pixmap Attributes By default, if a pixmap has more colors than that available in the colormap, the library will use substitute colors that are judged "close enough". This closeness is defined as the difference between the requested color and the color found being smaller than some pre-set threshold values between 0 and 65535 (0 means exact match). The default thresholds are 40000 for red, 30000 for green and 50000 for blue. To change these defaults, use the following routine @findex fl_set_pixmap_colorcloseness() @anchor{fl_set_pixmap_colorcloseness()} @example void fl_set_pixmap_colorcloseness(int red, int green, int blue); @end example @node Pixmap Remarks @subsection Remarks The following routines may come in handy to read a pixmap file into a pixmap @findex fl_read_pixmapfile() @anchor{fl_read_pixmapfile()} @example Pixmap fl_read_pixmapfile(Window win, const char *filename, unsigned *width, unsigned *height, Pixmap *shape_mask, int *hotx, int *hoty, FL_COLOR tran); @end example @noindent where @code{win} is the window in which the pixmap is to be displayed. If the window is yet to be created, you can use the default window, returned by a call of @code{@ref{fl_default_window()}}. Parameter @code{shape_mask} is a pointer to an already existing @code{Pixmap}, which, if not @code{NULL}, is used as a clipping mask to achieve transparency. @code{hotx} and @code{hoty} are the center of the pixmap (useful if the pixmap is to be used as a cursor). Parameter @code{tran} is currently not used. If you have already had the pixmap data in memory, the following routine may be used @findex fl_create_from_pixmapdata() @anchor{fl_create_from_pixmapdata()} @example Pixmap fl_create_from_pixmapdata(Window win, char **data, unsigned *width, unsigned *height, Pixmap *shape_mask, int *hotx, int *hoty, FL_COLOR tran); @end example @noindent All parameters have the same meaning as for @code{fl_read_pixmapfile}. Note that the Forms Library handles transparency, if specified in the pixmap file or data, for pixmap and pixmapbutton objects. However, when using @code{@ref{fl_read_pixmapfile()}} or @code{@ref{fl_create_from_pixmapdata()}}, the application programmer is responsible to set the clip mask in an appropriate GCs. Finally there is a routine that can be used to free a Pixmap @findex fl_free_pixmap() @anchor{fl_free_pixmap()} @example void fl_free_pixmap(Pixmap id); @end example @noindent You will need the XPM library (version 3.4c or later) developed by Arnaud Le Hors and GROUPE BULL (@email{lehors@@sophia.inria.fr}) to use pixmap. The XPM library can be obtained from many X distribution/mirror sites via anonymous FTP, e.g.@: (@uref{ftp://ftp.x.org/contrib/libraries/}. Its home page is @uref{http://old.koalateam.com/lehors/xpm.html}. @node Clock Object @section Clock Object A clock object simply displays a clock on the form @ifnottex @menu * Adding Clock Objects: Adding Clock Objects * Clock Types: Clock Types * Clock Interaction: Clock Interaction * Other Clock Routines: Other Clock Routines * Clock Attributes: Clock Attributes * Remarks: Clock Remarks @end menu @end ifnottex @node Adding Clock Objects @subsection Adding Clock Objects To add a clock to a form you use the routine @findex fl_add_clock() @anchor{fl_add_clock()} @example FL_OBJECT *fl_add_clock(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, char label[]) @end example @noindent The meaning of the parameters is as usual. The label is by default placed below the clock. @node Clock Types @subsection Clock Types The following types are available: @table @code @tindex FL_ANALOG_CLOCK @item FL_ANALOG_CLOCK An analog clock complete with the second hand. @tindex FL_DIGITAL_CLOCK @item FL_DIGITAL_CLOCK A digital clock. @end table @node Clock Interaction @subsection Clock Interaction No interaction takes place with clocks. @node Other Clock Routines @subsection Other Clock Routines To get the displayed time (local time as modified by the adjustment described below) use the following routine @findex fl_get_clock() @anchor{fl_get_clock()} @example void fl_get_clock(FL_OBJECT *obj, int *h, int *m, int *s); @end example @noindent Upon function return the parameters are set as follows: @code{h} is between 0-23, indicating the hour, @code{m} is between 0-59, indicating the minutes, and @code{s} is between 0-59, indicating the seconds. To display a time other than the local time, use the following routine @findex fl_set_clock_adjustment() @anchor{fl_set_clock_adjustment()} @example long fl_set_clock_adjustment(FL_OBJECT *obj, long adj); @end example @noindent where @code{adj} is in seconds. For example, to display a time that is one hour behind the local time, an adjustment of @code{3600} can be used. The function returns the old adjustment value. By default, the digital clock uses 24hr system. You can switch the display to 12hr system (am-pm) by using the following routine @findex fl_set_clock_ampm() @anchor{fl_set_clock_ampm()} @example void fl_set_clock_ampm(FL_OBJECT *obj, int yes_no) @end example @node Clock Attributes @subsection Clock Attributes Never use @code{FL_NO_BOX} as the boxtype for a digital clock. The first color argument (@code{col1}) of @code{@ref{fl_set_object_color()}} controls the color of the background, the second (@code{col2}) is the color of the hands. @node Clock Remarks @subsection Remarks See @file{flclock.c} for an example of the use of clocks. @xref{Misc. Functions}, for other time related routines. @node Chart Object @section Chart Object The chart object gives you an easy way to display a number of different types of charts like bar-charts, pie-charts, line-charts, etc. They can either be used to display some fixed chart or a changing chart (e.g. a strip-chart). Values in the chart can be changed and new values can be added which makes the chart move to the left, i.e., new entries appear at the right and old entries disappear at the left. This can be used to e.g. monitor processes. @ifnottex @menu * Adding Chart Objects: Adding Chart Objects * Chart Types: Chart Types * Chart Interaction: Chart Interaction * Other Chart Routines: Other Chart Routines * Chart Attributes: Chart Attributes * Remarks: Chart Remarks @end menu @end ifnottex @node Adding Chart Objects @subsection Adding Chart Objects To add a chart object to a form use the routine @findex fl_add_chart() @anchor{fl_add_chart()} @example FL_OBJECT *fl_add_chart(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent It shows an empty box on the screen with the label below it. @node Chart Types @subsection Chart Types The following types are available: @table @code @tindex FL_BAR_CHART @item FL_BAR_CHART A bar-chart @tindex FL_HORBAR_CHART @item FL_HORBAR_CHART A horizontal bar-chart @tindex FL_LINE_CHART @item FL_LINE_CHART A line-chart @tindex FL_FILLED_CHART @item FL_FILLED_CHART A line-chart but the area below curve is filled @tindex FL_SPIKE_CHART @item FL_SPIKE_CHART A chart with a vertical spike for each value @tindex FL_PIE_CHART @item FL_PIE_CHART A pie-chart @tindex FL_SPECIALPIE_CHART @item FL_SPECIALPIE_CHART A pie-chart with displaced first item @end table All charts except pie-charts can display positive and negative data. Pie-charts will ignore values that are less then or equal 0. The maximum number of values displayed in the chart can be set using the routine @code{@ref{fl_set_chart_maxnumb()}}. The argument must be not larger than @code{FL_CHART_MAX} which currently is 512. Switching between different types can be done without any complications. @node Chart Interaction @subsection Chart Interaction No interaction takes place with charts. @node Other Chart Routines @subsection Other Chart Routines There are a number of routines to change the values in the chart and to change its behavior. To clear a chart use the routine @findex fl_clear_chart() @anchor{fl_clear_chart()} @example void fl_clear_chart(FL_OBJECT *obj); @end example To add an item to a chart use @findex fl_add_chart_value() @anchor{fl_add_chart_value()} @example void fl_add_chart_value(FL_OBJECT *obj, double val, const char *text, FL_COLOR col); @end example @noindent Here @code{val} is the value of the item, @code{text} is the label to be associated with the item (can be empty) and @code{col} is an index into the colormap (@code{FL_RED} etc.) that is the color of this item. The chart will be redrawn each time you add an item. This might not be appropriate if you are filling a chart with values. In this case put the calls between calls of @code{@ref{fl_freeze_form()}} and @code{@ref{fl_unfreeze_form()}}. By default, the label is drawn in a tiny font in black. You can change the font style, size or color using the following routine @findex fl_set_chart_lstyle() @anchor{fl_set_chart_lstyle()} @findex fl_set_chart_lsize() @anchor{fl_set_chart_lsize()} @findex fl_set_chart_lcolor() @anchor{fl_set_chart_lcolor()} @example void fl_set_chart_lstyle(FL_OBJECT *obj, int fontstyle); void fl_set_chart_lsize(FL_OBJECT *obj, int fontsize); void fl_set_chart_lcolor(FL_OBJECT *obj, FL_COLOR color); @end example @noindent Note that @code{@ref{fl_set_chart_lcolor()}} only affects the label color of subsequent items, not the items already created. You can also insert a new value at a particular place using @findex fl_insert_chart_value() @anchor{fl_insert_chart_value()} @example void fl_insert_chart_value(FL_OBJECT *obj, int index, double val, const char *text, FL_COLOR col); @end example @noindent @code{index} is the index before which the new item should be inserted. The first item is number 1. So, for example, to make a strip-chart where the new value appears at the left, each time insert the new value before index 1. To replace the value of a particular item use the routine @findex fl_replace_chart_value() @anchor{fl_replace_chart_value()} @example void fl_replace_chart_value(FL_OBJECT *obj, int index, double val, const char *text, FL_COLOR col); @end example @noindent Here @code{index} is the index of the value to be replaced. The first value has an index of 1, etc. Normally, bar-charts and line-charts are automatically scaled in the vertical direction such that all values can be displayed. This is often not wanted when new values are added from time to time. To set the minimal and maximal value displayed use the routine @findex fl_set_chart_bounds() @anchor{fl_set_chart_bounds()} @example void fl_set_chart_bounds(FL_OBJECT *obj, double min, double max)' @end example @noindent To return to automatic scaling call it with both @code{min} and @code{max} being set to @code{0.0}. To obtain the current bounds, use the following routine @findex fl_get_chart_bounds() @anchor{fl_get_chart_bounds()} @example void fl_get_chart_bounds(FL_OBJECT *obj, double *min, double *max)' @end example Also the width of the bars and distance between the points in a line-chart are normally scaled. To change this use @findex fl_set_chart_autosize() @anchor{fl_set_chart_autosize()} @example void fl_set_chart_autosize(FL_OBJECT *obj, int autosize); @end example @noindent with @code{autosize} being set to false (0). In this case the width of the bars will be such that the maximum number of items fits in the box. This maximal number (defaults to @tindex FL_CHART_MAX @code{FL_CHART_MAX}) can be changed using @findex fl_set_chart_maxnumb() @anchor{fl_set_chart_maxnumb()} @example void fl_set_chart_maxnumb(FL_OBJECT *obj, int maxnumb); @end example @noindent where @code{maxnumb} is the maximal number of items to be displayed, which may not be larger than @code{FL_CHART_MAX}. @node Chart Attributes @subsection Chart Attributes Don't use boxtype @code{FL_NO_BOX} for a chart object if it changes value. The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the box, the argument (@code{col2}) isn't used. @node Chart Remarks @subsection Remarks See @file{chartall.c} and @file{chartstrip.c} for examples of the use of chart objects. xforms-1.0.93sp1/doc/part4_global_structure.texi0000644000175000017500000001764411171560225020374 0ustar jensjens@node Part IV Global Structure @chapter Global Structure The Forms Library defines the basic architecture of an object class. This architecture allows different object classes developed by different programmers to work together without complications. The Forms Library consists of a main module and a number of object class modules. The object class modules are completely independent from the main module. So new object class modules can be added without any change (nor recompilation) of the main module. The main module takes care of all the global bookkeeping and the handling of events. The object class modules have to take care of all the object specific aspects, like drawing the object, reacting to particular types of user actions, etc. For each class there exists a file that contains the object class module. For example, there are files @file{slider.c}, @file{box.c}, @file{text.c}, @file{button.c}, etc. The main module communicates with the object class modules by means of events (messages if you prefer). Each object has to have a handle routine known to the main module so that it can be called whenever something needs to be done. One of the arguments passed to the handle routine is the type of event, e.g. @code{FL_DRAW}, indicating that the object needs to be redrawn. Each object class consists of two components. One component, both its data and functions, is common to all object classes in the Forms Library. The other component is specific to the object class in question and is typically opaque. So for typical object classes, there should be routines provided by the object class to manipulate the object class specific data. Since C lacks inheritance as a language construct, inheritance is implemented in the Forms Library by pointers and the global function @code{@ref{fl_make_object()}}@footnote{There are other ways to simulate inheritance, such as including a pointer to generic objects as part of the instance specific data.}. It is helpful to understand the global architecture and the object-oriented approach of the Forms Library, it makes reading the C code easier and also adds perspective on why some of the things are implemented the way they are. In this chapter it is assumed that we want to create a new class with the name @code{NEW}. Creating a new object class mainly consists of writing the handle routine. There also should be a routine that adds an object of the new class to a form and associates the handle routine to it. This routine should have the following basic form: @example FL_OBJECT *fl_add_NEW(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example This routine must add an object of class @code{NEW} to the current form. It receives the parameters @code{type}, indicating the type of the object within the class (see below), @code{x}, @code{y}, @code{w}, and @code{h}, indicating the bounding box of the object in the current active units (mm, point or pixels), and @code{label} which is the label of the object. This is the routine the programmer uses to add an object of class @code{NEW} to a form. See below for the precise actions this routine should take. One of the tasks of @code{fl_add_NEW()} is to bind the event handling routine to the object. For this it will need a routine: @example static int handle_NEW(FL_OBJECT *obj, int event, FL_Coord mx, FL_Coord my, int key, void *xev); @end example This routine is the same as the handle routine for free objects and should handle particular events for the object. @code{mx} and @code{my} contain the current mouse position and @code{key} the key that was pressed (if this information is related to the event). @xref{Part IV Events, , Events}, for the types of events and the actions that should be taken. @code{xev} is the XEvent that caused the invocation of the handler. Note that some of the events may have a @code{NULL} @code{xev} parameter, so @code{xev} should be checked before dereferencing it. The routine should return whether the status of the object is changed, i.e., whether the event dispatcher should invoke this object's callback or, if no callback is set for the object, whether the object is to be returned to the application program by @code{@ref{fl_do_forms()}} or @code{@ref{fl_check_forms()}}. What constitutes a status change is obviously dependent on the specific object class and possibly its types within this class. For example, a mouse push on a radio button is considered a status change while it is not for a normal button where a status change occurs on release. Moreover, most classes have a number of other routines to change settings of the object or get information about it. In particular the following two routines often exist: @example void fl_set_NEW(FL_OBJECT *obj, ...); @end example @noindent that sets particular values for the object and @example fl_get_NEW(FL_OBJECT *obj, ...); @end example @noindent that returns some particular information about the object. See e.g.@: the routines @code{@ref{fl_set_button()}} and @code{@ref{fl_get_button()}}. @ifnottex @menu * The Routine @code{fl_add_NEW()}:: @end menu @end ifnottex @node The Routine @code{fl_add_NEW()} @section The Routine @code{fl_add_NEW()} @code{fl_add_NEW()} has to add a new object to the form and bind its handle routine to it. To make it consistent with other object classes and also more flexible, there should in fact be two routines: @code{fl_create_NEW()} that creates the object and @code{fl_add_NEW()} that actually adds it to the form. They normally look as follows: @example typedef struct @{ /* instance specific record */ @} SPEC; FL_OBJECT *fl_create_NEW(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @{ FL_OBJECT *obj; /* create a generic object */ obj = fl_make_object(FL_COLBOX, type, x, y, w, h, label, handle_NEW); /* fill in defaults */ obj->boxtype = FL_UP_BOX; /* allocate instance-specific storage and fill it with defaults */ obj->spec_size = sizeof SPEC; obj->spec = fl_calloc(1, obj->spec_size); return obj; @} @end example The constant @code{FL_NEW} will indicate the object class. It should be an integer. The numbers 0 to @tindex FL_USER_CLASS_START @code{FL_USER_CLASS_START - 1} (1000) and @tindex FL_BEGIN_GROUP @code{FL_BEGIN_GROUP} (10000) and higher are reserved for the system and should not be used. Also it is preferable to use @findex fl_malloc() @anchor{fl_malloc()} @findex fl_calloc() @anchor{fl_calloc()} @findex fl_realloc() @anchor{fl_realloc()} @findex fl_free() @anchor{fl_free()} @code{fl_malloc()}, @code{fl_calloc()}, @code{fl_realloc()} and @code{fl_free()} to allocate/free the memory for the instance specific structures. These routines have the same prototypes and work the same way as those in the standard library and may offer additional debugging capabilities in future versions of the Forms Library. Also note that these functions are actually function pointers, and if desired, the application is free to assign these pointers to its own memory allocation routines. The object pointer returned by @code{@ref{fl_make_object()}} will have all of its fields set to some defaults (@pxref{Part IV The Type FL_OBJECT, , The Type @code{FL_OBJECT}}). In other words, the newly created object inherits many attributes of a generic one. Any class specific defaults that are different from the generic one can be changed after @code{@ref{fl_make_object()}}. Conversion of units, if different from the default pixel, is performed within @code{@ref{fl_make_object()}} and a class module never needs to know what the prevailing unit is. After the object is created, it has to be added to a form: @example FL_OBJECT *fl_add_NEW(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @{ FL_OBJECT *obj; obj = fl_create_NEW(type, x, y, w, h, label); fl_add_object(fl_current_form, obj); return obj; @} @end example xforms-1.0.93sp1/doc/xforms.init0000644000175000017500000001353311320231310015165 0ustar jensjens# -debug # The integer value specifies what kind of debugging output is generated. $DEBUG = 0; # -doctype # The value is the 'SystemLiteral' which identifies the canonical DTD # for the document. # Definition: The SystemLiteral is called the entity's system # identifier. It is a URI, which may be used to retrieve the entity. # See http://www.xml.com/axml/target.html#NT-ExternalID $DOCTYPE = ''; # -expand # the @EXPAND array contains the expanded section names. #@EXPAND = ( 'html' ); # -iso # if this value is true, ISO8859 characters are used for special symbols # (like copyright, etc). $USE_ISO = 0; # -I # add a directory to the list of directories where @include files are # searched for (besides the directory of the file). additional '-I' # args are appended to this list. # (APA: Don't implicitely search ., to conform with the docs!) # my @INCLUDE_DIRS = ("."); @INCLUDE_DIRS = ( ); # -P # prepend a directory to the list of directories where @include files are # searched for before the directory of the file. additional '-P' # args are prepended to this list. @PREPEND_DIRS = ( ); # --conf-dir # append to the files searched for init files. @CONF_DIRS = ( ) ; # -top-file # This file name is used for the top-level file. # The extension is set appropriately, if necessary. # If empty, .html is used. # Typically, you would set this to "index.html". $TOP_FILE = 'index.html'; # -toc-file # This file name is used for the table of contents. The # extension is set appropriately, if necessary. # If empty, _toc.html is used. $TOC_FILE = ''; # -frames # if the value is true, HTML 4.0 "frames" are used. # A file describing the frame layout is generated, together with a file # with the short table of contents. $FRAMES = 0; # -menu | -nomenu # if the value is true the Texinfo menus are shown. $SHOW_MENU = 1; # -number | -nonumber # if this is set the sections are numbered, and section names and numbers # are used in references and menus (instead of node names). $NUMBER_SECTIONS = 1; # -use-nodes # if this is set the nodes are used as sectionning elements. # Otherwise the nodes are incorporated in sections. $USE_NODES = 0; # -node-files # if this is set one file per node is generated, which can be a target for # cross manual references. $NODE_FILES = 0; # -split section|chapter|node|none # if $SPLIT is set to 'section' (resp. 'chapter') one html file per section # (resp. chapter) is generated. If $SPLIT is set to 'node' one html file per # node or sectionning element is generated. In all these cases separate pages # for Top, Table of content (Toc), Overview and About are generated. # Otherwise a monolithic html file that contains the whole document is # created. $SPLIT = 'chapter'; # -sec-nav|-nosec-nav # if this is set then navigation panels are printed at the beginning of each # section. # If the document is split at nodes then navigation panels are # printed at the end if there were more than $WORDS_IN_PAGE words on page. # # If the document is split at sections this is ignored. # # This is most useful if you do not want to have section navigation # with -split chapter. There will be chapter navigation panel at the # beginning and at the end of chapters anyway. $SECTION_NAVIGATION = 0; # -separated-footnotes # if this is set footnotes are on a separated page. Otherwise they are at # the end of each file (if the document is split). $SEPARATED_FOOTNOTES = 0; # -toc-links # if this is set, links from headings to toc entries are created. $TOC_LINKS = 0; # -subdir # If this is set, then put result files into the specified directory. # If not set, then result files are put into the current directory. #$SUBDIR = 'html'; $SUBDIR = '.'; # -short-extn # If this is set, then all HTML files will have extension ".htm" instead of # ".html". This is helpful when shipping the document to DOS-based systems. $SHORTEXTN = 0; # -prefix # This set the output file prefix, prepended to all .html, .gif and .pl files. # By default, this is the basename of the document. $PREFIX = ''; # -o filename # If this is set a monolithic document is outputted into $filename. $OUT = ''; # -no-validate # suppress node cross-reference validation $NOVALIDATE = 0; # -short-ref # if this is set cross-references are given without section numbers. $SHORT_REF = 0; # -idx-sum # if value is set, then for each @printindex # _.idx is created which contains lines of the form # key ref sorted alphabetically (case matters). $IDX_SUMMARY = 0; # -def-table # If this is set a table construction for @def.... instead of definition # lists. # (New Option: 27.07.2000 Karl Heinz Marbaise) $DEF_TABLE = 0; # -verbose # if this is set chatter about what we are doing. $VERBOSE = 0; # -lang # use &$I('my string') if you want to have translations of 'my string' # and provide the translations in $LANGUAGES->{$LANG} with 'my string' # as key. # To add a new language use ISO 639 language codes (see e.g. perl module # Locale-Codes-1.02 for definitions). Supply translations in the # $LANGUAGES hash and put it in a file with $LANG as name in an i18n # directory. # Default's to 'en' if not set or no @documentlanguage is specified. $LANG = 'en'; # -ignore-preamble-text # If this is set the text before @node and sectionning commands is ignored. $IGNORE_PREAMBLE_TEXT = 0; # -html-xref-prefix # base directory for external manuals. #$EXTERNAL_DIR = '../'; $EXTERNAL_DIR = undef; # -css-include # All the specified css files are used. More precisely the @import sections # are added to the beginning of the CSS_LINES the remaining is added at # the end of the CSS_LINES (after the css rules generated by texi2html). # cf texinfo manual for more info. # - means STDIN @CSS_FILES = ( 'xforms.css' ); 1; xforms-1.0.93sp1/doc/part2_introduction.texi0000644000175000017500000000500611171560225017520 0ustar jensjens@node Part II Introduction @chapter Introduction This part of the documentation describes the Form Designer, a GUI builder meant to help you interactively design dialogue forms for use with the Forms Library. This part assumes the reader is familiar with the Forms Library and has read Part I of this document. Even though designing forms is quite easy and requires only a relatively small number of lines of C-code, it can be time consuming to ï¬gure out all required positions and sizes of the objects. The Form Designer was written to facilitate the construction of forms. With Form Designer, there is no longer any need to calculate or guess where the objects should be. The highly interactive and WYSIWYG (What You See Is What You Get) nature of the Form Designer relieves the application programmer from the time consuming process of user interface construction so that he/she can concentrate more on what the application program intends to accomplish. Form Designer provides the abilities to interactively place, move and scale objects on a form, also the abilities to set all attributes of an object. Once satisfactory forms are constructed, the Form Designer generates a piece of C-code that can then be included in the application program. This piece of code will contain one procedure create_form_xxx() for each form, where xxx indicates the form name. The application only needs to call it to generate the form designed. The code produced is easily readable. The Form Designer also lets the user identify each object with C variables for later reference in the application program and allows advanced object callback bindings all within the Form Designer. All actions are performed with the mouse or the function keys. It uses a large number of forms itself to let the user make choices, set attributes, etc. Most of these forms were designed using the Form Designer itself. It is important to note that the Form Designer only helps you in designing the layout of your forms. It does not allow you to specify the actions that have to be taken when, e.g., a button is pushed. You can indicate the callback routine to call but the application program has to supply this callback routine. Also, the current version is mostly a layout tool and not a programming environment, not yet anyway. This means that the Form Designer does not allow you to initialize all your objects. You can, however, initialize some objects, e.g., you can set the bounds of a slider inside the Form Designer. Eventually full support of object initialization will be implemented. xforms-1.0.93sp1/doc/part5_trouble_shooting.texi0000644000175000017500000000320711376032004020365 0ustar jensjens@node Part V Trouble Shooting @chapter Trouble Shooting This chapter deals with a number of (common) problems encountered by people using the Forms Library. Ways of avoiding them are presented. @table @asis @item @code{fl show form()} only draws the form partially This only happens if immediately following @code{@ref{fl_show_form()}} the application program blocks the execution (e.g., waiting for a socket connection, starting a new process via @code{fork()} etc.). To fix this problem, you can flush the X buffer manually using @code{fl_update_display(1)} before blocking occurs or use an idle callback to check the status of the blocking device or let the main loop handle it for you via @code{@ref{fl_add_io_callback()}}. @item I updated the value of a slider/counter/label, but it does not change This only happens if the update is followed by a blockage of execution or a long task without involving the main loop of Forms Library. You can force a screen update using @code{fl_update_display(1)}. @item I found a bug in XForms, What do I do? Please consider subscribing to the XForms mailing list at @url{http://lists.nongnu.org/mailman/listinfo/xforms-development} and sending an email with information about the bug you found. Please try to post information about the version of the Forms Library you're using and your OS beside a description of the bug. Some sample code that exhibits the erratic behavior would help greatly. If, for some reasons, you don't want subscribe to the mailing list you may also send an email to one of the maintainers. At the moment you probably should first contact Jens Thoms Toerring, <@email{jt@@toerring.de}>. @end table xforms-1.0.93sp1/doc/part4_introduction.texi0000644000175000017500000000467011171560225017530 0ustar jensjens@node Part IV Introduction @chapter Introduction Earlier chapters discussed ways to build user interfaces by combining suitable objects from the Forms Library, defining a few object callbacks and using Xlib functions. However, there is always a possibility that the built-in objects of the Forms Library might not be enough. Although free objects in principle provide all the flexibility a programmer needs, there can be situations where it is beneficial to create new types of objects, for example switches or joysticks or other types of sliders, etc. In these cases, a programmer can use the architecture defined by the Forms Library to create a new object class that will work smoothly with the built-in or user-created object classes. Creating such new object classes and adding them to the library is simpler than it sounds. In fact it is almost the same as making a free object. This part gives you all the details of how to add new classes. In chapter 24 a global architectural overview is given of how the Forms Library works and how it communicates with the different object classes by means of events (messages). Chapter 25 describes in detail what type of events objects can receive and how they should react to them. Chapter 26 describes in detail the structure of the type @code{FL_OBJECT} which plays a crucial role, a role equivalent to a superclass (thus all other object classes have @code{FL_OBJECT} as their parent class) in object-oriented programming. One of the important aspects of an object is how to draw it on the screen. Chapter 27 gives all the details on drawing objects. The Forms Library contains a large number of routines that help you draw objects. In this chapter an overview is given of all of them. Chapter 28 gives an example illustrating on how to create a new object class. Due to the importance of button classes, special routines are provided by the Forms Library to facilitate the creation of this particular class of objects. Chapter 29 illustrates by two examples the procedures of creating new button classes using the special services. One of the examples is taken from the Forms Library itself and the other offers actual usability. Sometimes it might be desirable to alter the behavior of a built-in class slightly. Obviously a full-blown (re)implementation from scratch of the original object class is not warranted. Chapter 30.1 discusses the possibilities of using the pre-emptive handler of an object to implement derived objects. xforms-1.0.93sp1/doc/part1_free_objects.texi0000644000175000017500000007156411375517653017461 0ustar jensjens@node Part I Free Objects @chapter Free Objects In some applications the standard object classes as provided by the Forms Library may not be enough for your task. There are three ways of solving this problem. First of all, the application program can also open its own window or use a canvas (the preferred way) in which it does interaction with the user). A second way is to add your own object classes (see Part IV). This is especially useful when your new type of objects is of general use. The third way is to add free objects to your form. Free objects are objects for which the application program handles the drawing and interaction. This chapter will give all the details needed to design and use free objects. @ifnottex @menu * Free Object:: Free Object * Example:: An Example @end menu @end ifnottex @node Free Object @section Free Object To add a free object to a form use the call @findex fl_add_free() @anchor{fl_add_free()} @example FL_OBJECT *fl_add_free(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, int (*handle)()); @end example @noindent @code{type} indicates the type of free object, see below for a list and their meaning. @code{x}, @code{y}, @code{w} and @code{h} are the bounding box. The @code{label} is normally not drawn unless the @code{handle} routine takes care of this. @code{handle} is the routine that does the redrawing and handles the interaction with the free object. The application program must supply this routine. This routine @code{handle} is called by the library whenever an action has to be performed. The routine should have the form: @example int handle(FL_OBJECT *obj, int event, FL_Coord mx, FL_Coord my, int key, void *xev); @end example @noindent where @code{obj} is the object to which the event applies. @code{event} indicates what has to happen to the object. See below for a list of possible events. @code{mx} and @code{my} indicate the position of the mouse (only meaningful with mouse related events) relative to the form origin and @code{key} is the KeySym of the key typed in by the user (only for @code{FL_KEYPRESS} events). @code{xev} is the (cast) XEvent that causes the invocation of this handler. @code{event} and @code{xev->type} can both be used to obtain the event types. The routine should return whether the status of the object has changed, i.e., whether @code{@ref{fl_do_forms()}} or @code{@ref{fl_check_forms()}} should return this object. The following types of events exist for which the routine must take action: @table @code @tindex FL_DRAW @item FL_DRAW The object has to be redrawn. To figure out the size of the object you can use the fields @code{obj->x}, @code{obj->y}, @code{obj->w} and @code{obj->h}. Some other aspects might also influence the way the object has to be drawn. E.g., you might want to draw the object differently when the mouse is on top of it or when the mouse is pressed on it. This can be figured out as follows. The field @code{obj->belowmouse} indicates whether the object is below the mouse. The field @code{obj->pushed} indicates whether the object is currently being pushed with the mouse. Finally, @code{obj->focus} indicates whether input focus is directed towards this object. When required, the label should also be drawn. This label can be found in the field @code{obj->label}. The drawing should be done such that it works correctly in the visual/depth the current form is in. Complete information is available on the state of the current form as well as several routines that will help you to tackle the trickiest (also the most tedious) part of X programming. In particular, the return value of @code{@ref{fl_get_vclass()}} can be used as an index into a table of structures, @code{FL_STATE fl_state[]}, from which all information about current active visual can be obtained. @xref{Part IV Drawing Objects, , Drawing Objects}, for details on drawing objects and the routines. @tindex FL_DRAWLABEL @item FL_DRAWLABEL This event is not always generated. It typically follows @code{FL_DRAW} and indicates the object label needs to be (re)drawn. You can ignore this event if (a) the object handler always draws the label upon receiving @code{FL_DRAW} or (b) the object label is not drawn at all@footnote{Label for free objects can't be drawn outside of the bounding box because of the clippings by the dispatcher.}. @tindex FL_ENTER @item FL_ENTER This event is sent when the mouse has entered the bounding box. This might require some action. Note that also the field @code{belowmouse} in the object is being set. If entering only changes the appearance redrawing the object normally suffices. Don't do this directly! Always redraw the object using the routine @code{fl_redraw_object()}. It will send an @code{FL_DRAW} event to the object but also does some other things (like setting window id's, taking care of double buffering and some other bookkeeping tasks). @tindex FL_LEAVE @item FL_LEAVE The mouse has left the bounding box. Again, normally a redraw is enough (or nothing at all). @tindex FL_MOTION @item FL_MOTION A motion event is sent between @code{FL_ENTER} and @code{FL_LEAVE} events when the mouse position changes on the object. The mouse position is given with the routine. @tindex FL_PUSH @item FL_PUSH The user has pushed a mouse button in the object. Normally this requires some action. @tindex FL_RELEASE @item FL_RELEASE The user has released the mouse button. This event is only sent if a @code{FL_PUSH} event was sent earlier. @tindex FL_DBLCLICK @item FL_DBLCLICK The user has pushed a mouse button twice within a certain time limit (@code{FL_CLICK_TIMEOUT}), which by default is about @w{400 msec}. @tindex FL_TRPLCLICK @item FL_TRPLCLICK The user has pushed a mouse button three times within a certain time window between each push. This event is sent after a @code{FL_DBLCLICK}, @code{FL_PUSH}, @code{FL_RELEASE} sequence. @tindex FL_UPDATE @item FL_UPDATE The mouse position has changed. This event is sent to an object between an @code{FL_PUSH} and an @code{FL_RELEASE} event (actually this event is sent periodically, even if mouse has not moved). The mouse position is given as the parameter @code{mx} and @code{my} and action can be taken based on the position. @tindex FL_FOCUS @item FL_FOCUS Input got focussed to this object. This event and the next two are only sent to a free object of type @code{FL_INPUT_FREE} (see below). @tindex FL_UNFOCUS @item FL_UNFOCUS Input is no longer focussed on this object. @tindex FL_KEYPRESS @item FL_KEYPRESS A key was pressed. The KeySym is given with the routine. This event only happens between @code{FL_FOCUS} and @code{FL_UNFOCUS} events. @tindex FL_STEP @item FL_STEP A step event is sent all the time (at most 50 times per second but often less because of time consuming redraw operations) to a free object of type @code{FL_CONTINUOUS_FREE} such that it can update its state or appearance. @tindex FL_SHORTCUT @item FL_SHORTCUT Hotkeys for the object have been triggered. Typically this should result in the returning of the free object. @tindex FL_FREEMEM @item FL_FREEMEM Upon receiving this event, the handler should free all object class specific memory allocated. @tindex FL_OTHER @item FL_OTHER Some other events typically caused by window manager events or inter-client events. All information regarding the details of the events is in @code{xev}. @end table @noindent Many of these events might make it necessary to (partially) redraw the object. Always do this using the routine @code{@ref{fl_redraw_object()}}. As indicated above not all events are sent to all free objects. It depends on their types. The following types exist (all objects are sent @code{FL_OTHER} when it occurs): @table @code @tindex FL_NORMAL_FREE @item FL_NORMAL_FREE The object will receive the events @code{FL_DRAW}, @code{FL_ENTER}, @code{FL_LEAVE}, @code{FL_MOTION}, @code{FL_PUSH}, @code{FL_RELEASE} and @code{FL_MOUSE}. @tindex FL_INACTIVE_FREE @item FL_INACTIVE_FREE The object only receives @code{FL_DRAW} events. This should be used for objects without interaction (e.g. a picture). @tindex FL_INPUT_FREE @item FL_INPUT_FREE Same as @code{FL_NORMAL_FREE} but the object also receives @code{FL_FOCUS}, @code{FL_UNFOCUS} and @code{FL_KEYPRESS} events. The @code{obj->wantkey} is by default set to @code{FL_KEY_NORMAL}, i.e., the free object will receive all normal keys (0-255) except @code{} and @code{} key. If you're interested in @code{} or @code{} key, you need to change @code{obj->wantkey} to @code{FL_KEY_TAB} or @code{FL_KEY_ALL}. @xref{Part IV Events, , Events}, for details. @tindex FL_CONTINUOUS_FREE @item FL_CONTINUOUS_FREE Same as @code{FL_NORMAL_FREE} but the object also receives @code{FL_STEP} events. This should be used for objects that change themselves continuously. @tindex FL_ALL_FREE @item FL_ALL_FREE The object receives all types of events. @end table See @file{free1.c} for a (terrible) example of the use of free objects. See also @file{freedraw.c}, which is a nicer example of the use of free objects. Free objects provide all the generality you want from the Forms Library. Because free objects behave a lot like new object classes it is recommended that you also read part IV of this documentation before designing free objects. @node Example @section An Example We conclude our discussion of the free object by examining a simple drawing program capable of drawing simple geometric figures like squares, circles, and triangles of various colors and sizes, and of course it also utilizes a free object. The basic UI consists of three logical parts. A drawing area onto which the squares etc. are to be drawn; a group of objects that control what figure to draw and with what size; and a group of objects that control the color with which the figure is to be drawn. The entire UI is designed interactively using the GUI builder @code{fdesign} with most objects having their own callbacks. @code{fdesign} writes two files, one is a header file containing forward declarations of callback functions and other function prototypes: @example #ifndef FD_drawfree_h_ #define FD_drawfree_h_ extern void change_color(FL_OBJECT *, long); extern void switch_figure(FL_OBJECT *, long); /* more callback declarations omitted */ typedef struct @{ FL_FORM * drawfree; FL_OBJECT * freeobj; FL_OBJECT * figgrp; FL_OBJECT * colgrp; FL_OBJECT * colorobj; FL_OBJECT * miscgrp; FL_OBJECT * sizegrp; FL_OBJECT * wsli; FL_OBJECT * hsli; FL_OBJECT * drobj[3]; void * vdata; long ldata; @} FD_drawfree; extern FD_drawfree *create_form_drawfree(void); #endif /* FD_drawfree_h_ */ @end example The other file contains the actual C-code that creates the form when compiled and executed. Since free objects are not directly supported by fdesign, a box was used as a stub for the location and size of the drawing area. After the C-code was generated, the box was changed manually to a free object by replacing @code{fl_add_box(FL_DOWN_BOX,...)} with @code{fl_add_free(FL_NORMAL_FREE,...)}. We list below the output generated by fdesign with some comments: @example FD_drawfree *create_form_drawfree(void) @{ FL_OBJECT *obj; FD_drawfree *fdui = fl_calloc(1, sizeof *fdui); fdui->drawfree = fl_bgn_form(FL_NO_BOX, 530, 490); obj = fl_add_box(FL_UP_BOX, 0, 0, 530, 490, ""); @end example @noindent This is almost always the same for any form definition: we allocate a structure that will hold all objects on the form as well as the form itself. In this case, the first object on the form is a box of type @code{FL_UP_BOX}. @example fdui->figgrp = fl_bgn_group(); obj = fl_add_button(FL_RADIO_BUTTON, 10, 60, 40, 40, "@@#circle"); fl_set_object_lcol(obj,FL_YELLOW); fl_set_object_callback(obj, switch_figure, 0); obj = fl_add_button(FL_RADIO_BUTTON, 50, 60, 40, 40, "@@#square"); fl_set_object_lcol(obj, FL_YELLOW); fl_set_object_callback(obj, switch_figure, 1); obj = fl_add_button(FL_RADIO_BUTTON, 90, 60, 40, 40, "@@#8*>"); fl_set_object_lcol(obj, FL_YELLOW); fl_set_object_callback(obj, switch_figure, 2); fl_end_group(); @end example This creates three buttons that control what figures are to be drawn. Since figure selection is mutually exclusive, we use @code{RADIO_BUTTON} for this. Further, the three buttons are placed inside a group so that they won't interfere with other radio buttons on the same form. Notice that the callback function @code{switch_figure()} is bound to all three buttons but with different arguments. Thus the callback function can resolve the associated object via the callback function argument. In this case, 0 is used for circle, 1 for square and 2 for triangle. This association of a callback function with a piece of user data can often reduce the amount of code substantially, especially if you have a large group of objects that control similar things. The advantage will become clear as we proceed. Next we add three sliders to the form. By using appropriate colors for these sliding bars (red, green, blue), there is no need to label them. There's also no need to store their addresses as their callback routine @code{change_color()} will receive them automatically. @example fdui->colgrp = fl_bgn_group(); obj = fl_add_slider(FL_VERT_FILL_SLIDER, 25, 170, 30, 125, ""); fl_set_object_color(obj, FL_COL1, FL_RED); fl_set_object_callback(obj, change_color, 0); obj = fl_add_slider(FL_VERT_FILL_SLIDER, 55, 170, 30, 125, ""); fl_set_object_color(obj, FL_COL1, FL_GREEN); fl_set_object_callback(obj, change_color, 1); obj = fl_add_slider(FL_VERT_FILL_SLIDER, 85, 170, 30, 125, ""); fl_set_object_color(obj, FL_COL1, FL_BLUE); fl_set_object_callback(obj, change_color, 2); fdui->colorobj = obj = fl_add_box(FL_BORDER_BOX, 25, 140, 90, 25, ""); fl_set_object_color(obj, FL_FREE_COL1, FL_FREE_COL1); fl_end_group(); @end example Again, a single callback function, @code{change_color()}, is bound to all three sliders. In addition to the sliders, a box object is added to the form. This box is set to use the color indexed by @code{FL_FREE_COL1} and will be used to show visually what the current color setting looks like. This implies that in the @code{change_color()} callback function, the entry @code{FL_FREE_COL1} in the Forms Library's internal colormap will be changed. We also place all the color related objects inside a group even though they are not of radio buttons. This is to facilitate gravity settings which otherwise require setting the gravities of each individual object. Next we create our drawing area which is simply a free object of type @code{NORMAL_FREE} with a handler to be written @example obj = fl_add_frame(FL_DOWN_FRAME, 145, 30, 370, 405, ""); fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); fdui->freeobj = obj = fl_add_free(FL_NORMAL_FREE, 145, 30, 370, 405, "", freeobject_handler); fl_set_object_boxtype(obj, FL_FLAT_BOX); fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); @end example The frame is added for decoration purposes only. Although a free object with a down box would appear the same, the down box can be written over by the free object drawing while the free object can't draw on top of the frame since the frame is outside of the free object. Notice the gravity settings. This kind of setting maximizes the real estate of the free object when the form is resized. Next, we need to have control over the size of the object. For this, two sliders are added, using the same callback function but with different user data (0 and 1 in this case): @example fdui->sizegrp = fl_bgn_group(); fdui->wsli = obj = fl_add_valslider(FL_HOR_SLIDER, 15, 370, 120, 25, "Width"); fl_set_object_lalign(obj, FL_ALIGN_TOP); fl_set_object_callback(obj, change_size, 0); fdui->hsli = obj = fl_add_valslider(FL_HOR_SLIDER, 15, 55, 410,25, "Height"); fl_set_object_lalign(obj, FL_ALIGN_TOP); fl_set_object_callback(obj, change_size, 1); fl_end_group(); @end example The rest of the UI consists of some buttons the user can use to exit the program, elect to draw outlined instead of filled figures etc. The form definition ends with @code{@ref{fl_end_form()}}. The structure that holds the form as well as all the objects within it is returned to the caller: @example fdui->miscgrp = fl_bgn_group(); obj = fl_add_button(FL_NORMAL_BUTTON, 395, 445, 105, 30, "Quit"); fl_set_button_shortcut(obj, "Qq#q", 1); obj = fl_add_button(FL_NORMAL_BUTTON, 280, 445, 105, 30, "Refresh"); fl_set_object_callback(obj, refresh_cb, 0); obj = fl_add_button(FL_NORMAL_BUTTON, 165, 445, 105, 30, "Clear"); fl_set_object_callback(obj,clear_cb,0); fl_end_group(); obj = fl_add_checkbutton(FL_PUSH_BUTTON, 15, 25, 100, 35, "Outline"); fl_set_object_color(obj, FL_MCOL, FL_BLUE); fl_set_object_callback(obj, fill_cb, 0); fl_set_object_gravity(obj, FL_NorthWest, FL_NorthWest); fl_end_form(); return fdui; @} @end example After creating the UI we need to write the callback functions and the free object handler. The callback functions are relatively easy since each object is designed to perform a very specific task. Before we proceed to code the callback functions we first need to define the overall data structure that will be used to glue together the UI and the routines that do real work. The basic structure is the DrawFigure structure that holds the current drawing function as well as object attributes such as size and color: @example #define MAX_FIGURES 500 typedef void (*DrawFunc)(int /* fill */, int, int, int, int, /* x,y,w,h */ FL_COLOR /* color */ ); typedef struct @{ DrawFunc drawit; /* how to draw this figure */ int fill, /* is it to be filled? */ x, y, w, h; /* position and sizes */ int pc[3]; /* primary color R,G,B */ int newfig; /* indicate a new figure */ FL_COLOR col; /* color index */ @} DrawFigure; static DrawFigure saved_figure[MAX_FIGURES], *cur_fig; static FD_drawfree *drawui; int max_w = 30, /* max size of figures */ max_h = 30; @end example @noindent All changes to the figure attributes will be buffered in @code{cur_fig} and when the actual drawing command is issued (mouse click inside the free object), @code{cur_fig} is copied into @code{saved_figure} array buffer. Forms Library contains some low-level drawing routines that can draw and optionally fill arbitrary polygonal regions, so in principle, there is no need to use Xlib calls directly. To show how Xlib drawing routines are combined with Forms Library, we use Xlib routines to draw a triangle: @example void draw_triangle(int fill, int x, int y, int w, int h, FL_COLOR col) @{ XPoint xp[4]; GC gc = fl_state[fl_get_vclass()].gc[0]; Window win = fl_winget(); Display *disp = fl_get_display(); xp[0].x = x; xp[0].y = y + h - 1; xp[1].x = x + w / 2; xp[1].y = y; xp[2].x = x + w - 1; xp[2].y = y + h - 1; XSetForeground(disp, gc, fl_get_pixel(col)); if (fill) XFillPolygon(disp, win, gc, xp, 3, Nonconvex, Unsorted); else @{ xp[3].x = xp[0].x; xp[3].y = xp[0].y; XDrawLines(disp, win, gc, xp, 4, CoordModeOrigin); @} @} @end example @noindent Although more or less standard stuff, some explanation is in order. As you have probably guessed, @code{@ref{fl_winget()}} returns the current "active" window, defined to be the window the object receiving dispatcher's messages (@code{FL_DRAW} e.g.) belongs to@footnote{If @code{@ref{fl_winget()}} is called while not handling messages, the return value must be checked.}. Similarly the routine @code{@ref{fl_get_display()}} returns the current connection to the X server. Part IV has more details on the utility functions in the Forms Library. The structure @code{fl_state[]} keeps much "inside" information on the state of the Forms Library. For simplicity, we choose to use the Forms Library's default GC. There is no fundamental reason that this has be so. We certainly can copy the default GC and change the foreground color in the copy. Of course unlike using the default GC directly, we might have to set the clip mask in the copy whereas the default GC always have the proper clip mask (in this case, to the bounding box of the free object). We use the Forms Library's built-in drawing routines to draw circles and rectangles. Then our drawing functions can be defined as follows: @example static DrawFunc drawfunc[] = @{ fl_oval, fl_rectangle, draw_triangle @}; @end example Switching what figure to draw is just changing the member @code{drawit} in @code{cur_fig}. By using the proper object callback argument, figure switching is achieved by the following callback routine that is bound to all figure buttons @example void switch_object(FL_OBJECT *obj, long which) @{ cur_fig->drawit = drawfunc[which]; @} @end example So this takes care of the drawing functions. Similarly, the color callback function can be written as follows @example void change_color(FL_OBJECT *obj, long which) @{ cur_fig->c[which] = 255 * fl_get_slider_value(obj); fl_mapcolor(cur_fig->col, cur_fig->c[0], cur_fig->c[1], cur_fig->c[2]); fl_mapcolor(FL_FREE_COL1, cur_fig->c[0], cur_fig->c[1], cur_fig->c[2]); fl_redraw_object(drawui->colorobj); @} @end example @noindent The first call of @code{@ref{fl_mapcolor()}} defines the RGB components for index @code{cur_fig->col} and the second @code{@ref{fl_mapcolor()}} call defines the RGB component for index @code{FL_FREE_COL1}, which is the color index used by @code{colorobj} that serves as current color visual feedback. Object size is taken care of in a similar fashion by using a callback function bound to both size sliders: @example void change_size(FL_OBJECT * obj, long which) @{ if (which == 0) cur_fig->w = fl_get_slider_value(obj); else cur_fig->h = fl_get_slider_value(obj); @} @end example Lastly, we toggle the fill/outline option by querying the state of the push button @example void outline_callback(FL_OBJECT *obj, long data) @{ cur_fig->fill = !fl_get_button(obj); @} @end example To clear the drawing area and delete all saved figures, a Clear button is provided with the following callback: @example void clear_cb(FL_OBJECT *obj, long notused) @{ saved_figure[0] = *cur_fig; /* copy attributes */ cur_fig = saved_figure; fl_redraw_object(drawui->freeobj); @} @end example To clear the drawing area and redraw all saved figures, a Refresh button is provided with the following callback: @example void refresh_cb(FL_OBJECT *obj, long notused) @{ fl_redraw_object(drawui->freeobj); @} @end example With all attributes and other services taken care of, it is time to write the free object handler. The user can issue a drawing command inside the free object by clicking either the left or right mouse button. @example int freeobject_handler(FL_OBJECT *obj, int event, FL_Coord mx, FL_Coord my, int key, void *xev) @{ DrawFigure *dr; switch (event) @{ case FL_DRAW: if (cur_fig->newfig == 1) cur_fig->drawit(cur_fig->fill, cur_fig->x + obj->x, cur_fig->y + obj->y, cur_fig->w, cur_fig->h, cur_fig->col); else @{ fl_drw_box(obj->boxtype, obj->x, obj->y, obj->w, obj->h, obj->col1, obj->bw); for (dr = saved_figure; dr < cur_fig; dr++) @{ fl_mapcolor(FL_FREE_COL1, dr->c[0], dr->c[1], dr->c[2]); dr->drawit(dr->fill,dr->x + obj->x, dr->y + obj->y, dr->w, dr->h, dr->col); @} @} cur_fig->newfig = 0; break; case FL_PUSH: if (key == FL_MIDDLE_MOUSE) break; cur_fig->x = mx - cur_fig->w / 2; cur_fig->y = my - cur_fig->h / 2; /* convert figure center to relative to the object*/ cur_fig->x -= obj->x; cur_fig->y -= obj->y; cur_fig->newfig = 1; fl_redraw_object(obj); *(cur_fig + 1) = *cur_fig; fl_mapcolor(cur_fig->col + 1, cur_fig->c[0], cur_fig->c[1], cur_fig->c[2] ); cur_fig++; cur_fig->col++; break; @} return FL_RETURN_NONE; @} @end example In this particular program, we are only interested in mouse clicks and redraw. The event dispatching routine cooks the X event and drives the handler via a set of events (messages). For a mouse click inside the free object, its handler is notified with an FL_PUSH together with the current mouse position mx, my. In addition, the driver also sets the clipping mask to the bounding box of the free object prior to sending @code{FL_DRAW}. Mouse position (always relative to the origin of the form) is directly usable in the drawing function. However, it is a good idea to convert the mouse position so it is relative to the origin of the free object if the position is to be used later. The reason for this is that the free object can be resized or moved in ways unknown to the handler and only the position relative to the free object is meaningful in these situations. It is tempting to call the drawing function in response to @code{FL_PUSH} since it is @code{FL_PUSH} that triggers the drawing. However, it is a (common) mistake to do this. The reason is that much bookkeeping is performed prior to sending @code{FL_DRAW}, such as clipping, double buffer preparation and possibly active window setting etc. All of these is not done if the message is anything else than @code{FL_DRAW}. So always use @code{@ref{fl_redraw_object()}} to draw unless it is a response to @code{FL_DRAW}. Internally @code{@ref{fl_redraw_object()}} calls the handler with @code{FL_DRAW} (after some bookkeeping), so we only need to mark @code{FL_PUSH} with a flag @code{newfig} and let the drawing part of the handler draw the newly added figure. @code{FL_DRAW} has two parts. One is simply to add a figure indicated by @code{newfig} being true and in this case, we only need to draw the figure that is being added. The other branch might be triggered as a response to damaged drawing area resulting from @code{Expose} event or as a response to @code{Refresh} command. We simply loop over all saved figures and (re)draw each of them. The only thing left to do is to initialize the program, which includes initial color and size, and initial drawing function. Since we will allow interactive resizing and also some of the objects on the form are not resizeable, we need to take care of the gravities. @example void draw_initialize(FD_drawfree *ui) @{ fl_set_form_minsize(ui->drawfree, 530, 490); fl_set_object_gravity(ui->colgrp, FL_West, FL_West); fl_set_object_gravity(ui->sizegrp, FL_SouthWest, FL_SouthWest); fl_set_object_gravity(ui->figgrp, FL_NorthWest, FL_NorthWest); fl_set_object_gravity(ui->miscgrp, FL_South, FL_South); fl_set_object_resize(ui->miscgrp, FL_RESIZE_NONE); cur_fig = saved_figure; cur_fig->pc[0] = cur_fig->pc[1] = cur_fig->pc[2] = 127; cur_fig->w = cur->fig->h = 30; cur_fig->drawit = fl_oval; cur_fig->col = FL_FREE_COL1 + 1; cur_fig->fill = 1; fl_set_button(ui->drobj[0], 1); /* show current selection */ fl_mapcolor(cur_fig->col, cur_fig->pc[0], cur->fig->pc[1], cur->fig->pc[2]); fl_mapcolor(FL_FREE_COL1, cur_fig->pc[0], cur->fig->pc[1], cur->fig->pc[2]); fl_set_slider_bounds(ui->wsli, 1, max_w); fl_set_slider_bounds(ui->hsli, 1, max_h); fl_set_slider_precision(ui->wsli, 0); fl_set_slider_precision(ui->hsli, 0); fl_set_slider_value(ui->wsli, cur_fig->w); fl_set_slider_value(ui->hsli, cur_fig->h); @} @end example With all the parts in place, the main program simply creates, initializes and shows the UI, then enters the main loop: @example int main(int argc, char *argv[]) @{ fl_initialize(&argc, argv, "FormDemo", 0, 0); drawui = create_form_drawfree(); draw_initialize(drawui); fl_show_form(drawui->drawfree, FL_PLACE_CENTER|FL_FREE_SIZE, FL_FULLBORDER, "Draw"); fl_do_forms(); return 0; @} @end example Since the only object that does not have a callback is the Quit button, @code{@ref{fl_do_forms()}} will return only if that button is pushed. Full source code to this simple drawing program can be found in @file{demos/freedraw.c}. xforms-1.0.93sp1/doc/part4_new_buttons.texi0000644000175000017500000003452211376032003017350 0ustar jensjens@node Part IV New Buttons @chapter New Buttons Since button-like object is one of the most important, if not @emph{the} most important, classes in graphical user interfaces, Forms Library provides, in addition to the ones explained earlier, a few more routines that make create new buttons or button-like objects even easier. These routines take care of the communication between the main module and the button handler so all new button classes created using this scheme behave consistently. Within this scheme, the programmer only has to write a drawing function that draws the button. There is no need to handle events or messages from the main module and all types of buttons, radio, pushed or normal are completely taken care of by the generic button class. Further, @code{@ref{fl_get_button()}} and @code{@ref{fl_set_button()}} work automatically without adding any code for them. Forms Library provides two routines to facilitate the creation of new button object classes. One of the routines is @findex fl_create_generic_button() @anchor{fl_create_generic_button()} @example FL_OBJECT *fl_create_generic_button(int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent which can be used to create a generic button that has all the properties of a real button except that this generic button does not know what the real button looks like. The other routine @code{@ref{fl_add_button_class()}}, discussed below, can be used to register a drawing routine that completes the creation of a new button. All button or button-like objects have the following instance-specific structure, defined in @file{forms.h}, that can be used to obtain information about the current status of the button: @tindex FL_BUTTON_STRUCT @example typedef struct @{ Pixmap pixmap; /* for bitmap/pixmap button only */ Pixmap mask; /* for bitmap/pixmap button only */ unsigned int bits_w, /* for bitmap/pixmap button only */ bits_h; int val; /* whether it's pushed */ int mousebut; /* mouse button that caused the push */ int timdel; /* time since last touch (TOUCH buttons)*/ int event; /* what event triggered the redraw */ long cspecl; /* for non-generic class specific data */ void * cspec; /* for non-generic class specific data */ char * file; /* filename for the pixmap/bitmap file */ @} FL_BUTTON_STRUCT; @end example Of all its members, only @code{val} and @code{mousebut} probably will be consulted by the drawing function. @code{cspecl} and @code{cspecv} are useful for keeping track of class status other than those supported by the generic button (e.g., you might want to add a third color to a button for whatever purposes.) These two members are neither referenced nor changed by the generic button class. Making this structure visible somewhat breaks the Forms Library's convention of hiding the instance specific data but the convenience and consistency gained by this far outweights the compromise on data hiding. The basic procedures in creating a new button-like object are as follows. First, just like creating any other object classes, you have to decide on a class ID, an integer between @code{FL_USER_CLASS_START} (1001) and @code{FL_USER_CLASS_END} (9999) inclusive. Then write a header file so that application programs can use this new class. The header file should include the class ID definition and function prototypes specific to this new class. After the header file is created, you will have to write C functions that create and draw the button. You also will need an interface routine to place the newly created button onto a form. After creating the generic button, the new button class should be made known to the button driver via the following function @findex fl_add_button_class() @anchor{fl_add_button_class()} @example void fl_add_button_class(int objclass, void (*draw)(FL_OBJECT *), void (*cleanup)(FL_BUTTON_SPEC *)); @end example @noindent where @code{objclass} is the class ID, and @code{draw} is a function that will be called to draw the button. @code{cleanup} is a function that will be called prior to destroying the button. You need a cleanup function only if the drawing routine uses the @code{cspecv} field of @code{FL_BUTTON_STRUCT} to hold memory allocated dynamically by the new button. We use two examples to show how new buttons are created. The first example is taken from the button class in the Forms Library, i.e.@: its real working source code that implements the button class. To illustrate the entire process of creating this class, let us call this button class @code{FL_NBUTTON}. First we create a header file to be included in an application program that uses this button class: @example #ifndef NBUTTON_H_ #define NBUTTON_H_ #define FL_NBUTTON FL_USER_CLASS_START extern FL_OBJECT *fl_create_nbutton(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); extern FL_OBJECT *fl_add_nbutton(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); #endif @end example Now to the drawing function. We use @code{obj->col1} for the normal color of the box and @code{obj->col2} for the color of the box when pushed. We also add an extra property so that when mouse moves over the button box, the box changes color. The following is the full source code that implements this: @example static void draw_nbutton(FL_OBJECT *obj) @{ FL_COLOR col; /* box color. If pushed we use obj->col2, otherwise use obj->col1 */ col = ((FL_BUTTON_STRUCT *) obj->spec)->val ? obj->col2 : obj->col1; /* if mouse is on top of the button, we change the color of * the button to a different color. However we only do this * if the * box has the default color. */ if (obj->belowmouse && col == FL_COL1) col = FL_MCOL; /* If original button is an up_box and it is being pushed, * we draw a down_box. Otherwise, don't have to change * the boxtype */ if ( obj->boxtype == FL_UP_BOX && ((FL_BUTTON_STRUCT *) obj->spec)->val) fl_drw_box(FL_DOWN_BOX, obj->x, obj->y, obj->w, obj->h, col, obj->bw); else fl_drw_box(obj->boxtype, obj->x, obj->y, obj->w, obj->h, col, obj->bw); /* draw the button label */ fl_drw_object_label(obj); /* if the button is a return button, draw the return symbol. * Note that size and style are 0 as they are not used when * drawing symbols */ if (obj->type == FL_RETURN_BUTTON) fl_drw_text(FL_ALIGN_CENTER, obj->x + obj->w - 0.8 * obj->h - 1, obj->y + 0.2 * obj->h, 0.6 * obj->h, 0.6 * obj->h, obj->lcol, 0, 0, "@@returnarrow"); @} @end example Note that when drawing symbols, the style and size are irrelevent and set to zero in @code{@ref{fl_drw_text()}} above. Since we don't use the @code{cspecv} field to point to dynamically allocated memory we don't have to write a clean-up function. Next, following the standard procedures of the Forms Library, we code a separate routine that creates the new button@footnote{A separate creation routine is useful for integration into the Form Designer.} @example FL_OBJECT *fl_create_nbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @{ FL_OBJECT *obj; obj = fl_create_generic_button(FL_NBUTTON, type, x, y, w, h, label); fl_add_button_class(FL_NBUTTON, draw_nbutton, NULL); obj->col1 = FL_COL1; /* normal color */ obj->col2 = FL_MCOL; /* pushed color */ obj->align = FL_ALIGN_CENTER; /* button label placement */ return obj; @} @end example You will also need a routine that adds the newly created button to a form @example FL_OBJECT *fl_add_nbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @{ FL_OBJECT *obj = fl_create_nbutton(type, x, y, w, h, label); fl_add_object(fl_current_form, obj); return obj; @} @end example This concludes the creation of button class @code{FL_NBUTTON}. The next example implements a button that might be added to the Forms Library in the future. We call this button a crossbutton. Normally, this button shows a small up box with a label on the right. When pushed, the up box becomes a down box and a small cross appears on top of it. This kind of button obviously is best used as a push button or a radio button. However, the Forms Library does not enforce this. It can be enforced, however, by the application program or by the object class developers. @ifhtml @center @image{images/crossbutton} @end ifhtml @ifnothtml @center @image{images/crossbutton,8cm} @end ifnothtml We choose to use @code{obj->col1} as the color of the box and @code{obj->col2} as the color of the cross (remember these two colors are changeable by the application program via @code{@ref{fl_set_object_color()}}). Note that this decision on color use is somewhat arbitrary, we could have easily made @code{obj->col2} the color of the button when pushed and use @code{obj->spec->cspecl} for the cross color (another routine named e.g.@: @code{fl_set_crossbutton_crosscol()} should be provided to change the cross color in this case). We start by defining the class ID and declaring the utility routine prototypes in the header file @file{crossbut.h}: @example #ifndef CROSSBUTTON_H_ #define CROSSBUTTON_H_ #define FL_CROSSBUTTON (FL_USER_CLASS_START + 2) extern FL_OBJECT *fl_add_crossbutton(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); extern FL_OBJECT *fl_create_crossbutton(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); #endif @end example Next we write the actual code that implements crossbutton class and put it into @file{crossbut.c}: @example /* routines implementing the "crossbutton" class */ #include #include "crossbut.h" /** How to draw it */ static void draw_crossbutton(FL_OBJECT *obj) @{ FL_Coord xx, yy, ww, hh; FL_BUTTON_STRUCT *sp = obj->spec; /* There is no visual change when mouse enters/leaves the box */ if (sp->event == FL_ENTER || sp->event == FL_LEAVE) return; /* draw the bounding box first */ fl_drw_box(obj->boxtype, obj->x, obj->y, obj->w, obj->h, obj->col1, obj->bw); /* Draw the box that contains the cross */ ww = hh = (0.5 * FL_min(obj->w, obj->h)) - 1; xx = obj->x + FL_abs(obj->bw); yy = obj->y + (obj->h - hh) / 2; /* If pushed, draw a down box with the cross */ if (sp->val) @{ fl_drw_box(FL_DOWN_BOX, xx, yy, ww, hh, obj->col1, obj->bw); fl_drw_text(FL_ALIGN_CENTER, xx - 2, yy - 2, ww + 4, hh + 4, obj->col2, 0, 0, "@@9plus"); @} else fl_drw_box(FL_UP_BOX, xx, yy, ww, hh, obj->col1, obj->bw); /* Draw the label */ if (obj->align == FL_ALIGN_CENTER) fl_drw_text(FL_ALIGN_LEFT, xx + ww + 2, obj->y, 0, obj->h, obj->lcol, obj->lstyle, obj->lsize, obj->label); else fl_draw_object_label_outside(obj); if (obj->type == FL_RETURN_BUTTON) fl_drw_text(FL_ALIGN_CENTER, obj->x + obj->w - 0.8 * obj->h, obj->y + 0.2 * obj->h, 0.6 * obj->h, 0.6 * obj->h, obj->lcol, 0, 0, "@@returnarrow"); @} @end example This button class is somewhat different from the normal button class (@code{FL_BUTTON}) in that we enforce the appearance of a crossbutton so that an un-pushed crossbutton always has an upbox and a pushed one always has a downbox. Note that the box that contains the cross is not the bounding box of a crossbutton although it can be if the drawing function is coded so. The rest of the code simply takes care of interfaces: @example /* creation routine */ FL_OBJECT * fl_create_crossbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @{ FL_OBJECT *obj; fl_add_button_class(FL_CROSSBUTTON, draw_crossbutton, NULL); /* if you want to make cross button only available for * push or radio buttons, do it here as follows: if (type != FL_PUSH_BUTTON && type != FL_RADIO_BUTTON) type = FL_PUSH_BUTTON; */ obj = fl_create_generic_button(FL_CROSSBUTTON, type, x, y, w, h, label); obj->boxtype = FL_NO_BOX; obj->col2 = FL_BLACK; /* cross color */ return obj; @} /* interface routine to add a crossbutton to a form */ FL_OBJECT *fl_add_crossbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @{ FL_OBJECT *obj = fl_create_crossbutton(type, x, y, w, h, label); fl_add_object(fl_current_form, obj); return obj; @} @end example The actual code is in the demo directory, see the files @file{crossbut.c} and @file{crossbut.h}. An application program only needs to include the header file @file{crossbut.h} and link with @file{crossbut.o} to use this new object class. There is no need to change or re-compile the Forms Library. Of course, if you really like the new object class, you can modify the system header file @file{forms.h} to include your new class header file automatically (either through inclusion at compile time or by including the actual header). You can also place the object file (@file{crossbut.o}) in @file{libforms.a} and @file{libforms.so} if you wish. Note however that this will make your application programs dependent on your personal version of the library. Since the current version of Form Designer does not support any new object classes developed as outlined above, the best approach is to use another object class as stubs when creating a form, for example, you might want to use checkbutton as stubs for the crossbutton. Once the position and size are satisfactory, generate the C-code and then manually change checkbutton to crossbutton. You probably can automate this with some scripts. Finally there is a demo program utilizing this new button class. The program is @file{newbutton.c}. xforms-1.0.93sp1/doc/part5_overview.texi0000644000175000017500000021152211376032004016646 0ustar jensjens@node Part V Overview of Main Functions @chapter Overview of Main Functions In this chapter we give a brief overview of all the main functions that are available. For an overview of all routines related to specific object classes see Part III. @ifnottex @menu * Version Information:: * Initialization:: * Creating Forms:: * Object Attributes:: * Doing Interaction:: * Signals:: * Idle Callbacks and Timeouts:: @end menu @end ifnottex @node Version Information @section Version Information The header file @file{forms.h} defines three symbolic constants which you can use to conditionally compile your application. They are @table @code @tindex FL_VERSION @anchor{FL_VERSION} @item FL_VERSION The major version number. @tindex FL_REVISION @anchor{FL_REVISION} @item FL_REVISION Revision number. @tindex FL_INCLUDE_VERSION @anchor{FL_INCLUDE_VERSION} @item FL_INCLUDE_VERSION @code{1000 * FL_VERSION + FL_REVISION} @end table There is also a routine that can be used to obtain the library version at run time: @findex fl_library_version() @anchor{fl_library_version()} @example int fl_library_version(int *version, int *revision) @end example @noindent The function returns a consolidated version information, computed as @code{1000 * version + revision}. For example, for library version 1 revision 21 (1.21), the function returns a value of 1021 with @code{version} and @code{revision} (if not @code{NULL}) set to 1 and 21, respectively. It is always a good idea to check if the header and the run time library are of the same version and take appropriate actions when they are not. This is especially important for versions less than 1. To obtain the version number of the library used in an executable, run the command with @code{-flversion} option, which will print the complete version information. @node Initialization @section Initialization The routine @findex fl_initialize() @anchor{fl_initialize()} @example Display *fl_initialize(int *argc, char *argv[], const char *appclass, XrmOptionDescList app_opt, int n_app_opt); @end example @noindent initializes the Forms Library and returns a pointer to the @code{Display} structure if a connection could be made, otherwise @code{NULL}. This function must be called before any other calls to the Forms Library (except @code{@ref{fl_set_defaults()}} and a few other functions that alter some of the defaults of the library). The meaning of the arguments is as follows @table @code @item argc, argv Number and array of the command line arguments the application was started with. The application name is derived from @code{argv[0]} by stripping leading path names and trailing period and extension, if any. Due to the way the X resources (and command line argument parsing) work, the executable name should not contain a dot @code{.} or a star @code{*}. @item appclass The application class name, which typically is the generic name for all instances of this application. If no meaningful class name exists, it is typically given (or converted to if non given) as the application name with the first letter capitalized (second if the first letter is an X). @item app_opt Specifies how to parse the application-specific resources. @item n_app_opt Number of entries in the option list. @end table The @code{@ref{fl_initialize()}} function builds the resource database, calls the Xlib @code{XrmParseCommand()} function to parse the command line arguments, and performs other per display initialization. After the creation of the database, it is associated with the display via @code{XrmSetDatabase()}, so the application can get at it if necessary. All recognized options are removed from the argument list and their corresponding values set. Forms Library provides appropriate defaults for all options. The following are the defaults: @multitable @columnfractions 0.25 0.1 0.45 0.2 @item @strong{Option} @tab @strong{Type} @tab @strong{Meaning} @tab @strong{Default} @item @code{-fldebug} @i{level} @tab int @tab prints debug information @tab 0 @item @code{-name} @i{appname} @tab string @tab changes application name @tab none @item @code{-flversion} @tab @tab prints the version of the library @tab @item @code{-sync} @tab @tab requests synchronous mode(debug) @tab false @item @code{-display} @i{host:dpy} @tab string @tab specifies remote host @tab @code{$DISPLAY} @item @code{-visual} @i{class} @tab string @tab TrueColor, PseudoColor... @tab best @item @code{-depth} @i{depth} @tab int @tab specifies prefered visual depth @tab best @item @code{-vid} @i{id} @tab long @tab specifies prefered visual ID @tab @item @code{-private} @tab @tab forces private colormap @tab false @item @code{-shared} @tab @tab forces shared colormap @tab false @item @code{-stdcmap} @tab @tab forces standard colormap @tab false @item @code{-double} @tab @tab enables double buffering @tab false @item -bw @i{width} @tab int @tab changes border width @tab 1 @item -rgamma @i{gamma} @tab float @tab specifies red gamma @tab 1.0 @item -ggamma @i{gamma} @tab float @tab specifies green gamma @tab 1.0 @item -bgamma @i{gamma} @tab float @tab specifies blue gamma @tab 1.0 @end multitable In the above table "best" means the visual that has the most colors, which may or may not be the server's default. There is a special command option @code{-visual Default} that sets both the visual and depth to the X servers default. If a visual ID is requested, it overrides depth or visual if specified. The visual ID can also be requested programmatically (before @code{@ref{fl_initialize()}} is called) via the function @findex fl_set_visualID() @anchor{fl_set_visualID()} @example void fl_set_visualID(long id); @end example Note that all command line options can be abbreviated, thus if the application program uses single character options, they might clash with the built-ins. For example, if you use @code{-g} as a command line option to indicate geometry, it might not work as @code{-g} matches @code{-ggamma} in the absence of @code{-ggamma}. Thus you should avoid using single character command line options. If the border width is set to a negative number, all objects appear to have a softer appearance. Some people might prefer @code{-bw -2}. Depending on your application, XForms defaults may or may not be appropriate. E.g., on machines capable of @w{24 bits} visuals, Forms Library always selects the deeper @w{24 bits} visual. If your application only uses a limited number of colors, it might be faster if a visual other than @w{24 bits} is selected. There are a couple of ways to override the default settings. You can provide an application specific resource database distributed with your program. The easiest way, however, is to set up your own program defaults programmatically without affecting the users' ability to override them with command line options. For this, you can use the following routine before calling @code{@ref{fl_initialize()}}: @findex fl_set_defaults() @anchor{fl_set_defaults()} @tindex FL_IOPT @anchor{FL_IOPT} @example void fl_set_defaults(unsigned long mask, FL_IOPT *flopt); @end example @noindent In addition to setting a preferred visual, this function can also be used to set other program defaults, such as label font size, unit of measure for form sizes etc. The following table lists the fields, masks and their meanings of @code{FL_IOPT}: @multitable @columnfractions 0.25 0.3 0.45 @headitem Structure @tab Mask Name @tab Meaning @item @code{typedef struct @{} @tab @tab @item @code{int debug;} @tab @code{FL_PDDebug} @tab Debug level (0-5) @item @code{int depth;} @tab @code{FL_PDDepth} @tab Preferred visual depth @item @code{int vclass;} @tab @code{FL_PDVisual} @tab Prefered visual, @code{TrueColor} etc. @item @code{int doubleBffer;} @tab @code{FL_PDDouble} @tab Simulate double buffering @item @code{int buttonFontSize;} @tab @code{FL_PDButtonFontSize} @tab Default button label font size @item @code{int menuFontSize;} @tab @code{FL_PDMenuFontSize} @tab Menu label font size @item @code{int choiceFontSize;} @tab @code{FL_PDChoiceFontSize} @tab Choice label and choice text font size @item @code{int browserFontSize;} @tab @code{FL_PDBrowserFontSize} @tab Browser label and text font size @item @code{int inputFontSize;} @tab @code{FL_PDInputFontSize} @tab Input label and text font size @item @code{int labelFontSize;} @tab @code{FL_PDLabelFontSize} @tab Label font size for all other objects (box, pixmap etc.) @item @code{int pupFontSize;} @tab @code{FL_PDPupFontSize} @tab Font size for pop-ups @item @code{int privateColormap;} @tab @code{FL_PDPrivateMap} @tab Select private colormap if appropriate @item @code{int sharedColormap;} @tab @code{FL_PDSharedMap} @tab Force use of shared colormap @item @code{int standardColormap;} @tab @code{FL_PDStandardMap} @tab Force use of standard colormap @item @code{int scrollbarType;} @tab @code{FL_PDScrollbarType} @tab Scrollbar type to use for browser and input @item @code{int ulThickness;} @tab @code{FL_PDULThickness} @tab Underline thickness @item @code{int ulPropWidth;} @tab @code{FL_PDULPropWidth} @tab Underline width, 0 for const. width fonts @item @code{int backingStore;} @tab @code{FL_PDBS} @tab Turn BackingStore on or off @item @code{int coordUnit;} @tab @code{FL_PDCoordUnit} @tab Unit of measure: pixel, mm, point @item @code{int borderWidth;} @tab @code{FL_PDBorderWidth} @tab Default border width @item @code{@} FL IOPT;} @tab @tab @end multitable A special visual designation, @code{FL_DefaultVisual} and a command line option equivalent, @code{-visual Default} are provided to set the program default to the server's default visual class and depth. If you set up your resource specifications to use class names instead of instance names, users can then list instance resources under an arbitrary name that is specified with the @code{-name} option. Coordinate units can be in pixels, points (1/72 inch), mm (millimeters), cp (centi-point, i.e., 1/100 of a point) or cmm (centi-millimeter). The the type of unit in use can be queried or set via the functions @findex fl_get_coordunit() @anchor{fl_get_coordunit()} @findex fl_set_coordunit() @anchor{fl_set_coordunit()} @example int fl_get_coordunit(void); void fl_set_coordunit(int coordUnit); @end example @noindent @code{coordUnit} can have the following values: @tindex FL_COORD_PIXEL @tindex FL_COORD_POINT @tindex FL_COORD_MM @tindex FL_COORD_centiPOINT @tindex FL_COORD_centiMM @code{FL_COORD_PIXEL}, @code{FL_COORD_POINT}, @code{FL_COORD_MM}, @code{FL_COORD_centiPOINT} and @code{FL_COORD_centiMM}. The unit in use can be changed anytime, but typically you would do this prior to creating a form, presumably to make the size of the form screen resolution independent. The basic steps in doing this may look something like the following: @example int oldcoordUnit = fl_get_coordunit(); fl_set_coordunit(FL_COORD_POINT); fl_bgn_form(...); /* add more objects */ fl_end_form(); fl_set_coordunit(oldcoordunit); @end example Some of the defaults are "magic" in that their exact values depend on the context or platform. For example, the underline thickness by default is 1 for normal fonts and 2 for bold fonts. There exists a convenience function to set the application default border width @findex fl_set_border_width() @anchor{fl_set_border_width()} @example void fl_set_border_width(int border_width) @end example @noindent which is equivalent to @example FL_IOPT fl_cntl; fl_cntl.borderWidth = border_width; fl_set_defaults(FL_PDBorderWidth, &fl_cntl); @end example Typically this function, if used, should appear before @code{@ref{fl_initialize()}} is called so the user has the option to override the default via resource or command line options. To change the default scrollbar type (which is @code{THIN_SCROLLBAR}) used in browser and input object, the following convenience function can be used: @findex fl_set_scrollbar_type() @anchor{fl_set_scrollbar_type()} @example void fl_set_scrollbar_type(int type); @end example where @code{type} can be one of the following @table @code @item FL_NORMAL_SCROLLBAR Basic scrollbar @item FL_THIN_SCROLLBAR Thin scrollbar @item FL_NICE_SCROLLBAR Nice scrollbar @item FL_PLAIN_SCROLLBAR Similar to thin scrollbar, but not as fancy @end table Setting the scrollbar type before calling @code{@ref{fl_initialize()}} is equivalent to @example FL_IOPT fl_cntl; fl_cntl.scrollbarType = type; fl_set_defaults(FL_PDScrollbarType, &fl_cntl); @end example It is recommended that this function be used before @code{@ref{fl_initialize()}} so the user has the option to override the default through application resources. Prior to version 0.80, the origin of XForms' coordinate system was at the lower-left corner of the form. The new Form Designer will convert the form definition file to the new coordinate system, i.e., with the origin at the upper-left hand corner, so no manual intervention is required. To help those who lost the @code{.fd} files or otherwise can't use a newer version of @code{fdesign}, a compatibility function is provided @findex fl_flip_yorigin() @anchor{fl_flip_yorigin()} @example void fl_flip_yorigin(void); @end example @noindent Note however that this function must be called prior to @code{@ref{fl_initialize()}} and is a no-op after that. For proportional font, substituting tabs with spaces is not always appropriate because this most likely will fail to align text properly. Instead, a tab is treated as an absolute measure of distance, in pixels, and a tab stop will always end at multiples of this distance. Application program can adjust this distance by setting the tab stops using the following routine @findex fl_set_tabstop() @anchor{fl_set_tabstop()} @example void fl_set_tabstop(const char *s); @end example @noindent where @code{s} is a string whose width in pixels is to be used as the tab length. The font used to calculate the width is the same font that is used to render the string in which the tab is embedded. The default @code{"aaaaaaaa"}, i.e.@: eight @code{'a'}s. Before we proceed further, some comments about double buffering are in order. Since Xlib does not support double buffering, Forms Library simulates this functionality with pixmap bit-bliting. In practice, the effect is hardly distinguishable from double buffering and performance is on par with multi-buffering extensions (It is slower than drawing into a window directly on most workstations however). Bear in mind that a pixmap can be resource hungry, so use this option with discretion. In addition to using double buffering throughout an application, it is also possible to use double buffering on a per-form or per-object basis by using the following routines: @findex fl_set_form_dblbuffer() @anchor{fl_set_form_dblbuffer()} @findex fl_set_object_dblbuffer() @anchor{fl_set_object_dblbuffer()} @example void fl_set_form_dblbuffer(FL_FORM *form, int yes); void fl_set_object_dblbuffer(FL_OBJECT *obj, int yes); @end example @noindent Currently double buffering for objects having a non-rectangular box might not work well. A nonrectangular box means that there are regions within the bounding box that should not be painted, which is not easily done without complex and expensive clipping and unacceptable inefficiency. XForms gets around this by painting these regions with the form's backface color. In most cases, this should prove to be adequate. If needed, you can modify the background of the pixamp by changing @code{obj->dbl_background} after switching to double buffer. Normally the Forms Library reports errors to @code{stderr}. This can be avoided or modified by registering an error handling function @findex fl_set_error_handler() @anchor{fl_set_error_handler()} @example void fl_set_error_handler(void (*user_handler)(const char *where, const char *fmt,...)); @end example @noindent The library will call the @code{user_handler} function with a string indicating in which function an error occured and a formatting string (see @code{sprintf()}) followed by zero or more arguments. To restore the default handler, call the function again with @code{user_handler} set to @code{NULL}. You can call this function anytime and as many times as you wish. You can also instruct the default message handler to log the error to a file instead of printing to @code{stderr} @findex fl_set_error_logfp() @anchor{fl_set_error_logfp()} @example void fl_set_error_logfp(FILE *fp); @end example @noindent For example @example fl_set_error_logfp(fopen("/dev/null","w")); @end example redirects all error messages to @file{/dev/null}, effectively turning off the default error reporting to @code{stderr}. In XForms versions older than 1.0.01 for some error messages, in addition to being printed to stderr, a dialog box were shown that requires actions from the user. This could be turned off and on with the function @findex fl_show_errors() @anchor{fl_show_errors()} @example void fl_show_errors(int show); @end example @noindent where @code{show} indicates whether to show (1) or not show (0) the errors. With newer versions of the Forms Library this function has no effect. The fonts used in all forms can be changed using the routine @findex fl_set_font_name() @anchor{fl_set_font_name()} @example int fl_set_font_name(int n, const char *name); @end example @noindent where @code{n} is a number between 0 and @code{FL_MAXFONTS -1}. The function returns @code{0} on success, @code{1} if called before proper initialization of the library and @code{-1} for either invalid arguments (@code{name} isn't set or isn't a name of a font that could be found, @code{n} negative or larger or equal to @code{FL_MAXFONTS}). @xref{Label Attributes and Fonts}, for details. A redraw of all forms is required to actually see the change for visible forms. Since the dimension of an object is typically given in pixels, depending on the server resolution and the font used, this can lead to unsatisfactory user interfaces. For example, a button designed to (just) contain a label in a @w{10 pt} font on a @w{75 DPI} monitor will have the label overflow the button on a @w{100 DPI} monitor. This comes about because a character of a @w{10 pt} font when rendered with @code{75 DPI} resolution may have 10 pixels while the same character in the same @w{10 pt} font with @w{100 DPI} resolution may have 14 pixels. Thus, when designing the interfaces, leave a few extra pixels for the object. Or use a resolution independent unit, such as point, or centi-point etc. Using a resolution independent unit for the object size should solve the font problems, theoretically. In practice, this approach may still prove to be vulnerable. The reason is the discreteness of both the font resolution and the monitor/server resolutions. The standard X fonts only come in two discrete resolutions, @w{75 DPI} and @w{100 DPI}. Due to the variations in monitor resolutions, the theoretically identical sized font, say a @w{10 pt} font, can vary in sizes (pixels) by up to 30%, depending on the server (rendering a font on a @w{80 DPI} monitor will cause errors in sizes regardless if a @w{75 DPI} or @w{100 DPI} font is used.) This has not even taken into account the fact that a surprising number of systems have wrong font paths (e.g., a @w{90 DPI} monitor using @w{75 DPI} fonts etc.). With the theoretical and practical problems associated with X fonts, it is not practical for XForms to hard-code default font resolution and it is not practical to use the resolution information obtained from the server either as information obtained from the server regarding monitor resolution is highly unreliable. Thus, XForms does not insist on using fonts with specific resolutions and instead it leaves the freedom to select the default fonts of appropriate resolutions to the system administrators. Given all these uncertainties regarding fonts, as a workaround, XForms provides a function that can be used to adjust the object size dynamically according to the actual fonts loaded: @findex fl_adjust_form_size() @anchor{fl_adjust_form_size()} @example double fl_adjust_form_size(FL_FORM *form); @end example This function works by computing the size (in pixels) of every object on the form that has an inside label and compares it to the size of the object. Scaling factors are computed if any object labels don't fit. The maximum scaling factor found is then used to scale the form so every object label fits inside the object. It will never shrink a form. The function returns the resulting scaling factor. In scaling the form the aspect ratio of the form is left unmodified and all object gravity specifications are ignored. Since this function is meant to compensate for font size and server display resolution variations, scaling is limited to 125% per invocation. The best place to use this function is right after the creation of the forms. If the forms are properly designed, this function should be a no-op on the machine the forms were designed on. Form Designer has a special option @code{-compensate} and resource @code{compensate} to request the emission of this function automatically for every form created. It is likely that this will become the default once the usefulness of it is established. There is a similar function that works the same way, but on an object-by-object basis and further allows explicit margin specifications: @findex fl_fit_object_label() @anchor{fl_fit_object_label()} @example void fl_fit_object_label(FL_OBJECT *obj, FL_Coord hm, FL_Coord vm); @end example @noindent where @code{hm} and @code{vm} are the horizontal and vertical margins to leave on each side of the object, respectively. This function works by computing the object labels size and comparing it to the object size. If the label does not fit inside the object with the given margin, the entire form the object is on is scaled so the object label fits. In scaling the form, all gravity specification is ignored but the aspect ratio of the form (and thus of all objects) is kept. This function will not shrink a form. You can use this function on as many objects as you choose. Of course the object has to have a label inside the object for this function to work. All colors with indices smaller than @code{FL_FREE_COL1} are used (or can potentially be used) by the Forms Library. If you wish they can be changed using the function prior to @code{@ref{fl_initialize()}}: @findex fl_set_icm_color() @anchor{fl_set_icm_color()} @example void fl_set_icm_color(FL_COLOR index, int r, int g, int b); @end example @noindent Using this function you can actually change all entries in the internal colormap (with @code{index} going up to @code{FL_MAX_COLORS-1}). You may also inspect the internal colormap using @findex fl_get_icm_color() @anchor{fl_get_icm_color()} @example void fl_get_icm_color(FL_COLOR index, int *r, int *g, int *b); @end example In some situations Forms Library may modify some of the server defaults. All modified defaults are restored as early as possible by the main loop and in general, when the application exits, all server defaults are restored. The only exception is when exiting from a callback that is activated by shortcuts. Thus it is recommended that the cleanup routine @code{@ref{fl_finish()}} is called prior to exiting an application or register it via @code{atexit()}. @findex fl_finish() @anchor{fl_finish()} @example void fl_finish(void); @end example In addition to restoring all server defaults, @code{@ref{fl_finish()}} also shuts down the connection and frees dynamically allocated memory. @node Creating Forms @section Creating Forms To start the definition of a form call @findex fl_bgn_form() @anchor{fl_bgn_form()} @example FL_FORM *fl_bgn_form(int type, FL_Coord w, FL_Coord h); @end example @noindent @code{type} is the type of the box that is used as a background. @code{w} and @code{h} give the width and height of the new form. The function returns a pointer to the form created. Once all objects required have been added to a form call @findex fl_end_form(); @anchor{fl_end_form()} @example void fl_end_form(void); @end example Between these two calls objects and groups of objects are added to the form. To start a new group of objects use @findex fl_bgn_group() @anchor{fl_bgn_group()} @example FL_OBJECT *fl_bgn_group(void); @end example @noindent The function returns a pointer to the group (actually to an invisible object of class @tindex FL_BEGIN_GROUP @code{FL_BEGIN_GROUP}). Groups can't be nested. When all objects that are supposed to belong to the group are added call @tindex FL_END_GROUP @findex fl_end_group() @anchor{fl_end_group()} @example void fl_end_group(void); @end example @noindent Also this function creates an (invisible) object, belonging to class @code{FL_END_GROUP}, but since it can't be used its address isn ot returned. Groups are useful for two reasons. First of all, it is possible to hide or deactivate groups of objects with a single function call. This is often very handy to dynamically change the appearance of a form depending on the context or selected options. In addition it can also be used as a shortcut to set some particular attributes of several objects. It is not uncommon that you want several objects to maintain their relative positioning upon form resizing. This requires to set the gravity for each object. If these objects are placed inside a group, setting the gravity attributes of the group will suffice. The second reason for use of groups is radio buttons. Radio buttons are considered related only if they belong to the same group. Using groups is the only way to place unrelated groups of radio buttons on a single form without interference from each other. Both forms and groups that have been ended by @code{@ref{fl_end_form()}} or @code{@ref{fl_end_group()}} can be "reopened" by using @findex fl_addto_form() @anchor{fl_addto_form()} @findex fl_addto_group() @anchor{fl_addto_group()} @example FL_FORM *fl_addto_form(FL_FORM *form) FL_OBJECT *fl_addto_group(FL_OBJECT *group); @end example @noindent Both functions return their argument on success and @code{NULL} on failure (e.g. because a different group or form is still open). On success further objects can be appended to the form or group. To remove an object from a form use @findex fl_delete_object() @anchor{fl_delete_object()} @example void fl_delete_object(FL_OBJECT *obj); @end example @noindent This does not yet destroy the object, it just breaks its connection to the form it did belong to, so it can still be referenced. To finally destroy an object use @findex fl_free_object() @anchor{fl_free_object()} @example void fl_free_object(FL_OBJECT *obj); @end example @noindent If @code{@ref{fl_delete_object()}} hadn't been called for the object this will happen now. The object receives a final event of type @code{FL_FREEMEM} to allow it to free memory it did allocate and do whatever other clean-up required. Finally all memory allocated for the object is freed. After being freed an object should not be referenced. A form as a whole, together with all the objects it contains can be deleted by calling @findex fl_free_form() @anchor{fl_free_form()} @example void fl_free_form(FL_FORM *form); @end example @noindent This will first hide the form (emitting warning if this is necessary), then free all of its objects and finally release memory allocated for the form. @node Object Attributes @section Object Attributes A number of general routines are available for setting and querying attributes. Unless stated otherwise, all attributes altering routines affect the appearance or geometry of the object immediately if the object is visible. Since the object class and type of an object can't be changed anymore once an object has been created there are only functions for querying these attributes: @findex fl_get_object_objclass() @anchor{fl_get_object_objclass()} @findex fl_get_object_type() @anchor{fl_get_object_type()} @example int fl_get_object_objclass(FL_OBJECT *obj); int fl_get_object_type(FL_OBJECT *obj); @end example @noindent Receiving a negative value indicates that a @code{NULL} pointer was passed to the functions. To set the two colors that influence the appearance of the object use @findex fl_set_object_color() @anchor{fl_set_object_color()} @example void fl_set_object_color(FL_OBJECT *obj, FL_COLOR col1, FL_COLOR col2); @end example @noindent and to find out about the colors of an object use @findex fl_get_object_color() @anchor{fl_get_object_color()} @example void fl_get_object_color(FL_OBJECT *obj, FL_COLOR *col1, FL_COLOR *col2); @end example @findex fl_set_object_boxtype() @anchor{fl_set_object_boxtype()} @example void fl_set_object_boxtype(FL_OBJECT *obj, int boxtype); @end example @noindent Changes the shape of the box of the object. Please note that not all possible boxtypes are suitable for all types of objects, see the documentation for the different objects for limitations. To find out the current boxtype of an object use @findex fl_get_object_boxtype() @anchor{fl_get_object_boxtype()} @example int fl_get_object_boxtype(FL_OBJECT *obj); @end example @noindent Receiving a negative value indicates that a @code{NULL} pointer was passed to the function. There are also functions to change or query the border width of an object: @findex fl_set_object_bw() @anchor{fl_set_object_bw()} @findex fl_get_object_bw() @anchor{fl_get_object_bw()} @example void fl_set_object_bw(FL_OBJECT *obj, int bw); void fl_get_object_bw(FL_OBJECT *obj, int *bw); @end example @noindent If the requested border width is 0, -1 is used. To change or inquire the objects position (relative to the form it belongs to) the functions @findex fl_set_object_position() @anchor{fl_set_object_position()} @findex fl_get_object_position() @anchor{fl_get_object_position()} @example void fl_set_object_position(FL_OBJECT *obj, FL_Coord x, FL_Coord y); void fl_get_object_position(FL_OBJECT *obj, FL_Coord *x, FL_Coord *y); @end example @noindent exist. If the object is visible it's redrawn at the new position. To change or inquire the size of an object use @findex fl_set_object_size() @anchor{fl_set_object_size()} @findex fl_get_object_size() @anchor{fl_get_object_size()} @example void fl_set_object_size(FL_OBJECT *obj, FL_Coord w, FL_Coord h); void fl_get_object_size(FL_OBJECT *obj, FL_Coord *w, FL_Coord *h); @end example @noindent When changing th size the position of the upper left hand corner of the object remains unchanged. To set or query both the position and size of an object the functions @findex fl_set_object_geometry() @anchor{fl_set_object_geometry()} @findex fl_get_object_geometry() @anchor{fl_get_object_geometry()} @example void fl_set_object_geometry(FL_OBJECT *obj, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h); void fl_get_object_geometry(FL_OBJECT *obj, FL_Coord *x, FL_Coord *y, FL_Coord (*w, FL_Coord *h); @end example @noindent can be used. Please note: always use one of the above functions to change the position and/or size of an object and don't try to change the information stored in the object directly. There's some double bookkeeping going on under the hood that makes sure that the objects position and size won't change due to rounding errors when the whole form gets resized and changing the internal information kept in the objects structure would interfer with this. There's a second function for calculation an objects geometry: @findex fl_get_object_bbox() @anchor{fl_get_object_bbox()} @example void fl_get_object_bbox(FL_OBJECT *obj, FL_Coord *x, FL_Coord *y, FL_Coord *w, FL_Coord *h); @end example @noindent The difference between this functions and @code{@ref{fl_get_object_geometry()}} is that @code{@ref{fl_get_object_bbox()}} returns the bounding box size that has the label, which could be drawn outside of the object figured in. Some objects in the library are composite objects that consist of other objects. For example, the scrollbar object is made of a slider and two scroll buttons. To get a handle to one of the components of the composite object, the following routine is available: @findex fl_get_object_component() @anchor{fl_get_object_component()} @example FL_OBJECT *fl_get_object_component(FL_OBJECT *obj, int objclass, int type, int number); @end example @noindent where @code{obj} is the composite object, @code{objclass} and @code{type} are the component object's class ID and type; and @code{number} is the sequence number of the desired object in case the composite has more than one object of the same class and type. You can use a constant -1 for @code{type} to indicate any type of class @code{objclass}. The function returns the object handle if the requested object is found, otherwise @code{NULL}. For example to obtain the object handle to the horizontal scrollbar in a browser, code similiar to the following can be used @example hscrollbar = fl_get_object_component(browser, FL_SCROLLBAR, FL_HOR_THIN_SCROLLBAR, 0) @end example To influence change the color, font size, font style, alignment and text of the label of an object use @findex fl_set_object_lcol() @anchor{fl_set_object_lcol()} @findex fl_set_object_lsize() @anchor{fl_set_object_lsize()} @findex fl_set_object_lstyle() @anchor{fl_set_object_lstyle()} @findex fl_set_object_lalign() @anchor{fl_set_object_lalign()} @findex fl_set_object_label() @anchor{fl_set_object_label()} @example void fl_set_object_lcol(FL_OBJECT *obj, FL_COLOR lcol); void fl_set_object_lsize(FL_OBJECT *obj, int lsize); void fl_set_object_lstyle(FL_OBJECT *obj, int lstyle); void fl_set_object_lalign(FL_OBJECT *obj, int align); void fl_set_object_label(FL_OBJECT *obj, const char *label); @end example To find out about the object labels color, font size, style, alignment and the string itself use @findex fl_get_object_lcol() @anchor{fl_get_object_lcol()} @findex fl_get_object_lsize() @anchor{fl_get_object_lsize()} @findex fl_get_object_lstyle() @anchor{fl_get_object_lstyle()} @findex fl_get_object_lalign() @anchor{fl_get_object_lalign()} @findex fl_get_object_label() @anchor{fl_get_object_label()} @example FL_COLOR fl_get_object_lcol(FL_OBJECT *obj); int fl_get_object_lsize(FL_OBJECT *obj); int fl_get_object_lstyle(FL_OBJECT *obj); int fl_get_object_lalign(FL_OBJECT *obj); const char * fl_get_object_label(FL_OBJECT *obj); @end example To set a tool-tip text for an object use the following routine @findex fl_set_object_helper() @anchor{fl_set_object_helper()} @example void fl_set_object_helper(FL_OBJECT *obj, const char *helpmsg); @end example @noindent where @code{helpmsg} is a text string (with possible embedded newlines in it) that will be shown when the mouse hovers over the object for nore than about @w{600 msec}. A copy of the string is made internally. The boxtype, color and font for the tool-tip message displayed can be customized further using the following routines: @findex fl_set_tooltip_boxtype() @anchor{fl_set_tooltip_boxtype()} @findex fl_set_tooltip_color() @anchor{fl_set_tooltip_color()} @findex fl_set_tooltip_font() @anchor{fl_set_tooltip_font()} @example void fl_set_tooltip_boxtype(int boxtype); void fl_set_tooltip_color(FL_COLOR textcolor, FL_COLOR background); void fl_set_tooltip_font(int style, int size); @end example @noindent where @code{boxtype} is the backface of the form that displays the text. The default is @code{FL_BORDER_BOX}. @code{textcolor} and @code{background} specify the color of the text and the color of the backface. The defaults for these are @code{FL_BLACK} and @code{FL_YELLOW}. @code{style} and @code{size} are the font style and size of the text. There are four function for controlling how an object reacts to resizing the form it belongs to or to find out what its current settings are: @findex fl_set_object_resize() @anchor{fl_set_object_resize()} @findex fl_get_object_resize() @anchor{fl_get_object_resize()} @findex fl_set_object_gravity() @anchor{fl_set_object_gravity()} @findex fl_get_object_gravity() @anchor{fl_get_object_gravity()} @example void fl_set_object_resize(FL_OBJECT *obj, unsigned int howresize); void fl_get_object_resize(FL_OBJECT *obj, unsigned int *howresize); void fl_set_object_gravity(FL_OBJECT *obj, unsigned int NWgravity, unsigned int SEgravity); void fl_get_object_gravity(FL_OBJECT *obj, unsigned int *NWgravity, unsigned int *SEgravity); @end example @noindent @xref{Part I Doing Interaction, , Doing Interaction}, for more details on the resizing behaviour of objects. If you change many attributes of a single object or many objects in a visible form, the changed object is redrawn after each change. To avoid this, put the changes between calls of the two functions @findex fl_freeze_form() @anchor{fl_freeze_form()} @findex fl_unfreeze_form() @anchor{fl_unfreeze_form()} @example void fl_freeze_form(FL_FORM *form); void fl_unfreeze_form(FL_FORM *form); @end example There are also routines that influence the way events are dispatched. These routines are provided mainly to facilitate the development of (unusual) new objects where attributes need to be changed on the fly. These routines should not be used on the built-in ones. To enable or disable an object to receive the @code{FL_STEP} event, use the following routine @findex fl_set_object_automatic() @anchor{fl_set_object_automatic()} @example void fl_set_object_automatic(FL_OBJECT *obj, int yes); @end example To determine if an object receives @code{FL_STEP} events use @findex fl_object_is_automatic() @anchor{fl_object_is_automatic()} @example int fl_object_is_automatic(FL_OBJECT *obj); @end example To enable or disable an object to receive the FL_DBLCLICK event use the following routine @findex fl_set_object_dblclick() @anchor{fl_set_object_dblclick()} @example void fl_set_object_dblclick(FL_OBJECT *obj, unsigned long timeout); @end example @noindent where @code{timeout} specifies the maximum time interval (in msec) between two clicks for them to be considered a double-click (using 0 disables double-click detection). To determine the current setting of the timeout use @findex fl_get_object_dblclick() @anchor{fl_get_object_dblclick()} @example unsigned fl_get_object_dblclick(FL_OBJECT *obj); @end example To make an object or a group invisible or visible use the following two functions @findex fl_hide_object() @anchor{fl_hide_object()} @findex fl_show_object() @anchor{fl_show_object()} @example void fl_hide_object(FL_OBJECT *obj); void fl_show_object(FL_OBJECT *obj); @end example @noindent @code{obj} can be the pseudo-object returned by @code{@ref{fl_bgn_group()}} and then allows to hide or show whole groups of objects. To determine if an object is visible (given that the form it belongs to is also visible) use @findex fl_object_is_visible() @anchor{fl_object_is_visible()} @example int fl_object_is_visible(FL_OBJECT *obj); @end example @findex fl_trigger_object() @anchor{fl_trigger_object()} @example void fl_trigger_object(FL_OBJECT *obj); @end example @noindent returns @code{obj} to the application program after calling its callback if one exists. @findex fl_set_focus_object() @anchor{fl_set_focus_object()} @example void fl_set_focus_object(FL_FORM *form, FL_OBJECT *obj); @end example @noindent sets the input focus in form @code{form} to object @code{obj}. Note however, if this routine is used as a response to an @code{FL_UNFOCUS} event, i.e., as an attempt to override the focus assignment by the main loop from within an objects event handler, this routine will not work as the main loop assigns a new focus object upon return from the object event handler, which undoes the focus change inside the event handler. To override the @code{FL_UNFOCUS} event the following routine should be used: @findex fl_reset_focus_object() @anchor{fl_reset_focus_object()} @example void fl_reset_focus_object(FL_OBJECT *obj); @end example Use the following routine to obtain the object that has the focus on a form @findex fl_get_focus_object() @anchor{fl_get_focus_object()} @example FL_OBJECT *fl_get_focus_object(FL_FORM *form); @end example The routine @findex fl_set_object_callback() @anchor{fl_set_object_callback()} @example void fl_set_object_callback(FL_OBJECT *obj, void (*callback)(FL_OBJECT *, long), long argument); @end example @noindent binds a callback routine to an object. To invoke the callback manually (as opposed to invocation by the main loop), use the following function @findex fl_call_object_callback() @anchor{fl_call_object_callback()} @example void fl_call_object_callback(FL_OBJECT *obj); @end example @noindent If the object @code{obj} does not have a callback associated with it, this call has not effect. @findex fl_set_form_callback() @anchor{fl_set_form_callback()} @example void fl_set_form_callback(FL_FORM *form, void (*callback)(FL_OBJECT *, void *), void *data); @end example @noindent binds a callback routine to an entire form. It is sometimes useful to obtain the last event from within a callback function, e.g., to implement different functionalities depending on which button triggers the callback. For this, the following routine can be used from within a callback function. @findex fl_last_event() @anchor{fl_last_event()} @example const XEvent *fl_last_event(void); @end example @noindent Sometimes, it may be desirable to obtain hardcopies of some objects in a what-you-see-is-what-you-get (WYSISYG) way, especially those that are dynamic and of vector-graphics in nature. To this end, the following routine exists: @findex fl_object_ps_dump() @anchor{fl_object_ps_dump()} @example int fl_object_ps_dump(FL_OBJECT *obj, const char *fname); @end example @noindent The function will output the specified object in PostScript. If @code{fname} is @code{NULL}, a fselector will be shown to ask the user for a file name. The function returns a negative number if no output is generated due to errors. At the moment, only the @code{FL_XYPLOT} object is supported. The object must be visible at the time of the function call. The hardcopy should mostly be WYSIWYG and centered on the printed page. The orientation is determined such that a balanced margin results, i.e., if the width of the object is larger than the height, landscape mode will be used. Further, if the object is too big to fit on the printed page, a scale factor will be applied so the object fits. The box underneath the object is by default not drawn and in the default black&white mode, all curves are drawn in black. See demo program @file{xyplotover.c} for an example output. It is possible to customize the output by changing the PostScript output control parameters via the function @findex flps_init() @anchor{flps_init()} @tindex FLPS_CONTROL @example FLPS_CONTROL *flps_init(void); @end example @noindent A typical use is to call this routine to obtain a handle to the PostScript output control structure and change the control structure members to suit your needs before calling @code{@ref{fl_object_ps_dump()}}. You should not free the returned buffer. The control structure has the following members @table @code @item int ps_color The choices are full color (@code{FLPS_COLOR}), grayscale (@code{FLPS_GRAYSCALE}) and black&white (@code{FLPS_BW}). The default for xyplot is black and white. In this mode, all drawings are black, on a white background. If @code{drawbox} (see below) is true, the drawing color can be either white or black depending on the specified color. @item int orientation Valid choices are @code{FLPS_AUTO}, @code{FLPS_PORTRAIT} and @code{FLPS_LANDSCAPE}. The default is @code{FLPS_AUTO}. @item auto_fit By default, this is true so the object always fits the printed page. Set it to false (0) to turn off auto-scaling. @item int eps Set this to 1 if output in EPS format is required. @item int drawbox Set this to 1 if the box of the object is to be drawn. @item float xdpi, ydpi These two are the screen resolution. The default is to use the actual resolution of the display. Note by setting a dpi number smaller or larger than the actual resolution, the output object is in effect being enlarged or shrunken. @item float paper_w The paper width in inches. The default is @w{8.5 in}. @item float paper_h The paper height in inches. The default is @w{11 in}. @end table To generate a PostScript output of a form or forms, use the @code{fd2ps} program documented in @ref{Part II Generating Hardcopies}. @node Doing Interaction @section Doing Interaction To display the form @code{form} on the screen use @findex fl_show_form() @anchor{fl_show_form()} @example Window fl_show_form(FL_FORM *form, int place, int border, const char *title); @end example @noindent @code{place} controls the position and size of the form. @code{border} indicates whether a border (window manager's decoration) should be drawn around the form. If a border is to be drawn @code{title} is the name of the window (and its associated icon). The routine returns the window identifier of the form. For resource and identification purposes, the form name is taken to be the title with spaces removed and the first character lower-cased. E.g., if a form has a title @w{@code{"Foo Bar}} the forms name is derived as @code{"fooBar"}. For the the location and size of the window controlled by @code{place} the following possibilities exist: @table @code @tindex FL_PLACE_SIZE @item FL_PLACE_SIZE The user can control the position but the size is fixed. Interactive resizing is not allowed once the form becomes visible. @tindex FL_PLACE_POSITION @item FL_PLACE_POSITION Initial position used will be the one set via @code{@ref{fl_set_form_position()}}. Interactive resizing is allowed. @tindex FL_PLACE GEOMETRY @item FL_PLACE GEOMETRY Place at the latest position and size (see also below) or the geometry set via @code{@ref{fl_set_form_geometry()}} etc. A form so shown will have a fixed size and interactive resizing is not allowed. @tindex FL_PLACE_ASPECT @item FL_PLACE_ASPECT Allows interactive resizing but any new size will have the aspect ratio as that of the initial size. @tindex FL_PLACE_MOUSE @item FL_PLACE_MOUSE The form is placed centered below the mouse. Interactive resizing will not be allowed unless this option is accompanied by @code{@ref{FL_FREE_SIZE}} as in @code{@ref{FL_PLACE_MOUSE}|@ref{FL_FREE_SIZE}}. @tindex FL_PLACE_CENTER @item FL_PLACE_CENTER The form is placed in the center of the screen. If @code{@ref{FL_FREE_SIZE}} is also specified, interactive resizing will be allowed. @tindex FL_PLACE_FULLSCREEN @item FL_PLACE_FULLSCREEN The form is scaled to cover the full screen. If @code{@ref{FL_FREE_SIZE}} is also specified, interative resizing will be allowed. @tindex FL_PLACE_FREE @item FL_PLACE_FREE Both the position and size are completely free. The initial size used is the designed size. Initial position, if set via @code{@ref{fl_set_form_position()}}, will be used, otherwise interactive positioning may be possible if the window manager allows it. @tindex FL_PLACE_HOTSPOT @item FL_PLACE_HOTSPOT The form is so placed that mouse is on the "hotspot". If @code{@ref{FL_FREE_SIZE}} is also specified, interactive resizing will be allowed. @tindex FL_PLACE_CENTERFREE @item FL_PLACE_CENTERFREE Same as @code{@ref{FL_PLACE_CENTER}|@ref{FL_FREE_SIZE}}, i.e., place the form at the center of the screen and allow resizing. @tindex FL_PLACE ICONIC @item FL_PLACE ICONIC The form is shown initially iconified. The size and location used are the window manager's default. @end table If no size is specified, the designed (or later scaled) size will be used. Note that the initial position is dependent upon the window manager used. Some window managers will allow interactive placement of the windows and some will not. There are three values that can be passed for @code{border}: @table @code @tindex FL_FULLBORDER @item FL_FULLBORDER Draw full border with title @tindex FL_TRANSIENT @item FL_TRANSIENT Draw borders with possibly less decoration (depends on the window managers behaviour) @tindex FL_NOBORDER @item FL_NOBORDER Draw no border at all @end table Since multiple forms can be displayed at the same time note that using @code{FL_NOBORDER} might have adverse effect on keyboard focus and is not very friendly to other applications (it is close to impossible to move a form that has no border). Thus use this feature with discretion. The only situation where @code{FL_NOBORDER} is appropriate is for automated demonstration suites or when the application program must obtain an input or a mouse click from the user, and even then all other forms should be deactivated while a borderless form is active. For almost all situations where the application must demand an action from the user @code{FL_TRANSIENT} is preferable. Also note that you can't iconify a form that has no borders and under most window managers forms displayed with @code{FL_TRANSIENT} can't be iconified either. One additional property (under almost all window managers) of a transient window is that it will stay on top of the main form, which the application program can designate using @findex fl_set_app_mainform() @anchor{fl_set_app_mainform()} @example void fl_set_app_mainform(FL_FORM *form); @end example @noindent By default, the main form is set automatically by the library to the first full-bordered form shown. To obtain the current main form, use the following routine @findex fl_get_app_mainform() @anchor{fl_get_app_mainform()} @example FL_FORM *fl_get_app_mainform(void); @end example In some situations, either because the concept of an application main form does not apply (for example, an application might have multiple full-bordered windows), or under some (buggy) window managers, the designation of a main form may cause stacking order problems. To workaround these, the following routine can be used to disable the designation of a main form (must be called before any full-bordered form is shown): @findex fl_set_app_nomainform() @anchor{fl_set_app_nomainform()} @example void fl_set_app_nomainform(int yes); @end example @noindent with a true flag. All visible forms will have the properties @code{WM_CLASS}, @code{WM_CLIENT_MACHINE} and @code{WM_NAME} set. In addition, the first full-bordered form will have the @code{WM_COMMAND} property set and is by default the applications main form. Sometimes it is necessary to have access to the window resource ID before the window is mapped (shown). For this, the following routine can be used @findex fl_prepare_form_window() @anchor{fl_prepare_form_window()} @example Window fl_prepare_form_window(FL_FORM *form, int place, int border, const char *name); @end example @noindent This routine creates a window that obeys any and all constraints just as @code{@ref{fl_show_form()}} does but remains unmapped. To map such a window, the following must be used @findex fl_show_form_window() @anchor{fl_show_form_window()} @example Window fl_show_form_window(FL_FORM *form); @end example @noindent Between these two calls, the application program has full access to the window and can set all attributes, such as icon pixmaps etc., that are not set by @code{@ref{fl_show_form()}}. The application program can raise a form to the top of the screen so no other forms obscures it by calling @findex fl_raise_form() @anchor{fl_raise_form()} @example void fl_raise_form(FL_FORM *form); @end example To instead lower a form to the bottom of the stack use @findex fl_lower_form() @anchor{fl_lower_form()} @example void fl_lower_form(FL_FORM *form); @end example When placing a form on the screen using @code{FL_PLACE_GEOMETRY} for the @code{place} argument to @code{@ref{fl_show_form()}} the position and size can be set before by using the routines @findex fl_set_form_position() @anchor{fl_set_form_position()} @findex fl_set_form_size() @anchor{fl_set_form_size()} @findex fl_set_form_geometry() @anchor{fl_set_form_geometry()} @findex fl_scale_form() @anchor{fl_scale_form()} @example void fl_set_form_position(FL_FORM *form, FL_Coord x, FL_Coord y); void fl_set_form_size(FL_FORM *form, FL_Coord w, FL_Coord h); void fl_set_form_geometry(FL_FORM form*, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h); void fl_scale_form(FL_FORM *form, double xsc, double ysc); @end example @noindent where @code{@ref{fl_set_form_geometry()}} combines the functionality of @code{@ref{fl_set_form_position()}} and @code{@ref{fl_set_form_size()}} and the last routine, @code{@ref{fl_scale_form()}}, scales the form in horizontal and vertical direction by the factors passed to the function. These routines can also be used when the form is visible. Sometimes it is desirable to know how large the decoration are the window manager puts around a forms window. They can be obtained by a call of @findex fl_get_decoration_sizes() @anchor{fl_get_decoration_sizes()} @example void fl_get_decoration_sizes(FL_FORM *form, int *top, int *right, int *bottom, int *left); @end example @noindent This is especially useful if it is necessary to open a window at some previously stored position since in that case one needs the position of of the window, which deviates from the position reported for the form by the window manager's decorations. Obviously, the above function can't be used for forms that are embedded into another form. The function @findex fl_form_is_isconified() @anchor{fl_form_is_isconified()} @example int fl_form_is_isconified(FL_FORM *form); @end example @noindent allows to test if the (visible) window of a form is in iconified state. If interactive resizing is allowed (e.g., by showing the form with @code{@ref{FL_PLACE_POSITION}}) it can be useful to limit the range of the size of a form can take. To this end, the following functions are available @findex fl_set_form_minsize() @anchor{fl_set_form_minsize()} @findex fl_set_form_maxsize() @anchor{fl_set_form_maxsize()} @example void fl_set_form_minsize(FL_FORM *form, FL_Coord minw, FL_Coord minh); void fl_set_form_maxsize(FL_FORM *form, FL_Coord maxw, FL_Coord maxh); @end example Although these two routines can be used before or after a form becomes visible, not all window managers honor such requests once the window is visible. Also note that the constraints only apply to the next call of @code{@ref{fl_show_form()}} for the form. To set or change the icon shown when a form is iconified use the following routine @findex fl_set_form_icon() @anchor{fl_set_form_icon()} @example void fl_set_form_icon(FL_FORM *form, Pixmap icon, Pixmap mask); @end example @noindent where @code{icon} can be any valid pixmap ID. (@xref{Pixmap Object}, for some of the routines that can be used to create pixmaps.) Note that a previously set icon if not freed or modified in anyway. If, for any reason, you would like to change the form title after the form has been made visible, the following call can be used (this will also change the icon title) @findex fl_set_form_title() @anchor{fl_set_form_title()} @example void fl_set_form_title(FL_FORM *form, const char *name); @end example The routine @findex fl_hide_form() @anchor{fl_hide_form()} @example void fl_hide_form(FL_FORM *form); @end example @noindent hides the particular form, i.e., closes its window and all subwindows. To check if a form is visible or not, the following function can be used @findex fl_form_is_visible() @anchor{fl_form_is_visible()} @example int fl_form_is_visible(FL_FORM *form)' @end example @noindent The function can return that the form is visible (@code{@ref{FL_VISIBLE}}), is invisible (@code{@code{FL_INSIBILE}}) or in the processing of becoming invisible (@code{@ref{FL_BEING_HIDDEN}}). The most important function for doing the actual interaction with forms is @anchor{fl_do_forms()} @findex fl_do_forms() @example FL_OBJECT *fl_do_forms(void); @end example @noindent It starts the main loop of the program and returns only when the state of an object changes that has no callback bound to it. A pointer to this object is then returned. A second way of doing interaction with the currently displayed forms is using @anchor{fl_check_forms()} @findex fl_check_forms() @example FL_OBJECT *fl_check_forms(void); @end example @noindent This routine returns @code{NULL} immediately unless the state of one of the object (without a callback bound to it) changed. In that case a pointer to this object gets returned. Then there are two more functions: @anchor{fl_do_only_forms()} @findex fl_do_only_forms() @anchor{fl_check_only_forms()} @findex fl_check_only_forms() @example FL_OBJECT *fl_do_only_forms(void); FL_OBJECT *fl_check_only_forms(void); @end example @noindent Both functions do the same as @code{@ref{fl_do_forms()}} and @code{@ref{fl_check_forms()}} except that they do not handle user events generated by application windows opened via @code{@ref{fl_winopen()}} or similar routines. To activate or deactivate a form for user interaction you can use @findex fl_activate_form() @anchor{fl_activate_form()} @findex fl_deactivate_form() @anchor{fl_deactivate_form()} @example void fl_activate_form(FL_FORM *form); void fl_deactivate_form(FL_FORM *form); @end example The same can also be done for all forms at once using @findex fl_deactivate_all_forms() @anchor{fl_deactivate_all_forms()} @findex fl_activate_all_forms() @anchor{fl_activate_all_forms()} @example void fl_deactivate_all_forms(void) void fl_activate_all_forms(void) @end example You can also register callbacks for a form that are invoked whenever the activation status of the form is changed: @tindex FL_FORM_ATACTIVATE @tindex FL_FORM_ATDEACTIVATE @findex fl_set_form_atactivate() @anchor{fl_set_form_atactivate()} @findex fl_set_form_atdeactivate() @anchor{fl_set_form_atdeactivate()} @example typedef void (*FL_FORM_ATACTIVATE)(FL_FORM *, void *); FL_FORM_ACTIVATE fl_set_form_atactivate(FL_FORM *form, FL_FORM_ATACTIVATE callback, void *data); typedef void (*FL_FORM_ATDEACTIVATE)(FL_FORM *, void *); FL_FORM_ACTIVATE fl_set_form_atdeactivate(FL_FORM *form, FL_FORM_ATACTIVATE callback, void *data); @end example Also individual objects (or groups of objects if the argument of the function is an object returned by @code{@ref{fl_bgn_group()}}) can be activated and deactivated to enable or disable user interaction: @findex fl_activate_object() @anchor{fl_activate_object()} @findex fl_deactivate_object() @anchor{fl_deactivate_object()} @example void fl_activate_object(FL_OBJECT *obj); void fl_deactivate_object(FL_OBJECT *obj); @end example @noindent It is normally useful to give the user a visual clue when an object gets deactivated, e.g., by graying out its label etc. To find out if an object is active use @findex fl_object_is_active() @anchor{fl_object_is_active()} @example int fl_object_is_active(FL_OBJECT *obj); @end example @findex fl_redraw_object() @anchor{fl_redraw_object()} @example void fl_redraw_object(FL_OBJECT *obj); @end example @noindent This routine redraws the particular object. If @code{obj} is a group it redraws the complete group. Normally you should never need this routine because all library routines take care of redrawing objects when necessary, but there might be situations in which an explicit redraw is required. To redraw an entire form use @findex fl_redraw_form() @anchor{fl_redraw_form()} @example void fl_redraw_form(FL_FORM *form); @end example For non-form windows, i.e., those created with @code{@ref{fl_winopen()}} or similar routines by the application program, the following means of interaction are provided (note that these do not work on form windows, for which a different set of functions exist. @xref{Windowing Support}, for details.) You may set up a callback routine for all user events using @findex fl_set_event_callback() @anchor{fl_set_event_callback()} @example FL_APPEVENT_CB fl_set_event_callback(int (*callback)(XEvent *ev, void *data), void *data); @end example It is also possible to set up callback functions on a per window/event basis using the following routines: @tindex FL_APPEVENT_CB @findex fl_add_event_callback() @anchor{fl_add_event_callback()} @findex fl_remove_event_callback() @anchor{fl_remove_event_callback()} @example typedef int (*FL_APPEVENT_CB)(XEvent *xev, void *user_data); FL_APPEVENT_CB fl_add_event_callback(Window win, int xevent_type, FL_APPEVENT_CB callback, void *user_data); void fl_remove_event_callback(Window win, int xevent_type); @end example @noindent These functions manipulate the event callback functions for the window specified, which will be called when an event of type @code{xevent_type} is pending for the window. If @code{xevent_type} is 0 it signifies a callback for all event for window @code{win}. Note that the Forms Library does not solicit any event for the caller, i.e.@: the Forms Library assumes the caller opens the window and solicits all events before calling these routines. To let the Forms Library handle event solicitation, the following function may be used @findex fl_activate_event_callbacks() @anchor{fl_activate_event_callbacks()} @example void fl_activate_event_callbacks(Window win); @end example @node Signals @section Signals Typically, when a signal is delivered, the application does not know what state the application is in, thus limiting the tasks a signal handler can do. In a GUI system and with a main loop inside the library, it's even harder to know what's safe or unsafe to do in a signal handler. Given all these difficulties, the Forms Library's main loop is made to be aware of signal activities and invoke signal handlers only when it's appropriate to do so, thus removing most limitations on what a signal handler can do. The application program can elect to handle the receipt of a signal by registering a callback function that gets called when a signal is caught @tindex FL_SIGNAL_HANDLER @findex fl_add_signal_callback() @anchor{fl_add_signal_callback()} @example typedef void (*FL_SIGNAL_HANDLER)(int, void *); void fl_add_signal_callback(int signal, FL_SIGNAL_HANDLER sh, void *data); @end example Only one callback per signal is permitted. By default, @code{@ref{fl_add_signal_callback()}} will store the callback function and initiate a mechanism for the OS to deliver the signal when it occurs. When the signal is received by the library, the main loop will invoke the registered callback function when it is appropriate to do so. The callback function can make use of all of XForms's functions as well as Xlib functions as if they were reentrant. Further, a signal callback registered his way is persistent and will cease to function only when explicitly removed. It is very simple to use this routine. For example, to prevent a program from exiting prematurely due to signals, a code fragment similar to the following can be used: @example void clean_up(int signum, void *data) @{ /* clean up, of course */ @} /* call this somewhere after fl_initialize() */ fl_add_signal_callback(SIGINT, clean_up, &mydata); @end example @noindent After this, whenever a @code{SIGINT} signal is received, @code{clean_up()} is called. To remove a signal callback, the following routine should be used @findex fl_remove_signal_callback() @anchor{fl_remove_signal_callback()} @example void fl_remove_signal_callback(int signal); @end example Although very easy to use, there are limitations with the default behavior outlined above. For example on some platforms there is no blocking of signals of any kind while handling a signal. In addition, use of @code{@ref{fl_add_signal_callback()}} prevents the application program from using any, potentially more flexible, system signal handling routines on some platforms. Also there might be perceptible delays from the time a signal is delivered by the OS and the time its callback is invoked by XForms' main loop. This delay can be particular troublesome for timing sensitive tasks (playing music for example). In light of these limitations, provisions are made so an application program may choose to take over the initial signal handling setup and receipt via various system dependent methods (@code{sigaction()} for example). To change the default behavior of the built-in signal facilities, the following routine should be called prior to any use of @code{fl_add_signal_callback(}) with a true value for @code{flag}: @findex fl_app_signal_direct() @anchor{fl_app_signal_direct()} @example void fl_app_signal_direct(int flag); @end example @noindent After this call @code{@ref{fl_add_signal_callback()}} will not initiate any actions to receive a signal. The application program should handle the receipt and blocking of signals (via e.g., @code{signal(2)}, @code{sigaction(2)}, @code{sigprocmask(2}) etc.) When the signal is received by the application program, it should call the following routine to inform the main loop of the delivery of the signal @code{signum}, possibly after performing some timing sensitive tasks: @findex fl_signal_caught() @anchor{fl_signal_caught()} @example void fl_signal_caught(int signum); @end example @noindent This routine is the only one in the library that can be safely called from within a direct application signal handler. If multiple invocations of @code{@ref{fl_signal_caught()}} occur before the main loop is able to call the registered callback, the callback is called only once. The following example illustrates how to handle a timing critical situation (for most application, idle callback, timeouts or @code{FL_TIMER} object should be sufficient). First, you need to define the function that will handle the timing critical tasks. The function will be registered with the OS to be invoked directly by it. There are limitations on what you can do within a (OS) signal handler, in particular, GUI activity is not safe. @example void timing_critical_task(int sig) @{ /* handle timing critical tasks that does not involve GUI */ ... /* Now tell the library the signal has been delivered by the OS. * The library will invoke the xforms signal handler when it's * appropriate to do so */ fl_signal_caught(sig); @} @end example @noindent Now define a (XForms) signal handler that will be responsible for handling the response of the GUI upon receipt of the signal @example void gui_signal_handler(int sig, void *data) @{ /* within an XForms signal handler, there is no limitation * on GUI activitity */ fl_set_object_color(....); ... @} @end example To make all this work, a set-up similar to the following can be used @example /* setup the signal */ fl_app_signal_direct(1); setitimer(ITIMER_REAL, interval); /* setup the OS signal handler */ signal(SIGALRM, timing_critical_tasks); /* setup the XForms signal handler */ fl_add_signal_callback(SIGALRM, gui_signal_handler, &myData); @end example @node Idle Callbacks and Timeouts @section Idle Callbacks and Timeouts For application programs that need to perform some light, but semi-continuous or periodic tasks, idle callback and timeouts (also @code{FL_TIMER} objects) can be utilized. To register an idle callback with the system, use the following routine @tindex FL_APPEVENT_CB @findex fl_set_idle_callback() @anchor{fl_set_idle_callback()} @example typedef int (*FL_APPEVENT_CB)(XEvent *, void *); FL_APPEVENT_CB fl_set_idle_callback(FL_APPEVENT_CB callback, void *user_data); @end example @noindent where @code{callback} is the function that will get called whenever the main loop is idle. The time interval between invocations of the idle callback can vary considerably depending on interface activity and other factors. A range between 50 and @w{300 msec} should be expected. It is possible to change what the library considers to be "idle" with the following function: @findex fl_set_idle_delta() @anchor{fl_set_idle_delta()} @example void fl_set_idle_delta(long msec); @end example @noindent Here @code{msec} is the minimum time interval of inactivity after which the main loop is considered to be in an idle state. However it should be noted that under some conditions an idle callback can be called sooner than the minimum interval. If the timing of the idle callback is of concern, timeouts should be used. Timeouts are similar to idle callbacks but with the property that the user can specify a minimum time interval that must elapse before the callback is called. The precision of timeouts tends to be quite a bit better than that of idle callbacks since they internally get prefered treatent. To register a timeout callback, the following routine can be used @tindex FL_TIMEOUT_CALLBACK @findex fl_add_timeout() @anchor{fl_add_timeout()} @example typedef void (*FL_TIMEOUT_CALLBACK)(int, void *); int fl_add_timeout(long msec, FL_TIMEOUT_CALLBACK callback, void *data); @end example @noindent The function returns the timeout ID (note: the function will not return 0 and -1, so the application can use these values to mark invalid or expired timeouts). When the time interval specified by the @code{msec} argument (in milli-second) is elapsed, the timeout is removed and the callback function is called with the timeout ID as the first argument. Although a timeout offers some control over the timing, due to performance and CPU load compromises, while the resolution can be better than @w{10 ms} under favourable conditions, it can also be much worse, occasionally up to @w{150 ms}. To remove a timeout before it triggers, use the following routine @findex fl_remove_timeout() @anchor{fl_remove_timeout()} @example void fl_remove_timeout(int id); @end example @noindent where @code{id} is the timeout ID returned by @code{@ref{fl_add_timeout()}}. @xref{Timer Object}, for the usage of @code{FL_TIMER} object. For tasks that need more accurate timing the use of signal should be considered. xforms-1.0.93sp1/doc/part2_getting_started.texi0000644000175000017500000001345111375524355020203 0ustar jensjens@node Part II Getting Started @chapter Getting Started To start up the Form Designer simply type fdesign without any arguments. (If nothing happens, check whether the package has been installed correctly.) A black window (the main window) will appear on the screen. This is the window in which you can create your forms. Next the control panel appears on the screen. No form is shown yet. @ifhtml @center @image{images/fdesign} @end ifhtml @ifnothtml @center @image{images/fdesign,14cm} @end ifnothtml The control panel consists of five parts. The first part is the menu bar, consisting of several groups of menus from which you can make selections or give commands to the program. Directly below the menu you have a row of buttons for manipulating forms and to invoke few other functions described below. At the left there is a list of all existing forms. At the start the list is empty, indicating that there are no forms yet. There's no upper limit to the number of forms you that can be created. You can work on exactly one form at a time and use this list to switch between the different forms. Below the forms list is another list of all groups in the form you're currently working on. It will be empty at first because there are no groups yet. Ignore this at the moment as we will come back to groups and their uses later. Just right of those two lists you find a list of all the different types of objects that can be placed into the form. Use the mouse to select the type of object you want to add to the form. On the right side you find a number of buttons to give commands to the program. Each of these buttons is bound to a function key. You can either press the buttons with the mouse or press the corresponding function keys on the keyboard. The functions of these keys will be described below. To create a new form click on the button labeled "New Form" in the top-left corner of the control panel, just below the menu bar. A little popup box will appear, prompting you for the name of the new form. This is the name under which the application program will know the form. You will have to provide a name (which must be a legal C variable name). Type in the name and press @code{}. Now the color of the other window for working on forms changes to that of the background color of the new form. (Actually, each new form gets created with a box already covering its entire area, what you see is the color of this box. You can change most properties of this box using the methods described below. Just its size is fixed to the size of the form, which can be simply changed by resizing the window.) Note that the form's name is added to the list of forms in the control panel. To add an object to the form choose the type of object in the control panel by clicking in the list of object classes. Next move the mouse into the form you are creating and drag the mouse while pressing the left mouse button. By keeping the mouse button pressed you create a box that has the desired size of the object. Release the button and the object will appear. Note that a red outline appears around the new object. This indicates that the object is selected. In this way you can put all kinds of objects on the form. It is possible to move objects around or change their sizes. To this end first select the object by pressing the mouse in it. A red outline will appear around the object. You now will be able to drag the object around with the mouse. By grabbing the object at one of the four red corners you can change its size. In this way you can change the layout of the objects on the form. It is also possible to select multiple objects and move or scale them simultaneously. See below for details. To change the object's attributes, e.g. the label, of an object, first single-click on the object to select it. Next press the function key @code{} or click on the button labeled "F1 attribs'' in the control panel or select "Object attributes" from the "Object" menu. The same effect can also be achieved by double-clicking on the object with the right mouse button. A new form appears in which you can change all the different attributes. Their meanings should be clear (if you have read the documentation on the Forms Library). Change the attributes you want to change and finally press the button labeled "Accept". To reset all attributes to their original values press "Restore" (or "Cancel" if you also want to close the window for modifying the attributes). See below for more information about changing attributes. In this way you can create the forms you want to have. Note that you can work on different forms at the same moment. Just add another form in the way described above and use the list of forms to switch between them. After you have created all your forms select "Save" from the "File" menu to save them to disk. It will ask you for a file name using the file selector. In this file selector you can walk through the directory tree to locate the place where you want to save the file. Next, you can type in the name of the file (or point to it when you want to overwrite an existing file). The name should end with @code{.fd}. So for example, choose @file{ttt.fd}. The program now creates three files: @file{ttt.c}, @file{ttt.h} and @file{ttt.fd}. @file{ttt.c} contains a readable piece of C code that creates the forms you designed. The file @file{ttt.h} contains the corresponding header file for inclusion in your application program. The file @file{ttt.fd} contains a description of the forms in such a way that the Form Designer can read it back in later. The application program now simply has to call the routines with names like @code{create_form_xxx()} (replace @code{xxx} with the names you gave to the forms) to create the different forms you designed. These are the basic ideas behind the Form Designer. In the following chapters we describe the program in more detail. xforms-1.0.93sp1/doc/part0_preface.texi0000644000175000017500000003346011375542174016420 0ustar jensjens@node Preface @unnumbered @emph{Preface} The Forms Library (or XForms for short) is a GUI toolkit with a rather long history. Developed in the last decade of the last millenium by @strong{Dr.@: T.@: C.@: Zhao} (then at the Department of Physics, University of Wisconsin-Milwaukee, USA) and @strong{Prof.@: Dr.@: Mark Overmars} (Department of Computer Science, Utrecht University, Netherlands) at a time when there were hardly any alternatives. It became open source software in 2002, distributed according to the Lesser GNU Public License (LGPL). While development slowed down a bit while other toolkits became available and matured, XForms is still used and development continues. The XForms home page is at @center @url{http://xforms-toolkit.org/} The sources and mailing list are hosted on @center @url{https://savannah.nongnu.org/projects/xforms/} The source package can be downloaded from @center @url{https://savannah.nongnu.org/files/?group=xforms} while the @code{git} repository can be accessed via @center @url{git://git.savannah.nongnu.org/xforms.git} and the CVS repository via @center @url{https://savannah.nongnu.org/cvs/?group=xforms} There also is a mailing list, maintained until recently by Dr.@: Robert Williams. Since August 2009 the maling list has a new home. You can subscribe to it at @center @url{http://lists.nongnu.org/mailman/listinfo/xforms-development} The archive of the mailing list can be found at @center @url{http://lists.gnu.org/archive/html/xforms-development/} The archive of messages from before August 2009 and going back until 1996 is at @center @url{http://xforms-toolkit.org/old-archive} Please write to the mailing list if you have questions or find bugs. This document is based on the documentation for version 0.89 of the Forms Library. It has been reconstructed from the PDF version (the original sources seem to have gone AWOL) and has been updated to cover the changes introduced since version 0.89. Some things from older versions are missing (e.g.@: function that are deprecated but still can be used), while some features described here may not be available with older versions of XForms. In the following the preface for the last available version of the documentation (version 0.89 from June 2000) is reproduced. Please note that a lot of the information there-in is outdated. Many of the URLs mentioned don't exist anymore, email addresses have changed and the restrictions on the distribution of the library have been removed by the original authors in favor of the LGPL. @sp 4 @strong{Preface of Version 0.89 (June 2000)} Window-based user interfaces are becoming a common and required feature for most computer systems, and as a result, users have come to expect all applications to have polished user-friendly interfaces. Unfortunately, constructing user interfaces for programs is in general a time consuming process. In the last few years a number of packages have appeared that help build up graphical user interfaces (so-called GUI's) in a simple way. Most of them, though, are difficult to use and/or expensive to buy and/or limited in their capabilities. The Forms Library was constructed to remedy this problem. The design goals when making the Forms Library were to create a package that is intuitive, simple to use, powerful, graphically good looking and easily extendible. The main notion in the Forms Library is that of a form. A form is a window on which different objects are placed. Such a form is displayed and the user can interact with the different objects on the form to indicate his/her wishes. Many different classes of objects exist, like buttons (of many different flavors) that the user can push with the mouse, sliders with which the user can indicate a particular setting, input fields in which the user can provide textual input, menus from which the user can make choices, browsers in which the user can scroll through large amounts of text (e.g.@: help files), etc. Whenever the user changes the state of a particular object on one of the forms displayed the application program is notified and can take action accordingly. There are a number of different ways in which the application program can interact with the forms, ranging from very direct (waiting until something happens) to the use of callback routines that are called whenever an object changes state. The application program has a large amount of control over how objects are drawn on the forms. It can set color, shape, text style, text size, text color, etc. In this way forms can be fine tuned to one's liking. The Forms Library consists of a large number of C-routines to build up interaction forms with buttons, sliders, input fields, dials, etc. in a simple way. The routines can be used both in C and in C++ programs. The library uses only the services provided by the Xlib and should run on all workstations that have X installed on them. The current version needs 4bits of color (or grayscale) to look nice, but it will function properly on workstations having less depth (e.g.@: XForms works on B&W X-terminals). The library is easy to use. Defining a form takes a few lines of code and interaction is fully handled by the library routines. A number of demo programs are provided to show how easy forms are built and used. For simple forms and those that may be frequently used in application programs, e.g.@: to ask a question or select a file name, special routines are provided. For example, to let the user choose a file in a graphical way (allowing him/her to walk through the directory hierarchy with a few mouse clicks) the application program needs to use just one line of code. To make designing forms even easier a Form Designer is provided. This is a program that lets you interactively design forms and generate the corresponding C-code. You simply choose the objects you want to place on the forms from a list and draw them on a form. Next you can set attributes, change size and position of the objects, etc., all using the mouse. Although this document describes all you need to know about using the Forms Library for X, it is not an X tutorial. On the contrary, details of programming in X are purposely hidden in the Forms Library interfaces, and one need not be an X-expert to use the Forms Library, although some knowledge of how X works would help to understand the inner workings of the Forms Library. Forms Library and all the programs either described in this document or distributed as demos have been tested under X11 R4, R5 & R6 on all major UNIX platforms, including SGI, SUN, HP, IBM RS6000/AIX, Dec Alpha/OSF1, Linux(i386, alpha, m68k and sparc) as well as FreeBSD, NetBSD (i386, m68k and sparc), OpenBSD(i386, pmax, sparc, alpha), SCO and Unixware. Due to access and knowledge, testing on non-unix platforms such as OpenVMS, OS/2 and Microsoft/NT are less than comprehensive. This document consists of four parts. The first part is a tutorial that provides an easy, informal introduction to the Forms Library. This part should be read by everybody that wants to use the library. You are encouraged to try variations of the demo programs distributed in the Forms Library package. Part II describes the Form Designer with which you can design forms interactively and haveForm Designer write code for you. Part III gives an overview of all object classes currently available in the library. The tutorial part only mentions the most basic classes but here you find a complete overview. Adding new object classes to the system is not very complicated. Part IV describes how this should be done. @strong{Version Note} The authors request that the following name(s) be used when referring to this toolkit @center Forms Library for X, @center Forms Library @center or simply @center XForms Forms Library is not public domain. It is copyright (c) by T.C. Zhao and Mark Overmars, and others, with all published and unpublished rights reserved. However, permission to use for non-commercial and not-for-profit purposes is granted. You may not use xforms commercially (including in-house and contract/consulting use) without contacting (xforms@@world.std.com) for a license arrangement. Use of xforms for the sole purpose of running a publically available free software that requires it is not considered a commercial use, even in a commercial setting. You may not "bundle" and distribute this software with commercial systems without prior consent of the authors. Permission to distribute this software with other free software that requires it, including Linux CD distribution, is granted. Further, permission to re-package the software is granted. This software is provided "as is" without warranty of any kind, either expressed or implied. The entire risk as to the quality and performance of the software is with you. Should the software prove defective, you assume the cost of all necessary servicing, repair or correction and under no circumstance shall the authors be liable for any damages resulting from the use or mis-use of this software. It would be appreciated if credit to the authors is acknowledged in published articles on applications based on the library. A reprint of the article would also be appreciated. The development environment for xforms consists of Linux 1.0.8/a.out X11R5 and Linux 2.0/ELF X11R6 with additional testing and validation on SGI R8000 and occasionally IBM RS6000/AIX and other machines. For every public release, most of the demos and some internal testing programs are run on each platform to ensure quality of the distribution. Figures in this document were produced by fd2ps, a program that takes the output of the form designer and converts the form definition into an encapsulated POSTSCRIPT file. fd2ps as ofXForms V0.85 is included in the distribution. This document is dated June 12, 2000. @strong{Support} Although XForms has gone through extensive testing, there are most likely a number of bugs remaining. Your comments would be greatly appreciated. Please send any bug reports or suggestions to T.C. Zhao (tc_zhao@@yahoo.com or xforms@@world.std.com but not both). Please do not expect an immediate response, but we do appreciate your input and will do our best. @strong{Bindings to other languages} As of this writing, the authors are aware of the following bindings perl binding by Martin Bartlett () ada95 binding by G. Vincent Castellano () Fortran binding by G. Groten () and Anke Haeming () pascal binding by Michael Van Canneyt () scm/guile binding by Johannes Leveling () python binding by Roberto Alsina (). (Seems the author has stopped working on this binding). Follow the links on XForms's home page to get more info on these bindings. @strong{Archive Sites} Permanent home for the Forms Library is at @example ftp://ncmir.ucsd.edu/pub/xforms ftp://ftp.cs.ruu.nl/pub/XFORMS (Primary mirror site) @end example The primary site is mirrored by many sites around the world. The following are some of the mirror sites @example ftp://ftp.fu-berlin.de/unix/X11/gui/xforms ftp://gd.tuwien.ac.at/hci/xforms ftp://ftp.st.ryukoku.ac.jp/pub/X11/xforms ftp://ftp.via.ecp.fr/pub2/xforms ftp://ftp.unipi.it/pub/mirror/xforms ftp://ftp.uni-trier.de/pub/unix/X11/xforms @end example Additional mirrors, html version of this document, news and other information related to XForms can be accessed through www via the following URL @example http://world.std.com/~xforms @end example In addition to ftp and www server, a mail server is available for those who do not have direct internet access. To use the mail server, send a message to or the old-fashioned path alternative . The message should be something like the following @example begin path fred@@stone.age.edu (substitute your address) send help end @end example To get a complete listing of the archive tree, issue send ls-lR.Z. @strong{Mailing List} A mailing list for news and discussions about XForms is available. To subscribe or un-subscribe, send a message to with one of the following commands as the mail body @example help subscribe unsubscribe @end example To use the mailing list, send mail to . Please remember that the message will be sent to hundreds of people. Please Do not send subscribe/unsubscribe messages to the mailing list, send them to . The mailing list archive is at @code{http://bob.usuhs.mil/mailserv/list-archives}. @strong{Thanks} Many people contributed, in one way or another, to the development of Forms Library, without whose testing, bug reports and suggestions, Forms Library would not be what it is today and would certainly not be in the relatively bug free state it is in now. We thank Steve Lamont of UCSD (), for his numerous suggestions and voluminous contributions to the mailing list. We thank Erik Van Riper (), formerly of CUNY, and Dr.@: Robert Williams of USUHS () for running the mailing list and keeping it running smoothly. We also thank every participant on the mailing list who contributed by asking questions and challenging our notion of what typical use of the Forms Library is. The html version of the document, undoubtedly browsed by the thousands, is courtesy of Danny Uy (). We appreciate the accurate and detailed bug reports, almost always accompanied with a demo program, from Gennady Sorokopud () and Rouben Rostamian (). We also thank Martin Bartlett (), who, in addition to marrying Forms Library to perl, made several xforms API suggestions, Last but certainly not least, we thank Henrik Klagges () for his numerous suggestions during the early stages of the development. xforms-1.0.93sp1/doc/part2_command_line.texi0000644000175000017500000000775211375524424017445 0ustar jensjens@node Part II Command Line Arguments @chapter Command Line Arguments To start the Form Designer simply type @example fdesign [-xformoptions] [-fdesignoptions] [files[.fd]] @end example @noindent An initial window will be created and mapped. Depending on the window manager, you may have the option to interactively select where to place the window if the @code{-geometry} option is not given. Next the program places the control panel on the screen. You can move this panel, if required, to the place you want (you can also change the default placement of the control panel via resources). fdesign accepts all of the XForms command line options as well as the following @table @code @item -geometry @i{geom} This option specifies the initial placement and size of the working area. @item -convert @i{fd-file-list} Normally fdesign does its work interactively. This option causes the fdesign simply read a list of fdesign output file (the @code{.fd} files) and emit the corresponding C-routines and header files. @item -version Prints current version and quits. @item -help Prints a brief help message on command line options. @item -altformat Generates an alternative output format. @item -border Forces decorations on several windows so that you can move them easily. @item -unit @i{point|pixel|mm|cp|cmm} Outputs object sizes in units other than pixels. cp and cmm stand for centi-point (1/100 of a point) and centi-mm (1/100 of a milli-meter). For typical displays, pixel and mm are too coarse and subject to round-off errors. @item -nocode Suppresses the output of UI code. This can be handy if the UI code is not generated interactively, but rather generated by the make process using fdesign -convert. @item -I @i{header} Changes the output include file from @code{} to header. Useful on systems where @file{forms.h} is renamed to something else or you need application specific constants/defines for the UI to function. In the later case, @code{header} may simply contain @example #include #define mystuff 1 @end example @item -main Emits a main program with callback stubs. Can be useful for simple programs. @item -callback Emits callback function template in a separate file. @item -lax Suppresses syntax checking on variable and callback function names. @item -bw @i{borderwidth} Changes default border width of the forms created. @end table Note that @code{-help}, @code{-version} and @code{-convert} do not require a connection to an X server. If an output unit other than the default (pixel) is selected, all object sizes in the output file will be in the unit requested. This kind of UI has a fixed and device resolution independent size (in theory at least) and can be useful for drawing applications. fdesign recognizes the following resources: @multitable @columnfractions 0.3 0.2 0.5 @item @code{workingArea.geometry} @tab string @tab Geometry @item @code{control.border} @tab bool @tab XForms borderwidth @item @code{control.geometry} @tab string (position only) @tab Control window geometry @item @code{attributes.geometry} @tab string (position only) @tab Attributes window Geometry @item @code{attributes.background} @tab string (e.g.@: gray80) @tab Attributes window background @item @code{align.geometry} @tab string (position only) @tab Align window geometry @item @code{help.geometry} @tab string (position only) @tab Help window geometry @item @code{convert} @tab bool @tab Convert @item @code{unit} @tab string @tab Unit @item @code{altformat} @tab bool @tab AltFormat @item @code{xformHeader} @tab string @tab Header file name @item @code{helpFontSize} @tab int @tab Help font size @item @code{main} @tab bool @tab Main @end multitable Note that resource specification of convert requires an X connection. In addition, all XForms's resources specification can be used to influence the appearance of various panels. The most useful ones are the font sizes @multitable @columnfractions 0.3 0.5 @item @code{*XForm.FontSize} @tab all label font sizes @item @code{XForm.PupFontSize} @tab all pup font sizes @end multitable xforms-1.0.93sp1/doc/part3_deprecated_objects.texi0000644000175000017500000014427311376031776020636 0ustar jensjens@node Part III Deprecated Objects @chapter Deprecated Objects In this chapter describes object types that have been replaced by newer ones. They may be in use in older applications and also still can be used in new programs (though this isn't recommended). There probably will be no more support for these objects in terms of bug fixes etc. @ifnottex @menu * Choice Object: Choice Object * Menu Object: Menu Object * XPopup: XPopup @end menu @end ifnottex @node Choice Object @section Choice Object A choice object is an object that allows the user the choose among a number of choices. The current choice is shown in the box of the choice object. The user can either cycle through the list of choices using the middle or right mouse button or get the list as a menu using the left mouse button. @ifnottex @menu * Adding Choice Objects: Adding Choice Objects * Choice Types: Choice Types * Choice Interaction: Choice Interaction * Other Choice Routines: Other Choice Routines * Choice Attributes: Choice Attributes * Remarks: Choice Remarks @end menu @end ifnottex @node Adding Choice Objects @subsection Adding Choice Objects To add a choice object to a form use the routine @findex fl_add_choice() @anchor{fl_add_choice()} @example FL_OBJECT *fl_add_choice(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent It shows a box on the screen with the label to the left of it and the current choice (empty in the beginning), centered in the box. @node Choice Types @subsection Choice Types The following types are available: @table @code @tindex FL_NORMAL_CHOICE @anchor{FL_NORMAL_CHOICE} @item FL_NORMAL_CHOICE Middle/right mouse button shortcut. @tindex FL_NORMAL_CHOICE2 @anchor{FL_NORMAL_CHOICE2} @item FL_NORMAL_CHOICE2 Same as @code{FL_NORMAL_CHOICE} except drawn differently. @tindex FL_DROPLIST_CHOICE @anchor{FL_DROPLIST_CHOICE} @item FL_DROPLIST_CHOICE Menu is activated only by pressing and releasing the mouse on the arrow. @end table @node Choice Interaction @subsection Choice Interaction There are two ways in which the user can pick a new choice. One way is using the right or middle mouse button. Pressing and releasing the right mouse button on the choice object selects the next choice in the list. When pressing the middle mouse button the previous choice is taken. Keeping the mouse pressed slowly cycles through the list. The other way is to use the left mouse button. In this case a menu appears from which the user can select the proper choice. Normally in both cases, whenever a choice is selected (even when it is the original one) the object is returned to the application program. You can control the condition under which the choice object gets returned to the application by using the function @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when) @end example where @code{when} can have the following values @table @code @item @ref{FL_RETURN_NONE} Never return or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback if end of interaction and selection of an item coincide. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever an item is selected (this is the default). @item @ref{FL_RETURN_END} Return or invoke callback on end of an interaction. @item @ref{FL_RETURN_ALWAYS} Return (or invoke callback) whenever the interaction ends and/or an item is selected. @end table @node Other Choice Routines @subsection Other Choice Routines There are a number of routines to change the list of possible choices. To add a line to a choice object use @findex fl_addto_choice() @anchor{fl_addto_choice()} @example int fl_addto_choice(FL_OBJECT *obj, const char *text); @end example @noindent The function returns the number of the new item. The items in the list are numbered in the order in which they were inserted. The first item has number 1, etc. To delete a line use: @findex fl_delete_choice() @anchor{fl_delete_choice()} @example void fl_delete_choice(FL_OBJECT *obj, int line); @end example Whenever the application program wants to clear the complete list of choices it should use the routine @findex fl_clear_choice() @anchor{fl_clear_choice()} @example void fl_clear_choice(FL_OBJECT *obj) @end example One can also replace a line using @findex fl_replace_choice() @anchor{fl_replace_choice()} @example void fl_replace_choice(FL_OBJECT *obj, int line, const char *text); @end example To obtain the currently selected item in the choice object use the call @findex fl_get_choice() @anchor{fl_get_choice()} @example int fl_get_choice(FL_OBJECT *obj); @end example @noindent The function returns the number of the current choice (0 if there is no choice). You can also obtain the text of the currently selected choice item using the call @findex fl_get_choice_text() @anchor{fl_get_choice_text()} @example const char *fl_get_choice_text(FL_OBJECT *obj); @end example @@noindent @code{NULL} is returned when there is no current choice. To obtain the text of an arbitrary choice item, use the following routine @findex fl_get_choice_item_text() @anchor{fl_get_choice_item_text()} @example const char *fl_get_choice_item_text(FL_OBJECT *obj, int n); @end example To obtain the total number of choice items, use the following function @findex fl_get_choice_maxitems() @anchor{fl_get_choice_maxitems()} @example int fl_get_choice_maxitems(FL_OBJECT *obj); @end example One can set various attributes of an item using the following routine @findex fl_set_choice_item_mode() @anchor{fl_set_choice_item_mode()} @example void fl_set_choice_item_mode(FL_OBJECT *obj, int numb, unsigned mode); @end example @noindent Here @code{mode} is the same as that used for menu objects (see above). See also @ref{XPopup}, for details. You can use the follow routine to populate a choice object at once, including mode and shortcut, by using @findex fl_set_choice_entries() @anchor{fl_set_choice_entries()} @example int fl_set_choice_entries(FL_OBJECT *obj, FL_PUP_ENTRY *entries); @end example @noindent where @code{entries} is a pointer to a @code{FL_PUP_ENTRY} structure (terminated by a @code{NULL} text field) as already described above for the function @code{@ref{fl_set_menu_entries()}}. Also see @ref{XPopup}, for more details. Please note that for choice objects no nested entries are permitted and the item callback functions are ignored. The function returns the number of items added to the choice object. Finally, the application program can set the currently selected entry of the choice using a call of @findex fl_set_choice() @anchor{fl_set_choice()} @findex fl_set_choice_text() @anchor{fl_set_choice_text()} @example void fl_set_choice(FL_OBJECT *obj, int line); void fl_set_choice_text(FL_OBJECT *obj, const char *txt) @end example @noindent where @code{txt} must must be the text of exactly one of the choice items. For example, after the following choice is created @example fl_addto_choice(obj," item1 | item2 | item3 "); @end example @noindent You can select the second item by either using @example fl_set_choice(obj, 2); @end example @noindent or @example fl_set_choice_text(obj, " item2 "); @end example @noindent Note the spaces in the text. @node Choice Attributes @subsection Choice Attributes Don't use @code{FL_NO_BOX} as the boxtype for a choice object. The first color argument (@code{col1} to @code{@ref{fl_set_object_color()}} controls the color of the box and the second (@code{col2}) the color of the text in the box. The current choice by default is shown centered in the box. To change the alignment of the choice text in the box, use the following routine @findex fl_set_choice_align() @anchor{fl_set_choice_align()} @example void fl_set_choice_align(FL_OBJECT *obj, int align); @end example To set the font size used inside the choice object use @findex fl_set_choice_fontsize() @anchor{fl_set_choice_fontsize()} @example void fl_set_choice_fontsize(FL_OBJECT *obj, int size); @end example To set the font style used inside the choice object use @findex fl_set_choice_fontstyle() @anchor{fl_set_choice_fontstyle()} @example void fl_set_choice_fontstyle(FL_OBJECT *obj, int style); @end example Note that the above functions only change the font inside the choice object, not the font used in the popup. To change the font used in the popup, use the XPopup functions @code{@ref{fl_setpup_default_fontsize()}} and @code{@ref{fl_setpup_default_fontstyle()}}. Note that these functions influence the font settings of all popups! @xref{Label Attributes and Fonts}, for details on font sizes and styles. @node Choice Remarks @subsection Remarks See @file{choice.c} for an example of the use of choice objects. @node Menu Object @section Menu Object Also menus can be added to forms. These menus can be used to let the user choose from many different possibilities. Each menu object has a box with a label in it in the form. Whenever the user presses the mouse inside the box (or moves the mouse on top of the box) a pop-up menu appears. The user can then make a selection from the menu. @ifnottex @menu * Adding Menu Objects: Adding Menu Objects * Menu Types: Menu Types * Menu Interaction: Menu Interaction * Other Menu Routines: Other Menu Routines * Menu Attributes: Menu Attributes * Remarks: Menu Remarks @end menu @end ifnottex @node Adding Menu Objects @subsection Adding Menu Objects To add a menu to a form use the routine @findex fl_add_menu() @anchor{fl_add_menu()} @example FL_OBJECT *fl_add_menu(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent It shows a box on the screen with the label centered in it. @node Menu Types @subsection Menu Types The following types are available: @table @code @tindex FL_PUSH_MENU @anchor{FL_PUSH_MENU} @item FL_PUSH_MENU The menu appears when the user presses a mouse button on it. @tindex FL_PULLDOWN_MENU @anchor{FL_PULLDOWN_MENU} @item FL_PULLDOWN_MENU The menu appears when the user presses a mouse button on it. @tindex FL_TOUCH_MENU @anchor{FL_TOUCH_MENU} @item FL_TOUCH_MENU The menu appears when the user move the mouse inside it. @end table @code{FL_PUSH_MENU} and @code{FL_PULLDOWN_MENU} behave rather similar. When you click on a @code{FL_PUSH_MENU} per default a pop-up window gets opened on top of the @code{FL_PUSH_MENU} menu's box that has a label at the top, indicating the currently selected menu item. The pop-up window stays open until you either select an item or press a mouse button somewhere outside the pop-up window. When you click on @code{FL_PULLDOWN_MENU} also a pop-up window is shown, but directly below the menu's box. This pop-up window has no label and it only stays open until you release the mouse button. @code{FL_PUSH_MENU} and @code{FL_PULLDOWN_MENU} can be made even more similar by using the @code{@ref{fl_set_menu_notitle()}} function (see below). This changes it's properties so that the pop-up window also appears below the menu's box and that no label is shown in the pop-up window. The only remaining difference then is that a @code{FL_PUSH_MENU} only gets closed when a menu item is selected or the user presses the mouse outside of the pop-up window while a @code{FL_PULLDOWN_MENU} also gets closed when the mouse button is released. @node Menu Interaction @subsection Menu Interaction When the menu appears the user can make a selection using the left mouse button or make no selection by clicking outside the menu (or by simply releasing the mouse button in case of a @code{FL_PULLDOWN_MENU} type menu. Normally when he makes a selection the menu object is returned by the interaction routines. You can control the condition under which the menu object gets returned to the application by using the function @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when) @end example where @code{when} can have the following values @table @code @item @ref{FL_RETURN_NONE} Never return the object or invoke its callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback if end of interaction and selection of an item coincide (this is the default for all menu objects except those of type @code{FL_TOUCH_MENU}). @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever an item is selected (this is the default for all menu objects of type @code{FL_TOUCH_MENU}). @item @ref{FL_RETURN_END} Return or invoke callback on end of an interaction. @item @ref{FL_RETURN_ALWAYS} Return (or invoke callback) whenever the interaction ends and/or an item is selected. @end table @node Other Menu Routines @subsection Other Menu Routines There are two ways to populate a menu, i.e.@: add items. The first one is a bit more complex but allows for more flexibility, e.g.@: later adding and removing items, associating callbacks with individual items etc. For the more simple (and in many cases sufficient) method see the function @code{@ref{fl_set_menu_entries()}}. To set the actual menu for a menu object, use the routine @findex fl_set_menu() @anchor{fl_set_menu()} @example void fl_set_menu(FL_OBJECT *obj, const char *menustr, ...); @end example @noindent @code{menustr} describes the menu in the form used by XPopups (@pxref{XPopup}). In the simplest case, it just contains the texts fr the menu items, separated by a bar (@code{'|'}), e.g.@: @code{"First|Second|Third"}. But it's also possible to employ special tags (@pxref{Creating XPopups}) that can be used to indicate special attributes (radio, toggle and greyed-out, for example). Whenever the user selects a menu item, a pointer to the menu object it belongs to is returned to the application program. Please note that if you call @code{@ref{fl_set_menu()}} on a menu that already contains items those items are removed. The function calls @code{@ref{fl_clear_menu()}} internally before the new items are added. If you explicitely assign a menu item ID to a menu using the special tag @code{%x} it is your responsibility to make sure that this ID isn't already used by a different menu item in the same menu. Failure to do so may make it impossible to use the menu properly. All functions working on items expect the menu item ID as one of their arguments. In case you don't set menu item IDs they are assigned automatically with the first item obtaining the menu item ID 1, the next 2 etc., i.e.@: it directly reflects the position of the item in the menu. It is also possible to add menu items to an existing menu using a call of @findex fl_addto_menu() @anchor{fl_addto_menu()} @example int fl_addto_menu(FL_OBJECT *obj, const char *menustr, ...); @end example @noindent where @code{menustr} is a string of the same form as used in @code{@ref{fl_set_menu()}} (you can add one or more new menu items this way). Also routines exist to delete a particular menu item or change it: @findex fl_delete_menu_item() @anchor{fl_delete_menu_item()} @findex fl_replace_menu_item() @anchor{fl_replace_menu_item()} @example void fl_delete_menu_item(FL_OBJECT *obj, int miid); void fl_replace_menu_item(FL_OBJECT *obj, int miid, const char *menustr, ...); @end example @code{miid} is the menu item ID. @code{menustr} must be a string as used in @code{@ref{fl_set_menu()}} with the only difference that only a single menu item can be specified. Please note: when deleting a menu item all other items keep their menu item IDs. The menu item ID of the deleted menu item isn't re-used when new items are added later. Instead for each menu an internal counter exists that gets incremented for each menu item added and which value is used for the menu item ID unless one is explicitely assigned to the menu item. The counter oly gets reset to 1 when the menu is cleared used @code{@ref{fl_clear_menu()}}. The menu item ID of a menu item changed by using @code{@ref{fl_replace_menu_item()}} does not change unless the library is explicitely asked to via @code{%x} in @code{menustr}. For most applications, the following routine may be easier to use at the expense of somewhat restrictive value a menu item can have as well as a loss of the ability to delete menu items or associate callbacks with menu items. @findex fl_set_menu_entries() @anchor{fl_set_menu_entries()} @example int fl_set_menu_entries(FL_OBJECT *obj, FL_PUP_ENTRY *ent); @end example @noindent where @code{ent} is a pointer to an array of structure of the following type, terminated by an element, where at least the @code{text} member is a @code{NULL} pointer: @tindex FL_PUP_ENTRY @example typedef struct @{ const char *text; FL_PUP_CB callback; const char *shortcut; int mode; @} FL_PUP_ENTRY; @end example The meaning of each member is explained in Section 21.3. For menus, item callback function can be @code{NULL} if the menu callback handles the interaction results. See demo program @file{popup.c} for an example use of @code{@ref{fl_set_menu_entries()}}. The function @code{@ref{fl_set_menu_entries()}} works by creating and associating a popup menu with the menu object. The popup ID is returned by the function. Whenever the function is called, the old popup associated with the object (if one exists) is freed and a new one is created. Although you can manipulate the menu either through the menu API (but adding and removing menu items is not supported for menus created this way ) or popup API, the application should not free the popup directly and use @code{@ref{fl_clear_menu()}} instead. To clear the whole menu use @findex fl_clear_menu() @anchor{fl_clear_menu()} @example void fl_clear_menu(FL_OBJECT *obj); @end example To find the menu item selected by the user use @findex fl_get_menu() @anchor{fl_get_menu()} @example int fl_get_menu(FL_OBJECT *obj); @end example @noindent The the function returns the menu item ID. In the simplest possible case this is just the position of the menu item (starting at 1). This stops to be true when either IDs have been explicitely assigned to items or items have been deleted. In that case the following rules apply: @enumerate @item A menu item ID may have been assigned to a menu item using @code{%xn} in the string for the text of the menu item. @item Menu items can get associated with a callback function that is executed when the menu item is selected. The callback function is of type @code{FL_PUP_CB} and receives the menu item ID of the selected menu. If such a callback is set for a menu item the return value of @code{@ref{fl_get_menu()}} is the return value of this function instead of the menu item ID that would have been returned otherwise. @end enumerate To obtain the text of the item selected @findex fl_get_menu_text() @anchor{fl_get_menu_text()} @example const char *fl_get_menu_text(FL_OBJECT *obj); @end example To obtain the text of any item, use the following routine @findex fl_get_menu_item_text() @anchor{fl_get_menu_item_text()} @example const char *fl_get_menu_item_text(FL_OBJECT *obj, int miid); @end example @noindent where @code{miid} is the menu item ID. If @code{n} isn't a valid menu iem ID item @code{NULL} is returned. To obtain the total number of menu items, use the function @findex fl_get_menu_maxitems() @anchor{fl_get_menu_maxitems()} @example int fl_get_menu_maxitems(FL_OBJECT *obj); @end example One can change the appearance of different menu items. In particular, it is sometimes desirable to make grey-out menu items and make them unselectable or to put boxes with and without checkmarks in front of them. This can be done using the routine: @findex fl_set_menu_item_mode() @anchor{fl_set_menu_item_mode()} @example void fl_set_menu_item_mode(FL_OBJECT *obj, int miid, unsigned mode); @end example @noindent @code{miid} is the menu index ID of the memu item you want to change. @code{mode} represents the special properties you want to apply to the chosen item. You can specify more than one at a time by adding or bitwise OR-ing these values together. For this parameter, the following symbolic constants exist: @table @code @tindex FL_PUP_NONE @anchor{FL_PUP_NONE} @item FL_PUP_NONE No special display characteristic, the default. @tindex FL_PUP_BOX @anchor{FL_PUP_BOX} @item FL_PUP_BOX "Binary" entry, i.e.@: an entry that stands for a choice that can be switched on and off. Displayed with an unchecked box to the left. @tindex FL_PUP_RADIO @anchor{FL_PUP_RADIO} @item FL_PUP_RADIO "Radio" item belonging to a group, so that gets automatically switched off when another item of the group is selected. Displayed with a diamoned-shaped box at the left. @tindex FL_PUP_GREY @anchor{FL_PUP_GREY} @item FL_PUP_GREY To be OR-ed with one of the above to make that item appear greyed-out and disable it (i.e.@: not selectable anymore). @tindex FL_PUP_CHECK @anchor{FL_PUP_CHECK} @item FL_PUP_CHECK To be OR-ed with one of @code{FL_PUP_BOX} and @code{FL_PUP_RADIO} to make the box to the left appear checked or pushed. @end table There is also a routine that can be used to obtain the current mode of an item after interaction, mostly useful for toggle or radio items: @findex fl_get_menu_item_mode() @anchor{fl_get_menu_item_mode()} @example unsigned int fl_get_menu_item_mode(FL_OBJECT *obj, int miid); @end example It is often useful to define keyboard shortcuts for particular menu items. For example, it would be nice to have @code{s} behave like selecting "Save" from a menu. This can be done using the following routine: @findex fl_set_menu_item_shortcut() @anchor{fl_set_menu_item_shortcut()} @example void fl_set_menu_item_shortcut(FL_OBJECT *obj, int miid, const char *str); @end example @noindent @code{miid} is the menu item ID of the menu item under consideration. @code{str} contains the shortcut for the item. (Actually, it can contain more shortcuts for the same item.) @xref{Shortcuts}, for more information about shortcuts. Finally there is the routine: @findex fl_show_menu_symbol() @anchor{fl_show_menu_symbol()} @example void fl_show_menu_symbol(FL_OBJECT *obj, int yes_no); @end example @noindent With this routine you can indicate whether to show a menu symbol at the right of the menu label. By default no symbol is shown. @node Menu Attributes @subsection Menu Attributes Any boxtype can be used for a menu except for those of type @code{FL_PULLDOWN_MENU}, for which @code{FL_NO_BOX} should not be used. The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the menu's box when not open and the second (@code{col2}) is the color when the menu is shown. To change the font style and size used in the popup menus (not the menu label), use the following routines @findex fl_setpup_default_fontstyle() @findex fl_setpup_default_fontsize() @example void fl_setpup_default_fontstyle(int style); void fl_setpup_default_fontsize(int size); @end example @noindent These settings apply to all menus at once. If desired, you can attach an external popup to a menu object via the following routine @findex fl_set_menu_popup() @anchor{fl_set_menu_popup()} @example void fl_set_menu_popup(FL_OBJECT *obj, int pupID); @end example @noindent where @code{pupID} is the ID returned by @code{@ref{fl_newpup()}} or @code{@ref{fl_defpup()}}. @xref{XPopup}, for more details on popup creation. For a menu created this way only @code{@ref{fl_get_menu()}} and @code{@ref{fl_get_menu_text()}} work as expected. Other services such as mode setting and query etc. should be done via the popup routines. To obtain the popup ID associated with a menu, use the following routine @findex fl_get_menu_popup() @anchor{fl_get_menu_popup()} @example int fl_get_menu_popup(FL_OBJECT *obj); @end example @noindent The function return the popup ID if the menu was created using @code{@ref{fl_set_menu_popup()}} or @code{@ref{fl_set_menu_entries()}}, otherwise it returns -1. Normally in the popup opened for a menu a title is shown. This can be switched off (and back on again by using the function @findex fl_set_menu_notitle() @anchor{fl_set_menu_notitle()} @example fl_set_menu_notitle(FL_OBJECT *obj, int off); @end example @node Menu Remarks @subsection Remarks See @file{menu.c} for an example of the use of menus. You can also use @code{FL_MENU_BUTTON} to initiate a callback and use an XPopup directly within the callback. See @file{pup.c} for an example of this approach. @node XPopup @section XPopup XPopup is not really an object class, but because it is used by menu and choice objects and can function stand-alone, it is documented here. XPopups are simple transient windows that show a number of choices the user can click on to select the desired option. @ifnottex @menu * Creating XPopups: Creating XPopups * XPopup Interaction: XPopup Interaction * Other XPopup Routines: Other XPopup Routines * XPopup Attributes: XPopup Attributes * Remarks: XPopup Remarks @end menu @end ifnottex @node Creating XPopups @subsection Creating XPopups To define a new popup, use the following routines @findex fl_newpup() @anchor{fl_newpup()} @findex fl_defpup() @anchor{fl_defpup()} @example int fl_newpup(Window parent); int fl_defpup(Window parent, const char *str, ...); @end example @noindent Both functions allocate and initialize a new popup menu and return the XPopup identifier (or -1 on failure). @code{@ref{fl_defpup()}} in addition accepts a pointer @code{str} to the texts for menu items (optionally also some more arguments, see below). More than one item can be specified by using a vertical bar (@code{|}) between the items, e.g.@: @code{"foo|bar"} adds two menu items. The @code{parent} parameter specifies the window to which the XPopup belongs. In a situation where the XPopup is used inside an object callback @code{FL_ObjWin(obj)} will do. If @code{parent} is @code{None} the root window will be used. Calling @code{@ref{fl_defpup()}} with the @code{str} argument set to @code{NULL} is equivalent to calling @code{@ref{fl_newpup()}}. It is possible to specify XPopup and item properties, such as shortcuts, callbacks etc., together with the items texts using a format string system similar as used for e.g.@: @code{oprint(3)}. If XPopup or item properties require arguments, they must be passed to @code{@ref{fl_defpup()}} following the @code{str} argument. The following item properties are supported: @table @code @item %t Marks the item text as the XPopup title string. @item %F Binds a callback function to the XPopup as a whole that is called for every selection made from this XPopup. You must specify the function to be invoked in the parameters following @code{str}. The value of the selected item is passed as the only argument to the invoked callback function. The callback function must return a non-negative integer. If such a callback function has been registered for a XPopup and you select its third item, in the simplest case 3 will be passed as a parameter to the callback function (more complicated situations would involve that the item had been assigned a different value. e.g. using @code{%x}, see below, or that there's also a callback bound to the item itself, in which case the global XPopup callback would receive the return value of the items callback function). @item %f Binds a callback to this particular item which is invoked if the item is selected. The routine must be supplied in the parameters following @code{str}. It has to return a non-negative integer. The value of the selected item is passed as a parameter to this function. If you have also bound the entire XPopup to a callback function via @code{%F}, then the function specified via @code{%f} is called first with the items value and its return value (if larger then @code{0} is then passed as the parameter to to the function bound to the whole XPopup (as set via @code{%F}). @item %i Disables and greys-out the item. @code{%d} can be used instead of @code{%i}. @item %l Adds a line under the current entry. This is useful in providing visual clues to groups of entries @item %m Whenever this item is selected another (already defined) XPopup is bound to the item so that the sub-XPopup is opened when the user moves the mouse onto the item, This can be used to create cascading menus. The identifier of the sub-XPopup to be shown must be provided in the arguments following @code{str}. It is the programmers responsibility to make sure that the item values of the sub-XPopup don't clash with those of the higher-level XPopup or it may be impossible to determine which item was selected. @item %h Specify a "hotkeys" that can be used to select this item. Hotkeys must be given in the arguments following @code{str} as a pointer to a string. Use @code{#} to specify that a key must be pressed together with the @code{} key, @code{^} for simultaneous pressing of @code{} and @code{&n} for the function key @code{Fn}. @code{%s} can be used instead of @code{%h}. @item %xn Assigns a numerical value to this item. This value must be positive. This new value overrides the default position-based value assigned to this item. Different from most other flags, the value @code{n} must be entered as part of the text string (i.e.@: do not try to use the arguments following @code{str} to specify this value!) and must be number larger than 0. It is the programmers responsibility to make sure that the items value does not clash with those of other items of the XPopup or determining which item was selected may be impossible. @item %b Indicates this item is "binary item" (toggle), currently in off state. When displayed, binary items will be drawn with a small box to the left. See also @code{FL_PUP_BOX}. @item %B Same as @code{%b} except that it also signifies that this item is in on or "true" state and consequently is drawn with a checked box on the left. See also @code{FL_PUP_BOX | FL_PUP_CHECK}. @item %rg Specifies this menu item is a "radio item" belonging to group with number @code{g}, currently not being selected. The group number @code{g}, that must be part of the string directly following @code{%r} (and not specified via the arguments following the string), must be a non-zero, positive number. Radio items are drawn with a small diamond box to the left (empty while not active). See also @code{FL_PUP_RADIO}. @item %Rg Same as @code{%rg} except that it also sets the state of the radio item as selected or "pushed", the item is drawn with a filled diamond box to the left. See also @code{@ref{fl_setpup_selection()}}. See also @code{FL_PUP_RADIO | FL_PUP_CHECK}. @item %% Use this if you need a @code{%} character in the string. @item H (@code{\010}) Same as @code{%l} except that the character must precede the item label, i.e., use @code{"\010Abc"} and not @code{"Abc\010"}. @end table Due to the use of variable arguments error checking can only be minimal. Also note that if @code{%x} is used to specify a value that happens to be identical to a position-based value, the result is unpredictable when subsequent references to these items are made. There is currently a limit of @tindex FL_MAXPUPI @code{FL_MAXPUPI} (64) items per popup. Tabs characters (@code{'\t'}) can be embedded in the item string to align different fields. You can add more items to an existing XPopup using the following routine @findex fl_addtopup() @anchor{fl_addtopup()} @example int fl_addtopup(int popup_id, const char *str, ...); @end example @noindent where @code{popup_id} is the value returned by @code{@ref{fl_newpup()}} or @code{@ref{fl_defpup()}} for the XPopup. Again, @code{str} can contain information for one or more new items, including the special sequences described earlier. The function returns -1 if invalid arguments are detected (as far as possible for a function with a variable number of arguments). To display a popup, use @findex fl_dopup() @anchor{fl_dopup()} @example int fl_dopup(int popup_id); @end example @noindent This function displays the specified XPopup until the user makes a selection or clicks somewhere outside of the XPopups box. The value returned is the value of the item selected or -1 if no item (or a disabled one) was selected. However, if there is a function bound to the XPopup as a whole or to the selected item itself, this function is invoked with the item value as the argument and the value returned by @code{@ref{fl_dopup()}} is then the return value of this function. If a callback function for both the selected item and the XPopup as a whole exists, the callback function for the item is called first with the item value as the argument and then the return value of this item specific callback function is passed to the XPopups callback function. @code{@ref{fl_dopup()}} then finally returns the return value of this second function call. Normally a XPopup get opened when the left mouse button has been pressed down and get closed again when the left mouse button is released. But there are a number of ways to achieve a "hanging" XPopup, i.e.@: that the XPopup that says open, even though the left mouse button isn't pressed down anymore. This happens e.g.@: when the user releases the mouse button in the title area of the XPopup or when the XPopup was opened via a keyboard shortcut. In that case it's also possible to navigate through the items and select via the keyboard. A typical procedure may look as follows: @example int item3_cb(int n) @{ return n + 7; @} /* define the menu */ int menu = fl_newpup(parent); fl_addtopup(menu, "Title %t|Item1%rg1|Item2%Rg1|Item3%x10%f|Item4", item3_cb); switch (fl_dopup(menu)) @{ case 1: /* item1 is selected */ /* handle it */ break; case 2: /* handle it */ break; case 4: /* handle it */ case 17: /* item 3 call back has been executed */ @} @end example @noindent Here callback function @code{item3_cb()} is bound to the third item and this item has been assigned the number 10. Thus, when it is selected @code{@ref{fl_dopup()}} does not return 3 or 10. Instead the callback function @code{item3_cb()} is invoked with 10 as its argument. And this function in turn returns @code{10 + 7}, which is the value @code{@ref{fl_dopup()}} finally returns. Note also that items 1 and 2 both are radio items, belonging to the same group (numbered 1). Item 2 is currently the active item of this group. Sometimes it might be necessary to obtain the popup ID inside an item callback function. To this end, the following function available: @findex fl_current_pup() @anchor{fl_current_pup()} @example int fl_current_pup(void); @end example @noindent If no popup is active, the function returns -1. Until all callback functions have been run the function returns the ID of the XPopup the items belong to. To destroy a popup menu and release all memory used, use the following routine @findex fl_freepup() @anchor{fl_freepup()} @example void fl_freepup(int popup_id); @end example For most applications, the following simplified API may be easier to use @findex fl_setpup_entries() @anchor{fl_setpup_entries()} @example void fl_setpup_entries(int popup_id, FL_PUP_ENTRIES *entries); @end example where @code{popup_id} is the popup ID returned by @code{@ref{fl_newpup()}} or @code{@ref{fl_defpup()}} and @code{entries} is an array of the following structures @tindex FL_PUP_ENTRY @example typedef struct @{ const char * item_text; /* item text label */ FL_PUP_CB callback; /* item callback routine */ const char * shortcut; /* shortcut for this item */ unsigned int mode; /* item mode */ @} FL_PUP_ENTRY; @end example @noindent The meaning of each member of the structure is as follows: @table @code @item text This is the text of a XPopup item. If text is @code{NULL}, it signifies the end of this popup menu. The first letter of the text string may have a special meaning if it is one of the following: @table @code @item '/' This indicates the beginning of a sub-popup, starting with the next item and ending with the next item with @code{text} being @code{NULL}. @item '_' Indicates that a line should be drawn below this item (typically as a visual reminder of logical groupings of items). @end table @item callback This is the callback function that will be called when this particular item is selected by the user. @code{@ref{fl_dopup()}} returns the value returned by this callback. If the callback is @code{NULL}, the item number will be returned directly by @code{@ref{fl_dopup()}}. @item shortcut Specifies the keyboard shortcut. @item mode Specifies special attributes of this item. This can be one or a combination by bitwise OR of one of the following: @table @code @tindex FL PUP NONE @item FL PUP NONE No special characteristics, the default. @tindex FL_PUP_GREY @item FL_PUP_GREY Item is greyed-out an can't be selected. Trying to select it results in @code{@ref{fl_dopup()}} returning -1. @tindex FL_PUP_BOX @item FL_PUP_BOX "Binary item", drawn with a little box to its left. @tindex FL_PUP_RADIO @item FL_PUP_RADIO "Radio item", drawn with a little diamond-shaped box to its left. All radio items of the XPopup belong to the same group. @tindex FL_PUP_CHECK @item FL_PUP_CHECK OR this value with @code{FL_PUP_BOX} or @code{FL_PUP_RADIO} to have the box to the left drawn as checked or pushed. @end table @end table With this simplified API, popup item values start from 1 and are the index in the entries array for the item plus 1. For example, the third element (with index 2) of the array of structure has an item value of 3. Please note that also elements of the array that end a submenu and thus don't appear as visible items in the XPopup get counted. This way, the application can relate the value returned by fl_dopup() to the array easily. See demo program @file{popup.c} for an example use of the API. To illustrate the usage of @code{@ref{fl_setpup_entries()}}, Fig 21.2 shows the popup created with the array of structures defined in the following code example: @example FL_PUP_ENTRY entries[ ] = @{ @{"Top item1", callback@}, /* item number 1 */ @{"Top item2", callback@}, @{"Top item3", callback@}, @{"/Top item4", callback@}, @{"Sub1 item1", callback@}, /* item number 5 */ @{"Sub1 item2", callback@}, @{"Sub1 item3", callback@}, @{"Sub1 item4", callback@}, @{"/Sub1 item5", callback@}, @{"Sub2 item1", callback@}, /* item number 10 */ @{"Sub2 item2", callback@}, @{"Sub2 item3", callback@}, @{NULL, NULL @}, /* end of level2, item number 13 */ @{NULL, NULL @}, /* end of sublevel1, item nuber 14 */ @{"Top item5", callback@}, /* item number 15 */ @{NULL, NULL @} /* end of popup */ @}; @end example @node XPopup Interaction @subsection XPopup Interaction To select an item, move the mouse to the item to be selected while keeping the mouse button pressed down and then release the mouse button on top of the item to be selected. If you don't want to make a selection release the mouse button somewhere outside the area of the XPopup. If you have a "hanging" XPopup, i.e.@: a XPopup that's open even though the mouse button isn't pressed anymore you can select by clicking on an item or use the cursor @code{Up} and @code{Down} keys to navigate through the items and select by pressing the @code{} key. The @code{} and @code{} keys allow you to jump to the first or last selectable item, respectively. Use @code{} to close the popup without selecting an item. It is also possible to use convenience functions to bind keyboard keys to items (the "hotkeys") instead of using @code{%s} with @code{@ref{fl_defpup()}}: @findex fl_setpup_shortcut() @anchor{fl_setpup_shortcut()} @example void fl_setpup_shortcut(int popup_id, int item_val, const char *hotkeys); @end example @noindent where @code{item_val} is the value associated with the item (either due to its position or set with @code{%x}) and hotkeys is a string specifying all the hotkey combinations. @xref{Shortcuts}, for details. Briefly, within that string @code{#} and @code{^} denote the @code{} and @code{} keys, respectively. @code{&n} with @code{n = 1, 2} etc.@: can be used to denote the function key numbered @code{n}. Thus if hotkeys is set to @code{"#a^A}, both @code{A} and @code{A} are bound to the item. One additional property of the hotkey is the underlining of corresponding letters in the item string. Again, only the first key in the hotkey string is used. Therefore, the hotkey strings @code{"Cc"}, @code{"#C"} and @code{"^C"} will result in the character @code{C} in the item string @code{"A Choice"} being underlined, while the the hotkey strings @code{"cC"} and @code{"#c"} will not since there's no @code{c} in the item string. There is a limit of maximum 8 shortcut keys. Two convenience functions are available to set the callback functions for items of a XPopup and the XPopup as a whole (called whenever a selection is made): @tindex FL_PUP_CB @findex fl_setpup_itemcb() @anchor{fl_setpup_itemcb()} @findex fl_setpup_menucb() @anchor{fl_setpup_menucb()} @example typedef int (*FL_PUP_CB)(int); FL_PUP_CB fl_setpup_itemcb(int popup_id, int item_val, FL_PUP_CB cb); FL_PUP_CB fl_setpup_menucb(int popup_id, FL_PUP_CB cb); @end example These functions thus allow to change the popup and item callback functions set at creation of the popup with @code{%F} and @code{%f}. As usual, @code{popup_id} is the ID of the XPopup, @code{item_val} the value associated with the item (position or value set via @code{%x}), and @code{cb} is the address of the callback function. Please note that Xpopup objects are a bit special in XForms. Normal objects get returned by e.g.@: @code{@ref{fl_do_forms()}} (or an associated callback gets invoked). But since Xpopup objects are meant to be sub-objects of other objects (like @code{FL_CHOICE} and @code{L_MENU} objects) and don't get invoked directly by a call of e.g.@: @code{@ref{fl_do_forms()}} but instead by a call of @code{@ref{fl_dopup()}} they can't get returned to the application. Instead the caller of @code{@ref{fl_dopup()}} (normally some internal function of a @code{FL_CHOICE} or @code{FL_MENU} object) has to deal with the return value. Furthermore, also callback functions can be set that get invoked whenever an item in the XPopup is entered or left, even without a selection being made. The following functions can be used to register these item enter/leave callbacks: @tindex FL_PUP_ENTERCB @tindex FL_PUP_LEAVECB @findex fl_setpup_entercb() @anchor{fl_setpup_entercb()} @findex fl_setpup_leavecb() @anchor{fl_setpup_leavecb()} @example typedef void (*FL_PUP_ENTERCB)(int item_val, void *data); typedef void (*FL_PUP_LEAVECB)(int item_val, void *data); FL_PUP_ENTERCB fl_setpup_entercb(int popup_id, FL_PUP_ENTERCB cb, void *data); FL_PUP_LEAVECB fl_setpup_leavecb(int popup_id, FL_PUP_LEAVECB cb, void *data); @end example @noindent The function @code{cb} will be called when the mouse enters or leaves an (non-disabled) item of the XPopup @code{popup_id}. Two parameters are passed to the callback function. The first parameter is the item number enter/leave applies to and the second parameter is a data pointer. To remove an enter/leave callback, call the functions with the callback function argument @code{cb} set to @code{NULL}. There is also a function to associate a XPopup item with a sub-XPopup @findex fl_setpup_submenu() @anchor{fl_setpup_submenu()} @example void fl_setpup_submenu(int popup_id, int item_val, int subpopup_id); @end example @noindent If a sub-XPopup is associated with item @code{item_val} that item can't be selected anymore (releasing the mouse button on this item makes @code{@ref{fl_dopup()}} return -1 but instead a new XPopup is opened beside the item and you can now make selections within this sub-XPopup. It is the programmers responsibility to make sure that the item values of the sub-XPopup don't clash with those of the higher-level XPopup or it may be impossible to determine which item was selected. @node Other XPopup Routines @subsection Other XPopup Routines Note that most of the setpup/getpup routines are recursive in nature and the function will search the menu and all its submenus for the item. It is possible to modify the display characteristics of a given XPopup item after its creation using the following routine @findex fl_setpup_mode() @anchor{fl_setpup_mode()} @example void fl_setpup_mode(int popup_id, int item_val, unsigned mode); @end example @noindent As usual @code{popup_id} is the XPopup ID as returned by @code{@ref{fl_newpup()}} or @code{@ref{fl_defpup()}} and @code{item_val} the value of the item. @code{mode} is one of @code{FL PUP NONE}, @code{FL PUP GREY}, @code{FL PUP BOX} or @code{FL PUP RADIO} (one of the later two can be bitwise ORed with @code{FL_PUP_CHECK}, as already discussed above. To obtain the mode of a particular menu item, use the following routine @findex fl_getpup_mode() @anchor{fl_getpup_mode()} @example unsigned int fl_getpup_mode(int popup_id, int item_val) @end example @noindent This comes in handy to check if a binary or radio item is set @example if (fl_getpup_mode(popupd, item_val) & FL_PUP_CHECK) /* item is set */ @end example There exists also a routine that can be used to obtain an items text @findex fl_getpup_text() @anchor{fl_getpup_text()} @example const char *fl_getpup_text(int popup_id, int item_val); @end example In some situations, especially when the popup is activated by non-pointer events (e.g.@: as a result of a keyboard shortcut), the default placement of popups based on mouse location might not be adequate or appropriate, thus XPopup provides the following routine to override the default placement @findex fl_setpup_position() @anchor{fl_setpup_position()} @example void fl_setpup_position(int x, int y); @end example @noindent where @code{x} and @code{y} specify the location where the top-left corner of the popup should be. @code{x} and @code{y} must be given in screen coordinates (i.e.@: relative to the root window) with the origin at the top-left corner of the screen. This routine should be used immediately before invoking @code{@ref{fl_dopup()}}, the position is not remembered afterwards. If @code{x} or @code{y} is negative, the absolute value is taken to mean the desired location relative to the right or bottom corner of the popup (not the screen!). A radio item in a group can be initialized to be in "pushed" state by using @code{%R}. But you can also switch a such a radio item to "pushed state also programmatically using @findex fl_setpup_selection() @anchor{fl_setpup_selection()} @example void fl_setpup_selection(int popup_id, int item_val); @end example @noindent Of course, other radio items of the XPopup belonging to the same group are reset to "unpushed" state. To obtain the number of items in a popup, use the following routine @findex fl_getpup_items() @anchor{fl_getpup_items()} @example int fl_getpup_items(int popup_id) @end example @node XPopup Attributes @subsection XPopup Attributes Use the following routines to modify the default popup font style, font size and border width: @findex fl_setpup_default_fontsize() @anchor{fl_setpup_default_fontsize()} @findex fl_setpup_default_fontstyle() @anchor{fl_setpup_default_fontstyle()} @findex fl_setpup_default_bw(); @anchor{fl_setpup_default_bw()} @example int fl_setpup_default_fontsize(int size); int fl_setpup_default_fontstyle(int style); int fl_setpup_default_bw(int bw); @end example @noindent The functions return the old size, style or border width value, respectively. All XPopups by default use a right arrow cursor. To change the default cursor, use @findex fl_setpup_default_cursor() @anchor{fl_setpup_default_cursor()} @example Cursor fl_setpup_default_cursor(int cursor); @end example @noindent where you can use for @code{cursor} any of the standard cursors defined in @code{} like @code{XC_watch} etc. The function returns the previously cursor. To change the cursor of a particular XPopup only , use the following routine @findex fl_setpup_cursor() @anchor{fl_setpup_cursor()} @example Cursor fl_setpup_cursor(int popup_id, int cursor); @end example @noindent For example, after the following sequence, @example id = fl_defpup(win, "item1|item2"); fl_setpup_cursor(id, XC_hand2); @end example @noindent the popup with ID @code{id} will use a "hand" instead of the default arrow cursor. In versions before 1.0.91 XPopups were drawn with a heavy shadow around the box. Drawing of this shadow could be controlled via @findex fl_setpup_shadow() @anchor{fl_setpup_shadow()} @example void fl_setpup_shadow(int popup_id, int yes_no); @end example @noindent Nowadays this function still exists for backward-compatibility but does nothing. The appearance of XPopups (and their associated sub-popups) can be change by the following routines: @findex fl_setpup_bw() @anchor{fl_setpup_bw()} @findex fl_setpup_softedge() @anchor{fl_setpup_softedge()} @example void fl_setpup_bw(int popup_id, int bw); void fl_setpup_softedge(int pupup_id, int yes_no); @end example @noindent The first sets the border width for a XPopup. Calling @code{@ref{fl_setpup_softedge()}} with a true argument for @code{yes_no} has the same effect as using a negative border width while using a false (0) argument is equivalent to using a positive one (so this function isn't very useful). The background color and text color of a popup can be changed using @findex fl_setpup_default_color() @anchor{fl_setpup_default_color()} @example void fl_setpup_default_color(FL_COLOR bgcolor, FL_COLOR tcolor); @end example @noindent By default, the background color @code{bgcolor} is @code{FL_COL1} and the text color @code{tcolor} is @code{FL_BLACK}. For "binary" or radio items, that have check box associated with them, the "checked" or "pushed" color (default is @code{FL_BLUE}) can be changed with the following routine @findex fl_setpup_default_checkcolor() @anchor{fl_setpup_default_checkcolor()} @example void fl_setpup_default_checkcolor(FL_COLOR checkcolor); @end example There is by default a limit of 32 XPopups per process. To enlarge the number of XPopups allowed, use the following routine @findex fl_setpup_maxpups() @anchor{fl_setpup_maxpups()} @example int fl_setpup_maxpups(int new_max); @end example @noindent The function returns the previous limit. It is possible to use XPopups as a message facility using the following routines @findex fl_showpup() @anchor{fl_showpup()} @findex fl_hidepup() @anchor{fl_hidepup()} @example void fl_showpup(int popup_id); void fl_hidepup(int popup_id); @end example @noindent No interaction takes place with a XPopup shown by @code{@ref{fl_showpup()}} and it can only be removed from the screen programmatically via @code{@ref{fl_hidepup()}}. @node XPopup Remarks @subsection Remarks Take care to make sure all items, including the items on submenus, of a XPopup have unique values and are positive. XPopups are used indirectly in the demo programs @file{menu.c}, @file{boxtype.c}, @file{choice.c} and others. For a direct pop-up demo see @file{popup.c}. xforms-1.0.93sp1/doc/part5_dirty_tricks.texi0000644000175000017500000001257111317661145017526 0ustar jensjens@node Part V Dirty Tricks @chapter Dirty Tricks This chapter describes some of the routines that may be used in special situations where more power or flexibility from Forms Library is needed. These routines are classified as "dirty tricks" either because they can easily mess up the normal operation of Forms Library or they depend on internal information that might change in the future, or they rely too much on the underlying window systems. Thus whenever possible, try not to use these routines. @ifnottex @menu * Interaction:: * Other:: @end menu @end ifnottex @node Interaction @section Interaction @ifnottex @menu * Form Events:: * Object Events:: @end menu @end ifnottex @node Form Events @subsection Form Events It is possible to by-pass the form event processing entirely by setting a "raw callback" that sits between the event reading and dispatching stage, thus a sneak preview can be implemented and optionally consume the event before the internal form processing machinery gets to it. Use the following routines to register such a preemptive processing routine @tindex FL_RAW_CALLBACK @findex fl_register_raw_callback() @anchor{fl_register_raw_callback()} @example typedef int (*FL_RAW_CALLBACK)(FL_FORM *, void *xevent); FL_RAW_CALL_BACK fl_register_raw_callback(FL_FORM *form, unsigned long mask, FL_RAW_CALLBACK callback); @end example @noindent where @code{mask} is the event mask you are interested in (same as the XEvent mask). The function returns the old handler for the event. Currently only handlers for the following events are supported @itemize @bullet @item @code{KeyPressMask} and @code{KeyReleaseMask} @item @code{ButtonPressMask} and @code{ButtonReleaseMask} @item @code{EnterWindowMask} and @code{LeaveWindowMask} @item @code{ButtonMotionMask} and @code{PointerMotionMask} @item @code{FL ALL EVENT} (see below) @end itemize Further, there is only one handler for each event pair, (e.g., @code{ButtonPress} and @code{ButtonRelease}), thus you can't have two separate handlers for each pair although it is okay to register a handler only for one of them (almost always a mistake) if you know what you're doing. If you register a single handler for more than one pair of events, e.g., setting mask to @code{KeyPressMask|ButtonPressMask}, the returned old handler is random. A special constant, @code{FL_ALL_EVENT}, is defined so that the handler registered will received all events that are selected. To select events, use @code{@ref{fl_addto_selected_xevent()}}. Once an event handler is registered and the event is detected, then instead of doing the default processing by the dispatcher, the registered handler is invoked. The handler must return @tindex FL_PREEMPT @code{FL_PREEMPT} if the event is consumed) and 0 otherwise so that the internal process can continue. See the demo program @file{minput2.c} for an example. @node Object Events @subsection Object Events Just as you can by-pass the internal event processing for a particular form, you can also do so for an object. Unlike in raw callbacks, you can not select individual events. The mechanism provided is via the registration of a pre-handler for an object. The pre-handler will be called before the built-in object handler. By electing to handle some of the events, a pre-handler can, in effect, replace part of the built-in handler. In @ref{Part IV Using a Pre-emptive Handler, , the chapter about pre-emptive handlers} the API was already discussed in detail, so here we just repeat the discussion for completeness as any use of pre-emptive handler is considered "dirty tricks". To register a pre-handler, use the following routine @tindex FL_HANDLEPTR @findex fl_set_object_prehandler() @example typedef int (*FL_HANDLEPTR)(FL_OBJECT *obj, int event, FL_Coord mx, FL_Coord my, int key, void *raw_event); void fl_set_object_prehandler(FL_OBJECT *, FL_HANDLEPTR prehandler); @end example @noindent where @code{event} is the generic event in the Forms Library, that is, @code{FL DRAW}, @code{FL ENTER} etc. The arguments @code{mx} and @code{my} are the mouse position and @code{key} is the key pressed. The last parameter, @code{raw_event} is a pointer to the XEvent that caused the invocation of the pre-handler. cast to a void pointer. Notice that the pre-handler has the same function prototype as the built-in handler. Actually they are called with the exact same parameters by the event dispatcher. The prehandler should return 0 if the processing by the built-in handler should continue. A return value of @code{FL PREEMPT} will prevent the dispatcher from calling the built-in handler. See demo program @file{preemptive.c} for an example. Similar mechanism exists for registering a post-handler, i.e., a handler invoked after the built-in handler finishes. Whenever possible a post-handler should be used instead of a pre-handler. @node Other @section Other As stated earlier, @code{@ref{fl_set_defaults()}} can be used to modify the Forms Library's defaults prior to calling @code{@ref{fl_initialize()}}. Actually, this routine can also be used after @code{@ref{fl_initialize()}} to override the values set on the command line or in the application databases. However, overriding users' preferences should be done with discretion. Further, setting @code{privateColormap} after @code{@ref{fl_initialize()}} has no effect. xforms-1.0.93sp1/doc/part3_buttons.texi0000644000175000017500000004660211376031774016516 0ustar jensjens@node Part III Button-like Objects @chapter Button-like Objects A very important class of objects are the buttons. Buttons are placed on the form such that the user can push them with the mouse. Different types of buttons exist: buttons that return to their normal position when the user releases the mouse, buttons that stay pushed until the user pushes them again and radio buttons that make other buttons be released. @ifhtml @center @image{images/buttontypes} @end ifhtml @ifnothtml @center @image{images/buttontypes,7cm} @end ifnothtml Also different shapes of buttons exist. Normal buttons are rectangles that come out of the background. When the user pushes them they go into the background (and possibly change color). Lightbuttons have a small light inside them. Pushing the button switches the light on. Round buttons are simple circles. When pushed, a colored circle appears inside them. Bitmap and pixmap buttons are buttons whose labels are graphics rather than text. @ifnottex @menu * Adding Button Objects: Adding Button Objects * Button Types: Button Types * Button Interaction: Button Interaction * Other Button Routines: Other Button Routines * Button Attributes: Button Attributes * Remarks: Button Remarks @end menu @end ifnottex @node Adding Button Objects @section Adding Button Objects Adding an object To add buttons use one of the following routines: @findex fl_add_button() @anchor{fl_add_button()} @findex fl_add_lightbutton() @anchor{fl_add_lightbutton()} @findex fl_add_roundbutton() @anchor{fl_add_roundbutton()} @findex fl_add_round3dbutton() @anchor{fl_add_round3dbutton()} @findex fl_add_checkbutton() @anchor{fl_add_checkbutton()} @findex fl_add_bitmapbutton() @anchor{fl_add_bitmapbutton()} @findex fl_add_pixmapbutton() @anchor{fl_add_pixmapbutton()} @findex fl_add_labelbutton() @anchor{fl_add_labelbutton()} @findex fl_add_scrollbutton() @anchor{fl_add_scrollbutton()} @example FL_OBJECT *fl_add_button(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); FL_OBJECT *fl_add_lightbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w,FL_Coord h, const char *label); FL_OBJECT *fl_add_roundbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w,FL_Coord h, const char *label); FL_OBJECT *fl_add_round3dbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w,FL_Coord h, const char *label); FL_OBJECT *fl_add_checkbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w,FL_Coord h, const char *label); FL_OBJECT *fl_add_bitmapbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w,FL_Coord h, const char *label); FL_OBJECT *fl_add_pixmapbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w,FL_Coord h, const char *label); FL_OBJECT *fl_add_labelbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w,FL_Coord h, const char *label); FL_OBJECT *fl_add_scrollbutton(int type, FL_Coord x, FL_Coord y, FL_Coord w,FL_Coord h, const char *label); @end example The meaning of the parameters is as usual. The label is by default placed inside the button for button and lightbutton. For roundbutton, round3dbutton, bitmapbutton and pixmapbutton, it is placed to the right of the circle and to the bottom of the bitmap/pixmap respectively. For scrollbutton, the label must be of some pre-determined string that indicates the direction of the scroll arrow. @node Button Types @section Button Types The following types of buttons are available: @table @code @tindex FL_NORMAL_BUTTON @anchor{FL_NORMAL_BUTTON} @item FL_NORMAL_BUTTON Returns value when released. @tindex FL_PUSH_BUTTON @anchor{FL_PUSH_BUTTON} @item FL_PUSH_BUTTON Stays pushed until user pushes it again. @tindex FL_MENU_BUTTON @anchor{FL_MENU_BUTTON} @item FL_MENU_BUTTON Returns value when pushed, useful e.g.@: for opening a popup when pushed. @tindex FL_TOUCH_BUTTON @anchor{FL_TOUCH_BUTTON} @item FL_TOUCH_BUTTON Returns value as long as the user pushes it. @tindex FL_RADIO_BUTTON @anchor{FL_RADIO_BUTTON} @item FL_RADIO_BUTTON Push button that switches off other radio buttons. @tindex FL_HIDDEN_BUTTON @anchor{FL_HIDDEN_BUTTON} @item FL_HIDDEN_BUTTON Invisible normal button. @tindex FL_INOUT_BUTTON @anchor{FL_INOUT_BUTTON} @item FL_INOUT_BUTTON Returns value both when pushed and when released. @tindex FL_RETURN_BUTTON @anchor{FL_RETURN_BUTTON} @item FL_RETURN_BUTTON Like a normal button but reacts on the @code{} key. @tindex FL_HIDDEN_RET_BUTTON @anchor{FL_HIDDEN_RET_BUTTON} @item FL_HIDDEN_RET_BUTTON Invisible return button. @end table Except for the @code{@ref{FL_HIDDEN_BUTTON}} and @code{@ref{FL_HIDDEN_RET_BUTTON}}, which are invisible, all types of button look similar on the screen but their function is quite different. Each of these buttons gets pushed down when the user presses the mouse on top of it. What actually happens when the user does so depends on the type of the button. An @code{@ref{FL_NORMAL_BUTTON}}, @code{@ref{FL_TOUCH_BUTTON}} and @code{@ref{FL_INOUT_BUTTON}} gets released when the user releases the mouse button. Their difference lies in the moment at which the interaction routines return them (see below). A @code{@ref{FL_PUSH_BUTTON}} remains pushed and is only released when the user pushes it again. A @code{@ref{FL_RADIO_BUTTON}} is a push button with the following extra property: whenever the user pushes a radio button, all other pushed radio buttons in the same form (or in the same group) are released. In this way the user can make its choice among several possibilities. A @code{@ref{FL_RETURN_BUTTON}} behaves like a normal button, but it also reacts when the @code{} key on the keyboard is pressed. When a form contains such a button (of course there can only be one) the @code{} key can no longer be used to move between input fields. For this the @code{} key must be used. A @code{@ref{FL_HIDDEN_BUTTON}} behaves like a normal button but is invisible. A @code{@ref{FL_HIDDEN_RET_BUTTON}} is like a hidden button but also reacts to @code{} key presses. @node Button Interaction @section Button Interaction @code{@ref{FL_NORMAL_BUTTON}}s, @code{@ref{FL_PUSH_BUTTON}}s, @code{@ref{FL_RADIO_BUTTON}}s, @code{@ref{FL_RETURN_BUTTON}}s and @code{@ref{FL_HIDDEN_BUTTON}}s are returned at the moment the user releases the mouse after having pressed it on the button. A @code{@ref{FL_MENU_BUTTON}}, in contrast, is returned already on a mouse press. A @code{@ref{FL_INOUT_BUTTON}} is returned both when the user presses it and when the user releases it. A @code{@ref{FL_TOUCH_BUTTON}} is returned all the time as long as the user keeps the mouse button pressed while the mouse is on top of it. A @code{@ref{FL_RETURN_BUTTON}} and a @code{@ref{FL_HIDDEN_RET_BUTTON}} are also returned when the user presses the @code{} key. As for other ``active'' objects, you can control under which conditions a button object gets returned or its callback invoked by using the function @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example where reasonable values for @code{when} are @table @code @item @ref{FL_RETURN_NONE} Never return object or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return object or invoke callback when mouse button is released and at the same moment the state of the button changed. @item @ref{FL_RETURN_CHANGED} Return object or invoke callback whenever the state of the button changes. @item @ref{FL_RETURN_END} Return object or invoke callback when mouse button is released @item @ref{FL_RETURN_ALWAYS} Return object or invoke callback on all of the above condtions. @end table Most buttons will always return @code{@ref{FL_RETURN_END}} and @code{@ref{FL_RETURN_CHANGED}} at the same time. Exceptions are @code{@ref{FL_INOUT_BUTTON}}s and @code{@ref{FL_TOUCH_BUTTON}}s. The former returns @code{@ref{FL_RETURN_CHANGED}} when pushed and both @code{@ref{FL_RETURN_END}} and @code{@ref{FL_RETURN_CHANGED}} together when released. @code{@ref{FL_TOUCH_BUTTON}}s return when pressed, then @code{@ref{FL_RETURN_CHANGED}} at regular time intervals while being pressed and finally @code{@ref{FL_RETURN_END}} when released. See demo @file{butttypes.c} for a feel of the different button types. @node Other Button Routines @section Other Button Routines The application program can also set a button to be pushed or not itself without a user action. To this end use the routine @findex fl_set_button() @anchor{fl_set_button()} @example void fl_set_button(FL_OBJECT *obj, int pushed); @end example @noindent @code{pushed} indicates whether the button should be pushed (1) or released (0). When setting a @code{@ref{FL_RADIO_BUTTON}} to be pushed this automatically releases the currently pushed radio button in the same form (or group). Also note that, while this routine only simulates the visual appearance and perhaps some internal states, it does not affect the program flow in any way, i.e.@: setting a button as being pushed does not invoke its callback or results in the button becoming returned to the program. For that @code{@ref{fl_trigger_object()}} is to be used or, more conveniently, just follow up @code{@ref{fl_set_button()}} with a call of @code{@ref{fl_call_object_callback()}}. To figure out whether a button is pushed or not use@footnote{@code{@ref{fl_mouse_button()}} can also be used.} @findex fl_get_button() @anchor{fl_get_button()} @example int fl_get_button(FL_OBJECT *obj); @end example Sometimes you want to give the button a different meaning depending on which mouse button gets pressed on it. To find out which mouse button was used at the last push (or release) use the routine @findex fl_get_button_numb() @anchor{fl_get_button_numb()} @example int fl_get_button_numb(FL_OBJECT *obj); @end example @noindent It returns one of the constants @code{@ref{FL_LEFT_MOUSE}}, @code{@ref{FL_MIDDLE_MOUSE}}, @code{@ref{FL_RIGHT_MOUSE}}, @code{@ref{FL_SCROLLUP_MOUSE}} or @code{@ref{FL_SCROLLDOWN_MOUSE}} (the latter two are from the scroll wheel of the mouse). If the last push was triggered by a shortcut (see below), the function returns the @code{keysym} (ASCII value if the key used is between 0 and 127) of the key plus @tindex FL_SHORTCUT @code{@ref{FL_SHORTCUT}}. For example, if a button has @code{C} as its shortcut the button number returned upon activation of the shortcut will be @code{FL_SHORTCUT + 3} (the ASCII value of @code{C} is 3). It can also be controlled which mouse buttons a buttons reacts to at all. To set which mouse buttons the button reacts to use @findex fl_set_button_mouse_buttons() @anchor{fl_set_button_mouse_buttons()} @example void fl_set_button_mouse_buttons(FL_OBJECT *obj, int mbuttons); @end example @noindent @code{mbuttons} is the bitwise OR of the numbers 1 for the left mouse button, 2 for the middle, 4 for the right mouse button, 8 for moving the scroll wheel up "button" and 16 for scrolling down "button". Unless set differently a button reacts to all mouse buttons. To determine which mouse buttons a button is reacting to use @findex fl_get_button_mouse_buttons() @anchor{fl_get_button_mouse_buttons()} @example void fl_get_button_mouse_buttons(FL_OBJECT *obj, unsigned int *mbuttons); @end example @noindent The value returned via @code{mbuttons} is the same value as would be used in @code{@ref{fl_set_button_mouse_buttons()}}. More information about the last event can be obtained by calling the function @code{@ref{fl_last_event()}} @findex fl_last_event() @example const XEvent *fl_last_event(void); @end example In a number of situations it is useful to define a keyboard equivalent for a button. You might e.g.@: want to define that @code{Q} has the same meaning as pressing the "Quit" button. This can be achieved using the following call: @findex fl_set_button_shortcut() @anchor{fl_set_button_shortcut()} @example void fl_set_button_shortcut(FL_OBJECT *obj, const char *str, int showUL); @end example @noindent Note that @code{str} is a string, not a single character. This string is a list of all the characters to become keyboard shortcuts for the button. E.g.@: if you use string "^QQq" the button will react on the keys @code{q}, @code{Q} and @code{Q}. (As you see you can use the symbol @code{^} to indicate the control key. Similarly you can use the symbol @code{#} to indicate the @code{} key.) Be careful with your choices. When the form also contains input fields you probably don't want to use the normal printable characters because they can no longer be used for input in the input fields. Shortcuts are always evaluated before input fields. Other special keys, such as @code{} etc., can also be used as shortcuts. @xref{Shortcuts}, for details. Finally, keep in mind that a button of type @code{FL_RETURN_BUTTON} is in fact nothing more than a normal button, just with the @code{} key set as the shortcut. So don't change the shortcuts for such a button. If the third parameter @code{showUL} is true and one of the letters in the object label matches the shortcut the matching letter will be underlined. This applies to non-printable characters (such as @code{#A}) as well in the sense that if the label contains the letter @code{a} or @code{A} it will be underlined (i.e.@: special characters such as @code{#} and @code{^} are ignored when matching). A false value (0) for @code{showUL} turns off underlining without affecting the shortcut. Note that although the entire object label is searched for matching character to underline of the shortcut string itself only the first (non-special) character is considered, thus a shortcut string of @code{"Yy"} for the label @code{"Yes"} will result in the letter @code{Y} becoming underlined while for @code{"yY"} it won't. To set the bitmap to use for a bitmap button the following functions can be used: @findex fl_set_bitmapbutton_data() @anchor{fl_set_bitmapbutton_data()} @findex fl_set_bitmapbutton_file() @anchor{fl_set_bitmapbutton_file()} @example void fl_set_bitmapbutton_data(FL_OBJECT *obj, int w, int h, unsigned char *bits); void fl_set_bitmapbutton_file(FL_OBJECT *obj, const char *filename); @end example Similarly, to set the pixmap to use for a pixmap button the following routines can be used: @findex fl_set_pixmapbutton_data() @anchor{fl_set_pixmapbutton_data()} @findex fl_set_pixmapbutton_file() @anchor{fl_set_pixmapbutton_file()} @findex fl_set_pixmapbutton_pixmap() @anchor{fl_set_pixmapbutton_pixmap()} @example void fl_set_pixmapbutton_data(FL_OBJECT *obj, unsigned char **bits); void fl_set_pixmapbutton_file(FL_OBJECT *obj, const char *file); void fl_set_pixmapbutton_pixmap(FL_OBJECT *obj, Pixmap id, Pixmap mask); @end example @noindent To use the first routine, you @code{#include} the pixmap file into your source code and use the pixmap definition data (an array of char pointers) directly. For the second routine the filename @code{file} that contains the pixmap definition is used to specify the pixmap. The last routine assumes that you already have a X Pixmap resource ID for the pixmap you want to use. Note that these routines do not free a pixmap already associated with the button. To free the pixmaps use the function @findex fl_free_pixmapbutton_pixmap() @anchor{fl_free_pixmapbutton_pixmap()} @example void fl_free_pixmapbutton_pixmap(FL_OBJECT *obj); @end example @noindent This function frees the pixmap and mask together with all the colors allocated for them. To get the pixmap and mask that is currently being displayed, use the following routine @findex fl_get_pixmapbutton_pixmap() @anchor{fl_get_pixmapbutton_pixmap()} @example Pixmap fl_get_pixmapbutton_pixmap(FL_OBJECT *obj, Pixmap &pixmap, Pixmap &mask); @end example Pixmaps are by default displayed centered inside the bounding box. However, this can be changed using the following routine @findex fl_set_pixmapbutton_align() @anchor{fl_set_pixmapbutton_align()} @example void fl_set_pixmapbutton_align(FL_OBJECT *obj, int align, int xmargin, int ymargin); @end example @noindent where @code{align} is the same as that used for labels. @xref{Label Attributes and Fonts}, for a list. @code{xmargin} and @code{ymargin} are extra margins to leave in addition to the object border width. Note that although you can place a pixmap outside of the bounding box, it probably is not a good idea. When the mouse enters a pixmap button an outline of the button is shown. If required, a different pixmap (the focus pixmap) can also be shown. To set such a focus pixmap the following functions are available: @findex fl_set_pixmapbutton_focus_data() @anchor{fl_set_pixmapbutton_focus_data()} @findex fl_set_pixmapbutton_focus_file() @anchor{fl_set_pixmapbutton_focus_file()} @findex fl_set_pixmapbutton_focus_pixmap() @anchor{fl_set_pixmapbutton_focus_pixmap()} @example void fl_set_pixmapbutton_focus_data(FL_OBJECT *obj, unsigned char **bits); void fl_set_pixmapbutton_focus_file(FL_OBJECT *obj, const char *file); void fl_set_pixmapbutton_focus_pixmap(FL_OBJECT *obj, Pixmap id, Pixmap mask); @end example @noindent The meanings of the parameters are the same as that in the regular pixmap routines. Finally, there's a function that can be used to enable or disable the focus outline @findex fl_set_pixmapbutton_focus_outline() @anchor{fl_set_pixmapbutton_focus_outline()} @example void fl_set_pixmapbutton_focus_outline(FL_OBJECT *obj, int yes_no); @end example @noindent See also @ref{Pixmap Object}, for pixmap color and transparency handling. @node Button Attributes @section Button Attributes For normal buttons the first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the normal color and the second (@code{col2}) the color the button has when pushed. For lightbuttons @code{col1} is the color of the light when off and @code{col2} the color when on. For round buttons, @code{col1} is the color of the circle and @code{col2} the color of the circle that is placed inside it when pushed. For round3dbutton, @code{col1} is the color of the inside of the circle and @code{col2} the color of the embedded circle. For bitmapbuttons, @code{col1} is the normal box color (or bitmap background if boxtype is not @code{FL_NO_BOX}) and @code{col2} is used to indicate the focus color. The foreground color of the bitmap is controlled by label color (as set via @code{@ref{fl_set_object_lcol()}}. For scrollbutton, @code{col1} is the overall boundbox color (if boxtype is not @code{FL_NO_BOX}), @code{col2} is the arrow color. The label of a scrollbutton must be a string with a number between 1 and 9 (except 5), indicating the arrow direction like on the numerical key pad. The label can have an optional prefix @code{#} to indicate uniform scaling. For example, the label @code{"#9"} tells that the arrow should be pointing up-right and the arrow has the identical width and height regardless the overall bounding box size. @node Button Remarks @section Remarks See all demo programs, in particular @file{pushbutton.c} and @file{buttonall.c} for the use of buttons. xforms-1.0.93sp1/doc/part3_introduction.texi0000644000175000017500000001167211376031777017543 0ustar jensjens@node Part III Introduction @chapter Introduction This part describes all different object classes that are available in the Forms Library. All available object classes are summarized in a table below. For each class there is a section in this document that describes it. The section starts with a short description of the object, followed by the routine(s) to add it to a form. For (almost) all classes this routine has the same form @example FL_OBJECT *fl_add_CLASS(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent Here @code{type} is the type of the object in its class. Most classes have many different types. They are described in the section. @code{x}, @code{y}, @code{w} and @code{h} give the left upper corner and the width and height of the bounding box of the object. @code{label} is the label that is placed inside or next to the object. For each object class the default placement of the label is described. When the label starts with the character @code{@@} the label is not printed but replaced by a symbol instead. For each object class there is also a routine @example FL_OBJECT *fl_create_CLASS(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent that only creates the object but does not put it in the form. This routine is useful for building hierarchical object classes. The routine is not described in the following sections. An important aspect of objects is how interaction is performed with them. First, there is the way in which the user interacts with the object, and second there's the question under which circumstances an object changes its state and how this is returned to the application program. All this is described in detail in the following sections. Object attributes can be divided into generic and object specific ones. For generic attributes (e.g.@: the object label size), the routines that change them always start with @code{fl_set_object_xxx()} where @code{xxx} is the name of the attribute. When a specific object is created and added to a form, it inherits many aspects of the generic object or initializes the object attributes to its needed defaults. Object classes can be roughly divided into static object classes (Box, Frame, LabelFrame, Text, Bitmap, Pixmap, Clock and Chart), Buttons, valuator objects classes (Slider, Scrollbar, Dial, Positioner, Counter, Thumbwheel), Inputs, choice object classes (Menu, Choice, Browser), container object classes (Tabbed Folder, Form Browser, Menu bar) and, finally, other object classes (Timer, XYPlot, Canvas, Popup). @table @asis @item Box Rectangular areas to visually group objects. @item Frame A box with an empty inside region. @item LabelFrame A frame with label on the frame. @item Text Simple one line labels. @item Bitmap Displays an X11 bitmap. @item Pixmap Displays a pixmap using the XPM library. @item Clock A clock. @item Chart Bar-charts, pie-charts, strip-charts, etc. @item Button Many different kinds and types of buttons that the user can push. @item Slider @itemx ValSlider Both vertical and horizontal sliders to let the user indicate some float value, possibly with a field showing the currently set value. @item Scrollbar Sliders plus two directional buttons. @item Dial A dial to let the user indicate a float value. @item Positioner Lets the user indicate an (x, y) position with the mouse. @item Counter A different way to let a user step through values. @item Thumbwheel Rolling a wheel to indicate float values. @item Input Lets the user type in an input string. @item Menu Both pop-up and drop-down menus can be created. @item Choice Can be used to let the user make a choice from a set of items. @item Browser A text browser with a slider. Can be used for making selections from sets of choices. @item Folder A (tabbed) folder is a compound object capable of holding multiple groups of objects. @item FormBrowser A browser you can drop forms into. @item Timer A timer that runs from a set time towards 0. Can e.g. be used to do default actions after some time has elapsed. @item XYPlot Shows simple 2D xy-plot from a tabulated function or a datafile. Data points can be interactively manipulated and retrieved. @item Canvas Canvases are managed plain X windows. It differs from a raw application window only in the way its geometry is managed, not in the way various interaction is set up. @item Popups Popup are mostly used by menus and choices, but they can also be used stand-alone to isplay context menus etc. @end table Thus, in the following sections, only the object specific routines are documented. Routines that set generic object attributes are documented in Part V. When appropriate, the effect of certain (generic) attributes of the objects on the specific object is discussed. In particular, it is described what effect the routine @code{@ref{fl_set_object_color()}} has on the appearance of the object. Also some remarks on possible boxtypes are made. xforms-1.0.93sp1/doc/part3_valuator_objects.texi0000644000175000017500000014762111376032001020351 0ustar jensjens@node Part III Valuator Objects @chapter Valuator Objects @ifnottex @menu * Slider Object: Slider Object * Scrollbar Object: Scrollbar Object * Dial Object: Dial Object * Positioner Object: Positioner Object * Counter Object: Counter Object * Spinner Object: Spinner Object * Thumbwheel Object: Thumbwheel Object @end menu @end ifnottex @node Slider Object @section Slider Object Sliders are useful for letting the user indicate a value between some fixed bounds. Both horizontal and vertical sliders exist. They have a minimum, a maximum and a current value (all floating point values). The user can change the current value by shifting the slider with the mouse. Whenever the value changes, this is reported to the application program. @ifnottex @menu * Adding Slider Objects: Adding Slider Objects * Slider Types: Slider Types * Slider Interaction: Slider Interaction * Other Slider Routines: Other Slider Routines * Slider Attributes: Slider Attributes * Remarks: Slider Remarks @end menu @end ifnottex @node Adding Slider Objects @subsection Adding Slider Objects Adding an object To add a slider to a form use @findex fl_add_slider() @anchor{fl_add_slider()} @example FL_OBJECT *fl_add_slider(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent or @findex fl_add_valslider() @anchor{fl_add_valslider()} @example FL_OBJECT *fl_add_valslider(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is by default placed below the slider. The difference between a normal slider and a valslider is that for the second type its value is displayed above or to the left of the slider. @node Slider Types @subsection Slider Types The following types of sliders are available: @table @code @tindex FL_VERT_SLIDER @anchor{FL_VERT_SLIDER} @item FL_VERT_SLIDER A vertical slider. @tindex FL_HOR_SLIDER @anchor{FL_HOR_SLIDER} @item FL_HOR_SLIDER A horizontal slider. @tindex FL_VERT_FILL_SLIDER @anchor{FL_VERT_FILL_SLIDER} @item FL_VERT_FILL_SLIDER A vertical slider, filled from the bottom. @tindex FL_HOR_FILL_SLIDER @anchor{FL_HOR_FILL_SLIDER} @item FL_HOR_FILL_SLIDER A horizontal slider, filled from the left. @tindex FL_VERT_NICE_SLIDER @anchor{FL_VERT_NICE_SLIDER} @item FL_VERT_NICE_SLIDER A nice looking vertical slider. @tindex FL_HOR_NICE_SLIDER @anchor{FL_HOR_NICE_SLIDER} @item FL_HOR_NICE_SLIDER A nice looking horizontal slider. @tindex FL_VERT_BROWSER_SLIDER @anchor{FL_VERT_BROWSER_SLIDER} @item FL_VERT_BROWSER_SLIDER A different looking vertical slider. @tindex FL_HOR_BROWSER_SLIDER @anchor{FL_HOR_BROWSER_SLIDER} @item FL_HOR_BROWSER_SLIDER A different looking horizontal slider. @end table @ifhtml @center @image{images/slidertypes} @end ifhtml @ifnothtml @center @image{images/slidertypes,12cm} @end ifnothtml @node Slider Interaction @subsection Slider Interaction Whenever the user changes the value of the slider using the mouse, the slider is returned (unless there's callback function associated with the object) by the interaction routines. The slider position is changed by moving the mouse inside the slider area. For fine control, hold down the @code{} key while moving the slider. In some cases you might not want the slider to be returned or its callback called each time its value changes. To change the default, call the following routine: @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when) @end example @noindent where the parameter @code{when} can be one of the four values: @table @code @item @ref{FL_RETURN_NONE} Never return or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end (mouse release) if value is changed since last return. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever the slider value is changed. This is the default. @item @ref{FL_RETURN_END} Return or invoke callback at end (mouse release) regardless if the value is changed or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback when the value changed or at end (mouse release). @end table See the demo program @file{objreturn.c} for an example use of this. @node Other Slider Routines @subsection Other Slider Routines To change the value and bounds of a slider use the following routines @findex fl_set_slider_value() @anchor{fl_set_slider_value()} @findex fl_set_slider_bounds() @anchor{fl_set_slider_bounds()} @example void fl_set_slider_value(FL_OBJECT *obj, double val); void fl_set_slider_bounds(FL_OBJECT *obj, double min, double max); @end example @noindent By default, the minimum value for a slider is 0.0, the maximum is 1.0 and the value is 0.5. For vertical sliders the slider position for the minimum value is at the left, for horizontal sliders at the top of the slider. By setting @code{nin} to a larger value than @code{max} in a call of @code{@ref{fl_set_slider_bounds()}} this can be reversed. If in a call of @code{@ref{fl_set_slider_bounds()}} the actual value of a slider isn't within the range of the new bounds, its value gets adjusted to the nearest limit. When the requested new slider value in a call of @code{@ref{fl_set_slider_value()}} is outside the range of bounds it gets adjusted to the nearest boundary value. To obtain the current value or bounds of a slider use @findex fl_get_slider_value() @anchor{fl_get_slider_value()} @example double fl_get_slider_value(FL_OBJECT *obj); void fl_get_slider_bounds(FL_OBJECT *obj, double *min, double *max); @end example @c ----------------------------------------------------------------- @c The following function still exist but the description is wrong. @c fl_set_slider_step() doesn't do anything and @c fl_set_slider_increment() is only used internallyy for sliders @c used in scrollbars (and doesn't do anything for normal sliders) @c In a number of situations you may like slider values to be rounded to @c some values, e.g. to integer values. To this end use the routine @c @findex fl_set_slider_step() @c @anchor{fl_set_slider_step()} @c @example @c void fl_set_slider_step(FL_OBJECT *obj, double step); @c @end example @c @noindent @c After this call slider values will be rounded to multiples of @code{step}. @c Use the value 0.0 for @code{step} to switch off rounding. @c By default, if the mouse is pressed below or above the the sliding @c bar, the sliding bar jumps to the location where the mouse got pressed. @c You can, however, use the following routine to change this default so @c the jumps are made is discrete increments: @c @findex fl_set_slider_increment() @c @anchor{fl_set_slider_increment()} @c @example @c void fl_set_slider_increment(FL_OBJECT *obj, double lj, double rj); @c @end example @c @noindent @c where @code{lj} indicates how much to jump if the left mouse button is @c pressed and @code{rj} indicates how much to increment if right/middle @c mouse buttons pressed. This routine can be used if finer control of @c the slider value is needed or to assign different meanings to different @c mouse buttons. For example, for the slider in the browser class, the @c left mouse jump is made to be one page and right jump is made to be @c one line. @c @c To obtain the current increment, use the following routine @c @findex fl_get_slider_increment() @c @anchor{fl_get_slider_increment()} @c @example @c void fl_get_slider_increment(FL_OBJECT *obj, double *lj, double *rj); @c @end example @c ----------------------------------------------------------------- @node Slider Attributes @subsection Slider Attributes Never use @code{FL_NO_BOX} as the boxtype for a slider. For @code{FL_VERT_NICE_SLIDER}s and @code{FL_HOR_NICE_SLIDER}s it's best to use a @code{FL_FLAT_BOX} in the color of the background to get the nicest effect. The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the background of the slider, the second (@code{col2}) the color of the slider itself. You can control the size of the slider inside the box using the routine @findex fl_set_slider_size() @anchor{fl_set_slider_size()} @example void fl_set_slider_size(FL_OBJECT *obj, double size); @end example @noindent @code{size} should be a floating point value between 0.0 and 1.0. The default is @tindex FL_SLIDER_WIDTH @code{FL_SLIDER_WIDTH}, which is 0.1 for regular sliders and 0.15 for browser sliders. With a value for @code{size} of 1.0, the slider covers the box completely and can no longer be moved. This function does nothing if applied to sliders of type @code{NICE_SLIDER} and @code{FILL_SLIDER}. The routine @findex fl_set_slider_precision() @anchor{fl_set_slider_precision()} @example void fl_set_slider_precision(FL_OBJECT *obj, int prec); @end example @noindent sets the precision with which the value of the slider is shown. This only applies to sliders showing their value, i.e.@: valsliders. By default, the value shown by a valslider is the slider value in floating point format. You can override the default by registering a filter function using the following routine @findex fl_set_slider_filter() @anchor{fl_set_slider_filter()} @example void fl_set_slider_filter(FL_OBJECT *obj, const char *(*filter)(FL_OBJECT *, double value, int prec)); @end example @noindent where @code{value} and @code{prec} are the slider value and precision respectively. The filter function @code{filter} should return a string that is to be shown. The default filter is equivalent to the following @example const char *filter(FL_OBJECT *obj, double value, int prec) @{ static char buf[32]; sprintf(buf, "%.*f", prec, value); return buf; @} @end example @node Slider Remarks @subsection Remarks See the demo program @file{demo05.c} for an example of the use of sliders. See demo programs @file{sldsize.c} and @file{sliderall.c} for the effect of setting slider sizes and the different types of sliders. @node Scrollbar Object @section Scrollbar Object Scrollbars are similar to sliders (as a matter of fact, scrollbars are made with sliders and scrollbuttons), and useful in letting the user indicate a value between some fixed bounds. Both horizontal and vertical scrollbars exist. They have a minimum, maximum and current value (all floating point values). The user can change this value by dragging the sliding bar with the mouse or press the scroll buttons. Whenever the value changes, it is reported to the application program via the callback function. @ifnottex @menu * Adding Scrollbar Objects: Adding Scrollbar Objects * Scrollbar Types: Scrollbar Types * Scrollbar Interaction: Scrollbar Interaction * Other Scrollbar Routines: Other Scrollbar Routines * Scrollbar Attributes: Scrollbar Attributes * Remarks: Scrollbar Remarks @end menu @end ifnottex @node Adding Scrollbar Objects @subsection Adding Scrollbar Objects To add a scrollbar to a form use @findex fl_add_scrollbar() @anchor{fl_add_scrollbar()} @example FL_OBJECT *fl_add_scrollbar(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is by default placed below the scrollbar. @ifhtml @center @image{images/scrollbars} @end ifhtml @ifnothtml @center @image{images/scrollbars,14cm} @end ifnothtml @node Scrollbar Types @subsection Scrollbar Types The following types of scrollbar are available: @table @code @tindex FL_VERT_SCROLLBAR @anchor{FL_VERT_SCROLLBAR} @item FL_VERT_SCROLLBAR A vertical scrollbar. @tindex FL_HOR_SCROLLBAR @anchor{FL_HOR_SCROLLBAR} @item FL_HOR_SCROLLBAR A horizontal scrollbar. @tindex FL_VERT_THIN_SCROLLBAR @anchor{FL_VERT_THIN_SCROLLBAR} @item FL_VERT_THIN_SCROLLBAR A different looking vertical scrollbar. @tindex FL_HOR_THIN_SCROLLBAR @anchor{FL_HOR_THIN_SCROLLBAR} @item FL_HOR_THIN_SCROLLBAR A different looking horizontal scrollbar. @tindex FL_VERT_NICE_SCROLLBAR @anchor{FL_VERT_NICE_SCROLLBAR} @item FL_VERT_NICE_SCROLLBAR A vertical scrollbar using @code{FL_NICE_SLIDER}. @tindex FL_HOR_NICE_SCROLLBAR @anchor{FL_HOR_NICE_SCROLLBAR} @item FL_HOR_NICE_SCROLLBAR A horizontal scrollbar using @code{FL_NICE_SLIDER}. @tindex FL_VERT_PLAIN_SCROLLBAR @anchor{FL_VERT_PLAIN_SCROLLBAR} @item FL_VERT_PLAIN_SCROLLBAR Similar to @code{FL_THIN_SCROLLBAR}. @tindex FL_HOR_PLAIN_SCROLLBAR @anchor{FL_HOR_PLAIN_SCROLLBAR} @item FL_HOR_PLAIN_SCROLLBAR Similar to @code{FL_HOR_THIN_SCROLLBAR}. @end table @node Scrollbar Interaction @subsection Scrollbar Interaction Whenever the user changes the value of the scrollbar, the scrollbar's callback is called (if one is associated with the scrollbar). The scrollbar position is changed by moving the mouse inside the scrollbar area or. For fine control hold down the left or right @code{} key while moving the slider. You can control under which conditions the scrollbar gets returned to your application or its callback invoked. To change the default, call @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example @noindent where the parameter @code{when} can be one of the following four values: @table @code @item @ref{FL_RETURN_NONE} Never return or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end (mouse release) if value is changed (since last return). @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever the scrollbar value is changed. This is the default. @item @ref{FL_RETURN_END} Return or invoke callback at end (mouse release) regardless if the value is changed or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback whenever value changed or mouse button was released. @end table The default setting for @code{when} for a scrollbar object is @code{@ref{FL_RETURN_CHANGED}} (unless during the build of XForms you set the configuration flag @code{--enable-bwc-bs-hack} in which case the default is @code{@ref{FL_RETURN_NONE}} to keep backward compatibility with earlier releases of the library). See demo program @file{objreturn.c} for an example use of this. @node Other Scrollbar Routines @subsection Other Scrollbar Routines To change the value and bounds of a scrollbar use the following routines: @findex fl_set_scrollbar_value() @anchor{fl_set_scrollbar_value()} @findex fl_set_scrollbar_bounds() @anchor{fl_set_scrollbar_bounds()} @example void fl_set_scrollbar_value(FL_OBJECT *obj, double val); void fl_set_scrollbar_bounds(FL_OBJECT *obj, double min, double max); @end example By default, the minimum value for a slider is 0.0, the maximum is 1.0 and the value is 0.5. For vertical sliders the slider position for the minimum value is at the left, for horizontal sliders at the top of the slider. By setting @code{min} to a larger value than @code{max} in a call of @code{@ref{fl_set_scrollbar_bounds()}} this can be reversed. If in a call of @code{@ref{fl_set_scrollbar_bounds()}} the actual value of a scrollbar isn't within the range of the new bounds, its value gets adjusted to the nearest limit. When the requested new scrollbar value in a call of @code{@ref{fl_set_scrollbar_value()}} is outside the range of bounds it gets adjusted to the nearest boundary value. To obtain the current value and bounds of a scrollbar use @findex fl_get_scrollbar_value() @anchor{fl_get_scrollbar_value()} @findex fl_get_scrollbar_bounds() @anchor{fl_get_scrollbar_bounds()} @example double fl_get_scrollbar_value(FL_OBJECT *obj); void fl_get_scrollbar_bounds(FL_OBJECT *obj, double *min, double *max); @end example @c --------------------------------------------------------------- @c The function fl_set_scrollbar_step() still exists but doesn't @c has any effect! @c In a number of situations you would like scrollbar values to be @c rounded to some values, e.g. to integer values. To this end use the @c routine @c @findex fl_set_scrollbar_step() @c @anchor{fl_set_scrollbar_step()} @c @example @c void fl_set_scrollbar_step(FL_OBJECT *obj, double step); @c @end example @c @noindent @c After this call the scrollbar values will be rounded to multiples of @c @code{step}. Use the value 0.0 for @code{step} to switch off rounding. @c This should not be confused with the increment/decrement value when @c the scroll buttons are pressed. Use @c @code{@ref{fl_set_scrollbar_increment()}} to change the increment @c value. @c --------------------------------------------------------------- By default, if the mouse is pressed beside the the sliding bar, the bar starts to jumps in the direction of the mouse position. You can use the following routine to change this size of the steps being made : @findex fl_set_scrollbar_increment() @anchor{fl_set_scrollbar_increment()} @example void fl_set_scrollbar_increment(FL_OBJECT *obj, double lj, double rj); @end example @noindent where @code{lj} indicates how much to increment if the left mouse button is pressed and @code{rj} indicates how much to jump if the middle mouse button pressed. For example, for the scrollbar in the browser class, the left mouse jump is made to be one page and middle mouse jump is made to be one line. The increment (decrement) value when the scrollbuttons are pressed is set to the value of the right jump. The default values for @code{lj} and @code{rj} are @code{0.1} and @code{0.02}. To obtain the current increment settings, use the following routine @findex fl_get_scrollbar_increment() @anchor{fl_get_scrollbar_increment()} @example void fl_get_scrollbar_increment(FL_OBJECT *obj, double *lj, double *sj); @end example @node Scrollbar Attributes @subsection Scrollbar Attributes Never use @code{FL_NO_BOX} as the boxtype for a scrollbar. For @code{FL_VERT_NICE_SCROLLBAR}s and @code{FL_HOR_NICE_SCROLLBAR}s it's best to use a @code{FL_FLAT_BOX} boxtype in the color of the background to get the nicest effect. The first color argument (@code{col1} to @code{@ref{fl_set_object_color()}} controls the color of the background of the scrollbar, the second (@code{col2}) the color of the sliding bar itself. You can control the size of the sliding bar inside the box using the routine @findex fl_set_scrollbar_size() @anchor{fl_set_scrollbar_size()} @example void fl_set_scrollbar_size(FL_OBJECT *obj, double size); @end example @noindent @code{size} should be a value between 0.0 and 1.0. The default is @tindex FL_SLIDER_WIDTH @code{FL_SLIDER_WIDTH}, which is 0.15 for all scrollbars With @code{size} set to 1.0, the scrollbar covers the box completely and can no longer be moved. This function does nothing if applied to scrollbars of type @code{FL_NICE_SCROLLBAR}. @node Scrollbar Remarks @subsection Remarks See the demo program @file{scrollbar.c} for an example of the use of scrollbars. @node Dial Object @section Dial Object Dial objects are dials that the user can put in a particular position using the mouse. They have a minimum, maximum and current value (all floating point values). The user can change this value by turning the dial with the mouse. Whenever the value changes, this is reported to the application program. @ifnottex @menu * Adding Dial Objects: Adding Dial Objects * Dial Types: Dial Types * Dial Interaction: Dial Interaction * Other Dial Routines: Other Dial Routines * Dial Attributes: Dial Attributes * Remarks: Dial Remarks @end menu @end ifnottex @node Adding Dial Objects @subsection Adding Dial Objects To add a dial to a form use @findex fl_add_dial() @anchor{fl_add_dial()} @example FL_OBJECT *fl_add_dial(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is by default placed below the dial. @node Dial Types @subsection Dial Types @ifhtml @center @image{images/dials} @end ifhtml @ifnothtml @center @image{images/dials,10cm} @end ifnothtml The following types of dials are available: @table @code @tindex FL_NORMAL_DIAL @anchor{FL_NORMAL_DIAL} @item FL_NORMAL_DIAL A dial with a knob indicating the position. @tindex FL_LINE_DIAL @anchor{FL_LINE_DIAL} @item FL_LINE_DIAL A dial with a line indicating the position. @tindex FL_FILL_DIAL @anchor{FL_FILL_DIAL} @item FL_FILL_DIAL The area between initial and current is filled. @end table @node Dial Interaction @subsection Dial Interaction By default, the dial value is returned to the application when the user releases the mouse. It is possible to change this behavior using the following routine @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example @noindent where @code{when} can be one of the following @table @code @item @ref{FL_RETURN_NONE} Never report or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end (mouse release) and only if the dial value is changed. This is the default setting. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever the dial value is changed. @item @ref{FL_RETURN_END} Return or invoke callback at the end regardless if the dial value is changed or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback when value has changed or mouse button has been released. @end table @node Other Dial Routines @subsection Other Dial Routines To change the value of the dial and its bounds use @findex fl_set_dial_value() @anchor{fl_set_dial_value()} @findex fl_set_dial_bounds() @anchor{fl_set_dial_bounds()} @example void fl_set_dial_value(FL_OBJECT *obj, double val); void fl_set_dial_bounds(FL_OBJECT *obj, double min, double max); @end example @noindent By default, the minimum value is 0.0, the maximum is 1.0 and the value is 0.5. To obtain the current values of the dial and its bounds use @findex fl_get_dial_value() @anchor{fl_get_dial_value()} @findex fl_get_dial_bounds() @anchor{fl_get_dial_bounds()} @example double fl_get_dial_value(FL_OBJECT *obj); void fl_get_dial_bounds(FL_OBJECT *obj, double *min, double *max); @end example Sometimes, it might be desirable to limit the angular range a dial can take or choose an angle other than 0 to represent the minimum value. For this purpose, use the following routine @findex fl_set_dial_angles() @anchor{fl_set_dial_angles()} @example void fl_set_dial_angles(FL_OBJECT *obj, double thetai, double thetaf) @end example @noindent where @code{thetai} maps to the minimum value of the dial and @code{thetaf} to its maximum value. The angles are relative to the origin of the dial, which is by default at 6 o'clock and rotates clock-wise. By default, the minimum angle is 0 and the maximum angle is 360. By default, crossing from 359.9 to 0 or from 0 to 359.9 is not allowed. To allowing crossing over, use the following routine @findex fl_set_dial_crossover() @anchor{fl_set_dial_crossover()} @example void fl_set_dial_crossover(FL_OBJECT *obj, int yes_no); @end example @noindent where a true value for @code{yes_no} indicates that cross-over is allowed. In a number of situations you might want dial values to be rounded to some values, e.g. to integer values. To this end use the routine @findex fl_set_dial_step() @anchor{fl_set_dial_step()} @example void fl_set_dial_step(FL_OBJECT *obj, double step); @end example @noindent After this call dial values will be rounded to multiples of @code{step}. Use a value of 0.0 for @code{step} to switch off rounding. By default, clock-wise rotation increases the dial value. To change, use the following routine @findex fl_set_dial_direction() @anchor{fl_set_dial_direction()} @example void fl_set_dial_direction(FL_OBJECT *obj, int dir); @end example @noindent where @code{dir} can be either @tindex FL_DIAL_CCW @code{FL_DIAL_CCW} or @tindex FL_DIAL_CW @code{FL_DIAL_CW}. @node Dial Attributes @subsection Dial Attributes You can use any boxtype you like, but the final dial face always appears to be circular although certain correlation between the requested boxtype and actual boxtype exists (for example, @code{FL_FRAME_BOX} is translated into a circular frame box.) The first color argument (@code{col1} to @code{@ref{fl_set_object_color()}} controls the color of the background of the dial, the second @code{col2}) the color of the knob or the line or the fill color. @node Dial Remarks @subsection Remarks The resolution of a dial is about 0.2 degrees, i.e., there are only about 2000 steps per 360 degrees and, depending on the size of the dial, it is typically less. The dial is always drawn with a circular box. If you specify a @code{FL_UP_BOX}, a @code{FL_OVAL3D_UPBOX} will be used. See the demo programs @file{ldial.c}, @file{ndial.c} and @file{fdial.c} for examples of the use of dials. @node Positioner Object @section Positioner Object A positioner is an object in which the user can indicate a position with an x- and a y-coordinate. It displays a box with a cross-hair cursor in it (except an invisble positioner, of course). Clicking the mouse inside the box changes the position of the cross-hair cursor and, hence, the x- and y-values. @ifnottex @menu * Adding Positioner Objects: Adding Positioner Objects * Positioner Types: Positioner Types * Positioner Interaction: Positioner Interaction * Other Positioner Routines: Other Positioner Routines * Positioner Attributes: Positioner Attributes * Remarks: Positioners Remarks @end menu @end ifnottex @node Adding Positioner Objects @subsection Adding Positioner Objects A positioner can be added to a form using the call @findex fl_add_positioner() @anchor{fl_add_positioner()} @example FL_OBJECT *fl_add_positioner(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is placed below the box by default. @node Positioner Types @subsection Positioner Types The following types of positioner exist: @table @code @tindex FL_NORMAL_POSITIONER @anchor{FL_NORMAL_POSITIONER} @item FL_NORMAL_POSITIONER Cross-hair inside a box. @tindex FL_OVERLAY_POSITIONER @anchor{FL_OVERLAY_POSITIONER} @item FL_OVERLAY_POSITIONER Cross-hair inside a transparent box (i.e.@{ drawn in in XOR mode). @tindex FL_INVISIBLE_POSITIONER @anchor{FL_INVISIBLE_POSITIONER} @item FL_INVISIBLE_POSITIONER Completely invisible positioner to be used just for the side effect of obtaining a position (typically an object is below below it that otherwise would receive user events). @end table @node Positioner Interaction @subsection Positioner Interaction The user changes the setting of the positioner using the mouse inside the box. Per default whenever the values changes, the object is returned by the interaction routines or its callback invoked (if one exists. To change the default use the function @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example @noindent where @code{when} can be one of the following @table @code @item @ref{FL_RETURN_NONE} Never report or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end (mouse release) and only when the positioner ended in a different position than the one it started from. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever the positioners value is changed, default setting. @item @ref{FL_RETURN_END} Return or invoke callback at the end only but regardless if the positioners value changed or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback when value has changed or mouse button has been released. @end table @node Other Positioner Routines @subsection Other Positioner Routines To set the value of the positioner and the boundary values use the routines: @findex fl_set_positioner_xvalue() @anchor{fl_set_positioner_xvalue()} @findex fl_set_positioner_xbounds() @anchor{fl_set_positioner_xbounds()} @findex fl_set_positioner_yvalue() @anchor{fl_set_positioner_yvalue()} @findex fl_set_positioner_ybounds() @anchor{fl_set_positioner_ybounds()} @example void fl_set_positioner_xvalue(FL_OBJECT *obj, double val); void fl_set_positioner_xbounds(FL_OBJECT *obj, double min, double max); void fl_set_positioner_yvalue(FL_OBJECT *obj, double val); void fl_set_positioner_ybounds(FL_OBJECT *obj, double min, double max); @end example @noindent By default the minimum values are 0.0, the maximum values are 1.0 and the actual values are 0.5. For boundaries in x-direction @code{min} and @code{max} should be taken to mean the left- and right-most position, respectively, and for the y-boundaries @code{min} and @code{max} should be taken to mean the value at the bottom and value at the top of the positioner. To obtain the current values of the positioner and the bounds use @findex fl_get_positioner_xvalue() @anchor{fl_get_positioner_xvalue()} @findex fl_get_positioner_xbounds() @anchor{fl_get_positioner_xbounds()} @findex fl_get_positioner_yvalue() @anchor{fl_get_positioner_yvalue()} @findex fl_get_positioner_ybounds() @anchor{fl_get_positioner_ybounds()} @example double fl_get_positioner_xvalue(FL_OBJECT *obj); void fl_get_positioner_xbounds(FL_OBJECT *obj, double *min, double *max); double fl_get_positioner_yvalue(FL_OBJECT *obj); void fl_get_positioner_ybounds(FL_OBJECT *obj, double *min, double *max); @end example @noindent In a number of situations you might like positioner values to be rounded to some values, e.g. to integer values. To this end use the routines @findex fl_set_positioner_xstep() @anchor{fl_set_positioner_xstep()} @findex fl_set_positioner_ystep() @anchor{fl_set_positioner_ystep()} @example void fl_set_positioner_xstep(FL_OBJECT *obj, double step); void fl_set_positioner_ystep(FL_OBJECT *obj, double step); @end example @noindent After these calls positioner values will be rounded to multiples of @code{step}. Use a value of 0.0 for @code{step} to switch off rounding. Sometimes, it makes more sense for a positioner to have an icon/pixmap as the background that represents a minified version of the area where the positioner's values apply. Type @code{FL_OVERLAY_POSITIONER} is specifically designed for this by drawing the moving cross-hair in XOR mode as not to erase the background. A typical creation procedure might look something like the following @example obj = fl_add_pixmap(FL_NORMAL_PIXMAP, x, y, w, h, label); fl_set_pixmap_file(obj, iconfile); pos = fl_add_positioner(FL_OVERLAY_POSITIONER, x, y, w, h, label); @end example @noindent Of course, you can overlay this type of positioner on objects other than a pixmap. See the demo program @file{positionerXOR.c} for an example. @node Positioner Attributes @subsection Positioner Attributes Never use @code{FL_NO_BOX} as the boxtype for a positioner of type. @code{FL_NORMAL_POSITIONER} (but the other two types will have a box type of @code{FL_NO_BOX} per default). The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the box, the second (@code{col2}) the color of the cross-hair. @node Positioners Remarks @subsection Remarks A demo can be found in @file{positioner.c}. @node Counter Object @section Counter Object A counter provides a different mechanism for the user to indicate a value. In consists of a box displaying a value and two or four buttons, two at the left and two at the right side. The user can press these buttons to change the value. If the counter has four buttons, the left-most and right-most button make the value change in large steps, the other buttons make it change in small steps. As long as the user keeps the mouse pressed, the value changes. @ifnottex @menu * Adding Counter Objects: Adding Counter Objects * Counter Types: Counter Types * Counter Interaction: Counter Interaction * Other Counter Routines: Other Counter Routines * Counter Attributes: Counter Attributes * Remarks: Counter Remarks @end menu @end ifnottex @node Adding Counter Objects @subsection Adding Counter Objects To add a counter to a form use @findex fl_add_counter() @anchor{fl_add_counter()} @example FL_OBJECT *fl_add_counter(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @end example @noindent The meaning of the parameters is as usual. The label is by default placed below the counter. @node Counter Types @subsection Counter Types @ifhtml @center @image{images/counters} @end ifhtml @ifnothtml @center @image{images/counters,8cm} @end ifnothtml The following types of counters are available: @table @code @tindex FL_NORMAL_COUNTER @anchor{FL_NORMAL_COUNTER} @item FL_NORMAL_COUNTER A counter with two buttons on each side. @tindex FL_SIMPLE_COUNTER @anchor{FL_SIMPLE_COUNTER} @item FL_SIMPLE_COUNTER A counter with one button on each side. @end table @node Counter Interaction @subsection Counter Interaction The user changes the value of the counter by keeping his mouse pressed on one of the buttons. Per default whenever the mouse is released and the counter value is changed the counter is returned to the application program or its callback is invoked. In some applications you might want the counter to be returned to the application program (or the callback invoked) e.g.@: whenever the value changes and not only when the mouse is released. To this end use @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example @noindent where @code{when} can be either @table @code @item @ref{FL_RETURN_NONE} Never report or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end (mouse release) and only if the counter value is changed. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever the counter value is changed. This is the default setting. @item @ref{FL_RETURN_END} Return or invoke callback at the end regardless if the counter value is changed or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback when the counter value has changed or mouse button has been released. @end table @node Other Counter Routines @subsection Other Counter Routines To change the value of the counter, it's bounds and stp size use the routines @findex fl_set_counter_value() @anchor{fl_set_counter_value()} @findex fl_set_counter_bounds() @anchor{fl_set_counter_bounds()} @findex fl_set_counter_step() @anchor{fl_set_counter_step()} @example void fl_set_counter_value(FL_OBJECT *obj, double val); void fl_set_counter_bounds(FL_OBJECT *obj, double min, double max); void fl_set_counter_step(FL_OBJECT *obj, double small, double large); @end example @noindent The first routine sets the value (default is 0) of the counter, the second routine sets the minimum and maximum values that the counter will take (default are -1000000 and 1000000, respectively) and the third routine sets the sizes of the small and large steps (defaults to 0.1 and 1). (For simple counters only the small step is used.) For conflicting settings, bounds take precedence over value, i.e., if setting a value that is outside of the current bounds, it is clamped. Also changing the bounds in a way that the current counter value isn't within the new bounds range anymore will result in its value being adjusted to the nearest of the new limits. To obtain the current value of the counter use @findex fl_get_counter_value() @anchor{fl_get_counter_value()} @example double fl_get_counter_value(FL_OBJECT *obj); @end example To obtain the current bounds and steps, use the following functions @findex fl_get_counter_bounds() @anchor{fl_get_counter_bounds()} @findex fl_get_counter_step() @anchor{fl_get_counter_step()} @example void fl_get_counter_bounds(FL_OBJECT *obj, double *min, double *max); void fl_get_counter_step(FL_OBJECT *obj, double *small, double *large); @end example To set the precision (number of digits after the dot) with which the counter value is displayed use the routine @findex fl_set_counter_precision() @anchor{fl_set_counter_precision()} @example void fl_set_counter_precision(FL_OBJECT *obj, int prec); @end example To determine the current value of the precision use @findex fl_get_counter_precision() @anchor{fl_get_counter_precision()} @example int fl_get_counter_precision(FL_OBJECT *obj); @end example By default, the value shown is the counter value in floating point format. You can override the default by registering a filter function using the following routine @findex fl_set_counter_filter() @anchor{fl_set_counter_filter()} @example void fl_set_counter_filter(FL_OBJECT *obj, const char *(*filter)(FL_OBJECT *, double value, int prec)); @end example @noindent where @code{value} and @code{prec} are the counter value and precision respectively. The filter function @code{filter} should return a string that is to be shown. Note that the default filter is equivalent to the following @example const char *filter(FL_OBJECT *obj, double value, int prec) @{ static char buf[32]; sprintf(buf, "%.*f",prec,value); return buf; @} @end example By default the counter value changes first slowly and the rate of change then accelerates until a final speed is reached. The default delay between the value changing is @w{600 ms} at the start and the final delay is @w{50 ms}. You can change the initial delay by a call of the function @findex fl_set_counter_repeat() @anchor{fl_set_counter_repeat()} @example void fl_set_counter_repeat(FL_OBJECT *obj, int millisec); @end example @noindent and the final delay by using @findex fl_set_counter_min_repeat() @anchor{fl_set_counter_min_repeat()} @example void fl_set_counter_min_repeat(FL_OBJECT *obj, int millisec); @end example @noindent where in both cases the argument @code{millisec} is the delay in milli-seconds. The current settings for the initial and final delay can be obtained by calling the functions @findex fl_get_counter_repeat() @anchor{fl_get_counter_repeat()} @findex fl_get_counter_min_repeat() @anchor{fl_get_counter_min_repeat()} @example int fl_get_counter_repeat(FL_OBJECT *obj); int fl_get_counter_min_repeat(FL_OBJECT *obj); @end example Until version 1.0.91 of the library the delay between changes of a counter was constant (with a default value of @w{100 ms}). To obtain this traditional behaviour simple set the initial and final delay to the same value. As a third alternative you can also request that only the first change of the counter has a different delay from all the following ones. To achieve this call @findex fl_set_counter_speedjump() @anchor{fl_set_counter_speedjump()} @example void fl_set_counter_speedjump(FL_OBJECT *obj, int yes_no); @end example @noindent with a true value for @code{yes_no}. The delay for the first change of the counter value will then be the one set by @code{@ref{fl_set_counter_repeat()}} and the following delays last as long as set by @code{@ref{fl_set_counter_min_repeat()}}. To determine the setting for "speedjumping" call @findex fl_get_counter_speedjump() @anchor{fl_get_counter_speedjump()} @example int fl_get_counter_speedjump(FL_OBJECT *obj); @end example @node Counter Attributes @subsection Counter Attributes Never use @code{FL_NO_BOX} as the boxtype for a counter. The first color argument (@code{col1}) t @code{@ref{fl_set_object_color()}} controls the color of the background of the counter, the second (@code{col2}) sets the color of the arrow buttons of the counter. @node Counter Remarks @subsection Remarks See demo program @file{counter.c} for an example of the use of counters. @node Spinner Object @section Spinner Object A spinner object is a combination of a (numerical) input field with two (touch) buttons that allow to increment or decrement the value in the (editable) input field. I.e.@: the user can change the spinners value by either editing the value of the input field or by using the up/down buttons shown beside the input field. There are two types of spinner objects, one for integer and one for floating point values. You can set limits on the values that can be input and you can also set the amount of increment/decrement achieved when clicking on its buttons. @ifnottex @menu * Adding Spinner Objects: Adding Spinner Objects * Spinner Types: Spinner Types * Spinner Interaction: Spinner Interaction * Other Spinner Routines: Other Spinner Routines * Spinner Attributes: Spinner Attributes @end menu @end ifnottex @node Adding Spinner Objects @subsection Adding Spinner Objects To add a spinner to a form use @findex fl_add_spinner() @anchor{fl_add_spinner()} @example FL_OBJECT *fl_add_spinner(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is by default placed on the left of the spinner object. @node Spinner Types @subsection Spinner Types There are two types of spinners, one for input of integer and one for floating point values: @table @code @tindex FL_INT_SPINNER @anchor{FL_INT_SPINNER} @item FL_INT_SPINNER A spinner that allows input of integer values. @tindex FL_FLOAT_SPINNER @anchor{FL_FLOAT_SPINNER} @item FL_FLOAT_SPINNER A spinner that allows input of floating point values. @end table The way a spinner looks like depends on its dimensions. If it's at least as wide as it's high the two buttons are drawn above each other to the right of the input field (and are marked with and up and down pointing triangle), while when the object is higher than it's wide they are drawn beside each other and below the input field (and the markers are then left and right pointing arrows). @node Spinner Interaction @subsection Spinner Interaction The user can change the value of a spinner in two ways. She can either edit the value in the spinner directly (exactly the same as for an integer or floating point input object (@ref{Part III Input Objects}) or by clicking on one of the buttons that will increment or decrement the value. Per default the spinner object gets returned to the application (or the associated callback is called) whenever the value changed and the interaction seems to have ended. If you want it returned under different circumstances use the function @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example where the parameter @code{when} can be one of the four values @table @code @item @ref{FL_RETURN_NONE} Never return or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end of interaction (when either the input field loses the focus or one of the buttons was released) and the spinner's value changed during the interaction. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever the spinner's value changed. This is the default. @item @ref{FL_RETURN_END} Return or invoke callback at end of interaction regardless of the spinner's value having changed or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback whenever the value changed or the interaction ended. @end table @node Other Spinner Routines @subsection Other Spinner Routines Probably the most often used spinner functions are @findex fl_get_spinner_value() @anchor{fl_get_spinner_value()} @findex fl_set_spinner_value() @anchor{fl_set_spinner_value()} @example double fl_get_spinner_value(FL_OBJECT *obj ); double fl_set_spinner_value(FL_OBJECT *obj, double val); @end example @noindent The first one returns the value of a spinner. The type of the return value is a double for both integer and floating point spinners, so you have to convert it for integer spinners appropriately, e.g:@: using the @code{FL_nint()} macro, that converts a double to the nearest integer value. You can set or retrieve the upper and lower limit the value a spinner can be set to using the functions @findex fl_set_spinner_bounds() @anchor{fl_set_spinner_bounds()} @findex fl_get_spinner_bounds() @anchor{fl_get_spinner_bounds()} @example void fl_set_spinner_bounds(FL_OBJECT *obj, double min, double max); void fl_get_spinner_bounds(FL_OBJECT *obj, double *min, double *max); @end example @noindent Since this function is to be used for integer as well as floating point spinner objects the @code{double} type values must be converted as necessary for @code{@ref{FL_INT_SPINNER}}. The default limits are @code{-10000} and @code{10000}, but can be set to up to @code{INT_MIN} and @code{INT_MIN} for @code{@ref{FL_INT_SPINNER}}s and @code{-DBL_MAX} and @code{DBL_MAX} for @code{@ref{FL_FLOAT_SPINNER}}s. To set or determine the step size by which a spinner will be incremented or decremented when one of the buttons is clicked on use @findex fl_set_spinner_step() @anchor{fl_set_spinner_step()} @findex fl_get_spinner_step() @anchor{fl_get_spinner_step()} @example void fl_set_spinner_step(FL_OBJECT *obj, double step); double fl_get_spinner_step(FL_OBJECT *obj); @end example @noindent The default step size is @code{1} for both @code{@ref{FL_INT_SPINNER}} and @code{@ref{FL_FLOAT_SPINNER}} objects. For @code{@ref{FL_FLOAT_SPINNER}} objects you can set (or determine) how many digits after the decimal point are shown by using @findex fl_set_spinner_precision() @anchor{fl_set_spinner_precision()} @findex fl_get_spinner_precision() @anchor{fl_get_spinner_precision()} @example void fl_set_spinner_precision(FL_OBJECT *obj, int prec); int fl_get_spinner_precision(FL_OBJECT *obj); @end example @noindent This is per default set to 6 digits after the decimal point. The function for setting the precision has no effect on @code{@ref{FL_INT_SPINNER}} objects and the other one returns 0 for this type of spinners. @node Spinner Attributes @subsection Spinner Attributes Please don't change the boxtype from @code{@ref{FL_NO_BOX}}. The label color and font can be set using the normal @code{@ref{fl_set_object_lcol()}}, @code{@ref{fl_set_object_lsize()}} and @code{@ref{fl_set_object_lstyle()}} functions. The color of the input field of a spinner object can be set via using @code{@ref{fl_set_object_color()}} where the first color argument (@code{col1}) controls the color of the input field when it is not selected and the second (@code{col2}) is the color when selected. Instead of creating a plethora of functions to influence all the other aspects of how the spinner is drawn (colors, font types etc.) the user is given direct access to the sub-objects of a spinner. To this end three functions exist: @findex fl_get_spinner_input() @anchor{fl_get_spinner_input()} @findex fl_get_spinner_up_button() @anchor{fl_get_spinner_up_button()} @findex fl_get_spinner_down_button() @anchor{fl_get_spinner_down_button()} @example FL_OBJECT *fl_get_spinner_input(FL_OBJECT *obj); FL_OBJECT *fl_get_spinner_up_button(FL_OBJECT *obj); FL_OBJECT *fl_get_spinner_down_button(FL_OBJECT *obj); @end example @noindent They return the addresses of the objects the spinner object is made up from and those then can be used to set or query the way the individual components are drawn. The addresses of these sub-objects shouldn't be used for any other purposes, especially their callback function may never be changed! @node Thumbwheel Object @section Thumbwheel Object Thumbwheel is another valuator that can be useful for letting the user indicate a value between some fixed bounds. Both horizontal and vertical thumbwheels exist. They have a minimum, a maximum and a current value (all floating point values). The user can change the current value by rolling the wheel. @ifnottex @menu * Adding Thumbwheel Objects: Adding Thumbwheel Objects * Thumbwheel Types: Thumbwheel Types * Thumbwheel Interaction: Thumbwheel Interaction * Other Thumbwheel Routines: Other Thumbwheel Routines * Thumbwheel Attributes: Thumbwheel Attributes * Remarks: Thumbwheel Remarks @end menu @end ifnottex @node Adding Thumbwheel Objects @subsection Adding Thumbwheel Objects To add a thumbwheel to a form use @findex fl_add_thumbwheel() @anchor{fl_add_thumbwheel()} @example FL_OBJECT *fl_add_thumbwheel(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is by default placed below the thumbwheel. @node Thumbwheel Types @subsection Thumbwheel Types @ifhtml @center @image{images/thumbwheels} @end ifhtml @ifnothtml @center @image{images/thumbwheels,7cm} @end ifnothtml The following types of thumbwheels are available: @table @code @tindex FL_VERT_THUMBWHEEL @anchor{FL_VERT_THUMBWHEEL} @item FL_VERT_THUMBWHEEL A vertical thumbwheel. @tindex FL_HOR_THUMBWHEEL @anchor{FL_HOR_THUMBWHEEL} @item FL_HOR_THUMBWHEEL A horizontal thumbwheel. @end table @node Thumbwheel Interaction @subsection Thumbwheel Interaction Whenever the user changes the value of the thumbwheel using the mouse or keyboard, the thumbwheel is returned (or the callback called) by the interaction routines. You change the value of a thumbwheel by dragging the mouse inside the wheel area or, for vertical thumbwheels also by using the scroll wheel of the mouse. Each pixel of movement changes the value of the thumbwheel by 0.005, which you can change using the @code{@ref{fl_set_thumbwheel_step()}} function. The keyboard can be used to change the value of a thumbwheel. Specifically, the @code{} and @code{} cursor keys can be used to increment or decrement the value of a vertical thumbwheel and the @code{} and @code{} cursor keys can be used to increment or decrement the value of horizontal thumbwheel. Each pressing of the cursor key changes the thumbwheel value by the current step value. The @code{} key can be used to set the thumbwheel to a known value, which is the average of the minimum and the maximum value of the thumbwheel. In some applications you might not want the thumbwheel to be returned all the time. To change the default, call the following routine: @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example where the parameter @code{when} can be one of the four values @table @code @item @ref{FL_RETURN_NONE} Never return or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end (mouse release) if value is changed since last return. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever the thumbwheel value is changed. @item @ref{FL_RETURN_END} Return or invoke callback at end (mouse release) regardless if the value is changed or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback whenever the value changes or the mouse button is released. @end table See demo program @file{thumbwheel.c} for an example use of this. @node Other Thumbwheel Routines @subsection Other Thumbwheel Routines To change the value and bounds of a thumbwheel use the following routines @findex fl_set_thumbwheel_value() @anchor{fl_set_thumbwheel_value()} @findex fl_set_thumbwheel_bounds() @anchor{fl_set_thumbwheel_bounds()} @example double fl_set_thumbwheel_value(FL_OBJECT *obj, double val); void fl_set_thumbwheel_bounds(FL_OBJECT *obj, double min, double max); @end example @noindent By default, the minimum value is 0.0, the maximum is 1.0 and the value is 0.5. To obtain the current value or bounds of a thumbwheel use @findex fl_get_thumbwheel_value() @anchor{fl_get_thumbwheel_value()} @findex fl_get_thumbwheel_bounds() @anchor{fl_get_thumbwheel_bounds()} @example double fl_get_thumbwheel_value(FL_OBJECT *obj); void fl_get_thumbwheel_bounds(FL_OBJECT *obj, double *min, double *max); @end example By default, the bounds are "hard", i.e., once you reach the minimum or maximum, the wheel would not turn further in this direction. However, if desired, you can make the bounds to turn over such that it crosses over from the minimum to the maximum value and vice versa. To this end, the following routine is available @findex fl_set_thumbwheel_crossover() @anchor{fl_set_thumbwheel_crossover()} @example int fl_set_thumbwheel_crossover(FL_OBJECT *obj, int yes_no); @end example In a number of situations you might like thumbwheel values to be rounded to some values, e.g. to integer values. To this end use the routine @findex fl_set_thumbwheel_step() @anchor{fl_set_thumbwheel_step()} @example void fl_set_thumbwheel_step(FL_OBJECT *obj, double step); @end example @noindent After this call thumbwheel values will be rounded to multiples of @code{step}. Use a value 0.0 for @code{step} to switch off rounding. @node Thumbwheel Attributes @subsection Thumbwheel Attributes Setting colors via @code{@ref{fl_set_object_color()}} has no effect on thumbwheels. @node Thumbwheel Remarks @subsection Remarks See the demo program @file{thumbwheel.c} for an example of the use of thumbwheels. xforms-1.0.93sp1/doc/Makefile.am0000644000175000017500000000354011255410173015030 0ustar jensjensinclude $(top_srcdir)/config/common.am info_TEXINFOS = xforms.texi xforms_TEXINFOS = part0_preface.texi \ part1.texi \ part1_defining_forms.texi \ part1_doing_interaction.texi \ part1_free_objects.texi \ part1_getting_started.texi \ part1_goodies.texi \ part1_introduction.texi \ part2.texi \ part2_command_line.texi \ part2_creating_forms.texi \ part2_generating_hardcopies.texi \ part2_getting_started.texi \ part2_introduction.texi \ part2_language_filters.texi \ part2_saving_loading.texi \ part3.texi \ part3_buttons.texi \ part3_choice_objects.texi \ part3_container_objects.texi \ part3_deprecated_objects.texi \ part3_input_objects.texi \ part3_introduction.texi \ part3_other_objects.texi \ part3_popups.texi \ part3_static_objects.texi \ part3_valuator_objects.texi \ part4.texi \ part4_an_example.texi \ part4_drawing_objects.texi \ part4_events.texi \ part4_fl_object.texi \ part4_global_structure.texi \ part4_introduction.texi \ part4_new_buttons.texi \ part4_preemptive_handler.texi \ part5_dirty_tricks.texi \ part5_overview.texi \ part5_resources.texi \ part5.texi \ part5_trouble_shooting.texi \ part5_useful_functions.texi \ part6.texi \ part6_images.texi .texi.html: texi2html --init-file xforms.init xforms.texi /bin/mkdir -p xforms.html mv index.html xforms_*.html xforms.html cp -r images xforms.html clean-local: -rm -r xforms.info* xforms.pdf xforms.html *~ install-html: /bin/mkdir -p $(htmldir)/xforms.html /bin/mkdir -p $(htmldir)/xforms.html/images /usr/bin/install -c -m 644 xforms.html/*.html $(htmldir)/xforms.html /usr/bin/install -c -m 644 images/*.png $(htmldir)/xforms.html/images xforms-1.0.93sp1/doc/images/0000755000175000017500000000000011200620276014234 5ustar jensjensxforms-1.0.93sp1/doc/images/FL_MCOL.png0000644000175000017500000000055311200407332016054 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p}IDAThÞíÚ± À0 ÄÀ$ðFZA…–×N)T§`eàMð`ýwfffDDÄ¥ÝÝÝk2UUUížtºg÷€?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`Íåa÷ŒÓM¥µVŽYsm%tEXtcreate-date2009-05-07T00:27:38+02:00Bðºf%tEXtmodify-date2009-05-07T00:27:38+02:00AÌRtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/pushme.png0000644000175000017500000000200511171560225016244 0ustar jensjens‰PNG  IHDRæ Ç™[Þ pHYs  ÒÝ~ü·IDATxÚíÝAr¢@†ÑÉTNÀ-ú,.Ys“^r¶¸ô}¥Y8 « ”5á½M- ‘|b—U~”RJ)ø<ÿ™¦iš&‡àQ†a†ád»®ëº®µÖZsh¶¨µÖZÏ·ÿ:9" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²AŸ{p­µÖê…‡WÇqÇýŒww‘=›¦iš&§;<Ó0 Ã0ìmÔ;l×u]×µÖZkN}HÛó'Hs²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" $²A" ´ÓŸgIß÷}߯?çx<ÇçìÉ–mmYÃö­Ã™+Y¾p\p~ô–¿{÷ögŽ÷'²ÜÁ•ÜKdy€õ«¿ëGû+·¬ÿöç_:¿1ܾ•õ7’~s€%"˶å2d—–Ö|ýüGíÉ–±ÿô)žIdùÂúõÚöIƒë$-­ózù÷¶~{ÊoYÏöýa?|»€/äÂq»Ç†û9\±r/‘å®?h?ç+S—‰¿¾}ïžÃ-Lðb²Åï&²<ÌÒ·Ö—<ß÷®a×Gd%¦ x€õ™Öõ%—ËâÊþó*¥”RÊét:N­µÖÚïp­µÖºŸñÂûüßoã8Žã~Ækº Hd‚D Hd‚D Hd‚D Hd‚D Hd‚D Hd‚D Hd‚D Hd‚D Hd‚D Hd‚D h×? >Ïó<ÏN g§‘=‡ÃÁˤí.²{øÍwà}˜“Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘Y€ ‘ú¼¼3Ïó<Ï À£|”RJ)@Â?¡CnõžcNôIEND®B`‚xforms-1.0.93sp1/doc/images/slider.png0000644000175000017500000000331011171560225016225 0ustar jensjens‰PNG  IHDR@ ¢Qþˆ pHYs  ÒÝ~üzIDATxÚíÝ=š¢X€Ñ©yjì‚ÐujÊNÙ )†®ãºw2Ø …~X÷œ¤m•_«ë­{¥­¯²,˲üx£ïû]×u]çtÀÖ꺮ëúÿEQEJ)¥äÔÀš¦išæ~û_§ÞO€ €@€ 0` À@€ €@€ 0` Ààûwºïû¾ï½x¿Éét:NùïGøz½^¯×¶mÛ¶õ%Ë;5MÓ4Ío=:ÿ¦ˆr8‡CJ)¥”ÏQd€!V×u]×ý¦#ªëº®k¯,¼“ÃÓŠ¢(Šâwü´þ»Çô°g.‚÷ ·aüž½ø\ 0` À@€ €@€ 0` À@€ €@€ 0` À@€!@J)¥Ô¶mÛ¶¯Ü|®o§–éû¾ï{çXF€áiUUUUå<¯øÈw]×u_{ÀçúÈßn·ÛíæÅøòü®î", À@€ €« a–ãñx<Ç=ŸÏçóyz©ÇçŒÝÿìž<»,°FÀðƒéôÎÀ##`5ÌêpÄùøœûí9£R#W@€a–±dÞïv#`5gRwÙEX[3Š…ý3†Y¦'Ÿß³ÅùÛ[vúR2àŒ€aÔpt»ìó°¶Ûâ²eaŒ€áïÿ`ééîWöDza?¾Ê²,Ëòr¹\.—”RJÉI€-4MÓ4Íý¶0` À@€ €@€ 0` À@€ €@€ 0` À@€ €@€ ¾s;à¾ïû¾÷ÂìÇét:N¹uv¾^¯×ëµmÛ¶ms;öÃáp8ªªªª*Ï3§¦iš¦ù”½õ•™›û÷¥”RJ)·cÏ.À§®ëº®ÛóÖu]×µWŠ|0d¡(Š¢(ö9Îø¬1:¬ÅEXÀîS‚Ã(>{?0M€ €@€ \ýƒãñx<‡÷ŸÏçóù¼Öڦ׼î>°FÀ£¦c9'¥¿cØ‚ð_ Ãö8Ö||ô~{ÙHtz©÷ìQŒ€0 ÛûS·‡}`]ü&ÃíñóÞÈ¿ÕyàñQȇ¿ÉØ»¶ÞÍÈ“@þÁØÅSÏ®aì’«9k{}Øþ‹±wg§ÿoîØ3—­í•}`ÿxÔtØžÍÞ²µ­»ì‡OÂúÁ{B»î>°FÀ@€ €@€ ü!¥”RjÛ¶mÛW 2Ò÷}ß÷ÎìCªªªªÊy€ýÈ.À]×u]—óKî xÅ=È.À·Ûív»åùbç|ìÀ>åü}ÉEX@€ €@&;c¿Øq­çïam¯leÝ=Æ0`²óøë§Çy~Ö/…ù xÉtŸMàZk›ó£Ã+“ÌcËÎÙÖý9Ÿûà ¬Åš°gßi^kmÛ­gþœÁÖGŸÎ˜L=ŽÃîÆ¦¦çŒÏ†Ïy%3ë®mz=ëNÈÏ9ǹ`Xh‹©Ýá¶{7w¸Îáäðœ=\ë¼An^²ÖØt,~Þ+…ßJ€ÉÚp"zøèز¯LçNïÏØVæLí¾ó¼ùúW¸ Vðz–ýðú§ïyvYâóà ÿ1fÝäl°á‘ÎßÖüea#`Xh,3Ë®a^v­õÖ{þìs¤æû*˲,ËËår¹\RJ)%'¶Ð4MÓ4÷ÛFÀ@€ €@€ 0` À@€ €@€ 0` À@€ €@€ ¾ÿÒ÷}ß÷N lí«,˲,x§ÿûb#«Ä–=ÔIEND®B`‚xforms-1.0.93sp1/doc/images/yesno.png0000644000175000017500000000240011171560225016077 0ustar jensjens‰PNG  IHDR@x\<`Ê pHYs  ÒÝ~ü²IDATxÚíܱ‘£JÐ?¿&² ™Ød‚I&¸`*RZcÖ J…FÀégg¥.ºûqEƒôU–eY–ÿúþù§ëº®ët쭮뺮ÿpQEQŒã8Ž£®€=4MÓ4ÍÏßÿë8ž€ 0`À € @@€€ 0`À € @@€€ 0`øÖ¼®ªªªªæž†a½ÄféÚÙ8Ûf2ÛÀlfîðävfkcéw1v­÷>7cÍd¶e šÝ9TqÅyøØÞLf[˜ƒü¼æ««K¶¼¤åc›å{|¾ýß=û»Ç×¾Úçí[.ïÃ=ÆñùvžãÚ×¼ö½Ã0aËzs‹~Ë·sÌÏÜ?ÓÅÕ%‹¨KÎíž·ßc§ÛÙv\ž¿gºCs ¯Ÿ·œ»Îw•Ãîc˜-yµ©w·Õ~Ï9:ïtý›3pìhzöö» ÓgõgŠèe΀y{,TžÁÜ’¬08²ÿõ6{ÀäøÙ9ÓWµüã‚HÑóìG³»WîR^»¯åÁöÊý´k_áÜBôÚê×ûçø±~å.ècFçõÙ ¿#€ÙÌÜWPž/™>Þ+»ÕÏlµÇ¹öÇßÖ4·÷WBbú!`ÉvæÚo5Žk{û•ÑYûÞa[_eY–ey¿ßï÷û8Žã8ê®Îu;# çÔ4MÓ4?;æ­8®Bó&üN/p-¾Ì›ºF®Å0`À € @@€€ 0`À € @@€€ 0`À € @@€€ 0`À € @@€€€ïO{ÃMÓ4McàßUÛ¶mÛêõ‹ú=¿ à]×u]gº¿“º®ëºÖêõ{ÀEQE1Žã8ަþÕ9+R¿¨ß+r 0`À € @@€€|UUUUµ_{àÈZ^R¡ªøà‹•®¢…«†aÕŠ¾L¹î×€ã}èOQ^ÑôSócÄÎ=>}vn›KÚ u8²¢ç¬­eÎÌð››–ë01WÌÓÃÁ”å2¸V-s~øbãpÉ'èÇgŸ·w ©Š^Ò^m¾Kж¼h×–÷㽚Š`[ø’Ö^=zå6®i‹a8CEó,Aó{Àaîf«¹ÇõoÉõ`5ûN,API/¹µjîà<®UËœŸ¾|AnÛR1C¶f×~£ë² 0`À € ࣿ†Ô÷}ß÷&¨_8Þ‡ðív»Ýn†Ô/¤|\·mÛ¶­õ Y®@€€ 0`À € @@€€ 0`À € @@À÷ô?}ß÷}¯S`o_eY–e©#àH$ºçd•aIEND®B`‚xforms-1.0.93sp1/doc/images/fontsize.png0000644000175000017500000000652011171560225016612 0ustar jensjens‰PNG  IHDR,9d€Ú pHYs  ÒÝ~ü IDATxÚíÝ1šœ¸Ðé÷õ ¼Ǭ‡Ø;!ôNœšu°†ÞÉå€ùê qωzÜU”¸¨õ#5]×u]÷Ïå~þüùóçÏX1 Ã0 êp¶Wþúõëׯ_W~ð×××××—°æû÷ïß¿W‡óüøñãÇŸ¯ÿøöíÛ·oßæyžçYij`ÂpžålûÊ@d‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð>kn\ß÷}߯ývÇq_¯yý|å§,ßõþéË×§´ðØ^¼·|»%éû»÷•íª:_Îp߇þ²Ÿ¸‡9xlkk¿]‹=<›¥Ñ,Ë«§={ßuFü´¢aÊ`ýÞç…9ñ³À¥f–Ûõo÷(¼³4Z¬…×Ï«J-´¶^€–F/uÍ >é[r‚°˜Ú®®K ,¦xÆuÄtù×Ó¯ü¹F<ÛG×u]×MÓ4MÓ<Ïó<+ Ï6 Ã0 ¯Ÿ2#\“²PYÏ̦­Ö<Ãð­Ør×s³ ¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@hŸ57®ïû¾ïS^9Žã8ŽËw-ÿåš¶½bNKRÞ›¾ý½-©§†Û­Êé!{ßÐßµtùÔš«œM–338!ùsÑUª¶ù5t,àz \#Ì¿ÝãzË´†¶»Ñãìö¼nmu{oÕyÛ{*se<ó¹Y&„R7zlÕ³g3Û÷m–Úë²·Û)ÂvÕ9¿¹·ËÙžÓÔ\·²'–Cá^®ž.ý:Ó±«}-£c‚Ú¹wùñ¼åMà<‚ÝÞ}sšüzªÜE^䨼píõËß>õ jx²ð¼‡Fœ:@=~°¶;N÷ÆáÚ^œÑæ½W ï½zå‘M9jǾs'ÿK½Xú躮ëºiš¦išçyžgEàÙ†a†áõ³¥QBóøÄÇ®EYtrdÖ Â? |Ž,“¥QB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð>ëobß÷}ßï}×8Žã8¾oaùïwíEN¶·s¬VÛ;¶…üö§WéŒmžwsúü5É?Êe·×3#¤˜œ‘~!ç5À^ Ì—žqþøÈöîËÞá¯T­öÎóŽíÝ“*¬U)5/Uçó*`†G‹Ì)ÀðwM%¯¯s —àl‚ð6égÙ­,…å_eTù”O®i‰äÙ!Ülíö“»®Š@¢iìaúùrÍ{ñjár˜K¹&´|W©ZµR±¶*ŸÓ¶µcwM8åŠ^G‹Ì¡:ã›åoψdw¢™»FoÞ—µÙIþ¹¹3î»*v›—í<£…9ÛÔëh‘!4㌘qEáÍj»]>G[Cj=•wS ÜKV¤Ýï )Õæ½`”ýú´*ŸòÍ2e?EBc×ËÛ® Þ¯åz©o¢¹ëmŽ}z •ÏoÕwG—=¾÷ö8ÆŒbÊ~©[ÊÖ®y´¼¶ê (ë£ëº®ë¦iš¦ižçyž€g†a†×Ïf„„îá^ùר,déúÔÌŒ€ÐÌÿÂ9;ú<›!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&í³þ&ö}ß÷}ÎÆqÇqm›ï¿­s߯iç{µ}îG­ì§ßµ_õôºí}ÙÛ”¾Zªz)×­®Ô@ÓkPK’ö‚­œ QUõ¥Æ‚ÐäyÞ¾~!§ò9s‹œ×§ÏKŽíc[½qo°•½åWlo{Œ¤sê,‡°íáom!w{\{ÍC ŽÍíÒ•íß»B²:P¶5Ük­!µ•žéxqAH’ÚfKO½Õ&e†}ÍñœGÒ¼ü!ò®áþzN à -åêÑõ׊ܯXÖÚÕÐ¥:û¤>À5»kÔc-ŠpJý}ry'pʾ´¾ÚÖÑá^ž#¤Rg IéƒãSÄô{eÍˉÃs„Aíærž,<öP|þó‹zã±½(õœå±ÞXª¶Æ Ò™RÑÒåöò]©í×_‡ŽÂ{MΈCW©›e¨N=r#–ˆÀŒ0œük?¥¾z­ì²Ûí‡9½ò™Ò¤³螤¶Ç$D µ„<ıÞÒ«ú€ ¤Ô ñõ\ÃÛ~T|»1‡øô}?cÞf.H\#læÁ[oïãÚMÿ9[8ãˆ\\JÕ§ž^ÒªVŽ5„<ÄÞyj´ÁN}`ÍG×u]×MÓ4MÓ<Ïó<+ Ï6 Ã0 ¯Ÿ]# 4A@h®f9ãÎC×fô"½®dF@hf„Yœw£AëÌMš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ BB„„öÙJCû¾ïûþ¼íã8ŽcÊ箽²-çí×±-×Öž²}òúO,ûWÐîh¿G{ûÏÙÇh» zÈ1Í!ÔàØ@³|×S‡•§]–Fá/ú…R[SÕë+¦ò¬ixFèü޳¥ ÇÊJÍTžýW°V½c‹íË?¯ng/ƒïݾq2…!üÛ8.lo'ý•¤H¯ävåkžš¹^OÂgÌÞ |)51ov:uAÿQjIjጻúkÜ5 arÏ&ï%á+—( pÇŽŽºqK£°Ê°[›ç]O5¬!PW ¤<|òþ®VöQÖ£á Ì?7ÔáÊÖ“ÖZmÛq˜R:ÿƯŒÀg÷RÌ¡°œ¡ÇÉÙvMöÖö©ßLY‚hFþ³˜÷Þtc9´N¾bÂõ´Äꯠ†:l÷Ãëãð®ÔCR˜BaéC“†+Â{µ=’Á‹Ç'`• zË¡¬„ð‡©ý›Ö÷EO«Ÿ „¿8c86×|v­D`[!•ÊþŽmÁPu¯óêïäƒ5‚*”ý_q>^*˜ ÇwÕ¿l¸²ïq6AHr¾[ä˜í`ά›kêåɇl—Ç'Šu÷ü?rŽ}Ãäy5?»=w-ÿ>£¶ò >÷£È=$!Õ)ûg–¿µ²ÿK^§AwULýYcFH¥ö~WÈÚ»ÎhOúY¶aWý©ßG×u]×MÓ4MÓ<Ïó<+ Ï6 Ã0 ¯Ÿ-š  4A@hn–¹Í•Ï–¹e½Ö˜šámœÿ¢—B ÌMš  4A@h‚€Ð!¡ BB„„&Mš  4A@h‚€Ð!¡ýçÃôû÷ïß¿+ q|t]×uBÓ¿Y&‡%C<<IEND®B`‚xforms-1.0.93sp1/doc/images/slidertypes.png0000644000175000017500000002120511200607043017306 0ustar jensjens‰PNG  IHDRlb¥mÕA pHYs  ÒÝ~ü"7IDATxÚíݽ±«H·à;_ÈB¦âÀD®¢Ø.¦Ü/ \0•Å©Bœ*˜®¡1tKM#`ñ÷<Μ‘4½@{¿›nøët:N§ÿ€¿žÿ©ªªª*ÝÀ|®×ëõzý'ˆfY–eYÛ¶mÛê¦U–eY–ÏÿGwI ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚h’âÍç%?¿’²-}ìÕ/]Ðç56MÓ4Mú»ôqEô_ô…Ìôð)¦¼rEt””ù¼vúùšjÊÚú†ìö­ùùº+·ÀÚ,D뺮ëz ;¹\.—Kß»ó¹¾uöEÍÏ˺)m^OE€xŸ“Ñ¢ÇãñxTUUUÕ²ÝÝu]×uŸ—é ŠãCéûÞ£ï´Ë÷ùùùùùùqúÀq<ÓÐù|>ŸÏmÛ¶m¹õņæfY–eYü1_(M1ßÝtS9°'eY–ey¿ßï÷{üÖÍýÒç«‘ómQÏ[箹½<Ï`‚è¿H¹ÐTkþ¼Î¾åf`[ Ííõù~¶cʾë}ŸkÚ·­¾ØiÈ.°-‚h’ô°×woÛôu}}Ì’ñ Í ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„Dõëh;\×u]×Ûjóår¹\.VõE}ÕW}ÙÏ[áç~ºÃÑÇãñxöÅÁx~îu¸ ÊqTUUUÕ:Ûv½^¯×«°ukþi›ÂOdXŠ ÊneY–eÙÚþ.µ§¿À:Ú¦ð–åfE„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡~éƨ뺮ký¤DøRžçyžë`(A¤ªªªªôŽ%`Y‚(H×u]×é€iùvÊÍŠ%ˆJ ”9¢;TEQMÓ4M“þîóõ÷åÇ,9´Í)Ûý¼•÷e†¶¶où÷OÍÑp‚(_×ï‚búú¿[[Ÿ¡ëOßîÜ-‡ý14€•š;È=×ÿùú'0WDvk2˜6E_ \öŠâ˜Ê®…Âg‚(Àn}7rÌúÇ I]ÛWCsa>†æ°0ƒcáhQÊuKXŠ¡¹üËm{–ºiPúÐâ”ý”G³À|Q€ú–æx`ÉÐ5|÷Ùï–ÚªeûŽ@`)3?68&A€Y™@7+ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„DõKÀqÔu]×µ~˜Ãår¹\.ú!… òx<‡~`+n·ÛívÓ¬ßù|>ŸÏmÛ¶m«7R¢pPUUUU¥X§ëõz½^õì• •eY–eþ~ÏÚ”eY–¥~€}s³"B ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P¿tY]×u]ë" ¢pPyžçy®ˆ'ˆÀTUUU•~`Y‚(H×u]×é€iùvÊÍŠ%ˆJ ÔA爖eY–åúÛy¿ßï÷»Ãæ8O§ÓétšoýÎßeë;7õeEQEÑ4MÓ4éï>__~Ì’é­í{÷¹Î÷6ÞÇôeÆ´³¯g†¶jh¦ôØ•‚u:ôÍŠÖ|çÀëõz½^ àüU_õ…>ß×ïbXŸ5G£ÏÑ}ª–]úvçn9,ëÐA4˲,ËÚ¶mÛv=­ÚÊÕpþ:ÕØ¢¹ƒ\ßÕ`à•Ç·¬Èçœs¬LXšvmÓz „ëiᘡÔb-{"ˆ¬Èw3 Ǭ¯CsçØßùê»þ–ôÜ5€šûÚ20† “qÝRš °I}s _ß]gËÓ©2f†Îýn‹C?åÑ,ð$ˆ¬Âç(2Çã@†®aè§R3U{¦mçTû²†JÁ: ¢ü#e^å:ï:»ž)Qþ±Å»à[$ˆ°jçóù|>/Û†¶mÛ¶U ˜Š Àªåyžçù²m¸Ýn·ÛM-`*‚(«&Àþ¢ì\]×u]ëõ`=Qvk Ãù˜Ûãñx<k¸böœÇ訛¯o—mƒ9¢0-A”2öÄQØA€U`Q`ꪪªJ?l‹ lX×u]×iɾ™# û#ˆ°jæˆÀþ¢¬šûó]@$A€P‚(¡QB ¢„D%ˆJ Ô/]P×u]×úœ¿¨/ãÐA4Ïó<ÏàüE}€H ¢·Ûív»)?ùü-Š¢(Š÷×›¦išF?o½¾Àš™# @(A€P‚(¡Ü5Ľˆæs¹\.—‹~H!ˆÀ<Çãá¦PŒW–eY–ûØgãÏçóùܶmÛ¶z#… À—ªªªªj»í¿^¯×ëU!ž À—²,˲l‹WötE¶H`E>Ïd6öA`Eúf2›ƒ{âñ-„D%ˆJ ” @(A€P‚(¡ŸÏçsÛ¶mÛê‚(_ªªªªªí¶ÿz½^¯Wu„x‚(_ʲ,˲-^ÚÓ]Ø"7+`Ï¡ŒïpèëÀ ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€´mÛ¶íív»Ýnc^¶è—.`Œº®ëºÖ@:A€/åyžç¹~†:\­ªªª*…W_Ô÷÷ïß¿ÿÖ«Î_ý Ž% Þá‚h×u]×i­új­új­;f}™sðí:”›J ” @¨Cß5·(Š¢(š¦iš&e™ç¿û–|]Oß’)˼/©[©EÊzÞ÷t辫éR5}ÿTz5SÚ<÷7þϲ1}>t/RŽ„ÏGÈTÇÀÐ}dîo¶ù¾¾«©óeîó%½…CÊOU߬™Ç· –~¢~þ2EØJ-ÔÑùÕתôw×små,KïÉ¡ šêøúKùT=ï[eYS}Œ©©óe޾Ú¹¿ë|o°E‡šûù¯þNHµ@MSöeüšUdGõwý©Ïq¾ìé|™»…óý<‚x®ˆ6f ‹_8ŽP uw~Eöƒ³ìó¶Ösœôýú8fè£ïœµ¡ñG¸óe©óeh —=2}o°N‚è`†=¨ÅT­b[çWß,ßeûÁYöy[s·ê}Víç5š»ïoª©ꚇæ:_Ö|öùÞ`[Ü5÷ÿù›–SQ-PS!¥_ûíó¯×†Òá|ÙÓù⌆ñQ€¦ŸãWÒùÓ!{bhî?ÒЏíµZÌá»›Ôoñf?G;¿>×ñóŽY‘iÏ…ïj4ÕV–:Xó7€óeýçËø¦´mè§|o°-N§Óét¿ßï÷{Û¶mÛνɲ,˲ŒÜ"¯âsÙs‹Ï»" ÿ"eð¤¿5ª)*Î} ¤Dá_ø‘£¦¨8_ô-0-7+ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„úµìæëº®ëZŽc ZUUUUÿý÷ßÿýóóóóó£ DZ@íº®ë:]°¬¥Ò™9¢„D%ˆJýEQÅ|˧¶x“¾žÈ½H÷K¬Ík lš¦išôwÖÏÑÿÇ3à¥\!|.3G ì[gú¶ÄT`\E_ˆ*¦¬§/$¿·íóÚÒ÷åu‹®Ü}¢u]×u½†¿\.—Ëåó2éqîýõ×O½ÎóüÌæ rŸÛ6Õ¾¤_%^Ï‘G–’Œ¦µ@}<Ç£ªªªª–íîÏoM û·>©M¿!P_PJûÚœ~åsèò}~~~~~~œöÎçóù|nÛ¶mÛÈ­/647˲,Ëâw8Æ´w /”ÆïËû¡ï+â•eY–åý~¿ßïñ[7Gô_¼^ý{ÿ÷ûòé÷¼ßžÈp$Sq×ÜYŒ ožç ì› š$åZè«÷094^¦Ü@è;CÛÖ·¼À |ÇÐ܉½FÖ÷aº)÷Îý|?Û1×ZSÚ–²üø–Gö×ét:NÏ)ª1·z»×›¬Y|.{nñùoCs%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QBý:Ú×u]×õ¶Ú|¹\.—‹ƒU}Q_õUßcö3Àúù‰?Ôá‚èãñx<·Ûív»­¿µçóù|>·mÛ¶­ƒU}Q_õUߣõóT•Êó<ÏóãìõÑ”eY–åš[èØÛ7?ñ¿s¸ ÀþTUUUÕÚZu½^¯×«êÀ;A€Í˲,˲õ\•ZÿuZX–›J ” @(A€PnVôEQÅë+MÓ4M3ôSïŸýnͨ/ê‹úÀþ¢ÿxþ"òþËGßëïú–¿fÔõU_õ€=14€P®ˆNæup—¿£«/ê‹ú¡?Ó{Õ0i^ ¢0¬K}Q_Ô÷ “`*†æJ¥o ê‹ú¢¾ôÕEu04÷Ïa?)³S^‡ ¥|*}ͨ/ê‹ú}õÒ?G#ˆþßÍo3+õE}Q_8Cs€ˆ À;WD€$†I0AÀ0iÆ34€P‚(¡QB ¢„:ÜÍŠªªªªJáÕõE}€¥.ˆþ÷¿ÿýïÿ»­6_.—Ëåâ`U_ÔW}ÕöápAôñx<Ûív»ÝÖßÚóù|>ŸÛ¶mÛÖÁš^ß­´ö~¿ßïwõ]êü}báÓTpþ.[ß¹©/Œá9¢ìÖš‡ù]¯×ëõªF0­º®ëºÖ°~‚(»•eY–ek»^Q–eY–ªÓÊó<Ïsý[!ˆÀó¦Pn…¥¾ÀÚ¢p ]×u]g¦â{æ;ž# @(A€P‚(¡ÌØ¡çÓ’ûžÜ÷nú3–çxóû:û¶ûy+ïË mmßòû©Ô°W‚(_×ï‚búú¿[[Ÿ¡ëOßîÜ-‡ý14€•š;È=×ÿùú'0WDvk2˜6E_ \öŠâ˜Ê®…Âg‚(Àn}7rÌúÇ I]ÛWCsa>†æ°0ƒcáhQÊuKXŠ¡¹üËm{–ºiPúÐâ”ý”G³À|Q€ú–æx`ÉÐ5|÷Ùï–ÚªeûŽ@`)3?68&A€Y™@7+ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„DõKÀqÔu]×µ~˜Öår¹\.ú! òx<Çív»ÝnGØßóù|>Ÿó<Ïó\õIwœs„ñžß3mÛ¶m«7Ò ¢ÀTUUU•~ Ïõz½^¯úæ&ˆ’eY–e®]ð®,˲,õÄp³"B ¢„D%ˆJ ” @(A€Pž# PEQ¯¯4MÓ4ÍÐO½ö»5°E‚(äßÃaßëïú–¿f¶ÅÐ\B ¢@â…Þ82Cs€Ùv À+WD%ˆ32€w†æIžÃhS²ò:ì6åSék`Q`€ïÓ2æá.졹„D%ˆJ ” @(A€P‚(¡__~Ì’é­í{÷¹Î÷6ÞÇôeÆ´³¯g†¶jh¦ôØ•‚uD6é»àú] ë³æhô9ºOÕò¡ëOßîÜ-‡eš ÀÌä^¯ëmèãŠ(ÀŠÌ`R†ª.µ¶iõÂe[8f(µk¡ì‰ °"ßÍ0³þ½Ícç«ïú[Ó24€28ÖL€É¸n ) ÍؤÏ7ÅYÿýl?·vü É¡sD¿ÛâÐOy4 < ¢«ð9ŠÌñ8¡kú©”‡ÇLÕžiÛ9Õ¾¬¡R°N‚(ÿH™W¹Î»Î®§…@ A€lñ.¸À¹Y¡QB ¢„:èѲ,˲\;ï÷ûý~w˜Âçïét:Nó­ßù»l}禾0Æ¡oVTUUUUëlÛõz½^¯Ppþª¯úÀþ:ˆfY–eYÛ¶mÛ®§U[¹Î_ç¯úß1G€P‚(¡QB ¢„D%ˆêÐo`ýÎçóù|^¶ k{ l Àªåyžçù²m¸Ýn·ÛM-`*‚(«&Àþ¢ì\]×u]ëõœ5ó¹\.—ËE?¤DÙ­5 çcnÇãñx¬áŠÙs££n¾¾]¶ {š#ºž³&þÜtu}¯Ê²,ËrÍ-tìíÛó{ÆÝ†DÙ!_÷°'æˆ)ªªªªjm­º^¯×ëUuà Àª @Š,˲,[ÏU©õ_§…e ¢À†­óïßlËç¹ÓæþÁQ`ú®ëºNKöÍQ`n}s§Íýƒù¢¬š9¢°?‚(«&ÀþüGI ” @(sD€Š¢(Šâõ•¦iš¦ú©÷Ï~·f¶H’<ƒâ{8ì{ý]ß2ã× À¶¢À!ô]•eëN§Óétrì±”?þüùóG? %ˆþO]×u]ëpþ¢¾Ìíõ×q×9ŽìÐAt Iœ¿¨ïv À«ƒQGçoÊ­SØn}€534˜Ñz®|ú3Ó^•eY–åš[èØƒw‚(äùËtÊCV^ÃgʧÒ× À>¢Àß=¦eÌÃ]ØŸÿè" ¢„D%ˆJ ”»æphUUUU¥ ’ À¡u]×u]úëÀx‚(;Q×u]×úÖO`óò<Ïó\?ÀV¢p Çœ g úk#ˆÀmΛ9~ÀÜ|Ï|Çã[%ˆJ ”9¢ (Š¢(Цiš¦I÷ùúûòc–Loíçm½¾>_û§Ú‹ô}I©ÎÐÞNß»iëë!ˆlÀwÁõ» µæöO»õi{cèúÓ·»ž:ÂT Í É3ö|¾š7fÍKíÑ{ ¶ÎQ€ÅÌQR£n±†îE_ \¶7Æ Tv-”­DóÝÂ1ë?¤ó5ÔÅ\QœomËp54—#34€38ÖF`°ig?î5(ºn } ÍØ€ÏÁoýQç»ö/5Gô»9™C?åÑ,™ °€ÏacŽ~ ]صÍ×þùú|Ì2ßãø:Âz¢•2 vÍgëí‡#Djë!MÈ„ír³"B ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P¿tG]×u]ë€i].—Ëå¢Ò ¢p ÇãñxÜn·Ûív„ý=ŸÏçó9Ïó<ϳ×GS–eY–kn¡coßžß3mÛ¶m«7Ò ¢l^UUUU­­U×ëõz½ª¼Dؼ,˲,[ÏU©õ_§…e¹YòHù‡¾Œ!ˆJ ” @(A€P‚(¡QByŽ(0@QEQ¼¾Ò4MÓ4C?õþÙïÖ À ¢@’gP|‡}¯¿ë[füšØCs%ˆAŠzàÈ ÍfgØ-¯\ ” ÌÈ@\Þš $y£MyÈÊë°Û”O¥¯€}D€¾{L˘‡»°?†æJ ” @(A€P‚(¡QB ¢HÛ¶mÛÞn·Ûí6æu` Ï`'꺮ëZ?Àú ¢l^žçyžëØ A¤ªªªªì5ê ,K€麮ë:û 0ß3ßq³"B ¢„DeŽ(@’¢(Š¢hš¦išôwŸ¯¿/?fÉôÖαݔå?÷FÊëï[Ioy_{¦êÛ¡-ü¼•”}ÿ®"1ýßDfñ]pý.ÌôI_[z8ºGSõ[zËÇ÷Æ´-üÎÐõÇ÷Œah.{FšÏWêžÒ#ÐúcÒÜ-LïUX?WD˜;¤ øœcmÓnwŒ¾¸5f¨ð´û8´…Ë™óõŒ!ˆ ðÝ<½1ë_ÏÐÜ1^×–²æ5Í鱩ŽÌõ·œc:\­ªªª*…W_Ô÷÷ïß¿ÿÖ«Î_`>}±ós](Û`¼ÃѮ뺮ÓZõÕZõÕZ=¦¾À¶À쉡¹³ø|k™˜81ílÀ˜=šoŽèÜ•vþíÐOy4 Ûò×ét:N÷ûý~¿·mÛ¶íÜ›,˲,ËÈ-ð*>—=·øü·+¢›‘rK$WÀô-¬ß¡ƒhÊ8û÷;¼õ-ùþ¸çï–y_R-¶R‹”õ }8xú2j:wMÇ<ê}Ì-õ§úfØ÷Y6¦Ï‡îEúUúŽ©ŽÃðŽI}õ-ìƒ+¢ƒMukì¡Q„­ÔB_}­Jw=GÑVβ1£ø®FS k{ÄøÏ‘wþó_ýý W Ô4e_ƯYEöqTןú€crEt°1ÃüÂq„Z¨»ó+²œeŸ·µžãd¾»€úÎ`‹ÑÁ —R‹©ZŶίÏ_ßëQ´•³lÌÐÜ1ÞgÕ~^³¡¹ðt衹Oï¥ö#\-PS!¥_ûísch7l— 0À´óE…à˜ ÍýGúÀ*·ËW‹9|÷P‡-Þìçhç×çà:~~à1+2í¹ð]¦ÚÊRÇ,ë¯Óét:î÷ûý~oÛ¶mÛ¹7Y–eY–‘[àU|.{nñùoWDá_¤ žtBMQ ÿ¯¿jŠŠÓr³"B ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ ” @¨_Ën¾®ëº®•à8¢UUUUõ÷ßÿý÷ß??????Êp Ѯ뺮ÓõËZ*™# @(A€P‚(¡QB ¢„D%ˆJ ” @(A€P‚(¡QB ¢„D%ˆJ Ô¯×ÿ©ëº®kÀ|þ:N§ÓIGã§wžÓclíIEND®B`‚xforms-1.0.93sp1/doc/images/FL_COL1.png0000644000175000017500000000055311200405667016031 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p}IDAThÞíÚ± À0 ÄÀ$ðF4Ö×N)T§`eàMð`ýwUUUDDÄ¥ÝÝÝk2effîžtºg÷€?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`Íåa÷ŒÓM¥U¥ê¾c¬*%tEXtcreate-date2009-05-07T00:14:15+02:00×Ù%tEXtmodify-date2009-05-07T00:14:15+02:00LfwítEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_WHEAT.png0000644000175000017500000000056511200411112016164 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p‡IDAThÞíÚ1 €@у 嬅t%(ÏØz¢ &a* ™§àgê¿dffFDD4ݨªªÚ®LÇ1FïoOú®}Ÿ³µõíb,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀXÀâ1ä‰ëra8çÖuí%tEXtcreate-date2009-05-07T00:42:18+02:00I¼%tEXtmodify-date2009-05-07T00:42:18+02:00QøÊ(tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_GREEN.png0000644000175000017500000000055411200410200016147 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p~IDAThÞíÚ± À0Qœ•X˜’™œÂu¤\EºWüŽ–UUU•™™z033ÝÝÝ{G¸O{*]_ßìOŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ X>†¼qCnž@t ªx7%tEXtcreate-date2009-05-07T00:34:40+02:00Qc™Û%tEXtmodify-date2009-05-07T00:34:40+02:00ÒïïtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_DARKTOMATO.png0000644000175000017500000000057111200411050016757 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p‹IDAThÞíÚ± €0 Q@ŒM<’`RFÈÞ‰"5ÅU Ò½ ¾®µ÷ÌÌ̈ˆˆMªªªÎ‘©µÞŸgö¤uE\×}³gü‰±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cçxy·üÙcÖ5*½e7¾·Oß%tEXtcreate-date2009-05-07T00:41:44+02:00j>c%tEXtmodify-date2009-05-07T00:41:44+02:005;tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_LIGHTER_COL1.png0000644000175000017500000000055411200407505017201 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p~IDAThÞíÚ± À0 ÄÀ$ðFZA+hlí”Bu VvÞÖgffFDD\úÐÝݽ&SUUÕîI§{vøcÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆÖ\vÏ8ÝTz_¤Yü^Ã%tEXtcreate-date2009-05-07T00:29:25+02:00ñDë‹%tEXtmodify-date2009-05-07T00:29:25+02:00®õ¿tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_DARKORANGE.png0000644000175000017500000000056211200411157016737 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p„IDAThÞíÚ± €0A@$Ôó-|O¦SÜ÷Dà‰ ÒN§oÍÌÌŒˆˆXô ªªj™z?Žëš=é»Î3¢µmöŒ?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`õòÆ8†Ü†Š®Gœ%tEXtcreate-date2009-05-07T00:42:55+02:00ëÔÓ&%tEXtmodify-date2009-05-07T00:42:55+02:00´e¥tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/labelframe.png0000644000175000017500000000337611171560225017051 0ustar jensjens‰PNG  IHDR@´:¾ pHYs  ÒÝ~ü°IDATxÚíÜ=’ªÜÐ{nõ˜a£C;u¦„΄Ã='Ðc¸7°ÊÒB6¬•|}”ß×7à÷¯®ëº®ÿÌèãòŸ¶mÛ¶U˜Ú~¿ßï÷ÿપªªêû¾ï{¥€)4MÓ4Íåïÿ*ÌO@€€ 0`À € @@€€ 0`À € @@€€ >”àY»Ýn·Û]þ>N§Ói}k|¼Þëׇ˜s›uà’; ¸f „í®¨ÛaÌ(ÆO>5à58àñ7ý!'ÇÛ%¼6×ðy§Ø÷Ëz_»Ð}»Í—|;ï³5œ®zã—Ÿ§Xò³—û†,áñåÖ×Ö2{Õ˜¢JÃß¿zc>Ó1óN·¿÷¶ê];‡Ã¡¬sÓ¹œ±??????û¾ïû¾”-/òpUUUU•Uèkkº7ݽ:—+¹gº¯È”¨iš¦i~~~~~~ÊÚraÍêµ ¡ïRʃ-Ù*•^=û ¥ðVÌ».„¤{ó.ùW˜Ë‰éª7ÅgšÝß; æg<Êkwé†Ïûìz‡Ü\‘Þ[áéLW½÷.y [õ®=ò3$¶ÃxVÃ;zöä5æ±£¥ìÆWiží_½ñK~­¦Ûª×Þ·lÓ¿º®ëº¾Ü¾^þcM×7ÛË} ²ü¿ Y“²rá²µ—¿€ @Æx –CÃF¹ø Yž‚† º°FÀ € @@€€ 0`À € @@€€ 0`À € @@€€ 0`À € @@€€ J0¦iš¦QnÇãñ¨'Ñ“[#€gÕ¶mÛ¶êÀÅ~¿ßï÷z=¹MxVUUUUÕ÷}ß÷ª±eË}êI–Ö“Ûá0`À € @@€€ 0`À € @@€€ >” t»Ýn·Û ™òt:N'^UÓ“K«¡Š­‰°CúmK~¼ü!Ó¬»JèÉñ5ÑŸkb¼*÷¾_´Æv÷*ƒž\Z7^×DÅÖGoÂå@½6ׯ9]Þ;)Ü;5 ™æÞºn÷bȶ¹|§'KïÉÛ×/‡¹½ ¥´ã/¾=»„Ó Ý¢'³=Év¯Êƒù½1sû­|È7÷ÛiÞ{ñmÈòÑ“KëÉÇKÐÃëcÌâÜ;]¾6/”Þ“ÏF5¥0^ùiâööøz²¢wÝŒ€7ÁA‹ž,‹èݼуyžyßµFw¿ôävzRôn‡KЫ2þ—ñ§•!—o§¹}(ÆO‰ôäÖzrȲ kb¼!ÃqøìA>Ï4N7zRO²&FÀÅ{×) ”SÞÔËtJÕ“©žÔ{[c 0`À € @@€€ 0`À € @@€€€%˜_×u]שz¶LÏêëëëëëKГ€žÉñx<ꀞ.Ü€ 0`À € @@€€ 0`À € @@€€ 0`À € @@€€ 0|”»é]×u]ç# D…pÛ¶mÛþýýýýý‡Ãáà# D…ðù|>ŸÏ>6®•˜î@€€ 0`À € @@€€ 0`À € @@€€ 0`À € @@€€€ët]×u¢ÀÔþÕu]×µBÀœþ†ÏÚejИ»IEND®B`‚xforms-1.0.93sp1/doc/images/FL_DARKVIOLET.png0000644000175000017500000000056211200411314016761 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p„IDAThÞíÚ± €0A@$Ôó-|O¦SÜ÷Dà‰ ÒN§oÍÌÌŒˆˆXô ªªj™ŽãºzŸ=é»"Z;ÏmöŒ?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`õòÆ8†Üƒz‘¥%tEXtcreate-date2009-05-07T00:44:28+02:00ØË¸%tEXtmodify-date2009-05-07T00:44:28+02:00Òi½ŒtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_CHARTEUSE.png0000644000175000017500000000056211200411252016641 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p„IDAThÞíÚ± €0A@$Ôó-|O¦SÜ÷Dà‰ ÒN§oÍÌÌŒˆˆXô ªªj™Ž£÷ëš=é»"γµmöŒ?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`õòÆ8†ÜƒzŠoë˜%tEXtcreate-date2009-05-07T00:43:54+02:00¢a³¬%tEXtmodify-date2009-05-07T00:43:54+02:00ýÐŘtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/thumbwheels.png0000644000175000017500000000440011177120377017301 0ustar jensjens‰PNG  IHDR@úDÕ pHYs  ÒÝ~ü²IDATxÚíÝ1RêüÀá{Š`¡rÆEЇ–±w”:CÃ" R:CÏ q¨aT.à+òÜaô&ù^ÄçiGåó#$&²,˲ì?Àý-ÿ™ÏçóùÜ8 m£Ñh4ýàn·Ûív×ëõz½6hÃd2™L&ååÿ\ž@€ 0` À@€ €@€ 0` À@€ €@€ 0` À@€ €@€ 0` À@€ €@€ ü5‚êò<Ïóü÷Üߢ(Š¢ð¸´A€k˲,Ë2s …·  €@oA×6Çãñr¹\.—·wï6›Íf³ñ(´Í0°ÜÐ`0 ·w¿¬\†5`` ¸¡~¿ßï÷Í€f¸¡Ùl6›ÍÌ€f¸¡——————ÕjµZ­né~Ù p¶@€ Ø +I¯×ëõzæ@]œd¿ßï÷{s .Nr«§d mœäöŽíï€.ÃNX@€ €@€ ø3¤$Ž„@3œÄ‘°hF€“8ÍpG ;a@€ 0` À@€ €q$q,hšà$Ž @3œÄ± hF€kët:N§¼<‡Ãá-Ý;Ç‚¸ ;a@€ 0` À@€ €@€E™¤Ûív»]s .Nr8‡ƒ9P—'Y,‹Å¨K€“8ÍØ 0` À@€ €½ á_yžçyžeY–eÇßn·ÛíÖ| Ö÷¿›EQEñ³î‘5`~¤×××××ןûó[†³ý’÷ûý~¿obÐÌÇÇÇÇÇÇWŸN§Óéô–î¯C%Ëår¹\ƒÁ`p|¹ül™ÞrñqúÙSu¯ª×ëõz½ý~¿ßï›ÝB©Óét:ò¨æå¡UË㻥d¦îmÞÝÝÝÝÝ5»ýÑh4æóù|>?ïã^ý»ìv»Ýn×ö”ªßfús#ý™VýyÞ?2›Íf³Yùñòú·úÒV€k;^LÔ]d@É6` ÀÀ[ÐIœ€f8‰óÐŒ')÷Š4êà$müÙC,/).ÃNX@€ €@€ 0` À@€ €@€NÆÄù€hF€“80Íp'ï Nâ|À4c', À@€ €@€ 0`àHXµív»ÝnWž†¡¼l&Ô%ÀPÃãããããcyùíííííí«k~ÿÙôë·q íÝZ{·yìááááá¡íç@Ûßåú'Ÿrk)¿Y–eYvKˆÿã8ºç"Àð?¶Ûív»5¸þßÍŸþâX€“”[‚Íá6EQ…9—!ÀI‡Ãáp0êà$‹Åb±X˜u p’áp8oém6›Ífã‘h›Ã™åyžçy•-ÊU®Y^çø#u¯ÿ•”mÞÕ¿ËéwL™O³¯­þUՆ곭þ(W¿Nú ë>CRžW)ó¿m Wçxa÷Õâì«Ï~ÿñã[HY,~õU×¼¨­û³}Ÿœï'pýÉ9ïãN3E WªY\Sn™öµ¯œ®×šáï!ÀpEª¯9Yd×U}bç]M¤¼…{«~ t³åØ ­ˆ]7m¶ýò7Ìçû˜êîÜ;ÛôµêºÏë^ý, ­HYˆ·ýݯa--v>íýü_Íö4ü§×¬rsÍÐNX×À[ÐðëØ~|:s½(1[ª`¸"Q; —'Àp¥¾Ê°5×ï'ÐlOòs½”©²•´ÊË^`ý¶ÃÕùþDÊßgø2óùé»#Õ=žWÊWÝÆÄÚð'˲,ËÞßßßßß×ëõz½þÍ¿ØUž²ååþþþþþ~·Ûív»[ºOOOOOOååçççççg;À¹L&“ÉdR^¶œÄéhF€“8!·¡îveoƒC:Nât„ÜA…˳4°\Ûççççççée¨Î0` À@€ €@€ üp’^¯×ëõÌ€º8É~¿ßï÷æ@]œd¹\.—Ks .N2 ƒÁ-Ý#'c¸ ;a@€ 0` ÀÀß'q(Jšà$E @3œÄ¡(hF€“8%ÍØ 0` ÀÀNXIúý~¿ß7êà$³Ùl6›™u p†@3¶@nhµZ­V+s oA7d÷+RpCv¿ …×6N§Ó©9Â6` ÀÀ[еÇãñx|«÷Îì—!Àµu:N§c¤àÚò<ÏóÜH!À5EQ…9ÎNX@€ €@€ 0` À@€ €@€ 0` À@€ €@€ 0` À@€ €@€ 0` À@€ €@€ 0` À@€ €@€ 0ø{üŸÅb±X, Úö'˲,Ë .é‚–G€\ºIEND®B`‚xforms-1.0.93sp1/doc/images/gravity.png0000644000175000017500000000557211171560225016444 0ustar jensjens‰PNG  IHDR@ú€&BNbKGDÿÿÿÿÿÿ X÷Ü pHYsHHFÉk> vpAg@úR®µæ ²IDATxÚíݽN2yÀáñ•………tö&ž†•¡…ÄÒ˜x–ž ±4J á8bbak‰`ûlóβ‹;™æã¾®†‡áÏ“¯zy@“½¿¿¿¿¿/Ÿ}}}}}U½*€¸îïïïïï—ÏÿWõ‚€ö˜Íf³Ù,I~~~~~~–éëÔƒJ3N§Óiñר†¶–Nø‹Åb±øýóôu“@€z€ÀÖŠNøLêAË›ü­2 ¨llÓ‰žI @µ °¶u'«Lª%µ•5Á3 ¨Æáö»¢‡Ãá0ûç£Ñh4-Ÿ÷ûý~¿_õªH™#‚€Á@€` @0 ŒF#‚€Á@€` @0 ŒF#þ¯×ëõz½åcÕëØPÂؗêЪ&06 ¯Õ÷M&“ÉdRÞöû&Ö«ÛÄ-+ë¶N ½œ´VVP¥Vt2·ºPšNad_Y‡húšBd´…FadMì¶ä9ô 4Z+ïjÛMÃOàM'ÖË ¶²‚NMá>€@û Á]­ ,&€Á˜”wci€¦0ØðšÊ  Á´… @0 ŒF#‚€Á@€` @0 ŒFsXõ€$éõz½^où|2™L&“ý}Þª]>Õ2€@òÂoÝíh&d]:éËšø Ávrö`Û*zˆ¸èvy¯ ¿v3€RÔ‘€Øôk–ÕíW÷Ÿ7ù+ú¹‚5{°î¡Ø¢Ê ¶¼`¥] 4H^­lÂ/& ’7ñÛö6/Â/{\ÛÂ5ñc0˜ô/~Õ'ùVýù»–w›–uÿ,z‘GÖöE'‡Y´‹d¯üCDSö9{P7‚f'„À¿m‚ECqWWÓ.°eêv§y ~`KÔmâæwJ@}9°áêv§y þ`ËÔýNó@õ ÿÉUkÐ^ÿTÖæ€ú€-S—;Íõ%®nwšêO¶„sö€¢Ü°eª¾Óü®Þ”Ç ŒF#‚€Á@€` @0 ¦nooooo“d6›Íf³òö+jj±X,‹$yzzzzz*/ @C”„ ¡6 Âê´×ÇÇÇÇÇG’ŒF£ÑhTõjÚo5_^^^^^’äààààà IÎÎÎÎÎÎJœ¦¥™–'õ´ñ0 ¾ét:N—Å º¸¸¸¸¸H’~¿ßï÷«^ @ó¤UT§Óét:IÒív»Ýn’\^^^^^&Éýýýýýýr»Â(øê%+øòd à¨—MƒoÕá÷÷÷÷÷w’\_____'ÉÛÛÛÛÛ[’üüüüüül¾@'}C\éÅé!`6SVð­r0PXv©¬ÀK_ÿüüüüüü}î ÏÃÃÃÃÃCÕ«hžáp8Ëßïáéééééi’ŸÏçÛvÒ7´Ïêd?ïïy~¯¯¯¯¯¯U¯¨Â`0 U¯‚U™ÀtĘ>:'ØÔÉÉÉÉÉÉò0ö3ù¯·Â÷LC0EÞÜÜÜÜÜ,MÐ Ÿ˜7! žJ»d5¨§Ò~Í ‚€Á@€` @0 Œ¦´A°[½^¯×ëåo7™L&“Éúû+ú¾ªö ”Ǡ抆ߦÛóo韟?GÚÌ ¦²$k¢¶º}ú|ß8?¨?Ðya•þ|ÛÉÕºá™÷þ¼÷å­wÝ ÜtYï«*¤a—¨™²=Ý_Þvu]×®¶ƒ6€5·îäiÛIUúþu'eEeM³ó>7obYô{dmgòG9 @’$ù´«ÉYÙûrÏ æ\ ”Í fÊž¸Õ}òU÷õA™4Ä®/ÒX÷»]¯Õûñm{‘Ǧûƒ62¨©¬I`Ù¿dUÙ·e)ë{­{ŽbYßÃm`h#@€šÛ×UÀEï3¸ïïµï턘4ľ¬é¿9¤¬ý AÚÌ @)\TÍ!Ø ‡P¡¾œ@)4‡ @0 ŒF#‚€Á¸ °7ãñx<W½  °sWWWWWWU¯€”væááááá¡êU°Ê9€Á@€` @0 ŒF#‚€Á@€` @0 ŒF#‚€Á@€` @0 ŒF#‚€Á@€` @0 ˜ÃªÿÔëõz½Þòùd2™L&ûû¼U»þ|¨‚ !å…ߺÛ@“@BÉ ºtÒ—5ñ‚´‰CÀìÕ¦!µî¡á¢Ûç½.üh#@öBH@}@vjÓC®YÛçí·è~Ö @›@öjÝC±ëÚö*â¼`€6€4JY“ÀU€H ¡ ?"€ìUVpm;ÉÛö*á¢ï€6pv*ëv*Ûߦ·iÉÛÞo @ö"/œÊ +ùLÙ«}…`Uû€&0ÆFqñlÏF~°>@EðÀöL‚€Á@€` @0 ŒF#‚€Á@€` @0 ŒF#‚€Á@€` @0 ŒF#‚€Á@€` @0 ŒF#‚€Á@€` @0 ŒF#‚€Á@€` @0 ŒF#‚€Á@€` @0 ˜ÃªÔÇííííím’,‹Åb‘¿ýt:N§¿_ït:N'I†Ãáp8¬ú[°Êø[·Ûív»õÙ»!¿]^^^^^.'xëJß—î€z€À/›NðLþšA¿¬; 4ùhd*:Ñ3ùhdÊ›šü4“reMøLþšI¹Ò ßÑÑÑÑÑÑòÑä ™~Ýz<Ç㪗ÔÑññññññò¹/šéàüüüüüüÏŸªÀ~ü_mäxŽÿtEXtps:HiResBoundingBox320x250+0+0QšÃtEXtps:LevelAdobe-3.0 EPSF-3.0 @Ër5IEND®B`‚xforms-1.0.93sp1/doc/images/FL_BLACK.png0000644000175000017500000000055111200406557016144 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p{IDAThÞíÚ± À0 Ä@;+ií¤)µS ×ÌÊÀ›àÁúgfffDDÄЇîîîQUUuzÌíV¥çôŒ?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`z Ù±Ž!/ƒeý¦alk%tEXtcreate-date2009-05-07T00:21:35+02:00.9«á%tEXtmodify-date2009-05-07T00:21:35+02:00qˆÝÕtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_ORCHID.png0000644000175000017500000000056211200410705016270 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p„IDAThÞíÚ1 À0 Ñ´ #S0‚am2AÐ!s†›ÒJ÷|Ýj_™™™MUUU}ecÎç9=éË"Z»OøcÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆúzyX·|í¬J/ëð¦Šì2L%tEXtcreate-date2009-05-07T00:40:05+02:00§Á %tEXtmodify-date2009-05-07T00:40:05+02:00øp{KtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_DARKER_COL1.png0000644000175000017500000000055311200407544017055 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p}IDAThÞíÚ± À0 ÄÀ$ð4jµ‚Ö×N)T§`eàMð`ýwUUUffæ¥ÝÝÝk2EDDìžtºg÷€?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`Íåa÷ŒÓM¥À³¢•±"ý%tEXtcreate-date2009-05-07T00:29:56+02:00Êiø%tEXtmodify-date2009-05-07T00:29:56+02:00•ØŽ;tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/folders.png0000644000175000017500000001300411177121273016404 0ustar jensjens‰PNG  IHDRÍ#ùû pHYs  ÒÝ~ü¶IDATxÚíÝ=²âVÞàjlÖáÌö*n!7tä%‚3ª¼ˆž‚hœ1¥Ì[ð¨ßÝQ£ ‰ó×yžè6 ú8â§Ã‘ôùÛ·oß¾}û¡,—Ëårù¢(Š¢PÄòÓO?ýôÓO_ªT¡öt:N'E@Ê6›Íf³©þþ‡â .q€ÀÄYgLœ 0q€ÀÄYgLœ °/c®l6›Íf3…ž¦²,˲T›ê ­µÌÐõB¿F],‹ÅBq§o_£6ÕZj™~ë…! >:[ïNEQEq:N§“¢Ò-W«ÕjµR›ê ­µÌ3õÂpmžêNé»ÕñÔ¦úB«@-óX½0´‘&èNS¢6ÕZjÒáÎ&Θ8 @`ÉÅÙeÓ®’{÷·{™¼¶ôÒ©Ç~×>úºw]Ïl›^·ß»wCom¬cZúµ<¾9íÞÇ-_ÒܬÃáp8Ú›é­÷tiŽÍÏ>³Ì~"·¶­½dR>¬Ü»_}ÕÅpu:Õúšž1ûõ´[…6¯RîËê…`“ ¦Ýoí]_{ýªÒz¿^USª¯j]ÝG2|%äÖ‹§Ý—Õ²Þ§^¢Kttö^ÝÏÛšï¯ÿoûØm—Æ}kÉ]Þߥ#Ý»§CŒzwê«.Ú—óü’s®¯ö>Ø¥<ÖoÕïÐm©½_w©åè­âÞ½ëÞBº—À½ÇÏ{—ð̺¦Ý÷ŸùF{þ°ý»Û1™º`£³Ï4¦ú§ºüÝl܇šöCa};»¼¿ß’gÝ˼û¦¾ê¢}9퇰qÊ0ÍúêÒª_[z}µ~ûu­bœýz¾-u_Âø½>n-ß»Íýîã½Çs½/O‰ÆÙ[¥óÓRû–Üûþñ·püÒ»7Ú¶/gˆ=½µä!J2Íúzlnèzn]Ï÷ë|zñ˜ûõ|9<ÓJÕr 5˜þ>’š—‚idquKkç\9M)߇´%˜¶`sgï©F”Úìòþî×®Òo/ëëšâçi ÑÚ•Dç1 /6í+ʇˆã—À­K¦W_Qê%Í˧Ú*îÝ»”÷å™-Ô÷§Ñ>ÕËT…¼¬ûÿöuxnÉ]–ùØI:_-ÏìWʵ<ÕúªÜûKÈó{Ô} }•Þµ0íVÑo_N¹-åÜ÷ǯÁáz´zÉG¢“ ڛѭ)ÛÍÃPûuê¯ty½ûfîÕ~å½· b Çܯ{ë¢ùz{¶¯±ËvNµ¾ž©åîõòØ[טýzÚ­âù½{¦-=V†íKxl]úþ½õØåXúÌw·z¡òùr¹\.—ê§Óét:õµèÅb±X,†X2é>Ò¶ßï÷û}õ÷jµZ­VjS}¡U –ûÚòÜêE«Âf³Ùl6ÕßæÎØDž Æ-Ý õ…VZF½D!ÎNœî§¾Ð*PËöÂM›É6à¥`³Ùl6›)b_QEQ ѯ‰¢~1ÊÛÛÛÛÛ›2RS–eY–}v¤KÁê_¨PW¤Ï|îljÁ˜ž9ßeê·Ò€Ôôd+æÎ˜8 @`â,‰³&Θ8 @`â,‰³&Θ8 @`â,}QTf³Ùl6Ky ˲,ËRMuFgø®(Š¢(RÞÂÍf³ÙlÔPgt€ªP{:N§S:[%È’›ý~¿ßïÇY×jµZ­VqËJœ gí_ÃÑ¿8açóù|>Ïçóù|>ÜZÞßßßßßS;}½—8›©år¹\.믇Ãáð̧šÿ{ïòi¨¾†›¯Çãñý‹ÆïMÛív»Ýö»äÅb±X,¦QJâlvªÐÙ —·^ïþ©öÏ*yNO×ëõz½®^Éç—q–µGä¾–¯œ¡/—Ëår¹¤¿)ô}¿8A:ÄY:©Üݧ( d€Ê­iÕ,öÆhݨ‹Nš“ n\àUò¼ÔRœ¥gÆe`õqÙœ/²4Ù€À„fÐ÷¦jŒv_3íQ[q6;ÝgÁ6'/èâùçxMuŒVœàƒúS…ÒQ=¹þÖãsAßÌ™8 ÀwÕ—)ÜäyOMЃډ³8»ÅcLœ ° N6hÞê¿â~¨Óct€ÀÄYgLœ 0q€ÀÄYgLœ 0q€ÀÄYgLœ 0q€ÀÄYgLœ 0q€À¾(ò±ßï÷û½rÈÁjµZ­VÊ!FgÈÈù|>ŸÏÊaÚÞßßßßß•C>ŒÎ*Ôn·Ûív«4¦d±X, 壳@'¿ü²\.—ÊÔˆ³&Θ8 @`.Ãmk $7!¨Åmk 7!¨3:ËwU¨Ýív»ÝnªûX–eY–ꚸ܄ Iœåƒ¢(Š¢øí·ß~ûë¯éíÝüñÇfãN“0%&˜8 @`â,‰³&Θ8 @`â,‰³&Θ8 @`r @Ö~ùe¹\.•Côûý÷ÃápP;ygÈšÔ]d•©1Ù€ÀÄYgÌÜY~௿þúë·ß”>q–®×ëõz}{{{{{S@úÄY>ív»Ýn§ }Õ gQEQ( €Š8˧²,˲T ÏDäR0gLœ 0q€ÀÄYgLœ 0q€ÀÄYóT0€f³Ùl6{~9Ó{² ÑY3: @QEQœN§ÓéôØ6›Íf³Ùn·ÛívJ%ct–ëë§ OFgĽ!µûû§7ãx†8Kî ¯_¿~ýúõkóõÝn·Ûíî]—€ 9gyP{„},b¶êÖ믋¶q–; a»k.¿¹=¢-ä&Xœíò£ö·oß¾}ûvï’EŸÇJþµåV_û­h«f`Ú‚ÝÙ ºEÅK®n]¡A4Ýš«šZL¼µUîœÓr²Áó÷]«d›¢_nUmm}/LB`‹Åb±PuæÎòÁ”îpk*Â~¿ßï÷«ÕjµZ©qbùùçŸþùgåP'ÎòÝ´o€UíKd«W„Z"zæ™^SýEÚSÁø©þ/¼Àô%»y¥U¨Ý׈¹Daîl“8›5HU„Z¢0w¶IœÍ”ÛWÕÇh«W„ZÒgîlSà8["<#çqÙf¨b gÏçóù|þ׿þüóÏ?[¿ÿ}¹\.¹ Ú§0.ûÌ™åÐŒÑ2sg›L6Èš TŒÑ…¹³MâlFÌ—íÎ-i2w¶)pœÝív»ÝîŸÿ|| E‘og0.Û4Îí˜'͇ý޳Æ)s¿½½½½½M»¾ô} ºÀqöù±C9ã+Š¢(Šëõz½^‡^Wu~<Çã˜k¬þžÏçóùõ¢jÍ…KœàDXr ÚNƒ8 Àw",9mãgø´ßï÷û}õ÷jµZ­VÊ„œU¶Þ/H™8 À‡+Ú’3í?"q€D[r£G'Îp“hËTiÏS"ÎòƒŽ Œ/ý/Ôf´u‰ ±¬×ëõz¥ÇÑÇ(ðÝù|>ŸÏÓØ—÷÷÷÷÷÷)íÓVµØXÛ, <¦zÔjó4àÞ×y¦Ýj½Óct–ª÷ÐY=ÀpJ{4´ážðä6OµØñùeFIª¢g!kEQEQõ»äê®N$RVÿáõyóù|>Ÿ×É'@¤¼§U½äæ†nç¤@œÈNu3ÄO®Õ2‡[>¤ÐµíÔ˜; |Pýü]"Îc¯À8ŒÎò år¹\.믇Ãápï§šŸ}lÉ@žÄYîVÅÍfļõzÓ­÷<¿d 7â,@Ïß‹fª÷œ1w–XÖ( Úׯ_¿~ý:Õ½3:˨L$€ÇT·V¬þ~ì‹S½…¢ÑY€`º?„%‡;ψ³ŒÄÔxÆó¼™ê£mL6ànÕÄ€.·ÓªO$èò©îK€ŸÏç}-íóår¹\.Õ?ªÇ£)bR¶Ùl6›Mõ·¹³&Θ8 @`â,‰³&Θ8 @`â, øÛÙl6›ÍñøÊ²,ËRù¿¶üõ#õ¨6S«MåŸO_#7ÆÙ¢(Š¢¸^¯×ëUA©zNÆñx<ÊÿUå¿Ýn·Û­~¤Õf:µé¨˜O_kr2ó*㜮|zÕáÛãsÇ<((ÿtÊ_?Rj3µÚTþùôµf½;™yU-}ºò%N<ÎÉ̘Æ<]q)‰³&Θ8 @`¹l¹\.—ËÃáp8î}g÷Ï>öþi«J£þÊ­’QncÖÂ-ý–¿ÚϧÿæÖk¢—ƒ§EåÆ xªÓ6»hûÿ2œöÒ^Ö‡xÿpåÜW]ëÅõ¨fKpDTœ]vÐ}iÍÎÙ~ȸ÷ýÑ5ƒ~—Vª¯jÿý–³Ú×ÕH÷ÒhˆgÚÿ½eÞe8¦Lûªkmf¸²rD­›Ôdƒîw6bí9Ÿkv9wzíý –Oûoß÷gZ¯ÚϧÿQ{¦4b•^_[«ÍL¯NÓdîlo|MÖËÁ!,åzî]íO»ÿ:Ê=V±NúÝÚöRÚl6›ÍF[J­ÅFdî,wK?¬´O“Gí«Aåpo[z~i}-ç±ìrÙ[Ëp-Š:qöŽCFûAäÖû§úåÑå¸1káÖèc÷£µöî­WíçÙó9ÊuÙ£ç{Íc¥ýÚcÂÐÇ–Üzܘ5>íº0Ùàn]Ñ~SŒ[Íbz_¢]®|®¦Zª©µö[å¬öó쿵“ôoÿØ´ŠgJãÖwJó*õ.Ë¿·œ»œà=³µõwvÙ‹éM6§E9¢6}¾\.—Ë¥úÇét:N}-z±X,‹!–Ì-õCÃñx<ÊÿUå¿Ýn·Û­~¤Õf:µé¨˜O_Óûr¨ßúòÃÎöuE6Õ¶rÖþ`8á㬯d¥­F”9s)‰³æÎ@Föûý~¿WS2RœÕtt]Ô#jSùóZëõz½^+‡qÌçóù|~>ŸÏçóÐë<Îj:¯m:Ê]W=N£Õf µ©üóékuÕ͹V«ÕjµRòc§Ì¼ï, ¡~ßY—‚˜8 @`â,‰³&Θ8 @`â,‰³&Θ8 @`â,‰³ö¥þý~¿ßï Q|]¯×ëõZq¾ù|>ŸÏ«¿ÿžÓwäëŠbºIEND®B`‚xforms-1.0.93sp1/doc/images/FL_MAGENTA.png0000644000175000017500000000055511200410273016376 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pIDAThÞíÚ± À0Q;+±;1%3‘Âu¤\EºWüŽ–™™±ô »»{UUUͬ5ã>í©t}}³?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`ûòÆy ¹¹Ô=ϯsr%tEXtcreate-date2009-05-07T00:35:39+02:00!ü¾/%tEXtmodify-date2009-05-07T00:35:39+02:00~MÈtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_LEFT_BCOL.png0000644000175000017500000000055711200407407016662 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pIDAThÞíÚ± €P ÄP@l”²KfÊPÙ‰â×H¸$¿ N®oÏÌÌŒˆˆØtcffæ\™ªªªÞžô]ÝÝÝÇÛ3þÄX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±€ÝcÈër5Ÿ¬ Q%tEXtcreate-date2009-05-07T00:28:23+02:00}Vµ%tEXtmodify-date2009-05-07T00:28:23+02:00"çûtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/dials.png0000644000175000017500000000770011177116321016046 0ustar jensjens‰PNG  IHDRÖªÏ%@ pHYs  ÒÝ~ürIDATxÚíÝ?ˆ×ð]c“Bi¬V…ë-\Ò‡7‰ Å­Ú$A¸°›6x‹_a§´ cpá "Í0%À¤r,‡- :p_‘&wv)”bthîæf5ûgfÞû½Ï§Åú¸Ûyß»ïýôfv:›Íf³Ù‚ºvíÚµk×ê<_ýçîÝ»wïÞu€ˆçÁƒ<¨?ò¤_¿~ýúõë«ÕjµZ9LÄöœC@ižwˆíÑ£G=ª?b @q”`Š£P{‚îáÇ>¬?b @q”`Šc;ÁݸqãÆÓét:V(Á÷â‹§§wî|úé7ßüä'øÃsϽòŠ @pŸ~úÍ7¿úUõ÷û÷'“ƒ%€à~þóW_ýå/«¿ÿ÷¿“Éþ£ÜïÿÎ;ï¾[ÄÝ!(ŽI0Áýú׿øÅÏ~VD  ¸·Þzï½?®?b;Å1  ¸/¾¸ÿ³Ïê˜P“`‚ûë_ïßÿË_ê(Á‰šÏçóù¼Ï|rrrrr⃠‚üÊo9þüçÏ?ÿê«ú#Jp¢]³Åb±X,šõ÷u¡œ N&‡‡÷õu§S„>óÛOz'“ù|:õ34 %x´ Ž•õ_7µg ýe°¿šû,ë¾n[E–Aä÷¢qÒ»þë¶UdùMÁßþö÷¿ÿãõG”àB›KšÏs^#Ìä›Áñ*連Ïóðp:•AÊÎoé½êyN§_‘ü¦C î%®‘–x[-Žúz‰‘Á|*o—_KsZ,ƒÄÊoœô6_KsZ,¿Ãøð÷߾sg2™L~úÓœL~øA ÞChK[¾ëk±03|cUÞ.ÖÕb$·ü–•ÞõµX~ûóÆ—ß1N Þ2´–i]ýh8J “ÁòŠïzO†BLù•Þº§GC!’¼Ah-Ç.búË âÛBLšù•Þ.âáxǸNѵø¶ÓVˆaÓ ª¿ÛºXˆeqò+½Û©bùÝ?“àÖÐ*¾ûb6ÌvT|÷Çl˜áó+½ûb6¼ï¿~aÜ9“à+¢kaõÇl˜.Tûd6Lßù•Þþ˜ oï­·Þ{ïãëš?YFŠïšUØñ—AÅwX—gÃ2Ènù•Þ!]ž Ëïv -Áæ¾é¨Ž¿3RrÕß±>~l›ÛæWzÇõø±mÛ*n;„²•&Û$ÊÌ ú›Û$Ø4¿Ò›Û$¶QP VÓ§ —“Aõ7Uª0]ò+½iR…7SD Vó¢ ÇΠú›U˜¶üJoúTᮦ³Ùl6›-—Ëår¹Z­V«UÔ調ΠãžAõ7O‡‡ö Ëïd¢þæé<½ò;™|ùå?ÿùÝwõGÂN‚•§L…cdPýÍ™©°üJo¾L…× 8 V£rfs«ÿ™ñž`󬇱™c=äËÙ¢ôõY öOÞ¬g—ð0Twhç®éçWziù®ÿþ÷¿þõí·õ?þYTNOOOOOëd3 6¦;óàþ2hL7æÁiæWzé"æ<ø«“`‚;;;;;;«?’Á$Ø ˜í˜ï7ƒfÀlÎ<8üJ/›Šÿ®rAÞ6ºS‚èÝ|þõ׎ä™ßƒƒüçÁ|ðÑGŸ|2¯IºÛÁîlŠØ=ƒ6B°o­†“P v¹ÃpyÜú *CÃÚÿL·MJ›\×W~ÓÌnÛ³23ÎSœËãL‚ÐïL·Y/)³•‚q)Á{w¹òö]v+.h#wj1ýqa@¯§Óa*oŬ—ØÔböÅ…qÙS|)™Z̾(Á{Ñ× Ø&XO-f;J0@rÌzaj1](Á;ÚulÖ }{V-–·ø\°w‡‡Ÿž>½#D—BlÖ ãªßí–¸0 'O‹l[!V|Ò¡ìÝÕ…XñH‡ Ð+Å EÏ9ÄöÁ}ôÉ'/¼pýúK/UšÜ›o¾þúk¯ýïßvV=b @q*ÁÕ­+šwqƒýªÖXóV)œ“ú…\ЇjÙ-½ÿüÊ.ý«VY„ôÚ@pÞ,€â4ÿØž`FpròòË÷î9g~ïÝËK¡ @q’+Á.£?.‰ëžA—ÇÑ—Ä ‘_Ù¥q.‰«Ø @p.Œ`dvCÎùÍu7pfÆÙµ46›"°–råxc5­—h ¶këʱ""»å—|EK¯»C0! çüF¸-Z]Ò%Ø"Ø;BìžAÿÍnÜbÌüÊ.»‰sGˆßüf>ÿÝïæóùüöíßþv>ŸÏ]@pwïžœüñõGl‡ w6B@Îù¶¢’A ¶)‚íØ±ß ÚÁæl„H%¿²Ë梽5F“I0=2†œós\ɦ›Óp4¦3àó+»ts¾&ÁÝ©tŽé¬.³ávŠ/©ç7ì¦7 V|<ÖJðîaVõ Æ]u ±âK¾ù7»i”`Åw¤ã®ï7Ì•ØE°´×KŽk2z-nnQ|‰“ß!³;F nnQ|ÇYiJð@:ßš¨ò’ÛŠýú냃¶š˜çkZ÷Z_bå÷à`>oÖÄþ²Û ¾ºòžçWñ“<@¤¯¾¨.Í*™×³…]Vuªµ¸í@³^ä÷©}ewß%¸í"@³Þ´T÷ V‚“ v¥¿Ò9Ö×…”Ò×6-®ë¯"wýº*/\•ß«§Åuݳ»y ^¯ SÞœ(ÁɆ¼¯›²©¹Ðž»ªWú»)Ûåz­ìÂ>ò[•ãJ·e»\—•Ý|)ÁÇ›eP„›7oÞ¼y³ú» @pÕÅpõGl‡ 8Ï;ÄÖ¼å€ @pÍ»c%]‚ë}ý½ªìò1ëÇúïrX»<“Ý_E—Ï¿Ë3é~^º,²|_)Ãd¼û¹k~ü.ß%¶Ë¸¼À. j[»7æuÉl$L‚«¿Ý"Xÿ²ËÏ.‹¸í‡ë¦aîþ1)D¢í«w/%¹¼Rb—fuÉ ±ÓWÎë’ÙHЏ;Äv7Íð§•}=Cß(¼€Ì2Œã†lJp}ÒÓåã»ÿvµégÞï³ú[`G¢®:y™¥ojpŸà Sa›_%jüÊy¥ / ³2;¤“†Ìî±Ëο]–ìúç³Ý³µRø.±ûE0P2 "_n‘ö ûººs;ë?ÿð¿ô§œWJ^—ˆ— ™¥’e Ng¹ty&ÍéãÞ‘¾Mˆ%‘¾KÈ ³i ; îþ#0ý“ûºŸñðQßïͪ|û *y™•ÙaÎZý‘Œ/ŒÛô ã.¸íö)Žuw‹ý.²¨¯”Hß%äÙØ²¿0n»ܶpKØyÓß% mŸy¬£êâ «´¯¾¯ç /ÐÇÊô3Nfw1Íf³Ùl¹\.—ËÕjµZ­bsŸ`ŠãiEÛtï‘pA^äd–ëÁvŠc;ÅQ‚(Ž=Á×ܬ\óÂGÛ!(Èb±X,J09:::::R‚(Ž=ÁçÂ8ŠãÂ8P‚( @qì  8ÆPÆ€ @y”`ŠcO0Á¹0€â4/Œ»P‚&"¹}ûöíÛ·ë<)Á·nݺuë–@<ÍüŠ ˜™cIEND®B`‚xforms-1.0.93sp1/doc/images/counters.png0000644000175000017500000000417611177117617016631 0ustar jensjens‰PNG  IHDRJ–gPŠñ pHYs  ÒÝ~ü0IDATxÚíÝA–¢¼à®{þ¸ gº†ŽÝ CwÂT‡®wTw`ÿ§í[%Pù’ç™tj¤bòJ@ò±ßï÷ûý/ ˆžÿt]×uꀜÏçóùü;¼w»Ýn·ëû¾ï{U¹iÛ¶mÛçÏÿQ‹ð€`„7#¼ á ÁoFx@0‚ތð€`„7#¼ á ÁoFx@0‚ތð€`„7#¼ á ÁoFx@0‚ތð€`„7óOÄB·mÛ¶­Æ[Ûáp8êR<Çã¡Öv¹\.—K=ï7dx?u]×u]þå<ŸÏçó9b™ŸƒNm‡,åx<Ǧiš¦1^mSæzïÝn·Ûíú¾ïû>Ï~!ˆXf ñj›2×Ã5oFx@0»X§Óét:©p,SžªÃ{Þ!‘ÿäP‡òäy\—:Šæ¯Òð.?¶??un(Íç§空ðžoù‡¢Ø†ZäáóJ•ëÇ‘üUÞb(‡¯[á-¶‰ÕW¿Jí!”J„×*ðCZj&¶KmÓÛív»Ý¦þï÷}ƒzbågÏÀRêvÞkǼßyÁï\†¹æÍF†ŸZUÃYÝz7=¥Ômz» mn-;æ9ògIPÀ’ ˜isÈÂÔ뻦v¡f² ŒñL›@0‚ތð€`„7#¼ á ÁoFx@0‚ÞLÈg›¿.‹Åáp8:¿ÇãñxÏFœ!x2ÆæÌ5oFx@0Â{”Óét:ÔÀÆÌµ o]`ÆÏõïÝîóSmÌñù)Â× ¼¿!¶–$—&¼ÿ"¶Ö"—ø{ÞËÛäÕÿv»Ýn·Û6{€u=#üãCŸL!¼Å6õÃwÃÙðÿ.µØŽOSõ´¹ØøI&Òçª4¼Å6@.DøtÕ…·ØÈ‘Ÿ¢¢ðÛ¹áãTÞn‹øøÐð9r Û8ÕM›‹p€‰í)*½aM„äBlOWõWÅD8q¹.H Äö\Òò;Ÿ øõËílüt?œû|´ô=ÀvÄváý›'Ÿ~˜²¥‘܉í%X˜ä/&ÒÖ"¶—#¼¿!–$¶—&¼ßá©Äö:„÷ÿ¡ÛÌcü\ðÖfÌ\›ð€`ÂUìz½^¯W °clž‡wÓ4MÓD)m×u]×ép@±ÆØÚ|ì÷ûý~¿ßï÷{ß÷}ß«ÈMÛ¶mÛ>v͂ތð€`,L¾®j5üÏçö¯+bÍû†è×׎Y4óÝß_’ñKs.ûÍשõ¼T¥´ÂÔž0µN¦¾vjoY£aá͆èñÃ÷ëö)Qôj8žS>.Œù+ùÔó²m4¯~Æ×vú‡ªyïbÌÇ‹¥ú ¤0mÎbb-RwðM©g ‰ÖÙg(ðf#SWª3YÏ9PÊçÔ×Λ²^¶ea›¼ÊQ†f¼>ãü›¸æÍbæÝ¦4¼·wÃåR7”-5oóWJê'kaÊÚ‘ü oV±l/U’è…µ[d©»îam¦ÍY]Ê`÷õ*©´¤^ëâ…köäCx³ÃÙÚ¦ÞÄ—òZŒ ›ż‹‡ôhßæ*i õ<ïµcâ^ë8—…y\ófÃOªŠ·ão_JyšÛ6õœÞFÃA›[+oÓ"ðS, X3m›šz}×Ô.ð•ð†M c isFx@0‚ތð€`„7#¼ á Áoæ¯'¬]¯×ëõªR g¿WSÅÇï­{å´ÇIEND®B`‚xforms-1.0.93sp1/doc/images/FL_SLATEBLUE.png0000644000175000017500000000056011200407723016644 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p‚IDAThÞíÚ± €0 Q@ÙÈ+¸Ïä^ÈEj® H÷&ø:¹ô™™™qèAUUÕX™º»çÜ=é»Ö)]»gü‰±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cc½<øònUº¢ĦóÕù%tEXtcreate-date2009-05-07T00:31:47+02:00ríl%tEXtmodify-date2009-05-07T00:31:47+02:00-\%tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_TOMATO.png0000644000175000017500000000056111200410401016313 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pƒIDAThÞíÚ1 €PQ 8Z ' ßÜ%A5 SÉ<›©w®ªªJ’dÒîîîõÊ4ÆqìûÛ“¾kÛ’dy{ÆŸ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 00{ yâ:†œVúã©ÃÕ%tEXtcreate-date2009-05-07T00:36:49+02:00À 5%tEXtmodify-date2009-05-07T00:36:49+02:00Ÿ¿ztEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_RIGHT_BCOL.png0000644000175000017500000000055611200407130016775 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p€IDAThÞíÚ± €P ÄP@l”RgØì‘(~„+@ò›àäúöÌÌ̈ˆˆM7fffΕ©»»ûíIßUUUu¼=ãOŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ Ø=†<±Ž!/aŸÁ³NÙ%tEXtcreate-date2009-05-07T00:25:28+02:00НjÅ%tEXtmodify-date2009-05-07T00:25:28+02:00ÕñtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_CYAN.png0000644000175000017500000000055511200410335016053 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pIDAThÞíÚ± À0Q;+±;1%3‘Âu¤\EºWüŽ–™™±ô »»{UUU­53ã>í©t}}³?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`ûòÆy ¹ùÌÔ=dnË?%tEXtcreate-date2009-05-07T00:36:13+02:00,ž]%tEXtmodify-date2009-05-07T00:36:13+02:00s/++tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/boxtypes.png0000644000175000017500000002320211171560225016622 0ustar jensjens‰PNG  IHDR¶@W\«¡ pHYs  ÒÝ~ü&4IDATxÚíÝ=š£¸Úàoúêx;+/aâ ]i¯¢ÂrèkNí°âY‚k Þ€×ðœ€s1â„@ ûN¦Ç€@o‰Ç2üµßï÷ûýÿ@ÇÏæ?—Ëår¹h¿ÿþýû÷æv»Ýn·Ó(4ñqóïí'DÉ5kÇÇŸÝ5Qòý~¿ßïš  §Óét:uÿ¡i"$D Hˆ @€ !2ABd‚„È ‘ú© ÒÇãñóÊÛív»Ý¶±-kÜ:`(3‘g•ÑÌÏL䉅fã¶ããæßeÎÛY3Ž Bä™4ÁkÌLäÐkÆÅ»s†¿1Ë ½¦ûx·bÖhëõ¿kžv€’¹œÅLRâãøOØv[¥´Ï¸Ï¬­å k™È×ëõz½®«™ÞÞÞÞÞÞb^8öÏÿRíy»ígç¿EhMR>-¦âg@÷¯UÌ~ÙÒQ ÀÅg•SY Dþþþþþþ¾\.—Ëe-;æñx<y–Õ2ã/…Ñ(sæl|¨Ò)ÛÞ]Ãøüýýýýý};¥€’4ùäáp8÷ûý~¿Ï¹ôÅ®‰¼Ûív»ÝüœÛR7ÖK¹ŽpŽ˜j>òœkÚ_1ë?ç× Ôæt:N§¯¯¯¯¯¯ù—îÆz3:›x¨þkþÖsk¸q[Ú!‹ÚÚÚÜXo&)£=—wÕ›Ò¡÷¶…ž-¹ `)f"OlÜõºó”CŸÓ?g6æ†{ó´CúÌëøHi½¡ûjc&ò¬†ÞP.þÙµo{Ì+s´^ÌZ™• @ÍÌDž@Ž[äMõú©Öm©ô•ü.¨™È™‰ÌÄܤ¶ÄLd2ÀÚ™‰ÌÄ\•¶ÄLd‚„È ‘"$D Hˆ @€ !2ABd‚„È ‘"$D Hˆ @€ !2ABd‚„È ‘úYÛŸN§ÓédÇå;ŸÏçóY;”æz½^¯Wí”ïííííímþåÇãñ¨ýòÝn·Ûí¦bT"7.—Ëår±û2ýþýû÷ïßÚ Lßßßßßß//////Z(ÓŸ?þüùs¿ßï÷ûRë šJæë®¡*½œÅn·Ûívv?Pñ1ÀZ4Q²vJÓÄÇÚ€iU:¹ÑDÉÏçóù|:€e‰Ö¨‰’]€(Ááp8Ú€ª‘M”¼ìÏ|€š¹V;P²J/g@ !2ABd‚„È ‘"$D Hˆ @€ Ÿš€’ÇãñØüûv»Ýn·i_?íö›g}€Út«PµQ'u‰©!ªG|[i1ÐÇËÙŠrÖSý„f"ÃLâÿ,¤XoµQ'qŽ-Z#¾Å´èãh[ˆg&2L&ôdûÏLóoß^uR'jˆ¶ôqm K"S…îOf†þíj“2´Z‹¦]ói×M„Ä×nßï~N|•÷l̸4ô™s¶•z k4gïõCå^·òÛ6þY˜“ËYPPAÏ÷³””?3¹×  m©Z¤NÓ7Þ›¿’Ì¿>ê-lÛ<}<_•Ƚnå·-”LˆL¥n-íÇÓÿàuu—Û¿Äøu Íjñ]%Ô,Tú¥Ô¢xê$OümEÛ¯7ƒ¸ßÐ sëHo õ¶mþ>ÞÕ}oü燶¨û®˜¥Ä¬[Ém«~²BdªÓ-¾å”ãôuóÝ&N¶­œ*Wr( Þ¶¥ôñø¯ÇÆ}~LŒ›²n%·m»¥”Fˆ “éÿ¾´‘ãAè’ï*¡fãfÏͳVê$ܵ®»¬ÒNøÕ[ض¥ú¸¶Í×¶ê'å"Cv¹‹þüWy˜–: LkÚªÿµ\ù?=VoaÛ¶8Þ"l¯mÕOÊ'Df5¦ºDýü3Gæ\7ßRmS]YJ6´LUå–3r·•z kTÎx/åóCïzi‹õ¶­úI™~jJÖ”ÎÐ¥åûßÕÿšÐç¤ëqë¿ñ7~ifÃ! _J-ЧN)RÆéU®û Cסü¶Roa-æïã1ƿϳn%·­úÉZ˜‰Ì ä¾ÀÿÐ¥äØŠ”gúMUEÕI Lñ3‚U’ôvPoA·ômTiõ“šýµßï÷ûý×××××Wû‰ûý~¿ßs,òt:N§f‰ù–³ôy¶—”}:jÖÔ¥îãçóù|>k€Òtë¶Š ”àp8‡ö#Kçš5 ”o•jžL5”Q˜‰ @€ !2A?55p5.ÇLd‚„È ‘"$D è§&h\¯×ëõªÚ„Èÿ÷ñññññ¡€¥¼¼¼¼¼¼|k €5úõëׯ_¿´[Uõå,ÄÇ@9š(Y;¬Ëår¹\.Ú(Áóù|>ŸÚ€*‰üúúúúúj÷0”à(Y%ïv»Ýn·ìšÇãñhlCu!òù|>ŸÏv<ã<Çã¡€’-[©n·Ûív³¶¤êËYÐOˆ @€ !2ABd‚„È ‘"$D Hˆ @€ !2ABd‚„È ‘"$D Hˆ @€ Ÿµmðñx<vŸµFŒJCdú5Cÿõ4ÀVN§Óéôõõõõõµ®5o‡DÂb -TÖ^74@™šé¯¯¯¯¯¯Z#ž2jb Á10T»n¨$,Kˆ P„fn]û³6Ö˼c`ZM%Q[XŠ&c¶ ¹É,å‡&€t`NݹÉ€ !2$1XŠùÈÌCˆ #‰ˆ’ÈMˆ @3(ùÈä#D Hˆ @ÐOMÀPý? ý¨³ý®r~øYæZMµ/bö PrÏÕÓÛPëA™}³ÎºÔÈsÜrUZHïq%ô µŸó–¶OUQjf&2ÄAWàZï¾ØÕ|Ç•S>=û±L®Œ 뢷²f"¥[Ôº'Ní×8¹š_ÌpûÖÒsIoCÕÊì›ÝÊz÷¦J ãúŽ„†*ʺ‘,TÔ†~ãzeLyWÌ{§ZÏþ¹¤<›¾¿Rf‘»D‰ŸMAÝžêkCkfÿ'ÇT•qu8_}Pý`¦í¡ý¯Z ‡®sŽíj¹ã¨´0­Üã±PL©0)õpÎsU4þYq9 ;¶tŸ½µôBü³)%5Ç >ý“çß_5l)Ô&¥î¥ôú¡Ë]ªÂ¨~P¦ô óôÐi+aîí]ª^©´°TÿšvÜ5çȰÿ5ùÎýUQHg&2QBßû3ôʘòÿ®þuZˆCïmÿä¤ÝJñ?E™ê;À©Z/fK»GEûYßjÂT=7¦õ¿f\¥í¯1ÏvïŸ%‘òó=ÕÊ4®o¦÷ÐiÍ?òZ-S–›{oª´0íHoªþß§ªÆsžû«¢íWª¢LËLdHŸeÜþœôå¦Üí4%ìÞj©MßR߂²}¶ýø´53¥2´—ÞUfKª~PŽ¥Fb)KIYç”jYò¨U¥…ô^“Þ»—:/îV³øl!å]ªh·eô,R˜‰ÌHóßXo½%/4ƒ;ǵû—žo¹)sÒ¡fùzJ=ÃDÕôM¶º7UZ¶ÚwêÙöþ_3‡‚Ñ¡ïZï‘ Š².Bd¢Ä”ì¡7Ö·ôî:””t6’ÒªÓ®Oîc£û¸?N0¿2kæüÕ@õƒ2åî›Ûh{³¡ÒÂÚ›|–2eM µ[÷qU”¡\΂ÁrÜH$ÞTWÌL¹©Ë¸-ùéÍœû+Ç–ú#¥)§W†*L¾K[¨~° SÄÒß;Ï:§TËiÛjÚöTi¡sž‡ªÖÐKX ­ªhˆ*J:3‘‰Òý~,ýã ½žQü:{oú¼ì©ÚjܲR¶44“zÜ –ë—^K§ÚFÕJÖ; ”ê1g \j䙲ܡû(f+¦Ú.•–m˜ó|0}­¦íÅCÛ!å]ª¨*Ê<ÌDf€¡wͽܡw/v[Öø3™¶˜ö¾ØùÖ'æÙe—®úÑl¸ Ã<í<ôÙ2kNî‘ç²?ëViK#bÚZ‘¯þŒ»Y\i[‘o¿¤? Óúk¿ßï÷û¯¯¯¯¯¯ö÷ûý~¿çXäét:NÍó-%ÄT 4M]jªqûñóù|>Ÿç_Ÿe«4@¿rj”Q%P¦ªÓáp8¯¯¯¯¯¯KiBÖ[£æ 7Ké>n&2ABd‚„È0˜+#¥q™ò"$D€‘ÌGJ`2¹ ‘ ‰(XŠø€y‘"ÀÌGæd2sú© `*Ý(YÄLEm`)•†ÈfˆO;Ü1[H§’°¬êBäÐÝÓét:LËÜd`u€r¸œA×ëõz½j€tݹÉý¯ê±Õšp¹\.—‹ý ° BdþK3Ü>ŸÏçóýýýýý]›L+ ¹äÔi«_ }~~~~~Ú¿Û Dþóù|>ŸµÀãñx<Ú(ÙV+•™ÈÀ6Üï÷ûýþööööö¦5€2©QCýЄ‘"$D Hˆ @€ !2ABd‚„È ‘"$D Hˆ @€ !2ABd‚„È ‘"ô³¶ Þív»ÝÎŽÊ÷|>ŸÏç¶·QM†-©¡jås<Ç£v€zÜn·Ûí¦X‹êBdr ƒ¾ß¯æ¸9‹“@5P Xã['ý”: ‘˜ŒøˆÑ®õÊÍé·ÓN ªjãäy“Z„È$)š²Õ(¹}’鄈ÑÔ Õ£6顤ãdþ~êx 6BdFSÙÞÜds íꡞ¬ÑÐÐþeÚãÁHBd¹­}n²¸˜Ö~¿ßï÷jK âƒ9{Še =ÛÄ"Pœ5FÉ" ‡óù|>ŸO§ÓétRgr‹‰Ò´?ÛsT[ôŽ: ‘ˆb20¿µDÉb 7QòTD`0N|Ьm•€ÿA| P‚&JN¿éV B­$Æ‚|úû—^¹vBdŠVò|dóù55Gýiˆ¥`-B½R/^ !2Aæ å(-Jß˪3Jî†Mê0¬]|¸¬¿/Kˆ À¿¬Es­äæb[Ú.Ô¬ÛßÕ„e ‘XµÜj`~k’ÅC@?±ò²„ÈÀ@@ŠvÅ8¶tŸ%™‚üý÷ßÿýwüëÿùçŸþù§ûÞöãåoK k ”&¥Æ|¦ú )\ ¹¿eâ_?m–yÒ¸öSÙø}ªG,¥}eäý~¿ßï×2YÐSf¿^{ýTµj ”íë©üÐòwKî¥hm E%™¿Î¨Ÿ@Œ¡¡3ö&Û8NÚ±Žp§´~ZO_Vµ¶­]aº3”ÇLd µ¥ùe¡miÇͿͪºú+CŽ9Ëåo»ú å놜ÈmiŸ¶÷¦9_ô÷zÇÆ²íßߣ·×—U-ºG‚=žBˆLúC–nôÐ}}Ž¢ù´˜(ôš˜x¥ëÄ.°méÕLýŒ˜Vú®CŸ+ ]bJ,¿žý?îNy6E{žW¾=2ç‘£/ÛGåí‹þ¾ÓãâûlüZåkU«æã_]Çå,ظ”ˆ¡üuóSnrØív»ÝN;”¯„‹E¨ŸÀPSý˜ºÿ5CŸMYbŽø8ý“×µOÍL¯¹¿Sò^˜j–v U ûq3‘)Ôйo1bf̵_9ÕŒ³˜¨"fÝB7ÂêÎòk¯ûYsè`ÆÕn5Héûê§ú CÅœ˜ÅÌ:—-ý½ñïêÿyøÐ"ôÞîÕc‡Þ,hª¹oSµ^Ì–¶_ÙÝ^³ùÖÅ>Z×¾ÍÒí¯?ñ½2¥ª«ZLÛ„ÈC™‰ÌÆýÓÒ~|]sкë?4Â0çJý\ãöÂöto†s3®¡§è¡ÏL ¬ã×!å½ë’¾¥Nøa½}ÎøxÚ5蘭ªÅ–˜‰L¡¦çµl°Ô¡B× 5‡Öeٛ˩Ÿ1ët¥ÜÎ(4?(÷L®õžê‡Ú*ǵÇíÓôåÆÜ ˆ©KÝøtþ«jÁ´ÌDfãB@ A@îuE?fÕÑïù|>ŸOíP¾ùkˆú©~Bº¡ós癿:Õ/ó„ÜE3òmKîVÊq5jædO•S1ÒßÛ­?Co¸×~åR5VÕ¾GˆLEJ›AFt_94È0{H¡~:hs½ÜºÁD»åçÙ¿ãÖ¹ÿ‘ïí®ùü¡Ìœ[j_¨U÷ûý~¿/mÝ쯒™”¾¼ö£BÕÂÞÇå,¨HÊ ²”ŸK»1T÷ÇÔý·± -1æ†QŽ Ø†2/j¡~ýúJ<X?ô:ÈÝŸEOûÞPËÄ™1ÕIò¸e¥lih†ã¸ ²”öþ²§JØ 1=:æºóã~ë0gUWµÚ3‘Ù¸ÐI~Ì­¢æ ú—’ò,@ õXJ̩ݮá뫘X9ôJ LzñZ‘øÌGˆ×Ž’›¸Ç¬d …ø¸_(fKAiôʵ"E” Ìo-s»ÚQ²ÛîCµ£ññ8CÃåþw1ô¯m"PœõÆÇmÍÉRs•dQ2#þªÇâãqúëpÌ%‰Trê¤w D`€v¬cV2Ã6âã¶vÐ㇜@5/+&b¥±=ñwtpl×Lˆ ÀH.pLe{ÁqH{nrûq·ãƒÚÄ„Å]âãeÅÇgC«º`Ži9ÉAˆ @s“õÄÇmM ÔŽ’ÇÅI@=ÄÇë24’Kÿ*Q¸%ŽÊ$D`2æ&1ê Ž»ºQ2@›à¸é‘_î_´%µ6‘˜˜x ž€t¹cG—]𳵡LÕ…È¢ €xbSà‡& Dˆ @€ !2ABd‚„È ‘"$D Hˆ @€ !2ABd‚„È ‘"$D Hˆ @€ Ÿš`*‡Ãáp8´y>ŸÏçSËÀ¶=Çã¡b\¯×ëõª 6ooooooÚ’ýúõëׯ_Ú¡altÉ·ÛP'!ò`ݰ¨Yè´³æ0CL -Tœ€OÈ»¥ÖRCFà[jmc$Ê$D@| ÄkNÀj;M2xâ5ÃiR DÀL{<ˆ¡Ù£h¦=Œ¯ÈAˆü? Žï÷ûý~×nPƒ˜S ök¶zÂ3tˆc@õˆ©íרk±½PX(¹®ý;t í_æ·½PØßèuí_çhä Dê…Å@è„$tb³½¹ÉýC TBÕÃÜäe• ·ÔÚóiñKt¤Ñ¯äèÐ_Ï-µöüGZüi5"ÿ—˜yÇâc _sú±Õ(9fxa`ôkª„(y~KÅÄ‚9¦=òÉýŸìH®ÁR1±¿zL{<ä;’M$ª™9Šàª}šÑ>!ùýû÷ïß¿›ŸÏçóù¼í5\†j×ö ÉŸ?þüùÓüÛl¨ybbQËzNÕ/šÏùüüüüüì>k,´óÄÄŽ–5ôœª_4ŸóþþþþþÞ}Öøaí„ÈÿšƒìÔHš›|:N§ÓZ¢äÐÀÂHš›ÜŒÐŒÇºò…ÅNðØž˜£:¦O…â㆑Riò…Åö)ÛsTÇô©P|ÜUZcµ"‹™„þ4–%;)æª*5GÉÓ†ÅNÒ`þÞa•Û´a±ýó÷áòZ‘ÿ…øȧ ‹›àx½[ax äÓŒÄbîT±=鑱Ó-ȧü34Êì¾Þøj\»M»ýã¡ãœîës–Uuˆ\çÉ P¦2ç#—|j 6Û›œ;‰‚Ò„¢ÉøÑ”X9¥õâ÷°”Ðè%~D$V^V¥!²KXË ÍG.'JöÓK`Y¡ùÈë’ÇEÆN`íRÂåÚbåq‘±Ñ)¬]J¸,Vž“ËYü‡ø˜ßº.ma€Ìoí—¶;íztGVCcåmŒÍ†ÇF¤Pî¸hh¬ld5-!2L&>8vb´ •×(ÇÇ"c mh¬,Pž–y1Çãñx<Æ¿þv»Ýn·:ÛgÎmï_nh¯…Ö0f/§oÝжš¿mãöÚŽóÚú²c „þ³Ü¡µ.ß–ÎSEkëkZ,Ÿ˜øx«'0ýG`9GÝ«ŸÑ]ÍÚjL \~ä—¶êÛ´•ÇènªcO‹5Ú#«˜@Y”œâGm¼ÞŸC b˜³ýSöαE;k‡Æ²¸XöfzŽ’û`™{G­³—•6¢ë?iy´ÔyD•Ô­±úmé!Æ[Kè5%ß¹Ýb¶®Ì£W}˷ΪǴÇj bF\)·5ÆLä"®†Üÿ­‘r°¬nû·÷WûÙæß¡½3[¹ÿ¶A;t•eä©ôj]ɦªuªG ¶×V%_9t*RÃ<—þº±–£®üê§æÐÕ?C¹´YÉk¼]³ú¦z”F[ Õ?CÙ¬äq„È›’r±…¡¯é>>î2ésx‡.1e¹ÝOîßöøÏ,!>‹Ù§ùþ ŷôÇùR@­Ûj­›¿š ­¢ñí™R=rQ¹ÛJ¥Qs|lôu)õ9¦æ =ÞÖUý†V<£»­j¢Ø2£ä5ÆÇê[ õÍè.G[Õ\i›±™(9]u—³X—ô¢9ôsr¬gÌŸÕy–8n¹·–yÚ¶´@yžuK¾˜Çº^j]Ží¿Ö•ÓÇí‹ù×þõQi§">ÎWÙæ<ž[ª~ãÖÓènB±ìR¸Xo|¬¾•Ùîò-õTÚÐ8Í.â ‘‹p h¿&¾ô‡þTä. ·ŽþíYçþ÷ÞBKIYnhÅì£øÖ+íÈÌq,;ÚSŽóþm•ÜþjZ·–Z7ÕÓ÷Kú¾ˆ™c2tßMuD©´%«yKüqÞÿx5ë_Ê´ýh]ÕoÜþ2ºÛª’#ÚuÍ>VߌîÆí¯{­»ïTÚæ§"oJè'*ó/wžuŽ)£¥µ•c©„u3«Åñ9ÕrçYçuÕºò«k9kX~Ì”²¶*-ó¥ó•˜¯×Ô¼†jtõmkhtǶ ‘ êÌýßVé®eöQ=ûw©£=fŽ[Ýû¤ï¯ò÷Ñœk3û»Î¾¦ÒÖiÙDû‚-¾•ÜÓË¡æ°Uê[ùíŸoYFwíåÆ?ζ ‘‹¦[Æ´O¿ô¥ôÿÙÎwi|Gû´æ¿ ŽùiÛg{µn-GTüÏËÿqŸJ›OmWÓË÷ËŒn-J¿ÌQÌq»ê§æÔSsB–ºòÚ×mªãV}[K=1ºzÅ?^>W@N!DÞ”i¿=›§(¤¬sè½1ßÖŽ[nŽï'§mç©.™?ÿ7±s®›µSëJ®u%Wi×°ü+Ÿ¦´•JÛÏYâ®yjì´_§-ÕkÆõ\£»jNŒÒndWÚþrÉê[ ÕcÚ54º›çh\Š#§ûk¿ßï÷û¯¯¯¯¯¯ö÷ûý~¿çXäét:NÍó-%äp8‡îãó¯Iü7Zã.—ÓáSJÆÐoPS–>Õö¦,wþN9¢òµê¸õœªÒ÷ÂÐgçÑTÅîãçóù|>Ï¿>Óž„¨u5Ôº|5dÚ*š²uýûzÜq>³Ò–3~ërB2mßOù«1´Ê•\ý¦ê×Fw5„Ë¥ÅÇk\CõÍè.¾=ÇíY£»emi´6O¦Ê(ª›‰\ÂÉF1wtê]¹×9å¸KµFúžÒ[;þRZx©£¢„#vNKÅÇ’ôjݲ­‘c‰SµpîöÜ’mTÚrFtý³’k˜›œÞû¦]î´_È¥©®Æ½ÔiÚ€XŸZ#!r”öŸƒ Æ6.[¯=¤0b¸/EŠ¡áòçççççgÌ' šÙžyîî _”fh¸Üž$ÑOÐÌöä ˆõ‹-"ÿ—f¶Kÿ¤ÌMúõÇÇëš}ÜÕT¿æÏh¨an2Я?>6û8E¨öN{£Ô¡ŸcäÌ´–ºå¯#yBû±|;ÔÐÏ1rfZó„ÂŽäÚ‘ƒb¢äл´Ô [¾¿¿¿¿¿C¯_{|Ü%‡ÞåøtëÀn·Ûív¡×‹së©æ æÜpŒyŽ´Ü}„ôTósn8ÆÂ¶ ‘ÿ‡ö0"f¸Sò˜ßö‚ã®ö0"f¸Sò˜Ÿà¸ññÙü#ÞÜK.»Ë9¶¡_||6ÿˆ7÷E‡ËîßrŽmj&D`ÚŸÛóòòòòòÒÌG®!>îšög€Àö<ŸÏçóÙÌG¯×ÐH®üñ³þ¶@˜ßÐH®üñ³þ¶@ˆ!DlÚ{¿k×­ Nl†Þî Ø¶nMpbS›ô¿ŒFÚŽضô¿ŒFÚŽÈMˆ<ƒ!€~CŒ“{¤-¤ž³µr´…Ôs¶6”Iˆ TMl ÐOl üЄ‘"$D Hˆ @€ !2ABd‚„È ‘"$D Hˆ @€ !2ABd‚„È ‘"$D Hˆ @€ !2ABd‚„È ‘"ôsÙÅ_¯×ëõj7”iùr¹\.—çóù|>ßßßßßßí€2-"?Çã¡éâ-•¬º&2ABd‚„È ‘"$D Hˆ @€ !2ABd‚„È ‘"$D ègè‰ëõz½^5@Íþe&òÇÇÇÇLJ¦¨ÇËËËËËK÷ñÿ ‘ÅÇ5ëFÉí÷ûý~¯ièú ¬Ÿº5Ö>IEND®B`‚xforms-1.0.93sp1/doc/images/fdesign.png0000644000175000017500000002267511171560225016401 0ustar jensjens‰PNG  IHDRºQDdEÑ pHYs  ÒÝ~ü%oIDATxÚíÝ=’ë6¶`{ê®@èØ“©ÞìâfÓJxZ¡vÒÁ$ìÉ´vô&æz óù•é‚I‘Ä÷÷vQEþˆ<~üøøøøøø`’oÿ^^^^^^„H†a†ñ”ß’ §Óét:õ}ß÷½01×ëõz½Þn·Ûíö˜ò7Aj|àxê»~‡ ¿Eoï‹mWËûz.’ ÀaýãÿøÇÿüÏ´÷þôÓO?ýò˸á·èåDìýýýýý}ËëávÙ×õt‹`ÿùÏþó¿ÿûxtôÉ“vh¹4ä§Ÿ~úéï‡y£÷H+„S®×ëõï×" ’ @sjwÓõbÝêk@¤=>wÚºÕGï‘DS KD²4žárrL5U'–¨XQ«šøL#¹ðÂGµX=‚tÝ?ïíÿÇÇòpJzzø¹éu[¢Ác™aŠ!l¿PÉpmÇKÈ© .'Ûüå§öQ|/äìÁñzÖÇ*÷x›ã¨PshÎKRì]GµômiÝü_ûÓsŽ?7=ÏrÕÕ9sæGr¼¶¥i…š­ÎY·ÒøäìÁp=§ÅjÞ5ϱRË…×××××ל9?>>>>>Â÷ާ‡S¨‰0ÛÙköŽý;íúæªÃv¾]Wí÷‡ðø<ãßrÓé†ñ/ÞË=¶•~âúk•cZ$ÇmÒ-½¼Î.±çŠÕšûwÕn.Ð"Ìø¶)–J³7íßýn»ã(õÜ+§kùÒ´9b{ù&Çsþþ˜]>Ï–#ùXç_~ùå—ò ã?–°æ¾žk.«å šî æ‚Ë=Çsû¢…Žý;ãØ£-3º®Û¼Wãžê5óaOûØrrúÆïkt†ñƒñï[]òÐþç­QþXâ>&KìëõcµÜ²ƒäB鉦æõÑΉÞx¿Ä~UˆÍ›Ó^›+ò5{3ÿLÌß¿¬y>Ö/­ô]ãy´¾Ö7íû(}íJ_Wëï—J×0g~Jq^K…ñð(ùè´ò˜’ó‹ýs; ´ãP£Eľü¼\ô¦=”ާ?þ>ö^[b[¦í—5פónÚ–¦o^çê¼gw8=çF`l WÎi×®%î—J당ÞnÓ:ÖÛßöœj¡ü¶$ÏÊéþ°\¥‰çîëå:5Ô[u´ˆ× 5KŽ]dÓÙâ#™ášèå|±å7w$ß´Ž%ÎçÝšû·4ªÓŽWT`–¾j-}¿Ä–ýþkùŸ• ×çŸöh½GáÈé± íDÒ‘|üýH<¦ŒÿÏ?=!|oMÛ„š}½æQ—«5)èx("¼GéÛû”mrd,-ÝæB|ÖëcŸ3öÄ‘º`älïC,±RÉikUšâYb ×?êÖwÀnGÚ"ZPÚÓJ9–ö%V—JZá¹ò{ûµµBŽpÛÃÄJM$ÇïÍù•>å¡t_§×mé–û:ê•\pÁeËG¦’öç@˶åÜZ¬Æ§>˜Õ? > æÌYº>9sÎ5Ïï-Ï¢4’ãÁ K×'g»Æ•¦ i9ïÞ™«%Žÿ´C%Ò<Ú±¯cUXóx›«H$õrŠPŠR¾åº$L[rþ»ær²&ëtèX:’ÓÞû{U…?iù{W…¿ª¯±ÄÞYzþ«t\NúRë&Xô¶ç墽ÄÞLßÄ8rJ÷ï´a#§EuÚñàš¬c›WΜµ]îS€-û½ÒÁ_•®l3>ì1m,wDoÍ8?þ^.Ú¥{3§Æué«m9síßy£:miõG‘«ã¹WÎÒk×:ßzÆž€çR_cš—§óù|>Ÿû¾ïû^P€~¥±/¶À5XÚxÊP›­1oûâ-jz…ù’Ø£%úî÷H˜7ÎûÚ±DÉÏš!ÀçmK’³&[HœÕ´IÌß#5ÛX³„ü}Úrg‡|‹'Ü.·Æ û¨1íq1ç<솓ó)é9kÖ6¶´mî…y‹@?wK—ا¤ #@kò‹œÀ1¤Ë>Ë\ßÂ9»á¶¿ÒïÝòh#éõO™Vn¼f­r¦—®yl{§íët|ÖÙû E ÌË­ølëᑤåÎù}; ê·:gÛÓ±Êgì̪/Õ®Iøwlù¥­'žµßsÖ3}ÄÖïëú5©'¹À.MûN2âZîz‰s!g™±‡ÒåP§ÕÅXn}ÒÉ‘ú5_:>kŽç%¹À.I°wK”3\®é{MZ!ç½5Û²…+Kn}|æ:êbÔ\vfk…§½k_ ²-×kx¥_bÉÏjK²ý½¦å° ±G¸ü¦ÝK´H?²N«h0ž3g™9‹Å0ü”œå§c¾Dr$½-Ëi5ñ/=>×ÏšÝ"~|,ú|>ŸÏç¾ïû¾wQž¥æÁÕ8J°Žëõz½^o·Ûív{LùCË…®ëº®&àY~þùçŸþù‘&xüó®ýë_ÿú׿ó{®õý(«ÔPШ¢ #ÀÌ^^^^^^Äc†a†Çß’ 3;N§ÓIÉ|Žm\ÖQ· ŠäPEr¨"¹T‘\ªÌ6Z„¡Vön<ˆˆ½‰£‚¹Žœ½p„;*Zã˜?Þ1oŸoŸÂ¾Ì–\0ÔÊÞ±7qT0ב³—uv„;*Zã˜?Þ1oŸoŸÂ¾èT‘\ªH.U$€*’ @É ŠäPEr¨òmý|}}}}}}üýñññññ‘ž3=Ïs×?mkk¾fæÝöm Ž ç‚¨R³—K¿·%„ð.}—#|ûû4gÕ_¯\ñ`¾=냋ý^8\ìÒqÈO!­c#­Í£"çÉ-‚c‰ñ1þÛ¾æ¨ÒwÏ:òwËÑ-‚EøÚÆ‘óžÎ&`˾=÷ã§µ_ˆ5´Ëi>Z:}.9ë®IøûúÕð³ž{3šÞ¿ù1©?rö~Íš8*žôÍáü:–Xz/ç\Áb×Þiç<÷˜§ç_KïØÚ> ßë [¶³– áMmìkcïë<¾€¦ÆÙØôãíÇü%Œ§§oÊ×<¢Ú9*r‡ê#Î?×òócèX¢ô\¨alï§—™ÁsÏ—ðØŽ«áQN’zÝþ>M/Ç ¶éÛV¢´ýB8ϳ™J×0Óqˆ½º¯/Ëúý8ב0×rÚ<*jJ{ÖG ôŒiΡc‰õ-wÁ¾ŽíX O$çUs­ØÎ½°„M$Jå\>òÓšÆùºZg?.½„y—£ céùµô­Àú·Ž%JÏ‚½—7†¥Ïœ9Ã6Vãé"9¯ü. 5ûØ£ %òo°|UCý~œëHpD=ë¼^§ÊI~• ÇËqK ¥j~ø1VÑ1ö)°/»l¹0MXÆn͘‹ësì±—£Qê–8ãœYìÑËËËËË‹8L3 Ã0 b8W$Kßµ¹äBi1ªñ”ñÂ¥åL_Nz'¿(cMúú%Ì»Gż¨üúv,‘Þ/15ßJö>íœAéQl$”´O§-áN§Óétêû¾ï{ÇL©ëõz½^ï÷ûý~ÃúHÞn·Ûí–ÿ®µ\ˆõ©¿j×TS.®&&¥KˆU~ÖÞ9öQ±…¤ûß.Ñ\Ö±ÄvÎ#¿ÙrÔc{üjlþÒ9]'·¹Os–3m Àr~œëT<ŸÏçóY~h¿ÆÙ){Gs9{Yçãá[û-wGű¹ªï˜?ö>ÝÂ5­tŸNÛ#ÎÍú}¤åšGûxο ìQì7@m€õI.À.Åj㇯,­¡Ñ"àx$€¸ÖÁöi¹TÑr iùõzb­H ;-†ÓFßÛ&ÉŠh•®‰a:³Çdnû fn¹Ðu]×uÂz ö&Ž áà˜Ç>–p¼¤ÌlÉ…¾ïû¾¿\.—ËŲGã}goâ¨`®#g/ᎊÖ8æwÌÛ§ÇÛ§´i¿Õ+Ô\à/j(èþ°t ÷^Sr郧Åðcm(èOp¤!<%`UGJ+Ÿû¾ïû^L`l¶n§Óét:9Í€ã¹^¯×ëõ~¿ßïwÑ€Ñ"€*’ LŽwa[DÉ€†Äž=TSCr€‰ BɃäÀî½F„óäÿ{5=z­¦Í³Ç×OÏ^lï¬Ir`ÇÆ“#±Wóÿ?%\~z­ÒëÎó°µC~„ŸõY¥{g ’ Dèb®9óç/Y„ Tì‘rÞ‡ÌÒ¥å¯Ox°Í®KG¸æ³¶±oNE¶|€[ûÅ#çÕ-o‘«G²Ç4ý¸Âï(Ò[”ÞŠô<{Ü›’ d‰}ùÍÕ|Ñ£>L“ÿ3À6…Íþý °Çm—\`6±ËVì>„y¾Ø…2'¯¹—æU°ýó:çÜÉÉÓ§ÏÊØ{ó¯-9óÇúyºz°wÇø¶ÚfÍ…áÓÍQï+Ô\`¶f|9¨/:¾f1c—ž½†Ö®¥J¯-9ó§ V¹z°_ù#lg}öõ ›¿þ±TBi§‰pÊ–#&¹À_œ<ù¥ç-:’n€=íä÷Û#ŸÏç¹ú¹nÀúçï÷ïß¿ÿ>×y7ï5XŸnÀ‚´-€H.‹x´Gh¡(€=*)<Ú/¨ª°M¯¯¯¯¯¯9sއ‘޽«Í¡¦§Å0½´}ERrhÂ/а_j(ìQþRúΪåû®ú­ÎORlnÀÁí÷ G2n¿ Ú{RFr88­`MÚ,´ÀýÕ¼ŽÑÖC· 9a[†t£¾ôœ±yò?Ú¡þŒ© ‰äÐðòë4»Ð‡ÓÇ©„œépTÚ,ì]º3iÍ1bFæxw‰’ @CÂËw˜H_èóS Ò ´£tÈIí¶iÚ}KÎ1bØÉ€ÙH+Ц_ýõ×_-}—´¤[:ìë®Rr`6Z.Ð&i€Ö¸Ï©—ŽÞ#,¹Tyyyyyy)}×0 Ã0ˆƒäÐXAÇüBŒõ…áxN§Óét*-åx½^¯×ëív»Ýnb°/±±±Æ¯ŠRk$€&Œ¿Ç_„9…Ãéã)ãyÂnátûØš¹J9Šá6—¶É !¥—éœùÓé 1  †äPEr¨"¹@TlT–ˆí~£-¹T‘\šH @Œ1°Èa(J !„Âø 2œ°wã;œñ*á]PøÞð¾(v¿.!vO•ÿYGŠ;Ûû åÐ4ià¨ÆIXZ!ýjþ’ÃDÆ\ŸµÇ˜·³½c’ ¿_îÓ]'^5ËÌ撚ÿ¹±Q‡Þôü1ù-ê?k_1og{Çt‹š>ä?þ³ì±f„á«éé±eÆÖ¡tùééi5?TŒï”bw5s}Vk±Ý/É  ã¯ÀX.9|µæ¡=ý‰ùË—>æ•Nä?‡?¤ïµÄöØIÉ€Ïê5§0¯yøc­>Ŷ’ Jë-ÏEË`^én›¥ï­ù¬ãÝçÔÄv¿t(æQدœî é‡á°æBN‡ˆü -Çv¿´\¨’_ôqštíØšóù|>ŸÓóô}ß÷½X,'çÞ ~d‡ü;ÖîUjb»ßXI.M˜6ZD¸œpþ0sŸ?EÎôØçŽ§Û¿lÇ÷ïß¿ÿžžçv»Ýn7±€#‘\š~/}D¯É:×äþ¥Ø>‰h“š @-€Ù¨¹m’\f£æ´Ir˜Ä@½®ëº®1ÜÉ€Mxt»\.—ËE4J=â&†sE²ô]’ @CÒÃL®³„úå‡aÚ³l‡š 5^^^^^^Äaša†aù"Yú.É  ãòg-¡~ùaêaéd”Rs Æét:N’°Ó\¯×ëõz¿ßï÷»ÖG²ôûZrhÂãñ»&AP¿„%–/­ÀÖH@›$~>ØçwOHÏ_ºäšõ“ág•®yz™ùÝ4Ö‰ë“\ˆv.ÈŸkqPºäô†‡ý±t@Í¥_Íé¦1Wئ¿ @©ða8ý?ï'~ŒÄ^­gÍ'æÄ!$}Ð-~Èiƒ0ÍÒe ·³¥ûŠó’\ø!§šÀ4[ûÅ~¹-ÝW˜—äÀoÚyö¨ŒåÿÌ?¾Uk÷¥1L¿kÑ“\ø±Rˆã¿Ó… Ç_½[.d˜_ôqš½Ä(ýFö ^“ô]Ðï‘tšmáaüœN„ÓÓ—þpÉéÇìØ†¯ÆæOgÍó·4gùùë´\بœ tl ˆiK«ÿô¹^¶¥¥Û^¿ì—äÅŽT/`k‘Ôr€]Êé\þ[N›)†ü¦cµÇJ. ÅÁbx¤˜+èT‘\ @ºñ?m’\ª¨¹4áYEqZ.hDkº®ëºNZð¸·1Z„ŽI.Uú¾ïûþr¹\.—üw•ÎÀr¦=ÊJ"ˆá˜äppã|ðøïØ?ã)ãyb¯æLO.ìš ÀÁ…c2§G‹%¦ý-­ÀQI.M+­‰k• q@Ët‹(NiœbV-~øH ç§Œó ì‘{˜¥#¶ôü[#¹T‘\š–iŒå‰ÃéaWˆüö ~hGkgÕ\š®’Tòñw¬ˆcº¸£ê ÀúÒw55óÇ~, ïšÒãsåLß{„ÓÛ[³wrÞµ>É !éKð´Ws.ëÒ À:êì_Gb?´äÌßN„ó#Žaéü[‹¹n‡’ÿÛx¬EglÉ¥óO}Žs-bÜ%3ö»÷šëóK¾6ži{©Û%¹p(-w[8öÞÜ2Ý"k ¦±b؉äÀA,ýè¨;œ3Ö9ÂXZù1LÏ¿µ4äЄi_™u`_š s=ÆÇºZ„¯RÜr›Û¹š ÀÁ-‘ Ðkزú¡²ká^b9Ûjþ˜sMß-€ƒ«¹K@É 9aCÁôœ±)é%äÌ™ß_.gcŸ¨sKÓ-hHØ!çA},§QøûÄpz¸Ìœé9Ÿ¨+ËÑrhH¬/\˜J˜«3Å:}çÒŸ(¡ÀÒ´\Ø´œvð\’ ›–îF!>p<]×u]'b¸/›K.¼¿¿¿¿¿Û1cº6@ ¾¾¾¾¾¾ÞÞÞÞÞÞD£Ô0 Ã0ˆá\‘,}׿’ Ó6Ø—gé±b‡5îëJÌÃB2öèt:N§¾ïû¾R×ëõz½Þï÷ûý.†õ‘¼Ýn·Û-ÿ] :M(=!|\—–Ç¡þïð³r’#áüÒ ,MÍ !ùØ9s–ŽQ3rDéR ¬Ir?+çq€ä¿‰U¤/€Ö¨¹Àhh {”®ÚKÓrâÚò±òuã2ráœù]-rÊì…åôbeðbKÈ™öÂ1 ÀsI.0›œÊù¥û§}n~]ýôthA~ËÇØ{±9Å0™#U»“\`âIR_»>ÿ”ræ,96tŸ}MÎÑpTs«Õr'Íüæ·×Þ˶«¹@Öé1vŒS}ܺÁ^€z~˜i™äÍ %R ¤q€4Éfëž°ßmw ´ O!§õJøjì½9ËŒÍ[~ÎMûD 5`^Ú, æS”q®%ç<ÔåÌ_3'íÕé£%ÿ( G*IOÏ_‡ñrrÎÇüq[ò·hYúþÜ=ü1LÿÄ« #;–~¬ªéD0>mr†ŒÍŸr²tÉ{?u™v–ù)†ôƒzþ<ÏÝj eÓîFü\1-†Ç+è(¹@ñ)Q:NDéi–ž¿þÁÌ…yÏ”õ/ý*†°5j.L놰ÎçŽ?]Ê XŸ6 ŒI.ì’/r¶CrópE©¹Ú¤ :na»Â‚Žö>Àv„•æö^r[rhHì"ž3¾Ã´¿—XZ¸é1&ò·hÓ´»÷sÅ0´Ç(è4§¦é´’¢K(--­êë€ål.¹Ðu]×uv ´àr¹\.q€½Û\ráóóóóóóv»Ýn7»Žê|>ŸÏç¾ïû¾ Ø;5€ƒk³´¡‚ެIÍààÚ¬5 ÂkÒr¨"¹ð:@)É€ßl!­ µÔx Œ§‡s†ïJ/-v¯’¾‡‰­IÎ’çŠÉrë&æ’ ¿Q§Ø¯ñƒâÇHÎ#èxþôÒÂWkÖv‰%ÏÉœuó1É !¥™ÚúŒu8O8Ϋ9ÂKÒ?Ÿ”¾:×1Ë-y 1l3æ’ @ÂLm:¯\š±N/9ü;}q?¶Lr8¸ØÃ|Ú¼™Ý0qP¿LØŽoB´¬þñ~k½`}Z.T×GÐx®tÑÁ¥—–?ÿ¼ë¹~dÄ<$¹0 à¹ÂÖ”Ó:‡¦—¾:íÓÇ5ªÒKÞZdÄ€íû9ê6j¹4!öˆÇaüwNÊ ¿ÐcéçÎ[$– ¹4$ç±|®yæZ¦TÛ'¹À_tÛÌïþ)Vmþ8$¹Àlm3[H:h[’\N)D¨áæ Èa´à°þùÏþóõõ¿ÿýïøÁ¿þõï´ç‘ë c~¼!$¹TÑ-hÂ?þøãÿÿ @tAG]êÚŒ­äpp´Â:ŸK^Hm[6푵Í$BýV/1ðùèœGzXš– @s¶ ãÄøÕ01¾:žRújþZ…s†ËO¿ –£åÐñcyì!<ýp¾:ž.9ýjl­b‰ƒ0U.sn 0&¹4$–xÖyºC¸n±´El ¬Cr¨"¹›r›$€*F‹Ö8HW=ˆ-!ýÞô2ÃBŒÓ–#öë÷ÇÇÇÇÇGÍœéá»ÆóçL¯azžõ#–³uÓ¢›?Œ[:>¥Ÿ¸4-€&„ …übбùÿcËÌ5½n±-s^Z3~øü _ÍŸ3\~ÎüûjÞ_³uùóÂå„×쯥I. ‡{œ6ÿ\ÃX–®[zžÒ­Z>š†£é9K—œ¿„­µY˜¶-ùñ ·=þš5\‡nP%¿½À¸B¬µÂ¼Ÿ¸É4~œÞf;…éANe„q¢!?>[‹¤nÍyîïÞÇK4ÔlË1â åpXÿþ÷¿ÿ}¬¼8@©ð1>§@czÎióÇÆ_Ø{Üêã¼Ä®Ÿ°\8 Xßþñ«¥sÆ–Ÿ3é<Û‰^zÍÓ5Â.Ó–<ž2m-Mr`gÒc¯#Pcé>üǾ÷¨^éô%–°5v#ݸîYŸ¾æ:ûånáØ$vc/yk€±çÖ`ºEMw(.(=Oþ«±uˆ-'ç³ÒÛ[~éú§”¾ZÛšXë(ý.Þ×w·;i´\.|ôÍy --·“~5¶ézÂ9…r¶"g Ó¯†ŸÂ)±WKc;-V<—äppéÇàÇßé¤Cý°I±ÏM‰­Ï´ÚËÏö©4¶¥±` t‹Ø®ëº®1ÜÉ€Møúúúúúz{{{{{RÃ0 à †sE²ô]’ ›p:N§Sß÷}ß‹F©ëõz½^ï÷ûý~ÃúHÞn·Ûí–ÿ.5þ¢*Aºj@lþðïúõÉYrº0ä\ëŸÞ®ôˆ5ëÀ6i¹\þh¥cC¤ç ¦®Cz|„؃zºpcΖùë_úéùE%óGÖ(Ý›¬Ir8¸¥ÇaÎî±tèÇô«5K›¶þs}ú´Ñ.j¶€uèT‘\ªH.UÔ\hBþ8V±:GÓF¡:RÕ¤ubû”-GRr¨òòòòòòRú®a†a=€õ•> –­=m(n1Ï9WrgM’ @•Óét:÷}ß÷}λ®×ëõz½Ýn·ÛM ¶,6,ô\ó‹á1¨¹TÉO(× pÞϵ¹äÂ0 Ã0Ø1plóžé®°ßó×Y Ç  #PEr¨"¹ÀŸHYc’ <™DÆÞ£!¹T™y´ˆ®ëº®V€5…¿u|||||äÌ™ž¿~ éùǯ>þÎ_“-Ç?ŒIzëÂ%ì+3$#]}}}}}½½½½½½9±Ö{ §_Ãé9²¥KÈŸÿi…iQÛo4fH.›hÁ–Ÿ}ÂÇÑØ£i8=lAVº„ØüG:6ZØÆ´oíl*ÀñŒìc¿¢Õ T|‘äÀîå7ȯÿE½µßäÉa´€CÙËà - Úiå1[ËãDK¸\.—Ë¥ô]îL€%L»"-­´ø_~ÙŹ–žÿò·ñ¨Ñ˜-¹ðùùùùùy»Ýn·›‹Pï|>ŸÏç¾ïû¾/}¯;bGÔ÷ïß¿ÿîØ`Úñ3튴´X1ÅtÙÅü¡+k–?¸{i1mÃ-Í™²å8¨¹°{¥ƒÖÌYú »Äº/þ{oBÍ ŠäPEr¨"¹T‘\ª-`Cº®ëºNÄp_$6¡ïû¾ï/—ËårR¸‰á\‘,}—n@É ŠäPEr¨"¹T‘\ªH.U$€*’ @É ŠäPEr¨"¹T‘\ªH.U¾Íµ ÷÷÷÷÷w¶À Ž €5Í–\†aæRswáÎGŽX“n@É ŠäPEr¨òM–Ðu]×uâ@ þáÆ 1¨Î9ëIEND®B`‚xforms-1.0.93sp1/doc/images/FL_BLUE.png0000644000175000017500000000055411200410141016042 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p~IDAThÞíÚ± À0Qœ•X˜’™œÂu¤\EºWüŽ–UUU•™™z033ÝÝÝ{»O{*]_ßìOŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ X>†¼qCnÞñt×%tEXtcreate-date2009-05-07T00:34:09+02:00@±Òò%tEXtmodify-date2009-05-07T00:34:09+02:00¤ÆtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_DARKPINK.png0000644000175000017500000000056211200411210016513 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p„IDAThÞíÚ± €0A@$Ôó-|O¦SÜ÷Dà‰ ÒN§oÍÌÌŒˆˆXô ªªj™z¿®ã˜=é»Î³µˆmöŒ?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`õòÆ8†Ü‰šÏÊq%tEXtcreate-date2009-05-07T00:43:20+02:00\랦%tEXtmodify-date2009-05-07T00:43:20+02:00Zè’tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/input.png0000644000175000017500000000331311171560225016105 0ustar jensjens‰PNG  IHDRr–tH= pHYs  ÒÝ~ü}IDATxÚíݽ‘âXÐí­Ž À–IC àv&2‰ä ›É@¤@&k°U*©„$àS÷9Æ ƒ~®jú}}Ÿ€¢(Š¢ø Òçí¯ªªªªR Ç÷÷÷÷÷÷ÿaåëëëëë«iš¦i”x¯²,˲¼=þW9€d MX¢ +@4aˆ&¬Ñ„ š°DV€h MX¢ +@4aˆ&¬Ñ„ š°DV€hŸJ@šº®ëºV€gØív»ÝnYÇ,¬çr¹\.—Ãáp8T`.«ÕjµZ5MÓ4ͲŽÜ4MX¢ +@4aˆ&¬Ñ„ š°DV€h MX¢ +ÿl6›ÍŸ?·?UÒ+@4_d8Òv»Ýn·÷ÏÇãñ8dýþ5g³Ùl6›Ûãóù|>Ÿ3÷ùú£š÷,î÷Ö%§VÀÏ ³2›v|ßisG5€étV€‘º:(÷1åöX¯˜BX™ÁmZg{çщžþ®L{oíI¥®=t->i5|«|]¿ëJ‡ï¡=ù2ýÕ—¢ÿ|ç½.¿§ªð›™z³!“GýëŒ[úèó×fN‡õœC†Õ){˜þêýÛöK®fU4ÂÊlî»ãìc˸m]Ú>æc‡)g÷.íAë|§ͶsËð#™²íõŸã”ëÒîZuÕVdŸÁ4Лuˆá ?‚Œ›¸™¶’«Ý‡OXL‰Ï‹&S&J~ÆuGà7ÐY™Ù¸ĶE%Y:1˜‹ÎÊ›õßúú®à’Ù#ÉüÔ†xoo X:•§8r"Bû˜Fï§ÿîžWçç]—®m}Ö ü$:+AÞÚor~ô ̯ü”ÞáƒPûîovm×aܹO¹×gÊuqMá·ÑYy¢!vÿûwîŸyM”yÆíºs2ðôSöÌ£WjÊõzöR`Y>Š¢(Šât:N§¦iš¦QÞ«,˲,‡ÃápP ^ãþû–Ïçóùï_5áçY­V«Õj)cým,¸=ÖY¢ +@4aˆæÝ@îSh:+@4aˆ&¬Ñ„ š°DV€h MX¢ùP8âTUUU•:p#¬çz½^¯Wu˜×rºš¢ +@4aˆ&¬Ñ„ š°DV€h MX¢ +@4aˆ&¬Ñ„ š°DV€h MX¢ +@4aˆö©¤©ëº®kux†Ýn·Ûí–uÌ q.—ËårÙï÷ûý^5æ²^¯×ëuÓ4MÓ,ëÈMÑ„ š°DV€h MX¢ +@4aˆ&¬Ñ„ š°DV€hoû"Ãív»Ýn‡¬y<Ç£K•àþª¹.¼Æ:+Ãc ðó|&D×ïè÷1åöØoóðÛD„•.·hÒßYé_:$=c«þé’)KûdÈúíªö¼×‚o°2 ¶×yåV¯?ëéÇ9å,¶wü×`.Ñ•)7áÙöy[Ýw/†O`=Úíèêå yÅ)û€WŠ+ã"¸ɚ®5wž±Õ¼ºª1®’síßE<æú‡Àm˸½õïaÜV]ë÷?Ü‹~7P¿)Óý“ ]Ó(nÕž r.úpï‡|‚íð¾+: ïߌ{ÝöVSBɳ;4:@䈾Áv¸qCék¶šën’ö~´zô8=Sý!žaÁ•®ápÜ'—ôïaÜV¯<빎axUà5>Š¢(Šât:N§¦iš¦QÞ«,˲,÷ûý~¿W €¹¬×ëõz½”±þ6ÜûÖe š°DV€h MX¢ +@4aˆ&¬Ñ„ š°DV€h íS HSUUUUêÀ°Bœëõz½^Õ`^Ëýéjˆ&¬Ñ„ š°DV€h MX¢ +@4aˆ&¬Ñ„ š°DV€h MX¢ +@4aˆ&¬Ñ„ š°DV€h MX¢ +@4aˆ&¬Ñ„ Úçý?꺮ëZQ€EQE¡@¦ÿéG”§âÕÑIEND®B`‚xforms-1.0.93sp1/doc/images/fselect.png0000644000175000017500000001157011171560225016377 0ustar jensjens‰PNG  IHDRJeR!êò pHYs  ÒÝ~ü*IDATxÚíݽ•£Jà=SlÛ2Õ®2Á$¹È”=›‚èÖÐìáRSˆñÁó÷êH¨( oWQÀ¢(Š¢øÄÏçÿ®×ëõzÕ°f—Ëår¹ü ïÃáp8š¦išFÓÀÚ”eY–åóõ¿5Ä"¼ á ÁoFx@0‚ތð€`„7#¼ á ÁoFx@0?§-®®ëº®5+<}~~~~~N[æÄáýõõõõõåéàëñx<Çñx<§Óét:Ù;sk{çxÜöÏ9*íéàëñ|þëý~¿ßïöÀ2ºÇÞi9ç ÁoFx@0‚ÞÌÛÂûœ”ó];o™}½&soE~ùSÕ$ÿ_ °U?ß»úÛív»Ýºï·L}ˬÁ³žk®![â÷<­tØ<}xrðšÛzBbÍq%Jwù¹æÊ=‹ÝCdú¾^{ß0cN￯V}õºÆ¾ú§k˜^û´ÒkéÛ#¯muζ Ý›Ck5´ä¡kºÆœß°›š°Ö>¨õøÒŸæ/ß~'9k̯ĽÐ÷GIz«ÓåÏѶ¯•œS·t­rÖ˜þ½{³©ð:ØþÚòù‡Î©ÖØ·ü=°©ÊÌï}æ÷æÓ{aª¶ÍYcº•æÞï«6Ÿ–Ù¹Ëh÷5ç›x¸¥½é— µ£ðŽÛ›é;÷¥µÛA>mŸ>ÿŒµ_&°%«6_g\­!Ö<`Þ5´Ìœš,ÿ«˜öO€1VÞsdßÄ´œÉD¯Õj| mé©OïÚ/Ónã|m›¿üòû}è/àÍÃæã/ËÉÑw¶o]ùË÷]æ4t¯mÑ’{*}&;ýδuΩIßù{³oÉt æ·Òk¿L€§EQEñ|`xÓ4MÓŒ)®ýøññ¥Ñ5tض½GN§Óét²wæ6G>Ë|¾~CÏ{üÐñ> QxzCx *ÊÞXÆŽ.‹K`ÐæyÞÌŒ=ﺮëºÖÄëdïÄ5ñló_¿~ýúõK³®Íáp8ßßßßßßZ`Ïco€ÙæÇãñxØakc¿,o¾c¯sÞÌÄ=ogR íóóóóósÚ2'ﯯ¯¯¯¯ëõz½^í°5xÚÇãñø¼Ãš½0·ö±wŽ;ZÎ2Û|ÚSôŒÑ¾EŸ½°Œî±wZÎy@0‚ތð€`„7³Ò§Šå<»Ú³¶`žGÿÞ¡mÕ=ï[ö?éñ…ü÷eø· i!‡Íý Ûöü7ÞŽjýohÛà9ïsî2ù¯‡–ßWZz]éÒ`?ºQÝsسá–éaöîA!ýzhùÝou—Oê Åžõõ°õ¼ái¥ÖžÒÖýgœþ?Uö­·¯üôáfhi°7ºVÞ¯ý£;öÄ*ïµêðªo`¼ûéú¼×'¬ W¶m³³ÍÓïÌQ¾át–±©ðîÎÖî^pÒZïFoúýnùÝO`>+=ç=&‡^d2ÕûC—ó){¶ºð~mðYÔ°« o1 i ÁofÆaóº®ëºÖÄëdïÄõ£(Š¢(î÷ûý~oš¦iš1Åýúõëׯ_šum‡ÃápøþþþþþÖËx{ÇgëSY–eY>_OÜó~<ÇÃ[û`yó{ó€`„7#¼ á ÁoFx@0‚ތð€`„7#¼ á ÁoFx@0‚ù9÷ 꺮ëZCë÷ùùùùù9¦„²,˲ԒtUUUUÕT¥ÍÞ______ÓV`ZÇãñx<6MÓ4ÍøÒ®×ëõzÕª<].—Ëå2m™?c6Àz‡Ãá0ÕŸÄ5ßHŒsÞŒð€`V1l~>ŸÏçsz™Ûív»Ýì0XÑ9ït<·^°ga†Ío-9=uØ*ç¼ ˜á­ÿ Àž¹Î`Sò;6æÅ%¼6(g ð“È9o€ÝØÑ…ìyûk`>}ï}GÝîòùKö-?tɾ¹P[M =o€Ýéëuï¨Ñ^¦írÒôæ—<´}5I/]˜ž÷T7iÑkö Zéc`÷Óô5>Ýãj_ù}%çÔ-]‡¡uŽnEá=æ§@[΄µ¡ƒÛ}kiOËY{§­"¼— f´C7¿ï›.íùzü<öôBýÉ9o&3>°Ç”³Â€ÿÓ7Ý,= mLÉc–Ü'á À}àÝOÛïœ;ÒCñé’sá¹;¬lJþ€sþœð¹×8¦nCgÎoƒð؈1ýQç˜cYExçüàü°Ò'÷cE=ý@ Ì„µô÷`?Ì6€`B†·þ7{f¶9À,꺮ëZ;0á 0±Óét:´óÞ“©ªªª*íÀÜBžóöLnöÌls&LxFl»œü÷`mVtÎ;ŸÉàiá½d0Oõxç¼ á ÁoFx@0‚YÅlóœk¬—™ Þ½ŽÜÝÜæna†ZÑuÞéz;àúÛm¢5ö&̰ù­eÉ»¡‰Æ©¸‡ÀTvzÎûÜ‘^²ït ùkú­9êÐWfNÍsJögÀTB>´Ýÿ }ßÚ/L¯=½–ñßÊi©ê0¾Ç,¶¦µ£žw:´†ÌÐÈl«¯7?ô[c¶´¯´î·ÒËëU,Ï¥baHžB›¯ßö&guêõ¹Þ%dx¯?6Dó1lþ¯õË×Ó›wÑÀ{… ïöeK¯õks&^¯çkÓ»¦6ß³îŒwÿ„–·¢aót|N}Á6íí_Òk™ê[Ýåû.'›£%x—EQEq¿ßï÷{Ó4MÓL»‚²,˲¬ªªª*ÍIjlÕñx<sa*Ï<}¾v΂q©á‘0k#¼ù °6†Í á Á¬bØ<ç­eoûž©eèxÚý«=ÆXÑ9ïôÝ´©¾6Ysk¼öXRÒ ›ßZ–¼=§€yÍ´9 m§³ÍórÓééñ€×†‹s¾Õ^fª:ômWNÍõ¤–2¼Ç<’2=;¾œœµŒÿVN LU‡×úÇ‚`>;šmž3›_ÚÐÈl«‡Ó2)mŒùO. cQ'¶Æs‡µYlo*Vw >?†])0­á½þÞ›ˆŠ²§"2lþ¯õË×ӛϩ‰Ø˜O˜ð>·¼ 9¯Æ×óµé]ÓN ›cŠY»äîk–´¢aót|Néë˜çŽðôV ýVúZó×ê°ä>]¾>Ûð£(Š¢(î÷ûý~oš¦išiWP–eY–UUUU¥¹£3ÎVÇãñ8Ç1¦òÌÓçkç¼ —Šñ.ôXáÍ_l€µ1lÁofSáݾ¼ýNw;~Ž–×ËØÈ9o—0°6çsÓçX^øžwß ùÐ'_uKh—Ó·äÐgc÷­eüÛßzWµ×î–ÓÌ!|x¿Ò]}%¤KúiN=_[cújì¡[—SO£ïb¶ù_‚êµ¾uŸñ7U ŽÙjÞKx¯ˆ° ‡;¬ý±dp¦ûñk¨ k&¼ÿXæ îÚ.isÞ "ÃæYöÙCÕ/X'áý—Áê%ûÊK†åz¶€¡ ›ÿ‘sýô|ké~ºL|.³ÕLëGQEQÜï÷ûýÞ4MÓ4Ó® ,˲,«ªªªJsët<ÇãÇ@˜Ê3OŸ¯ ›@0‚ތð€`„7³©ðn_dÕ~§»Œ?mkkU€%mä:o7YCkÛ ËØø°¹ ™–‰¬Aøžwß y;H†>åºýNßwÛ%}Úw:Þ^[cû[Cï˜æk±„ï×Bºëµ¡à¡ŸæÔóµ5vÿp³u}ï u€50Û|ÔPðÐ0~醎1L;îœ7À2„÷ŠÄ=[,¶–ä©b,œ9O[ÿV§ê˜ðþcÉ'v¯'ê^«‰~6À{6ϲÏËŸúnq#¶ÞKxÿe°zɸZòO„õl5C6ÿ#çúéùÖÒýt™ø|m«sþÈüóùQEQ÷ûý~¿7MÓ4Í´+(˲,˪ªªªÒÜÀ:Çãñ8Ç1¦òÌÓçkÃæŒð€`„7#¼ á ÁoFx@0‚ތð€`„7#¼ á ÁoFx@0‚ތð€`„7#¼ á ÁoFx@0‚ÞÌOM0•²,˲ÔtUUUUÕT¥ o€‰]¯×ëõªxº\.—ËeÚ2…7ÀćÃáphš¦i­±góÄ8ç ÁoFx@0‚ތð€`„7#¼väܱÕmÜö~t“€k‡Ùív»ÝnùŸ²NzÞ»ÐÌ;"=o€Ízöªsâ¹o™¾!è¾üóýî·¦*?¿æÛ¦ç À?è§·c²/JÛž^>¿ü×j²m€ÐÉöûéo_>§œ=ø6 ×zúµûìa÷Þüƒü9êË0±®Í°9ÀfõMëZÛt0ýì4á ° é)fùßš6VóËï[rŸ1oØ`ãÒs³Ó×w²ûþk½ó¾ò»µÊ_r?„7ÀŽ ºü[» U>´>s,—ðØ 1ƒÉ¦†­ŸðØ ¼m&¬@0‚ތð€`LX˜E]×u]kæ ¼&v:N§“v`>Â`2UUUU¥˜›sÞŒð€` ›L¦,˲,µ]ÓžRÞ»^¯×ëU;ðt¹\.—Ë´e o€‰‡ÃáÐ4MÓ4ZcÏæ‰q΂ތð€`„7#¼ á /:ŸÏçóyùõ oøã]a<”뼂ɘÛív»ÝÖVóµÕjh«®ð)ç–u†åzÄŠí'Ãæ$°ÓÚÜD¬¿ž7Àîô…V_ä_¾»dΨÀ#q»MÏ`ƒúb¯]·–î§Ó.ß™KFé6bûIÏ ¤t¥{«ÝOû"¶¯œt$生êSõ¹‡Æöúc^x„4fÀy{a–ÓVqgéw o€ jÇU_?8§œn_¹ïÓ9ê9G›LUó÷r΀¿X²'º|G$¼v§o¢Yþ´²tÏuèòC‡µ§7Â…7ÀŽt‡ŽÓã}Ë÷ Aç,Ÿ_Ã%Û$V;ç Ìø TCË™j½knÛ÷ÒóàͶtö2„7o“´§asÞF`¿Fςތð€`f?ç}½^¯×«†ö¦®ëº®µs˜=¼ÇãñÐÐÀšM{¤:N§ÓI«2³Í&SUUUUÚ¹9ç ÁoFx@0‚ތð€`„7#¼ á ÁoFx@0‚ÞL˜§ŠÏçóùœ³äív»ÝnÏ埯Û%´ß9~Ÿ~cÀÜ‚=ÔaqþÐÑV~°f›6wˆ`«‚õ¼óå÷úä»ßm—ÙýVߺƗßüŸjéïöµá˜òÓåŒÙ¢œ=Þw2e m•Þûóý6Öö«rìzÂZ÷`—sXo¼ÒËOUþ¹¥ûþø5¶µ—O _+¿oçÛ¢i÷þÜmÕ÷ëšê·‘ÓæïúUù‚…÷9éµ2»£t_!ù¾CðÐòs¾5f‹æn±ôÞÌ)9gé(êë/®­­æþm¼Öó^ïh3amöžÁò=õ÷uº½Æôþo‹öÓ/ÚæÀšmöœw¾ù^éCä|±åpÜ\MŸ“ž£ ÷]9m¬Ÿ›´ÌÎaq|+ =e3Á mq ïÞ‰fSõŒÓ“°ö¹Eã—Ÿ{[âîý©Ú<î–Âì:¼û†»ŸN[þ|sq§Ú¢œó£Ó–Ÿ3¡,¿ ûî²·†½?Uù¯Õ'§Íßõ«òý(Š¢(Šûý~¿ß›¦išF£ÀÚ”eY–åóµasFx@0‚ތð€`Âßa͵¤{à²Ã¶Üõ÷ïß¿ÿ¶;¶çãããããC;´6 €öUÎoFx@0‚ÞÌÃûãããã?ÿyþ×`{ô¼ á ÁoFx@0‚ތð€`„7#¼ á ÁoFx@0‚ތð€`~no“~ÿþýû¿ÿµkØ*=oFx@0‚ÙÈ9ﻀ=Þ·Ûív»=_—eY–¥ À¶mj¶yUUUUÙ©l›sÞŒð€`„7#¼ á ÁoFx@0‚ތð€`„7#¼ ˜ÿ{0I]×u]kX³EQE¡! ŠÿÄ;ØŸ6ýIEND®B`‚xforms-1.0.93sp1/doc/images/FL_PALEGREEN.png0000644000175000017500000000056311200410553016624 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p…IDAThÞíÚ± €0 Ñ€Øè¯àžÉ½P*ŠÔW¤{|]kUUUI’ ½èîî¾V¦9ï{ÎÝ“¾+#9wÏøcÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆ®õò°nù»Ç|תô{^ÄWÏ:C%tEXtcreate-date2009-05-07T00:38:35+02:00¢_ë%tEXtmodify-date2009-05-07T00:38:35+02:00L)ßtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_DARKCYAN.png0000644000175000017500000000056311200410754016521 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p…IDAThÞíÚ± €0 Qƒ²‘› àžYÄ;Q¤Nq Ý›àëZû¨ªªÊÌÌ mtww•é¾3ç|{Òw]WDÄùöŒ?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`¬—‡uË×ΪôÛœ¾âG¶%tEXtcreate-date2009-05-07T00:40:44+02:00…ü1%tEXtmodify-date2009-05-07T00:40:44+02:00ÚM~tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/buttontypes.png0000644000175000017500000001330011171560225017343 0ustar jensjens‰PNG  IHDR"S¹r‰ pHYs  ÒÝ~ürIDATxÚíÝ1ŒãƆá]Ã@R¥ šE*!•°î \JuR•€µûl«*P>5‘¸Ñ^u*ܸîRãÛÊwPm`‘Ò©.Åd±³ÍÜOÎ 9?ù>…½ÐQ5ΧÉëÅb±X,®PëKó¿¶mÛ¶¥8º4MÓ4Íÿ쪪ªªŽÇãñx¤håÛn·ÛíÖüýÅÐŽ0¨G˜Ô#Ìêfõ3€z„@=  aP0¨G˜Ô#Ìêfõ3€z„@=  aPïKŠi­×ëõzm¿rwwwwwç[Ò÷¯Ão³dKÜoç*áM¯M¯´ÝZGíŠA˜!Ùaé;ØÂÿªQ8žcBÚ÷Þr‚¿„rNUÚÔ®)Õ.†‘ý œO̯fJ›ï;zfˆ"ÿM'ù•-YÞ7“jù~ß.f=îÚËÛÿþe-ù޾5ËËDWÍìZ&á}ׯôr—3µË g† öù;Kø ´Œ´Ëˈ´ïruÉß1ßQ^æiëCÚz%i|»î÷ajl¿m˜jíJ¥ÐžÙv»Ýn·¥7ùéìv»ÝnWÎöœN§ÓéÔ¶mÛ¶öëçóù|>§ý,÷ ð©–i2bz{9ä.ÃÛÛÛÛÛ[»,—Ëåry<Çc¾znþÂ¥Ýõ;–SÚs«]©=ÌèVúéiš¦iš2·­ªªªªº6X¹å;$â‡L§:MÃóCóp8‡Üõ*þg‡Fs«]©fe6¦©Ì­÷™ûPOµæøÁ!kÂ|J›ÚÆ93$;ÀÂKædè*žþF¾|øSúEšdRIŽ’É·æ)ÕFí{‡ÚÆÔ|$ž³”jHÄɧt]>ü‰òyYò-q#Ó÷ŠäõiOµ¾žÄ÷Ñû­™ÚÕÏõb±X,ætn9g§ì“Ì9¶êåË7o~ÿ{É’¯^}ýõÏ?çûŽæïÒf3æ.èS7¨WÈQÍß3ê™=ØÍÍ‹WW77ŸÇ»w?ü@u€òÍ"Ìž÷ÃÂe¢Rî~ù,ÂL2TxiàñææÅ‹—/ß¼ùá‡|ƒ€x3ò|ÈѰMïíq@Ò,ÃUPª…Ù?ÿùã¿ùùûåKóÿðãS¤½|ùË/ëõ«W¿ý-‘å™Q˜}ûíÿøßÿš¿_½ºº’ šaFy¤™>Ã’0¤‰\4-ŸjßÕc,]îÙÏ}üï/¿¬×L!IËÜж®ëº®) >ê{f¾3ƒŠvoÌÇ~üþû?üáÏ6óÍO?½~ýý÷ÿùÏï~çÿÄ_G—y—äsæÞ—ÝDZŽ;÷cbîÁòM`˜ÑÄIÿkÂìàùæ›|ýÚŽ´çŸâþmÞõÓO¯_»kC?¾Ç‹˜#Ò çÞÕ"~I”Iq˜=ÍH¼ôº™â!97æëù}²çžâóÛo9C–†ä)YDÂ|±$ï™lMrˆ´¯fbÌôÃLŸìÒzºq‡=™ "Ñõa9"M~¾Ü ùˆçÞoðÓ§Ðò××iîÊH-Ëì¦æ›˜cæ_/ -J…Ï¢™jKãâÓï™ÅFŽH“ F6e²÷‹<Æìe®¯/¯§ë¾¦ oR€‘Ïi4‘fŸëŠóüòê««ëë¿þõñ¿ð‰‰1›i¹·™¦GIŒÅ,O-*ÇdzfŸô'ÆâÓæõõ?þñø:UÖ'UŒÙJ8—~à§dyêLLÉÛ}©˜Xzì¥ÅöϨECšä0cèlYÌp"âí÷ûý~Ÿoý&ÆÌ-Ms¤Ò5Òb"Z4®‰‡™Ÿ 6÷¿]×pwhìGieƘoî™û¯áåéÄï·$%e/3VŸŒZcw¹ô\é~Bf¦~˜ëÌh˜bøÎ¥åŽ1ùþò-™ê>Ôœx—"­Ï½©EZÌèvVÆã#Zž¦Š<:7®>§GûBi¤bGÚét:NœƒD¿[ssaíff1}²§™Šî´Žçñ/Nˆ±±Pèªß]ó¡ÑÄÃÌ~LŒûØLwøÑícùâÊ]žƒ(Gè´M~6ã×_ÿü³™Už”!ŸLof*r`@9fwÎ,ìRD½yóø×§Oÿú—™îÿŠD”`ÖaötÇ(ÙËP] L³½Î 0„@=  ž‚sf¹çЮè0[­V«ÕŠ+4̸q@Žsfõ3ÍÜ)Ÿó¦Â¸ ebìþþýûûûûû««ûû««¿üåñÖÔºâFÃÓ–,̦ý/žO6$;Æì׿ûîßÿþî;" ]\ó7€™6zf#fîa3çàôŘHƒäÈ2÷{T&Á¦Q²0c—#†$ÆlÃDšo`ŠÚ^¾˜}dÞó¼ijÑð¾ ïßN ÷'¿kÜ•¼Wò[I^iº~»ð§¸Û)ßBß–„ûm¹¿ãºÆ˜-G¤u­i4IåH;ªá¶NÔ¢’}!¯iŸÙn|íjä{=\-$[ÛõÛõ+ðw—ü=äwRLŒÙL¤¥ñ®Ã4= •æ‹®;£ë´¤·^³<»nmîå‡9<ÊßfWª³ÅGZ×ßàáöO1wWx«$Ëû>½„.¹å;ÓÜuÈ‘Z4–ì×™ÅtÕûUè¹ƺÔu]×uÚ³™H[.—Ëår¬ï(é KúÊÓ닃Z”ÏD.šöí0:ò¥9ŸÏçóùíÛwï޾ͱþ>~üðáx<ÇuLòSiÜñ€2ûâ å–}j¾; !_¡pÐjñiWWoß~õÕÍÍW_ů3_ŒùjW¿_©]ßEjJ¨Eù|))‚~ÝL÷½¹#­ëÖæ[>¦Üòí‘Ò¤Š´Ü1–»9K»<æ€ZäMq»Ã]'¯÷[¦ß®rç@ú>±ë·“,/ÙÉÚŸÒu”,fà1mŒ¥½ºCÊ·ïúMè  O4ÌØuª}ªÑØÜ¯çøv]·$ÇÜÎTßzH]{i¹{c]¯ó‹Y³äºLîO¡µhHÜÎ ‘DÚçÆ$Èw]³ï´¿¼ïî[iOdĬ‡Z4< ÅñEÚðçÆrÌøÊw¶ƒKtm1Q”ï$µ(Ÿ/çYõùU[>;ÒªªªªJË”sts×üù g†¢-”ºJ{>”¬Ð03·;šÏnØív»ÝŽêäC\M[Ñ=³¶mÛ¶öhš¦i*"Ä(:̦}¦dn½OÈg"÷fÌaP0¨G˜Ô#Ìêfõ3€z„@=  7FÑ–Ëår¹|xxxxxàvÈÁ†§0ûLuw÷—êÑ31fß̬®ëº®‰4ô;¢yÌ´Í(Ì$¿ËÂq•ö‘}ðqcÌ01F¤A~¤÷{(%Á¦Ñìzf¾ˆ’ô·ì¨£êäà‹1‘†~Gz×÷ö;Ò%ïòµBg †EUÍ~… —ƒ$Æl9"fH»´û"æ´‚oyùOgtÅlÆ —ÒR׳ّ–¶&¸Ì¿RC_»(‡³ Ö”LZ11fËi.š¡òÙûh¬Ÿ¹áOtÿ•VkvÃŒ¾,™¯Èà@*©bÌVι´p=qÿÕW'©iÓ“£ ñMW™ÛæŒÂLÞ¸„×@¤ÅØï÷ûý>ßúMŒ™§xïv»Ýn—¶É B×=ë¶!9>Ñw¦>ý3&€x«MI›Íf³Ù˜H3§]|ŒÑ !Ç>µkWŽºDm!̼‚Ë'G¤¥êÑ !Ÿ|?”i¯³ÿ£6¼T‘–cPÑ×XÐ •)ßÞ¡eÐb¦³ÝÙ>TֱؑÖõ½ÃÄJ×^¸oÖ¢|ÉùôûgfîIu÷V’5{9t´ácŒf¨|iÏ5Æïá‰òòéf¾¶K²¤ü³¦ÙŒb,7ÉÀcv]r›ß+¾›\S+böcLåhgº¾Kþ:µ…sf *"ÒòEZÞQÌ]óçƒ0C¡ìH;N§Ó‰scèJ~+2L; EÛX( Ä ®¦{3Ô#Ìêfõ3€z„@=  aP0¨§à¢éÜÏ&hWt˜­V«ÕjÅN?&@½Bù®‹Åb±8‡Ãáx<G u]×uM9À§ªªªªº¶Ô+ô«9>ææãæoî͈ Îçóù|¦¶†P¯¯0 aPOfòç®NéAï<´´ÈÞ3#$¥A)@ŒÄaÆãïÃë<›ÑíC¸&7¯ØKÚ¯‡—ô=æÜ“¾>»¼ïÃëïú­%ï•—ÒßôêÐ3³J_äØìe ½½ÎµÅ}Ý}¯½~ÉVuý]—÷ñ•F¸”†ùŽ ]‡0s›Úø_ú¾5HÖì6Ö’÷æ^>Û CRÑ4½ ìëö1=»Ýn·ÛQ’â0 ŸQ#äÊ×¶mÛ¶”Ô4MÓ4 å€á©ï™1€¦WÚ»´a\ô¶1®Î@¯ ¯ëVå[>_ù”YòPŽÎ@ìÙ†öë]ßÏ§ç» æ[H–—l‰dmáOéZò03zLøj0 É Iñà¡éíSó7@0|­ãFÃõ3€z3 3`ªè™Ô#Ì&n-à./Ygü2s(yj 0 õMC"|£gæy¦¢%À꺮ë:~=çóù|>³ßQÂlÖ|O$ðq1Cºåi—U™Û™êÞ+fb4ñQ†ñL×xsr†G˜ÍÁ`fœù³ª@#zf³pç9û_Ý>œd=³Yc*Çœí÷ûý~O9`3`vÌ<ÆÍf³ÙlbÖ¿ †g-„Ybnã’®ËûøzBc 3ŽU扩ùákúÇ4=³‰“ u€v„€Ä¸f‹ma–Xx.b Û3ÌÖ–VÆwöK5׎mf›sãœÙ’Ë“}¯»ÓÊS ô¹ë‘ÏúóM¯l­ïÉëîVqön>RÝfÉ–»¯À6³Í9fÏÈ›Úp¤Å–|ý1ñÿ)c•JfÖ|ƒ`ù®Ùb›sos>„Y2ýúLÀT™¦Öþ߯qŒ_Û\Ú6çÀ9³dÜóÅ0v³X[Âïr—²ye›5Ö´B{fmÛ¶mûîÝ»w}×PUU5Æ–Z€«_S;nÃÊ6ëRh˜Åî4v0=M¶¹| 3Ô#Ìê1Ì8ä³yÓ3r˜­V«ÕjÅnÊÄMh1Z˜ív»ÝnÇJcæ?<<<<<ÜÞÞÞÞÞR&(Mx†™ÀÐX»˜P0¨G˜Ô#Ìêfõ3€z„@=  žâ‹¦—Ëår¹´_1÷,`§Ž‹Kn%O¢¬€´Ô„™]Æñx<ìÈr¸Mù´›ì˜ï;·²ò):Ìì#´´p›ãi<”=Ç7šCYÃ(ôœ16%î£Üõ~³ýgK޲2´—0¤âÂÌÄØÑÂNš»™Þn·ÛíV×öÛ16d‰i€DAÃŒvŒ±c¦Í<ÈDZù>ÆlæsÍsÅ6›Íf³)ÿjü±‚!ýk."Ì|“;0%GÚ¸1f31¦+ÒÌsѨá0š¦iš&ßú ê™Ñ'›»VÚ¶•c6]‘VUUUU׿ùœC‹(9ÒhÁ@€gÊì“Ùìþû 0ß$Ÿõz½^¯ÃËÜÝÝÝÝÝQVP‚ÑzfåOú¸ó0ÿ* <ß{cÖ9 6ègäaFgËè“åPÂlÆòm 66†“1ý*_Ô¹½.{yû_}ëñõÛ|Kºkö-øýî–p×úÀ~b0¤³p#f¿Kò·ý‰ö¿J<ííL5@Šð~‘”p¿w£gæ%ï Ãý\_ß«ßòèW7Ü"’s¢¾wÅüTBÚ#}Üã]fW]+1Í 0·ã=¼ JÀ0cÏJOÿ˜ÏñN9”ž|FxROîÉY¥ò(Óh=33)_ã-†å§÷%ËÇ|î”z‡%ÜnXþÈßÄ ùÙß»äÍ“®›OUîÉYýÖ?O 3~¦šº|Ž[É|¿ãÜþ’×Ý5û¶Ãp÷‹d_ø#öã4j‚doæ^~žfUø÷Ê«c××».ÉaPBma/@Ž˜ÄÈaf6rïüy*íyfö`£ïn ã^+ÆãÜðÓG¢ aFÑ97zïÄøu—v\S¾"†õNA¼2Ÿ1-éŸ ß´Ñ'ž¤·íF]Ú>zxýD¬QÜ“¦9\ç ´¡EI¤ ƒã"·~Óß}“¶$ï•Ƚþ))nˆ{/pài°Ë1›‰±±â„Ë-UäÄ/?ùkÎ šoº<äB;½1æÖÉ!k#1È=5_iꥱ÷Ôét:NzÌWßò0&ô£æ:3÷ÀÞ[Ø‘eî©©6ÇáŸYòoó^6ÅMsØ£Ìz(ÿERá @bD0<îÍPž€Œ8«af²X­V«ÕŠrÀ03‰Méb hÁ93€z„@=  aP0¨G˜Ô#Ìêfõ3€z„@=  aPïÙ†yX@£ëÅb±X,(€^ÿeµˆQÏIEND®B`‚xforms-1.0.93sp1/doc/images/FL_YELLOW.png0000644000175000017500000000055511200410233016331 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pIDAThÞíÚ± À0Q;+±;1%3‘Âu¤\EºWüŽ–™™±ô »»{UUUÍ̬å>í©t}}³?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`ûòÆy ¹xjÔ=ú 2A%tEXtcreate-date2009-05-07T00:35:07+02:00ÿL‘%tEXtmodify-date2009-05-07T00:35:07+02:00 ý´¥tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/scrollbars.png0000644000175000017500000001344111177114710017117 0ustar jensjens‰PNG  IHDRD"ÇW†” pHYs  ÒÝ~üÓIDATxÚíÝ=Ž«ÈÂà¹G³oÀÒdK³ ‡vêUtØ„N{¤8ô.Žd¯`$6à5|'àc˜Ÿ*ªž'¹}»=ÝðæðR€ÿ÷ññññññüÙüOY–eYŠ`I§Óét:ý.f›Íf³ÙÜn·Ûí&€¹EQEóõq„¥˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜ögn+\EQ`çóù|>Ë¡5þ{´Æñ­ªªªªu-óñx<r–³œs“]1k”eY–eüËy:N§Óº–™ö¨ÙæÉç½ç–?ã;·ûý~¿ß×R)w»Ýn·»Ýn·Ûm9Ç¿=×u]×õÚs¶=§*Ób¶Ùl6›MÌJ÷LjüËL[<ÿ85‡SÍ?EÆ%~k|ï»a ã‹íyùíùz½^¯WãEl2-f±Ùn·Ûí¶9€v!PbøÇÉáTzš³ûý~¿ßÛWðLs±“ˇä,gä¼.þXSÉä§æ »[Ÿ†~Ÿ<ÙèjöÍ×k¼EÎÈYÎ9SÌضÔ-’ú8·-’¡áœ·œåŒœ×È¥Œ iÏŒ©aÀTÚ4¶ë™ sã&{9Ë9¯³™–d&¶æü· “ä,gä¼fÌ&ff ˆ™´|8ç-g9#ç4˜1›€™1 ffÒræü·œåŒœ×Œٛ̌kd&-%ÎyËYÎÈ9%fÌ03¤ÄLZ>œÿ–³œ‘sü̘ý3c@̤­‹sÞr–3rN³af È™™´T9ÿ-g9#瘙1ûÍÌ@—™´Ø8ç-g9#çT™1û£9ðýýýýý­’<Ó”±Ÿ?þüùSëåü·œåŒœã¤˜ýÞÔš¯«É4ìcàœ·œåŒœÓæRÆßÚõ¬Ñ>éþ möikŸÿ6¾r–3rŽbö_óµ öuqrÎ[ÎrFÎ9p)c/Ç—ô)iïÓÚû:ÉäÀ}#r–3rއ³77Çækg—5²ïZ ç¼å,gäœ3f£˜IÖÂÌÏ8ÿ-g9#ç˜1›xm¾v6ˆ}Ñz9ç-g9#çܘ1›…™4 3c¼Çùo9Ë9‡eÆl¡M¶ùÚÙk`ö-)qÎ[ÎrFÎyRÌõ¬¤ô×Ý{(cih­âÙÆRÝ®ä,g9Ë9NŠY0Ý’v>ŸÏç³dòÑœÙêŽûÐ¯¯¯¯¯î>„ôÆ7¬´·.9ËYÎrŽ“b›rªÌ‹2-û ㋜匜S•u1[ãA³ýµØï÷ûýÞ–ƒÄøb{úÈ´˜ÅvМê2ûý~¿ßå°FÞûÆâW–eY–Çãñx|~~~~~ʆʮ˜¹?`ZßßßßßßëZf÷˜@0Í2‹À’3² h3—2¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜ögn+\UUUU`Çãñx<ʆʮ˜Ýï÷ûý~>ŸÏç³á˜Ên·Ûív·Ûív»I†Ê®˜ÁÜŠ¢(Š"¶¥r2 fŠY¶Ûív»=N§ÓÉtʲ,Ë2†%i¶+#’†fVj¿ßï÷{û H‰bXSÉäžÍf³ÙlÂ^ÖçÜÓŽ¯ziðTƶ-u‹drÓÌ~tëÓÐï“›sKÑ"X/3f iÏŒ©aÀTÚ3fízf& ÖE1›‘2,II€õRÌ&¦Œ1PÒ`]³ (c@Ì”4ˆŸbö&e X#% ⤘  Œ)QÒ ŠÙPÆ€(i–bö/”1 gJ,O1ûMèRÒ`ŠÙUUUUÕ|}<Ç£Lºš2ÖÞgSù!‚v«Z$аo€¹™1û­;Wf& È™} ,I1{ª;“Öý>@Jìë Ŭ% H•}Ä@1LIÖξ b£˜¢¤ka1SÌ&£¤±±/€µPÌf¡¤¡ØçÀ)f³SÒ€¹Ù·ÀÚ)f‹zVÒÈÓív»Ýnçóù|>ù>¹éî=”1X;Å,˜nIsÀõ›i}}}}}}5_+cÅ, °Ò³ßï÷û½˜–}¤J1ƒ‰™ù`¨ìŠYY–eYx Ù³º®ëº6ðÓ²w€1~ˆ ,Å 0Å 0Oe\±Ãáp8.—ËårÿÊæ5íï }ý3}–pü_éþÅñùt¿ß^ž>ùŒY÷1£óÞ;혾·ÌCs:ÊS­W ï %ŠYÖ^׌>%¤Ïá阊òºB„:¨Zü–1?3¦ã·¨eÆî½mµ½ü}Fîw—2òféó›YftæÙP7TÎó­…wЦ˜eªÿyúöìÜbK¦Ïå—ýÿ[[@(.edF.Ó£[`bH2Õ1íscû§ã/gõî ±ßï÷û½–QEQq.Ûù|>ŸÏkOøñx<ív»ÝnÇüž_¿~ýúõËk{Îb¶zag^ÿõxŠÄ|¿îûÍÞ{ôHÚc:ÇÚͱ^i'ɴʲ,Ë2Îe;N§ÓIÚîc³Ùl6›Ûív»Ý¼¯mÏ ¥˜­ÞTÏ£›ã¯Ç0'6ŸùÖe¾’ÿ˜Î±výŸÌÙýmÏ^“v’L+ÎÃÙ˜Ïǧ‘vª c{æ=î1cFùÜM´üšÆðDÊ|Fðð’$€ñ³Lõ?(t^?”ñŸá6ÇïÏs‹º¼d[ÆSÌøãõ,|ú›cdÌè„Ù5nQÝeóœI`Iî1ËÚ³{–º?e]£jd§ú»C›ÑÿõÈÄI1[±i?wè!éòÈ;ßõÿ@äå?lüïœc¤æË!žípÌëþ;X»Ýn·ÛíÂ.C>OÕ •¶ç]ŠD$†O6Ëç3ˆB¥íSž€.ÅŒE ½'ù„<×xCvi§¡ªªªªâYžãñx< 1SÌXTž•CÑ 7÷ûý~¿ÇP}› V]>Jü3ˆˆ{ÌrH[Iº3ˆˆ{ÌrHÛ%”@—bqÈ.í4”eY–¥ ?Å €‰Õu]×µ%þ3ˆˆ{ÌrHÛ=f@—bqYi»„èRÌ "Ù¥ äé‡ÂRÌSÌSÌËîáUUUUeàæp<Ç£Þã_(iË™ç,»bv¿ßï÷{üŸFß|bóù*ÍÃ|ã_f Ï÷~{™}:Ó{bxD¾´™Êø4‡Ãáp8t¿¹\.—˘ßÜÚž‰S¦Ëßl6›Í&戢(Š¢¸^¯×ëu-ËL#¶ÃÓf[òHèµXã{¿»Ìô×äÿø¦‘¶=!)±=§Ç=fQØn·Ûí6¥ü€94µß¾Òã¦k*™h¼¾FÜÝ;´™ €”(f´ËXso†Lh4×¾wµÝ½C[{ iÏž)i°^ŠÙB”1`J¤A1›‘2,II€õRÌ&¦Œ1PÒ`]³ (c@Ì”4ˆŸbö&e X#% ⤘  Œ)QÒ ŠÙPÆ€(i–bö/â,cýõ×_ýetâ÷Ï?ÿüóÏ?±-Õáp8F‡>”4Xžbö›™1€.% –¡˜ýQUUUUÍ×Çãñx<Ê «)cí}&0•"h—±ªE2 ûF˜›³ßºse±Í¤5w.Ýn·Ûíf¼êr¹\.9į}¹`X®&€%)fOugÒºßH‰}„¢˜õ¢¤©²O€(fƒ)iÀÚÙw@l³Q”4`-ì£ fŠÙd”4 6öE°ŠÙ,”4 ûX#ÅlvJ07ûX;ÅlQÏJ4ʲ,ËR¼ÖÝ{(c°vŠY0Ý’v>ŸÏç³drV×u]×ý¿On¾¾¾¾¾¾š¯•1H‰bX@öª¬‹Ù/&tdüv»Ýn·‹m¤l9kg mÙ³æžÇãñx<>?????-3Ó2RxïCeWÌÖu¯Ž;‹ Ok|ïÛ_À?D–b˜b˜Ç坨áp8—Ëår¹Œeóšöw†¾þ™>KØgùû/U÷5Ó&°äº¿7:1¬×{ËÜ«~ï]0ÕzÅóîÒ ˜eíuáéS‡úž=Ô~¦ù Sý¶ñ Ì}H=fÙæ[¯×c:~‹šÛëRúzëj/ŸípÉw°v.eäÍÒ5æ7ç“@Øe›c½BýÝP9Ï·ÊЦ˜eªÿyúöÕò M Îq|ï¢Í9Ök½[@ 3fä2­1Ú&ž“ê˜ö¹ˆ±ýÓñõÒ»hsÙê…=dý×ç;èœã~³8×½ý{–¹G+Ô˜†µ9Ö+í$€i)f«7ÕóèæøëiÏ ,¿^Ë”´´Ç´ÿœXŸõ}}‚ çw0”K™ÑÜwå|·Rا¦—ùëõ:¼$I`<Å,Sý S=¯?4å—ð½¿j½ÒÞ¢./ÙŸã)füñz– þåŸê1 q&0fÙB­×·¨î²yÎ$°$÷˜eíÙ=KÝŸJ «ÏøTŸ6tÙBìTwèc3ú¿Þ9€8)f+6íGâ=$]òyÇ/ÿ´ „}ìGØíd¾-*¶ípÌëcÞ–€8¹” 03f,jè}8iÌ'ä¹Öô§˜±¨<+‡¢Àk.eL1L1L1L1L1L1L1L1L1L1ìÏÜV¸ªªªª <ÀŽÇãñx” •]1»ßï÷ûý|>ŸÏgÃ0•Ýn·Ûín·Ûív“ •]1ƒ¹EQElKåd@̳(l·Ûív{:N§“è4”eY–e KÒlWF$ ͬÔ~¿ßï÷öÅ,°¦’É!=›Íf³Ù„½¬+ι;¦_õ Ò ˜Ð.cu]×u- ¿vk×o% ÖK1[ˆ2ÌAI€4(f3RÆ€%)i°^ŠÙÄ”1 JÚºøŒMlÏÞ) ˜M@b¦¤Å¬yƦX»æYÄÇãñx|~~~~~Žùm㬑bö&e X#% ˜Ã÷÷÷÷÷÷º–ùx<GcG<³”1 %JZ âùÌÃ×|""¯Ýï÷ûýÿöÜ¿5Ÿ ö#m K1ûÊ%-”>óð5ŸˆHzÛóõz½^¯Æ‹Ø(fÿBr¦¤…Òþ×'¬´ÿ퓳œå,ç8)fÿ²YÛ°JÚ’šÙ†æëPs9Œ²œå,g9Ç釚G¯67­ªdÏ4ÿÜþüùóçÏŸÒ˜C<€¥}h%g9ËYÎqRÌþß3yªÉ4ì—Ôf5'†œåŒœóáRÆßºLm‚x *ûÀÜ4#9ç-g9#çP³§º3iÝï¤Ä¾.íóßê-g9#ç(f½(i@ªìÓpÎ[ÎrFÎ1PÌSÒ€µ³ïZ ç¿å,gäœÅl% X û(ºœó–³œ‘s<³É(i@lì‹Òàü·œåŒœs ˜ÍBIB±Ï¡ç¼å,gäÅlvJ07û–8ÿ-g9#ç´)f‹zVÒúëî=”1úsÎ[ÎrFÎqRÌ‚é–4›{zÔo¦õõõõõõÕ|­ŒåÉùo9Ë9§J1‹‚¬ôì÷ûý~/¦e_ÁÎyËYÎÈ9fŠLÌÎ ˜›óßr–3rNOvŬ,˲, <ùpÎ[ÎrFÎñË®˜Õu]×µ˜–½ëòœÿ–³œ‘sJ~ˆR圷œåŒœ×B1€kŸÿ–†œåŒœ×K1€9ç-g9#çuñTÆÕ;‡Ãár¹\.—ñ¯l^ÓþÎÐ×?Óg û,ÿ{¥JÓ&Ü^æ>IŽOé½q ûß]÷¡#2~Ë|ï½3ß{ºÜ7"g9#çµSÌøòЧZô9`ªx¼®^óÕ›1¿¹ù¯¦]¶iÇ1ÔO—1f›º ,ù^€gšsÞr³œ‘󺸔‘ßÞ+]c~ó2ËóoŽmCý·±e5ßZ(cÌ­}ÎÛÅHr–3r^Å,kýÏÜ·ç|äöž2|6£õ^õ²ý@œZÉYÎÈy\ÊÈì–¹pkÚƒþî2/s9âÝòc~fÌ–9Ç6à"Fž©ªªª*9`{†œ)f‰;ñú¯O{ºäßšÃÜï½Gäùî˜#“µoŸ,o¿ßï÷{9̧,˲,å°LÎÇãñx|~~~~~ÊÄöÌPŠY"¦zBÝ}Ú²ÌÌÛë;¦Ö2½^ßgã8fXò½ÀÚ¹phu]×umi-¹œ-mü3f·®2Ó˜{rùLÜå5tæÈjï`ŠYÖú&æv(9Õ'V-é½1³ ¤½ý¬qÖËSùíÙf> Ë?cpŽY¬1ãê¿g›÷œI 3f<½©ûÓµKû0zÌ8†úoûÎÐK _/Uª[8°^ÿûøøøøø¸^¯×ëµýş(Š¢(š¯]ʘK `è%…¹]l&€Ü(f HÈ€6—2¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜¦˜ögûÿTUUU•P–ô¿A„òÀû¤—‡]IEND®B`‚xforms-1.0.93sp1/doc/images/FL_INDIANARED.png0000644000175000017500000000056111200407773016730 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pƒIDAThÞíÚ± €0 Q@Ùè¯àžÉ½P*ŠÔW¤{|]kŸUUUI’zÑÝÝ=V¦ûžsÎÝ“¾,I®Ý#þÄX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±€±^Ö-÷˜ïZ•wÄ]Ǫ…%tEXtcreate-date2009-05-07T00:32:27+02:00_µÞ•%tEXtmodify-date2009-05-07T00:32:27+02:00¨¡tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_RED.png0000644000175000017500000000055411200410042015725 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p~IDAThÞíÚ± À0Qœ•X˜’™œÂu¤\EºWüŽ–UUU•™™z033ÝÝÝ{GD¸O{*]_ßìOŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ X>†¼qCn]t–A%tEXtcreate-date2009-05-07T00:33:06+02:00T%¹b%tEXtmodify-date2009-05-07T00:33:06+02:00 ”ÏVtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_BOTTOM_BCOL.png0000644000175000017500000000055511200407322017126 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pIDAThÞíÚ± €@ A@ß‘[pûn•8i£i§‚ÓÆwfffFDDzPUUµ&Sww÷îIß5•®Ý3þÄX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±€5—!ï¦Ò iEVþb¾1%tEXtcreate-date2009-05-07T00:27:30+02:00qô%tEXtmodify-date2009-05-07T00:27:30+02:00.®‚5tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_WHITE.png0000644000175000017500000000055011200406517016203 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pzIDAThÞíÚ± À0 Ä@;+ií¤)5SR¸¶VAÞüögfffDDÄÐFww÷¨ªªºu´*]_oö'ÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒL!o¬cÈÓö3ìœåß%tEXtcreate-date2009-05-07T00:21:03+02:00Ãf™8%tEXtmodify-date2009-05-07T00:21:03+02:00œ×ï tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_TOP_BCOL.png0000644000175000017500000000055411200410505016560 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p~IDAThÞíÚ± À0 ÄÀ$ðFZA+hlí”Bu VvÞÖgffFDD\úÐÝݽ&SUUÕîI§{vøcÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆÖ\vÏ8ÝTz_¤Yü^Ã%tEXtcreate-date2009-05-07T00:37:57+02:00³YÈ%tEXtmodify-date2009-05-07T00:37:57+02:00ìèjütEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/symbols.png0000644000175000017500000001674111171560225016447 0ustar jensjens‰PNG  IHDRc1vvˆ pHYs  ÒÝ~ü“IDATxÚí±uëºE¿ÿrjÀ-Øu(ÔM¨†êD9t¼-¸“ðx \ 1Ì ö޼d‰g‡H¾}ÿ ‚ÿ"Ôƒ¥° –ÀR€X K`)@,ð^óãiš¦iŠ$Çý~¿ßï[F+´B+´B+´Š­Õ{ýîÇãñð.âív»ÝnÚ{A+´B+´B+´Šª•€¥8N§Óižçyž=ŠØÒc¢Z¡Z¡ZEÕŠµ –x·Ó”Ëår¹\xÙ:@<–êTòM*˜_ YŠ4ì)½thCZ—®×ëõzÝû+ú‚š>q­_ÐSÕœ¥XÂc±7hÝžÏçóùDèÅ1‘’þ {‘êpLTOí>ÂèZŠÔX¢ÛAv,idI+’T]J·6ràEs£k"2b±–º¨‘j¢½â`-û´+=‚}L[ ¨Wêzd‰ =}˜T‚ò §Rµ¯Hô–p`)£½©+u½îQgmcP’¡\66#Í¥™òRªõ~Eޱ€¾:‚±è›_^Öžµ¦ƒ3K1Úb  蛡ŒX@ ÚÛ·i.Ÿž9Âê_:B4„ѯ^ÙÉ,†ãrG &:B4Ëqu,ºèü  }#Íý;>"%*!‚ý¸ª‰®´^a/@^50ÈòLïs–t„õêõM$;´|¡s=÷ûý~¿–›ùÓ!Yi1b)–;ü¦% b9??????^Z;Ïó<Ï#GK8!î-…w3‘‚±(•Ö°ÜI]k`,@–^p¼–"’™HYŽˆg5®™€¨ÑÅN¨§oÏèr”"ª™HaÄ"§Kt¡ù˜Ñ•Æ€…öجrvªÓ}/5œYŠÑcÑR4ºÐ|ÌèBРޤn×";=£K1²-ïäF˜.ÑèòóèÂX´ÏÄšœµ¬RͶ'¬éÀ;>&ðÆKªœm'dº"ì`ÓT9XžÉlY ‹7¥Ô(+b@#A`YÓ–‚б“ƨAôÍAzû µ„Ž4ާÑ ƒRu)Ýf¾æÖR:ÇÒ˜ùþ\|ÑÐ&—¿=,?µ#dk½-/;ÍY ¨F7ŒE®ÆRÈ0½2qù»¼:‘§Rj´WÒ¥ ŒÐPC r `'Ñ!6î_n° …   X @lâãõz½^/E+´B+´B+´Kq>ŸÏç3Á„Vh…Vh…Vh52oÌ4@=¬¥° €¹G]­=… ôÑÐľžÇZ¸ýX!£+þ‡Ç'…ÄŽ±^-׋/1Ö764T2a)RYׯä;QA M¶Ó©oI’:ãD 1Fµ‰W–él)Ê“*°ë8'úŒ£I›£ëûøvÎGí%ˆ«½]KqIH?'øÐM´nÍXä{É÷^,õ{¼¬@ŒY8ê’³S Rç½}ÌŒWÝF)ÖœWþy‰G‹7'«O ÝÚhÒKCkG·¶ß–óßk{\Ó¼¾…}ÏB¯|lSËÏÎv{ŽmY/f¨ç)†–gJ  Eç“ úHúÔnjԵ¾†¶}<óýjO—ìÝc›êÅØZû-äi}ìmÝÞßêm¹×$ Fv[ˆsw|ÄÕå:ä©[·’kšrMˆ½^Qm¹…Ç–gKcÆÌÞö[‹Ó–bmm´Iz}ÊÃ+ƸÅÞ˜Ù¦ü·Ú±§qt~±p?ŽÞY°VÇbÄžåÖ–(l§­aÈRäPé'ÇæÉ"Q£ÏZRy×­>f,O$Iñí–sÕÛ÷,جczGͳ(ôz-E*ß¶ ÛÛMÆ+dõúÄЭ&½4lyt1îS(_¶é%Æú®›‘=êí³£wÞÛÇŒ¸²PÏMÜDZ~K’¿²‡>V5ɯ Ú¬ýnyÆ·NïJQûV½µûù‰±^G­qvj¶Ü&fZf·M ½‰´×ëõz½öÚûóù|>ŸÞsS6fÆŒCˆMSKQ“B㤥¯Jåm¶cÚÀ Ú1ƒ± º"YÕ£ èu‹ñ~Å|Œ1Úðõõõõõå÷~‡ö¤Iª_ÓØæ^:XŠšî+xOÝ1Ø;%´­ÕbMFȾ664RMûøøøøøXþþýýýýý3ãöfY} hlóÝîøH¸åoaäÔ…z­FȾö‘CÕß„ò«$®ŽÅ€Æ6kè|)ÆÚ§.ÔkEöÁ6Ø‹œe´`{Ä«<³lŽ)š¸ãƒ©¢¼ƒ¬ï½Ç[½ñŠ—}}ÍhÔj–N‚09²œÙòÑ…<,OP¹‰c{‡îköã–H©ŽsœìcT¦ìÅÂ1caµ“!KQ_˜0#Ã4G zWáÞ³¯¤¸·Œäêöb¯±°¿tÚܹëçh™åÈi3¤ï1ûl®¼­Ž¼ö¢|ÅÚí܇eô )¸|1¦½(19Önê6½–BÖX0£‘æNÍ5Ð%åÏröÙ¿3ˆ 6Ú䈗5k˜¶©dÇŒÅ8åÈ)‰ü‘ï|)/ß½ ‚¥¤6bš¦iš–¿ï÷ûý~qŒÇžÃ(…z"‘Š‘ˆj#êŸÃZŠ3-96‡­ ulaJ¸'D:Æòi޵ÿÚY½dh”3õñí¤pŒíIíw|äû¹ŽÅHÙ»f¢æYm0a)0PÏÞeM(ÇbLjkÜ“2ŽHÏþÞ˜ö…û§gb& ¥ÜX3P?ŒVÍF³ õwsX6×RÔ¤fÖ°9;#¬XCöÖPÙ—IÑÍR`&@Œx‰œØ5mdQWÇb@c›5t˜øÀL@û4æuçP9z{‰ZÓÆœÔØWKEªm£ƒ¥¨Ž „š”C °å¤Iª_ÓØæ^šZ ÌD Ôë©„± ê¬ÅL¤Ê†°pöûF”û;>/TBgÔð¨R$åçyžç™8£o"_`)@, ¶–âõz½^/E+´B+´B+´Kq>ŸÏç3Á„Vh…Vh…Vh52o¬÷€zXK`)@€nºZ{÷‰˜¨Ç5‚Îz²íûˆÜ­ÚÇs_­"åò±ö—ë¯q¦ìœ}²òM-E*ÄÚÁ—|ÇrpD:®qtŽ÷ˆîz­¶‹{ÔÒï=—ý¶?mÑå7+YŠòCM¿c?°¢×8:§ß‰a,ˆÉ1u‹qÞ£¾…gœ¬ì¼–â’~#€ö×%cï7ó_•lg{Ëk[È÷[³µöñ3Z'5×ÐÍNû×j‚FÖ—]M]*©{£K{ûê£k…;ÿ¼üšrù{ïœS›9¿šã*ßZ~Dõ²½åòÖlM[ç½ßlWvbR£„Ù4pmtÓ«]ÖÎûÚ~ËÛYò’îcÿ•ªKÞ³RË3k„+é\k¾ß븶Skû¸ò$<¶÷í}[¤ÑÎú².û.Sû3ë5¹V¿Ì‹VqRs¼5ºõíœ4²¾¾ò´oaû¬´€ã—›[¶5Ò·mzC”¾È[î1®ê(¹ D«µÈ)s%ÆÖŽº—=ê»÷’¶•DTùôÔ1š°kBx™‘:®6qÇô9flê\²¾äØÝ"öKü±\“:Ë~»ÃrÝÊ»ÿ–ºiœw=mGCïìì½g¤ž–"¿²É¯Ñ¥njYÂjŽ«dk-ÏŽåô«ÑYöŽ|ûŠÉÆä1<Ú)Ýê'/Žéfá¼KÕ;†#™“š¼ØÛZΣ·–בQï3–šs•Zžyìóc[ØkþŽÊ^ËÊ<Æ¿vLFÒ*R’m¿ÆâǼÚ«õË6÷Ö¥½‹Ó-g¥vœ7½‰´Äoz«?®Ü¥–«JM¦”|³üì¬mm-iGŽ_1õò FŒIµ¿æìÛYÖ¦.ùÊJíc|ëu5Ðë€cWìrï7~ú^y£ÕºYhÿõ‡èÚ¦ÛZŠxB"¡3Z¡퇑Ïo"Þð³P£ –ÀR€X KT=—bš¦iš"Éq¿ßï÷»Æ–Ñ ­Ð ­Ð ­bk%ð¨«Çãñx<¼‹x»Ýn·›ö^Ð ­Ð ­Ð ­¢j%`)N§Óétšçyžg"¶ô˜h…Vh…Vh…VQµb-€¥0÷w);°¼® ¡W̬>w½^¯×«ß,s3JA!C7hÏ5MdIÍDšw«·KáÝ»YS°Ãv•öØë9[K±¨ÓxÄ»/bS^¥}õz.—gb,êÃ4S‘6iS¥{õŽïøÀX´SËܰ`š*]Þßõíßõ6ÝæÀR¡¿¿¿¿¿¿ SH(› ½‡ò¬!U¥·û»t/Ïçóù|¶?Òwí´éê0°öz¡qÉ—÷wv.,ßÿˆÑŒã{Á^@´ësÚßÙé>=s„5˜‰zX{z,—µÚÖzP£¹ÐñF,0D½Ð3Ö5[fj2WM¢bmbB›°–b!’±ÀL´!ž½Ð˜Ç=öÛ^KƼd÷ò7ö"ã‹à–bÁ»±ÀLô‚µãÐwª4Ín›öâõz½^//góÏŸ?þü±ÖªÔXäç=CXŠåÚȯ÷mèÌ&©øøøøøøXþþýýýýýE¨!¿±Y©lvÒIÏo¼ªÜRx7y b,zá×FÔL7ä‘uò¢W•`-ÅÈÄ«êa-E$3;-ã}4¢&þ·'è-œ#ˆ1ªzÀ›H£š‰<Yì¦ÁGÂoÊ€1ªz(K1‚™ˆ‚ÀF@_bŒR¨O|HuxÛBf&R˜ 9K,À¬¥(BªƒßžÓÙLÀ^°`îø0f"…±Š5°`ôR9ÒäµKK™Xc±€ËDí¿œ-ÏÄL”ëhË6Yb Ð7£˜‰½äÊãñx<€¾¸±˜‰Ýb ̄ܢ å8°˜ 4bìðé™Ð, 6ññz½^¯‚¢Z¡Z¡Z‰€¥8ŸÏçó™`B+´B+´B+´™7a@=¬¥° €‰çR¬=ˆ‰I¿ºkÛö#¹´kÙûÈQG&¢LËLO¿3NöÕÄ’ý8ìf)RiÖä(ùÎÈ lM7©¶µ?®tË£ 2ePƾbÛuÉNÕê`)Ê~LëQ·6mÓ~¸ø8oE!QÆš2Qu-– ­¥¸$¤ŸDMÎtÓhÛZÇŸï%߻ԕÝÚÞ/+¬í¥äskg-jæR£ZÆÌ±Œ.É/Šy±MG)Öœ—ì¼Z¼7˺µi[Viê–´3µ,dž·÷•+¼ÝB¿E®Eª]½”)Ïh;ùe9Ë´c¬óòL )K‚,já³^};¡|¿Ó5C¸mZèë¬k{ãÊ~íj£ÌÞ|±™_²ŠåDzwúX/ÆÜ¼Üü˜ #Ø‹õÐa;rzu´}÷^Ÿ{ó4v–åç´Dj—l4Fb{ä£oŒ™³k3jùÐôÞ­°lj[7½0’jÈ{DY;¿ÖjTìÚe!Ó}E†b}c¬³¥È]UúÉ1qG°RºiØ sªW¤jž“Ѿôè^hŸ5r-^í"fZ*fy²;¥Ã;>µxºÉ†»ö}Û{[[þÛcí?v\ÖÌY¤§FµÏô½‹÷.Ï\˯HµÑBÄv»‰´äúAi_ºIµmí6°ïçnmzþ_ïéN+›¹†2^òKJ±|<ÃæhЛe¡¹Jð¨甈B”!ÓÇTŒ—›€¼‰ÀR€X K`)@,€¥ªÞñ1MÓ4M‘ä¸ßï÷û]cËh…Vh…Vh…V±µxmØãñx<ÞE¼Ýn·ÛM{/h…Vh…Vh…VQµ°§Óét:Íó<ϳG[zL´B+´B+´B«¨Z±–ÀR€ïHcbçÅÇ0m^þÞ¾²a)œ…`Mˆ¬1꘱$ õñ 0×ëõz½jlùù|>ŸÏöGÄć3ê½í5=GF*Ú\o€}¥pÆÒpEXâp‰É^WE~‰—5X —`, /©™ˆw\ZB^Ç&êùÅR8cí‰j&òÌêµwÆ{ÆÉ#í½°<vƒ±mÒòÇ*)â-ÏÄR„ MnŒYF“ÈaœàXŠP¤¥Ÿq ¨aL3q,_Ö´Z¬IŒüúúúúúòÒZ¿Æ–%}̶ދÓR°aaBŽ1¦™ÐÐ*RžÏçóù쥵mºOÈÁR'ŸX3¡¡U cA' %ð¨«! “âDŠcÆ s# %°„ÖÀR¸3qŒT±ô:%)‰±€&>œ™;ä+-`d°Ψ7\Y¦áÈæL*0°€¥pC}çÇØèEÑX º@èK¼1c,@SòKšiš¦iò~\ÜñˆR¼^¯×ë… h…Vh…Vh…V{ùüüüüüô~,…¯g¿÷­Ð ­Ð ­Ð**o,R€zXK`)@€¢µkÏÅÛž4):¡Ôs Ûï±=ÇÎ…ž’uh£á8ñS-6ãÍfŒy¬]#dÜÈU%å½D 5QJ¾²Á:ò¹¨×a»G}D·^üÄ{71FÕâkx¯ úô;¾RÅK;G8èàQ·ô;1Œ1†’c=;ÖR\ÒOôNX¾_©=æÛ9¶ÇË mºÍ¹°ŸØå:Púëãg´N”\CI½c\ëw¶·¹½ßíïïíéÊÛ¿ð^R,òÏÛ”•µýêí½|kÃYR-”=~ßÚĤìj :kè¶÷›^â­oÝ‹40n­ñ›YÛýK}O¤×·¾K òýj´îÝcËÖœ‹’ôžÒ¶fYç––Ë{¼ÕçÚÞŠ#75¢®<ÒüV¤µß˸š8¬ï¹xm˜@0ùjsì&Uò3»–r%å`dGÓ¡fy&1S’Y°WZò^ßô‘(YÜÞ{.¢^ •ëP¢Rýuƒ}é¶½µµ!VïñÖ¦îvßVyäìÍӢŦï% Í]{MÈž‹H¥ª^=,ë\£ÛÞ'Ðx·–u/¶Ð‹º1£Å>ïkÒ¤lÏÿ•}¬Äo—* èSsá½$ÕëЦµèæ+ÞÐjÌltŒÚ¶¾¼/þïö&JvS~rJŸó[\J®™´oï\[+«LRçÂ;R:´‰xº@½V5%9ƽh÷D{ï y+ŸwßޙƩbJ¥×¹°¬?Ožˆ§›µxC+²•cX øìwv:CÐmÔÃfc0&X ø¾ŠWßÎÀ{¡×S›EŒÁ˜`)àÿø-^ æÛQ›5ZŒ-·q>ŸÏçóÙf˾¸}Ô&X ÒA2˜ßW=l1€¥šxÅ‹Áüöêa³ˆ±6cŒOØK1(±;HóÛ¨‡Í"SôŒf XŠá§ƒd0_O=lù¸†¬±ÀLøK1cv æËª‡Íbô«„ÔXìµé¯0¾àé™C@Yþ´D´ÚVeꟼ9NŒ¥†`yÑ×Þ_/°Á¡ƒLÙî ЪD=t(‰%ò1£0L|„…r óA/–ÈG,E@(^%¤ZT,‘02XŠPP¼ö‚V KŒ~ÁÈZK1Ïó<ÏyúíýÜ;5ëÉ)^}a)+ŒŒ˜¥x½^¯× Ak´*YäµýÛxg¸B+ZEÊGâ ʰçóù|>#%Z¡Z¡ZÁȼqcÔÃòLKt¸ãcí±¬%S05¿Á1–_EU©MDÙ×P#;önÓ²ží«‡eõ,DKù65ÎQìªØ‹F–" µ’tÚ›Bãt™ÇÔC“¨¥{õ±©g¯Ü±©žh¨¨[Šò`*O°q@=4AôY z_t[KqIH?á” ^Mb[®úØØ«=ëõ)ù¾õzEK¾÷¼%kíÉ[»öí-×´ ÖP¥Xs¸{ýÆD[=%m"ªü·½4ô•YíõŒTyêÕë«ÆöÞ×Z[Ò-×· š.Ϭ9%˯ö._*Ù¦—S%Ðy ÉÞ­ÙÑP»ØåÙTÞÉYгogÐW½^j”ì%ÿï±ãÕÞòvï)†ÞñQ ùñ’åİzÑUÃò®®ýâVkvÍ»zwˆD]Œ‰u¨¡³¥X›“]Û\’x1BœI)MZ®¥·¦ƒåó´õ,“–·¿êU¿’I„úh‰15Àåh M-E>|”~¢7°Yõb؈Md¯Û,¬Š—ͬceSÏ–•Çšzkö¢o´´ÜZ›-¢¥HÃtÛír‚Û«çQskÕKè™%{91ZåÙžv±©ÆÚѾ[Þþ-½Õ6MuUó„ǽË3#Q¯šlgí¿^u¥Ç2Κžú”?ÝÁšzÚ•¤¼ýù¸ˆÔ‘ÖlY¯UãÐôM¤c>'À‚z±àÓ&¢,kè1³Zê¯ò´éøöÒa-¢£š ú ă7‘€o8V¨‡Q K`)@,€¥° –ÀR€X KüV²Edúï,IEND®B`‚xforms-1.0.93sp1/doc/images/FL_DARKGOLD.png0000644000175000017500000000056611200410630016510 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$pˆIDAThÞíÚ1 €@Ñ… ka5àâÔ k=Q\M1ÕA2OÁÏÔ«ªªÊÌÌ ½èîî>f¦ë:Ïû^=éÛÆØWOøcÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŽyyˆˆcõ˜ïš•8úh_lŒk%tEXtcreate-date2009-05-07T00:39:20+02:00bòì%tEXtmodify-date2009-05-07T00:39:20+02:00=CmØtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/FL_DODGERBLUE.png0000644000175000017500000000056211200411416016734 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p„IDAThÞíÚ± €0A@$Ôó-|O¦SÜ÷Dà‰ ÒN§oÍÌÌŒˆˆXô ªªj™®ë8zŸ=é»Z‹8ÏmöŒ?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`õòÆ8†Ü†Š€­—â%tEXtcreate-date2009-05-07T00:45:34+02:00iÊl%tEXtmodify-date2009-05-07T00:45:34+02:006¡¼XtEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/fd_align.png0000644000175000017500000000456111171560225016517 0ustar jensjens‰PNG  IHDR~-¸5, pHYs  ÒÝ~ü #IDATxÚíÝÏq»8ÆñõN* j`RŠ}M¹r¤®øè.2C*ð ¤ïÍ›‹Òû¾ú~™Ýü°- ¬'______ÿ Øûûûûûû[–eY–µmÛ¶-éãããããã_ ¡PƒÐ¨AhÔ ´jZ5-€oË^Ö4MÓ44`®Óét:–½vah}×u]×5;0­ëº®ëŠ¢(ŠbÍí,ÞÖ‚»i|”eY–åår¹\.kÞ‡sZ5-€„@·ýÞ:Ïó<Ï-5V"‘:Ú«£½šºêh·chÙ[¦ÑŸH¬ªªª*êh©Žöjêª# Óƒ5-€„@ #¡u<Ç#%§5ئ>´lts[Õ‚Ö`›âкwm·;ÒšÛè0¦2´lÆÕºnš6e¡et5¿›¦M¤ãMKA}ºæ5]Ûù|>ŸÏÛ—v™¾›>¦K5Ý&þeU÷um²÷èóéþ[ÊÙk€ BËw$±fœq8ìUúX£ÿÏÕU÷ØÑ¸ˆžL}©…{ZŒ–aÂH“ÐÐbeàÝcM˸Z@ Ä…2æ!º€”:§E\Mù=—CûL·ÏÞgƒÂäô§pÆ )ZýW‘®ùo¿Ý1í3Ý>aŽÒémÖ±¸ˆ›¼]÷[ÕK¬¯$0$t!Ñu÷Ø)Ó2®–ÑKÞSï Ý2-£+®X*lEÁÅžçrdvßþ¥Ö˯Sžj ­±¦ ÂèÊ'äô¶CžçyžÛÞƒzu]×u䪹“OtÉùû—d¿¿ÁcµÆšÏjØqåÿéã-×¼Öž,˲,kÛ¶m[Û5Õ¨,˲,«ªªªJf •Ý0×þ´Øü®™6•&±ÙM¯ëši)PüHÖÑYF\ø‹âÐêÙèÚ¶ª­À6õ¡ÕÓÛÍíQrZ€UFB \ü×èî}EWì­GhÔØý:­¦iš¦±ÝˆÔ‘šcÇÐê/ÖPpqñó’„¥'ðåÜIáþÿûœ·.ß`’J Ÿ0coj<ºdÆÕoÙž£M]Ê|Úy¼ {ð§ì6Nó¢KÒd kê`=•¿>×ÅÁÀ"ÅwÄø;ºˆ+°Kýmœ†ÑE\i2¼Ë¢ÿOi3òhâŠ= ;8§PƒÐ¨AhÔ ´jZ5-€;Þå=Ïó<ÏãV¯_^)§$)\ˆ-áº=iûÝöBÚ1´²,˲,î=àåܾ/IÿßUUUUeï`*Š¢(Šþ¿ÙïÃ’XÝã@x<€ ÆÇp‘0s@hD \$̰ ¡5Ûñx<´­ ŸÏçóÜ£®Ã!D©|>+dy¸EiùD‚üQN,çZc-Ÿ^ØQ Ö8NòymÜ’³]¢´äÇa_øñ £.[¦g¦·LFZÄæ ?¾aÔeÝtPÅ1BtZÐКćðÑ%±TØNã=èÚ§>ÓŒÃß»¶ô‡¹Ÿ>wK‚NÞ‘~Åt§à³MÜ"¤ðÓq>‹}˜$Lƒk±’ÿï]’>Ë æ~Š95Š0=xo8w§à³MÜ"œqõú‰«ôŒG-®c`îï·ýtÿ-5жzèÂkÄdfBN»ùzÜr†yÉ»üèB*ˆ+¼2¾È$|tù|zÜrîMÄ1$G—Èžp“؇Œâ*UkŽ-+ í·‚nãäÓ¸±v€üèòo½1Y5 ’:ìgîÈCËåÆ)¬e÷<-ùÑÅç¸{?…# [ñ9÷³æ»æñÿô¸å ƒ‡@.<€hZV¨5kÿÖ¯'\¿òÐö·‰Ð`Êš¹þx’Ð` ÁcO.¨±ûH«iš¦i$TUBI꺮ë:…‹ý`‡ëõz½^Û¶mÛ–æWQEQÐ#ÉT–eY–UUUUëÓ9§@ÆÇpa¤P i± ¡PƒÐ¨AhÔøõ kuòýlH2Ú°)ÒIEND®B`‚xforms-1.0.93sp1/doc/images/crossbutton.png0000644000175000017500000000547511177122021017340 0ustar jensjens‰PNG  IHDR6¾`Úh¼ pHYs  ÒÝ~ü ïIDATxÚíÝA®¢Xàk§VÀL\Á5¹;ñ8ÔMô´Ò“Ž:&=ï© ®€Ä•Tø+Åêø¢ò<#Ê:"rÏÇË„Åét:No@²?ÿüûïþù-˲,ˬH÷×_üñûï_êÔQZ–eY–V tÙn·Ûí¶žþÍê€! AB‚„( Q¢$D è‹UÀ|,—Ëåri=Lår¹\.ëWb$ÊŒ¸?×´š?Q‡×`$Êì¸?×ý‰O^•‘( Q¢$D È…EpW›Íf³Ù¤´<‡Ã!6ÿØ{k Q˜À=CN¬Âí8œ /EXÂ= Qxh›†”ÿM™Æ"Dá¡¥Œ,»Ú4_7B…[pN&Ð?.l^ýJóì¦3ð„(L ~âù$Dái´çZ'0-! O }W”Â#pN&~é1Ù–´=çSa,BîêÚëoßuïðÏR8œ AB‚„( Qra3UEQÖ0„‘(³“çyžçÖÃ=½¿¿¿¿¿[¼žEUUUUÕÿ(˲,K+ºl·Ûív[O‰@€ ! AB‚üÄå®úo&þÚw7utÔѸßôU¿õs1½S´‹¡Ýé=Ö ÔQ—C˾õ㢓•A×+¯§]Þ u4ÖzЦåpî ]{³ï2å©)ûéýíûßumû®6Bu«#ÍŒBô·yûüüüüü¼ÿ¦$eCÓ<ü•²Yi¾Þ~×µíÓ—9eÃñ,·è»gPGó©£ô¥UG÷7£=ŸÏçóùÛ·oß¾}kž—Ëår¹ÜgùSöjÛ¸Rгù¿)¥xmûá¾~ýúõë×ÇìWuX¯×ëõz÷üRGSÕÑðñ«:º…ÙÎͲ,Ë278lÔêß«½¶}úÜRö¾ï¹‘½V}°ãñx<Õ‘:·ŽÚïmWYúøUÝ‚ ‹fíÚ+ýbWn:Xÿ¨£ô:êšO콌EˆÞ¼´Ò»ø´epíÙôö‡zêH-<;!zWíqØð‘Y×&&åpkú§§·ž²:Š­ýaZBôæÒÝ Ù'M¹°ÿ³RÎ夷u4nõ°œŠß‰N°!xíög¡ŽÆj¯:Ÿ‘( Q¢$D Hˆ@€ ! AB‚„( Q¢äÞ¹W[.—Ëår¬¹=òcrávŠ¢(ŠbÜy~~~~~~Z·Ü“‘èÕ²,˲l¬¹ÕÏs·V™›óù|>ŸÇšÛ~¿ßï÷Ö*÷g$TGiY–eYÆæ0<>Sž&è)<²:Jw»Ýn·«ûsz­ÛWUUU•:b*F¢OïÐ!}Ñ¥ë½̸~ö¨ïßÓm]·_­V«ÕJ1!ú²ì;ó|}u±x{ë‹Òf|Öí‡DÕCÑÙéßÿÝ4´ÛwMwÍ¡=·®%IiÏkëÒv|Noꈚ}Yמajj¾+eº]ÌéÄšË9Ö4žW_”NŸêˆ~.,zz]E2Õ~zûsëWÒ—³¿=sð³üˆÒ··ÛƧ:"Fˆ>½®"² Ój>ëé:VoÑ«Õ1ç¾,û¡<£¾ƒ·¿ºìHqBxýç>§Rè"D_VÊÕƒéí‡|®©}æWç>ÛQ:ÖïDÕ1Ήr‹ûŽ[äý—´¯Ly%åõöR9«D—Óét:>>>>‹z:½ýX¿UGÄü_r»ÇWßfïx<Ç!ßt½^¯×ë<Ïó<¾TÍÛžéŽsîWsû¾ã>Èaøm8QG×.m=m$zµú<Öó"5·ý~¿ßï­Uæ&˲,ËÆšÛv»Ýn·Ö*÷g$TGén·Ûív›Íf³Ù‡ÃáòÞº}UUUU Y†z>ýmÒ— Ҳ,˲ŒÍax|ª#†0äGù}ÿžVŠÍö«ÕjµZ _†C‡ô ĵ—!ó„Ç¤Žˆ¢#ÞÛÛbñöÖ¥Íø¬Û‰¦- Ž¸!:b™ýw”¶ãsÚ²ìßÿÝ4´ÛwMwÍ¡=·®%IiCQ¢£éŽÒiâóÚ3µÿõ]R§ÛÅœ~@¬¹œc@u¤ŽîÃ…E#«»ïf³XÜ+>»Šdªñnûs¬“ÔåìoêH=!z£RüŸ?F¥‹EtöÚbk.‰3: Ž¸‡sGÓ}ðö×—Ýn£`?Ô·#DGÐîsÚ(àv„è é—µ£t¬ß‰þjÙRÿw¬h¿ÝœaºWGü7çD9N§Óéãc±øø¨§ÓÛõ;ÑþÒê¿Ü }`Ê+)¯·—ÊY%ºÜâ~ÔêˆûX47åCn¾õøêÛƒÇãñ8䛎{ãìá·=ã5úÕܾïz½^¯×yžçy>|©š·áÔ'ÕÑ}–¶ž6½Ú¸Ï‹ðô æ©ÞPŽõü"ÏAb*Ή@€ ! AB‚„( Q¢$D Hˆ@€ ! AB‚„( Q¢äy¢W÷¡Üž'Ê<EQŸóôTQîÏHôjY–eY6ÖÜšOH‡ù8ŸÏçóy¬¹í÷ûý~o­rF¢Au”–eY–elÃãs³Ùl6›þ6‡Ãáp8ø{ñ˜ê(Ýív»Ý®îÏé=¶n_UUUUꈩ‰>½C‡ô D—®÷™'tõ¨ïßS{W³ýjµZ­VꈩÑ—eß™çê«‹ÅÛÛÛ[”6ã³n?|$ªŽBˆÎNÿþ說ݾkºkí¹u-IJ{^[”¶ãsÚxSGÔ„è˺ö SSó])ÓíbN? Ö\α ñ¼º¢tªøTGôsaÑÓë*’©öÓÛŸ[¿’¾œý홃Qz¿øTGÄѧ×UäCö aZíÑçé[õjuDŒÃ¹/Ë~(ϨëàmÊeGêˆû¢ÀCè?÷9m”B!ú²R®Lo?äsmìHé3)ç>ÛQ:ÖïDÕ1Ήr‹ûŽ[äý—´¯Ly%åõöR9«D—Óét:‹z:½ýX¿UGÄ,š]pÈMì_}›½ãñx<‡|Óõz½^¯ó<Ïó|øR5o{¦;ι_ÍíûŽû ‡á·áD]»´õ´‘èÕê?ðXÏ‹ðÜ æiÜçySqN‚„( Q¢$D Hˆ@€ ! AB‚„( Q¢$D Hˆ@€ ! AB‚„( Q¢$D Hˆ@€ ! AB‚„(}™ç×.Š¢( ~PG0Ä¢ªªªªê”eY–å«~Õår¹\.ýɹ…,˲,{í RG¨£Úv»Ýn·õôŒF¢—Ëår¹è¦è]¾)z×Xœ€ ! AB‚„( Q¢$D Hˆ@€ ! AB‚„( Q¢$D Hˆ@€ ! AB‚„( QúÒüGQEQX)â#Ñ<Ïó<·: ßûûûûû{=ý/ƒP¨?ÚÏIEND®B`‚xforms-1.0.93sp1/doc/images/FL_SPRINGGREEN.png0000644000175000017500000000056211200411355017105 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p„IDAThÞíÚ± €0A@$Ôó-|O¦SÜ÷Dà‰ ÒN§oÍÌÌŒˆˆXô ªªj™®«÷ã˜=é»Z;ψmöŒ?1`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,`õòÆ8†Ü‰š÷ý %tEXtcreate-date2009-05-07T00:45:01+02:00µ§â(%tEXtmodify-date2009-05-07T00:45:01+02:00ê”tEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/images/borderwidth.png0000644000175000017500000000460211171560225017265 0ustar jensjens‰PNG  IHDRžŒ â> pHYs  ÒÝ~ü 4IDATxÚíݽuêÚ€Ñë7¨@ 8V†ëpH¬JØ¡:!¡êØ´à¨á¼€7ô$‹™…öœÉõ=>ãXˆýK’ᣮ뺮ÿ‚Ù\þs8‡ƒÝ4MÓ4͇öªªªªÊ9çœíx•”RJéòõìˆÉÐAÚ (C;eh€  픡‚2´@P†vÊÐAÚ (C;eh€  픡‚2´@P†vjóªüùùùùùéàY~~~~~~Þq˵€´€´€´€Ƽlh¯ªªªªóù|>Ÿ- —RJ)µmÛ¶í{m¹ЂЂÐÂX 9眳û‘’[ؼöÇ{ZâqMÓ4Móî·B hA haØ‚q…G\FûÞÝ&ÂFx‰Æ}Öñ²L ha¬ã ·2¢°>!†ö ã ó­oD¶`\a# ÀºÚ/Œ+L3¢åð‘o”¡‚2´@P†vÊÐAÚ (C;eh€ 6%ßøÝn·Ûí._ÇãñhALï¥1öžta¿i¡äõoiÁ^Ò‚î7{ìYœi¸ÁœÃXPæúWZÐXÿK(úL;·r´Œ’ µ{Z¢Ìõ]Áð»Î® -Pr,ÁÐþ˲>ÔN_$óÈwA  …øûd¸ciA ZÐBÉ-°4—Çæ7ýçeî“ÝkF eîOŸZ(³…ãûD îw´ …‹ã€u²gÚÿϲæw}Óõ1Ôù>=ò¢ÿÖ‚¿ ÆE_ZÐZ(¹oÁ¥…2[˜þÈЂ×H,Á™öÑ…k)_ãgžœ´°nαkA  …9|ªˆ`9δ?ÍØÅäKÓ}ÖÖÖØÏõûZ”ÖÂôß|îmD ñ[þ¹7ߢäŒëh¥9Óþ„0æì‡%Ž´€Þ±…é÷4Q4å´0¶ýZ äXš3íÿ“Êü´óÖm»oîû;ó?Î-¬»…ù¥xŠÕº[XbÏ …÷mÁ¸®-ð— í³–û㊿עÞ.gW´Pf  …±ÛåyA e¶pëû‡+B ^#ñ8Cû/9EˆçUÛ0ýãaE å´€´0½Oª…ÒZ@ Zà/}Ôu]×uß÷}ßçœsÎ󃿾¾¾¾¾Æ¾û—[Â{I)¥”ƾ۶mÛ¶ïu‹ÆZP±ŽTÀãE¼{ *àYE¼o *à¹E¼K ×ýz#:ÊÐAÚ (C;eh€  픡‚2´@P›˜›Õu]×uîJnhßï÷ûýÞØív»ÝnO§ÓétZ÷-uè 4´×™oÝ£»ÐÂ…CW!†v# ÷Y߸¢´ ´pÍ¡+^<´{YÆãÖñM hA hA haÈ¡+ø¨ëº®ë¾ïû¾Ï9çœíx•”RJéòµ|€  픡‚2´@P†vÊÐAÚ (C;eh€  픡‚2´@P†vÊÐAÚ (C;eh€  픡‚ڼ꧔RJîž«mÛ¶mßk›µ€´€´€´€Æl^ûã‡Ãáp°tx\Ó4MÓ¼ïök-h-h-h- ½xh¯ªªªªóù|>Ÿ-#JËO hA hA haN 9眳û”û¼ûU›ái‰û¬ã©H hA haºã ·ra9¬Iˆ¡ýÂK4æ[ßË2- …±Œ+ÌaD`­ íÆ¦­{D¶`\aŒ á†ö ã CF 4>§‚2´@P†vÊÐAÚ (C;eh€ ‚~Nû«ìv»Ýnwùúx<GûaLÉûG ö‰=£ëß>Ñ‚ý kÀý>Ü3öÉœiøÅœÃXPæúWZÐXÿKs¦_8ZFɆGÓ=-Qæú¿®`ø]gWЂ(¹–fh¿yQˆ§/’yä» ÐB„[=܇±Ð‚(¹þ’ËãoÈoúÏ×z«wW¬ -”Ù‚'HÊláx¥´G´Zs°–æLû¬E9Ìïúò§ë#¬ó/‹zd$¸õàY9¹èK Z€’[ð\”ÙÂôßq¨¯‘Xš3í7,Ür–òôñ3ONZXw α£ÐÂ>U-ð7œi_ÐØ¥æÇ¼ÜÃÁØ¿ì÷µ(­…±-_âV …ø- Š7ߢäŒëh¿äLûÓŒ½”™ŽSNhA h!f Óïi¢YÊial µ@É-ð—œiÿg:•ùi=ç­Ûvß6Ìÿ7—Ør´¿…ù¿»èIT ëna‰ÛŽÞ·ã:ZàU íw.÷Ç/#ÆpË]¡Ì@ c[îy2[¸õ¡…µ¶À«Ú‰$æQÕ¥§Ý“Z-Lßj jÁóh¿ahÿeq߷ܧ«½ã~@ e¶ ´`å£ë-häµ¼eh€  픡‚2´@P†vÊÐA…þœö®ëº®s'P¦ Cû~¿ßï÷î®m·Ûív{:N§S9·Ú¡+(Y¸¡Ý¸Î´rFw- … ‡®€’Ú(Ì·îqE hA hášCW% 1´{YÆ}Ö÷M hA hA haÈ¡+Jöâ¡ýûûûûûÛÝZ-€@ 0ôQ×u]×}ß÷}ŸsÎ9Û)ð*)¥”ÒåkŸÓAÚ (C;eh€  픡‚2´@P†vÊÐAÚ (C;eh€  픡‚2´@P†vÊÐAm®ÿ§ëº®ëìˆà£®ëº®íˆæ_·ò½ËûÍ›ðIEND®B`‚xforms-1.0.93sp1/doc/images/FL_INACTIVE.png0000644000175000017500000000055411200410440016517 0ustar jensjens‰PNG  IHDR2±£è pHYsHHFÉk> vpAg2ˆ!$p~IDAThÞíÚ± €@ A@ß‘[pû®Ç)c6zv*8m|gfffDDÄ¡UUUk2uwwïžô]SéÚ=ãOŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ Xsyðòn*Ý-åÔJá¡¡%tEXtcreate-date2009-05-07T00:37:20+02:00|;+_%tEXtmodify-date2009-05-07T00:37:20+02:00#Š]ktEXtps:HiResBoundingBox50x30+0+0ôIEND®B`‚xforms-1.0.93sp1/doc/part1_goodies.texi0000644000175000017500000010502311375521704016434 0ustar jensjens@node Part I Goodies @chapter Goodies A number of special routines are provided that make working with simple forms even simpler. All these routines build simple forms and handle the interaction with the user. @ifnottex @menu * Messages and Questions:: * Command Log:: * Colormap:: * File Selector:: @end menu @end ifnottex @node Messages and Questions @section Messages and Questions The following routines are meant to give messages to the user and to ask simple questions: @findex fl_show_message() @anchor{fl_show_message()} @example void fl_show_message(const char *s1, const char *s2, const char *s3); @end example @noindent It shows a simple form with three lines of text and a button labeled OK on it. The form is so shown such that the mouse pointer is on the button. Sometimes, it may be more convenient to use the following routine @findex fl_show_messages() @anchor{fl_show_messages()} @example void fl_show_messages(const char *str); @end example @noindent when the message is a single line or when you know the message in advance. Embed newlines in @code{str} to get multi-line messages. As a third alternative you can also use @findex fl_show_msg() @anchor{fl_show_msg()} @example void fl_show_msg(const char * fmt, ...); @end example @noindent The only required argument @code{fmt} is a format string as you would use it for e.g.@: @code{printf(3)}, which then is followed by as many arguments as there are format specifiers in the format string. The string resulting from expansion of the format string using the remaining arguments can have arbitrary length and embedded newline characters (@code{'\n'}), producing line breaks. The size of the message box is automatically made to fit the whole text. Both of the message routines block execution and do not return immediately (but idle callbacks and asynchronous IO continue to be run and checked). Execution resumes when the OK button is pressed or @code{} is hit, or when the message form is removed from the screen by the following routine (for example, triggered by a timeout or idle callback): @findex fl_hide_message() @anchor{fl_hide_message()} @example void fl_hide_message(void) @end example There is also a routine that can be used to show a one-line message that can only be removed programmatically @findex fl_show_oneliner() @anchor{fl_show_oneliner()} @findex fl_hide_oneliner() @anchor{fl_hide_oneliner()} @example void fl_show_oneliner(const char *str, FL_Coord x, FL_Coord y); void fl_hide_oneliner(void); @end example @noindent where @code{str} is the message and @code{x} and @code{y} are the coordinate (relative to the root window) the message should be placed. Note that multi-line message is possible by embedding the newline character in @code{str}. See the demo program @file{preemptive.c} for an example of its use. By default, the background of the message is yellow and the text black. To change this default, use the following routine @findex fl_set_oneliner_color() @anchor{fl_set_oneliner_color()} @example void fl_set_oneliner_color(FL_COLOR background, FL_COLOR textcol); @end example A similar routine exists to change the font style and size @findex fl_set_oneliner_font() @anchor{fl_set_oneliner_font()} @example void fl_set_oneliner_font(int style, int size); @end example @noindent @findex fl_show_alert() @anchor{fl_show_alert()} @findex fl_hide_alert() @anchor{fl_hide_alert()} @example void fl_show_alert(const char *s1, const char *s2, const char *s3, int centered); void fl_hide_alert(void); @end example @noindent work the same as @code{@ref{fl_show_messages()}} goodie except that an alert icon (!) is added and the first string is shown bold-faced. The extra parameter @code{centered} controls whether to display the form centered on the screen. As in the case of messages also another function is avaialble @findex fl_show_alert2() @anchor{fl_show_alert2()} @example void fl_show_alert2(int centered, const char *fmt, ...); @end example @noindent @code{centered} controls if the alert message is centered and @code{fmt} must be a format string as e.g.@: used for @code{printf(3)}. After the format string as many further arguments are required as there are format specifiers in the format string. The string resulting from expansion of the format string using the rest of the arguents can have arbitrary length and the first embedded form-feed character (@code{'\f'}) is used as the separator between the title string and the message of the alert box. Embedded newline characters (@code{'\n'}) produce line breaks. In combination with @code{@ref{fl_add_timeout()}}, it is easy to develop a timed alert routine that goes away when the user pushes the OK button or when a certain time has elapsed: @example static void dismiss_alert(int ID, void *data) @{ fl_hide_alert(); @} void show_timed_alert(const char *s1, const char *s2, const char *s3, int centered) @{ fl_add_timeout( 10000, dismiss_alert, 0 ); /* ten seconds */ /* fl_show_alert blocks, and returns only when the OK button is pushed or when the timeout, in this case, 10 seconds, has elapsed */ fl_show_alert(s1, s2, s3, centered); @} @end example @noindent Then you can use @code{show_timed_alert()} just as @code{@code{fl_show_alert()}} but with added functionality that the alert will remove itself after 10 seconds even if the user does not push the OK button. @findex fl_show_question() @anchor{fl_show_question()} @findex fl_hide_question() @anchor{fl_hide_question()} @example int fl_show_question(const char *message, int def); void fl_hide_question(void); @end example @noindent Again shows a message (with possible embedded newlines in it) but this time with a Yes and a No button. @code{def} controls which button the mouse pointer should be on: 1 for Yes, 0 for No and any other value causes the form to be shown so the mouse pointer is at the center of the form. It returns whether the user pushed the Yes button. The user can also press the @code{} key to mean Yes and the @code{} key to mean No. If the question goodie is removed programmatically via @code{@ref{fl_hide_question()}}, the default @code{def} as given in @code{@ref{fl_show_question()}} is taken. If no default is set, 0 is returned by @code{@ref{fl_show_question()}}. The following code segment shows one way of using @code{@ref{fl_hide_question()}} @example void timeout_yesno(int id, void *data) @{ fl_hide_question(); @} ... fl_add_timeout(5000, timeout_yesno, 0); /* show_question blocks until either timeouts or one of the buttons is pushed */ if (fl_show_question("Want to Quit ?", 1)) exit(0); /* no is selected, continue */ ... /* rest of the code *. @end example @noindent In the above example, the user is given 5 seconds to think if he wants to quit. If within the 5 seconds he can't decide what to do, the timeout is triggered and @code{@ref{fl_show_question()}} returns 1. If, on the other hand, he pushes the No button before the timeout triggers, @code{@ref{fl_show_question()}} returns normally and @code{@ref{fl_hide_question()}} becomes a no-op. @findex fl_show_choice() @anchor{fl_show_choice()} @findex fl_show_choices() @anchor{fl_show_choices()} @findex fl_set_choices_shortcut() @anchor{fl_set_choices_shortcut()} @findex fl_hide_choice() @anchor{fl_hide_choice()} @example int fl_show_choice(const char *s1, const char *s2, const char *s3, int numb, const char *b1, const char *b2, const char *b3, int def); int fl_show_choices(const char *s, int numb, const char *b1, const char *b2, const char *b3, int def); void fl_set_choices_shortcut(const char *s1, const char *s2, const char *s3); void fl_hide_choice(void); @end example @noindent The first routine shows a message (up to three lines) with one, two or three buttons. @code{numb} indicates the number of buttons. @code{b1}, @code{b2} and @code{b3} are the labels of the buttons. @code{def} can be 1, 2 or 3, indicating the default choice. The second routine is similar to the first except that the message is passed as a single string with possible embedded newlines in it. Both routines return the number of the button pressed (1, 2 or 3). The user can also press the @code{<1>}, @code{<2>} or @code{<3>} key to indicate the first, second, or third button. More mnemonic hotkeys can be defined using the shortcut routine, @code{s1}, @code{s2} and @code{s3} are the shortcuts to bind to the three buttons. If the choice goodie is removed by @code{@ref{fl_hide_choice()}}, the default @code{def} is returned. To change the font used in all messages, use the following routine @findex fl_set_goodies_font() @anchor{fl_set_goodies_font()} @example void fl_set_goodies_font(int style, int size); @end example To obtain some text from the user, use the following routine @findex fl_show_input() @anchor{fl_show_input()} @findex fl_hide_input() @anchor{fl_hide_input()} @example const char *fl_show_input(const char *str1, const char *defstr); void fl_hide_input(void); @end example @noindent This shows a box with one line of message (indicated by @code{str1}), and an input field into which the user can enter a string. @code{defstr} is the default input string placed in the input box. In addition, three buttons, labeled @code{Cancel}, @code{OK} and @code{Clear} respectively, are added. The button labeled @code{Clear} deletes the string in the input field. The routine returns the string in the input field when the user presses the @code{OK} button or the @code{} key. The function also returns when button @code{Cancel} is pressed. In this case, instead of returning the text in the input field, @code{NULL} is returned. This routine can be used to have the user provide all kinds of textual input. Removing the input field programmatically by calling @code{@ref{fl_hide_input()}} results in @code{NULL} being returned by @code{@ref{fl_show_input()}}, i.e.@: it's equivalent to pressing the @code{Cancel} button. A similar but simpler routine can also be used to obtain textual input @findex fl_show_simple_input() @anchor{fl_show_simple_input()} @example const char *fl_show_simple_input(const char *str1, const char *defstr); @end example @noindent The form shown in this case only has the @code{OK} button. The example program @file{goodies.c} shows you these goodies. It is possible to change some of the built-in button labels via the following resource function with proper resource names @findex fl_set_resource() @example void fl_set_resource(const char *res_str, const char *value) @end example @noindent To, for example, change the label of the @code{Dismiss} button to @code{"Go"} in the alert form, code similar to the following can be used after calling @code{@ref{fl_initialize()}} but before any use of the alert goodie: @example fl_set_resource("flAlert.dismiss.label", "Go"); @end example Currently the following goodies resources are supported: @table @code @item flAlert.title The window title of the alert goodie @item flAlert.dismiss.label The label of the @code{Dismiss} button @item flQuestion.yes.label The label of the @code{Yes} button @item flQuestion.no.label The label of the @code{No} button @item flQuestion.title The window title of the Question goodie @item flChoice.title The window title of the Choice goodie @item *.ok.label The label of the @code{OK} button @end table Note that all goodies are shown with @code{FL_TRANSIENT} and not all window managers decorate such forms with titles. Thus the title setting in the above listing may not apply. @node Command Log @section Command Log In a number of situations, a GUI is created specifically to make an existing command-line oriented program easier to use. For stylistic considerations, you probably don't want to have the output (@code{stderr} and @code{stdout}) as a result of running the command printed on the terminal. Rather you want to log all the messages to a browser so the user can decide if and when to view the log. For this, a goodie is available @findex fl_exe_command() @anchor{fl_exe_command()} @example long fl_exe_command(const char *cmd, int block); @end example @noindent This function, similar to a @code{system(3)} call, forks a new process that runs the command @code{cmd}, which must be a (null-terminated) string containing a shell command line. The output (both @code{stderr} and @code{stdout}) of @code{cmd} is logged into a browser, which can be presented to the user when appropriate (see below). The @code{block} argument is a flag indicating if the function should wait for the child process to finish. If the argument @code{block} is true (non-zero), the function waits until the command @code{cmd} completes and then returns the exit status of the command @code{cmd}. If the argument @code{block} is false (0), the function returns immediately without waiting for the command to finish. In this case, the function returns the process ID of the child process or -1 if an error occured. Unlike other goodies, @code{@ref{fl_exe_command()}} does not deactivate other forms even in blockng mode. This means that the user can interact with the GUI while @code{@ref{fl_exe_command()}} waits for the child process to finish. If this is not desired, you can use @code{@ref{fl_deactivate_all_forms()}} and @code{@ref{fl_activate_all_forms()}} to wrap the function. If @code{@ref{fl_exe_command()}} is called in non-blocking mode, the following function should be called to clean up related processes and resources before the caller exits (otherwise a zombie process may result) @findex fl_end_command() @anchor{fl_end_command()} @example int fl_end_command(long pid); @end example @noindent where @code{pid} is the process ID returned by @code{@ref{fl_exe_command()}}. The function suspends the current process and waits until the child process is completed, then it returns the exit status of the child process or -1 if an error has occurred. There is another routine that will wait for all the child processes initiated by @code{@ref{fl_exe_command()}} to complete @findex fl_end_all_command() @anchor{fl_end_all_command()} @example int fl_end_all_command(void) @end example @noindent The function returns the status of the last child process. You can also poll the status of a child process using the following routine @findex fl_check_command() @anchor{fl_check_command()} @example int fl_check_command(long pid); @end example @noindent where @code{pid} is the process ID returned by @code{@ref{fl_exe_command()}}. The function returns the following values: 0 if the child process is finished; 1 if the child process still exists (running or stopped) and -1 if an error has occurred inside the function. If some interaction with the command being executed is desired, the following functions may be more appropriate. These functions operates almost exactly as the @code{popen(3)} and @code{pclose(3)} functions: @findex fl_popen() @anchor{fl_popen()} @findex fl_pclose() @anchor{fl_pclose()} @example FILE *fl_popen(const char *command, const char *type); int fl_pclose(FILE *stream); @end example @noindent The @code{@ref{fl_popen()}} function executes the command in a child process, and logs the @code{stderr} messages into the command log. Further, if type is @code{"w"}, @code{stdout} will also be logged into the command browser. @code{@ref{fl_pclose()}} should be used to clean up the child process. To show or hide the logs of the command output, use the following functions @findex fl_show_command_log() @anchor{fl_show_command_log()} @example int fl_show_command_log(int border); void fl_hide_command_log(void); @end example @noindent where @code{border} is the same as that used in @code{@ref{fl_show_form()}}. These two routines can be called anytime anywhere after @code{@ref{fl_initialize()}} has been invoked. The command log is by default placed at the top-right corner of the screen. To change the default placement, use the following routine @findex fl_set_command_log_position() @anchor{fl_set_command_log_position()} @example void fl_set_command_log_position(int x, int y); @end example @noindent where @code{x} and @code{y} are the coordinates of the upper-left corner of the form relative to the root window. The logging of the output is accumulative, i.e.@: @code{@ref{fl_exe_command()}} does not clear the browser. To clear the browser, use the following routine @findex fl_clear_command_log() @anchor{fl_clear_command_log()} @example void fl_clear_command_log(void); @end example It is possible to add arbitrary text to the command browser via the following routine @findex fl_addto_command_log() @anchor{fl_addto_command_log()} @example void fl_addto_command_log(const char *s); @end example @noindent where @code{s} is a (null-terminated) string with possible embedded newlines. The string @code{s} is added to the browser using @code{@ref{fl_addto_browser_chars()}}, i.e.@: the string is appended after the last line in the browser. Finally, there is a routine that can be used to obtain the GUI structure of the command browser @findex fl_get_command_log_fdstruct() @anchor{fl_get_command_log_fdstruct()} @example typedef struct @{ FL_FORM * form; /* the form */ FL_OBJECT * browser; /* the browser */ FL_OBJECT * close_browser; /* the Close button */ FL_OBJECT * clear_browser; /* the Clear button */ @} FD_CMDLOG; FD_CMDLOG *fl_get_command_log_fdstruct(void); @end example @noindent From the information returned, the application program can change various attributes of the command browser and its associated objects. Note however, that you should not hide/show the form or free any member of the structure. @node Colormap @section Colormap In a number of applications the user has to select a color from the colormap. For this a goody has been created. It shows the first 64 entries of the colormap. The user can scroll through the colormap to see more entries. Once the user presses the mouse one of the entries the corresponding index is returned and the colormap is removed from the screen. To display the colormap use the routine @findex fl_show_colormap() @anchor{fl_show_colormap()} @example int fl_show_colormap(int oldcol); @end example @noindent @code{oldcol} should be the current or default color. The user can decide not to change this color by pressing the @code{Cancel} button in the form. The procedure returns the index of the color selected (or the index of the old color). @node File Selector @section File Selector The most extended predefined form is the file selector. It provides an easy and interactive way to let the user select files. It is called as follows: @findex fl_show_fselector() @anchor{fl_show_fselector()} @example const char *fl_show_fselector(const char *message, const char *directory, const char *pattern, const char *default); @end example @noindent A form will be shown in which all files in directory @code{directory} are listed that satisfy the pattern @code{pattern} (see Fig 6.1). @code{pattern} can be any kind of regular expression, e.g.@: @code{[a-f]*.c}, which would list all files starting with a letter between @code{a} and @code{f} and ending with @code{.c}. @code{default} is the default file name. @code{message} is the message string placed at the top of the form. The user can choose a file from the list given and the function then returns a pointer to a static buffer that contains the filename selected, or @code{NULL} if the @code{Cancel} button is pressed (see below). The user can also walk through the directory structure, either by clicking on the box with the name of the currently displayed directory to edit it manually, or by double-clicking on the name of a directory (shown with a 'D' in front of it) shown in the list. If the directory content changes while it is being displayed in the file selector the @code{ReScan} button can be used to request a rescan of the directory. @ifhtml @center @image{images/fselect} @end ifhtml @ifnothtml @center @image{images/fselect,7cm} @end ifnothtml In a typical application, once the file selector goodie is shown, it is up to the user when the file selector should be dismissed by pushing @code{Ready} or @code{Cancel} button. In some situations the application may want to remove the file selector on it's own. To this end, the following routine is available @findex fl_hide_fselector() @anchor{fl_hide_fselector()} @example void fl_hide_fselector(void); @end example @noindent The effect of removing the file selector programmatically is the same as pushing the @code{Cancel} button. There are total of @tindex FL_MAX_FSELECTOR @code{FL_MAX_FSELECTOR} (6) file selectors in the Forms Library with each having its own current directory and content cache. All the file selector functions documented manipulate the currently active file selector, which can be set using the following routine @findex fl_use_fselector() @anchor{fl_use_fselector()} @example int fl_use_fselector(int n); @end example @noindent where @code{n} is a number between 0 and @code{FL_MAX_FSELECTOR - 1}. To change the font the file selector uses, the following routine can be used: @findex fl_set_fselector_fontsize() @anchor{fl_set_fselector_fontsize()} @findex fl_set_fselector_fontstyle() @anchor{fl_set_fselector_fontstyle()} @example void fl_set_fselector_fontsize(int font_size); void fl_set_fselector_fontstyle(int font_style); @end example @noindent These routines change the font for all the objects on the form. It is possible to change the font for some of the objects (e.g., browser only) using @code{@ref{fl_get_fselector_fdstruct()}} explained later. The window title of the file selector can be changed anytime using the following routine @findex fl_set_fselector_title() @anchor{fl_set_fselector_title()} @example void fl_set_fselector_title(const char *title); @end example To force an update programmatically, call @findex fl_invalidate_fselector_cache() @anchor{fl_invalidate_fselector_cache()} @example void fl_invalidate_fselector_cache(void); @end example @noindent before @code{@ref{fl_show_fselector()}}. Note that this call only forces an update once, and on the directory that is to be browsed. To disable caching altogether, the following routine can be used: @findex fl_disable_fselector_cache() @anchor{fl_disable_fselector_cache()} @example void fl_disable_fselector_cache(int yes); @end example @noindent A false (0) parameter (re)enables directory caching. The user can also change the pattern by clicking the mouse on top of it it. Note that directories are shown independent of whether they satisfy the pattern. He can also type in a file name directly. Complete keyboard navigation is built-in. E.g., you can use @code{d} to change the directory instead of using the mouse. When the user is satisfied, i.e., found the correct directory and indicated the file name required, he can press the button labeled @code{Ready} or press the @code{} key. He can also double click on the file name in the browser. The full path to the filename is returned by the procedure. If the user presses the @code{Cancel} button @code{NULL} is returned. It is also possible to set a callback routine so that whenever the user double clicks on a filename, instead of returning the filename, the callback routine is invoked with the filename as the argument. To set such a callback, use the following routine @findex fl_set_fselector_callback() @anchor{fl_set_fselector_callback()} @example void fl_set_fselector_callback(int (*callback)(const char *, void *), void *user_data); @end example @noindent where the second argument of the callback is the @code{user data}. The return value of the callback function is currently not used. Note that the behavior of the file selector is slightly different when a callback is present. Without the callback, a file selector is always modal. Please note that when a file selector has a callback installed the field for manually entering a file name isn't shown. The placement of the file selector is by default centered on the screen, which can be changed by the following routine @findex fl_set_fselector_placement() @anchor{fl_set_fselector_placement()} @example void fl_set_fselector_placement(int place); @end example @noindent where place is the placement request same as in @code{@ref{fl_show_form()}}. The default is @code{FL_PLACE_CENTER | FL_FREE_SIZE}. By default, an fselector is displayed with transient property set. To change the default, use the following routine @findex fl_set_fselector_border() @anchor{fl_set_fselector_border()} @example void fl_set_fselector_border(int border); @end example @noindent The @code{border} request by this function is the same as in @code{@ref{fl_show_form()}}, but @code{FL_NOBORDER} is ignored. If the arguments @code{directory}, @code{pattern} or @code{default} passed to @code{@ref{fl_show_form()}} are empty strings or @code{NULL}, the previous value is used (with some reasonable defaults getting used when this happens the first time). Thus the file selector "remembers" all the settings the selector had last time. The application program can figure out the directory, pattern and file name (without the path) after the user changed them using the routines @findex fl_get_directory() @anchor{fl_get_directory()} @findex fl_get_pattern() @anchor{fl_get_pattern()} @findex fl_get_filename() @anchor{fl_get_filename()} @example const char *fl_get_directory(void); const char *fl_get_pattern(void); const char *fl_get_filename(void); @end example It is also possible to programatically set new values for the default directory and pattern by using the functions @findex fl_set_directory() @anchor{fl_set_directory()} @findex fl_set_pattern() @anchor{fl_set_pattern()} @example int fl_set_directory( const char * dir ); void fl_set_pattern( const char * pattern ); @end example @noindent @code{@ref{fl_set_directory()}} returns 0 on success and 1 on failure, either because the argument was a @code{NULL} pointer or not a valid directory. There are other routines that make the fselector more flexible. The most important of which is the ability to accommodate up to three application specific button: @findex fl_add_fselector_appbutton() @anchor{fl_add_fselector_appbutton()} @example void fl_add_fselector_appbutton(const char *label, void (*callback)(void *), void *data); @end example @noindent The argument @code{data} is passed to the callback. Whenever this application specific button is pushed, the callback function is invoked. To remove an application specific button, use the following routine @findex fl_remove_fselector_appbutton() @anchor{fl_remove_fselector_appbutton()} @example void fl_remove_fselector_appbutton(const char *label); @end example Within the callback function, in addition to using the routines mentioned above, the following routines can be used: @findex fl_refresh_fselector() @anchor{fl_refresh_fselector()} @example void fl_refresh_fselector(void); @end example @noindent This function causes the file selector to re-scan the current directory and to list all entries in it. If, for whatever reasons, there is a need to get the fselector's form the following routine can be used: @findex fl_get_fselector_form() @anchor{fl_get_fselector_form()} @example FL_FORM *fl_get_fselector_form(void); @end example @noindent See @file{fbrowse.c} for the use of the file selector. Although discouraged, it is recognized that direct access to the individual objects of a fselector's form maybe necessary. To this end, the following routine exists @tindex FD_FSELECTOR @findex fl_get_fselector_fdstruct() @anchor{fl_get_fselector_fdstruct()} @example typedef struct @{ FL_FORM * fselect; void * vdata; char * cdata; long ldata; FL_OBJECT * browser, * input, * prompt, * resbutt; FL_OBJECT * patbutt, * dirbutt, * cancel, * ready; FL_OBJECT * dirlabel, * patlabel; FL_OBJECT * appbutt[3]; @} FD_FSELECTOR; FD_FSELECTOR *fl_get_fselector_fdstruct(void); @end example You can, for example, change the default label strings of various buttons via members of the @code{FD_FSELECTOR} structure: @example FD_FSELECTOR *fs = fl_get_fselector_fdstruct(); fl_set_object_label(fs->ready, "Go !"); fl_fit_object_label(fs->ready, 1, 1); @end example @noindent Since the return value of @code{@ref{fl_get_fselector_fdstruct()}} is a pointer to an internal structures, the members of this structure should not be modified. In the listing of files in a directory special files are marked with a prefix in the browser (for example, @code{D} for directories, @code{p} for pipes etc.). To change the prefix, use the following routine @findex fl_set_fselector_filetype_marker() @anchor{fl_set_fselector_filetype_marker()} @example void fl_set_fselector_filetype_marker(int dir, int fifo, int socket, int cdev, int bdev); @end example @noindent where @code{dir} is the marker character for directories, @code{fifo} the marker for pipes and FIFOs, @code{socket} the marker for sockets, @code{cdev} the marker for character device files and, finally, @code{bdev} the marker character for block device files. Although file systems under Unix are similar, they are not identical. In the implementation of the file selector, the subtle differences in directory structures are isolated and conditionally compiled so an apparent uniform interface to the underlying directory structure is achieved. To facilitate alternative implementations of file selectors, the following (internal) routines can be freely used: To get a directory listing, the following routine can be used @tindex FL_Dirlist @findex fl_get_dirlist() @anchor{fl_get_dirlist()} @example const FL_Dirlist *fl_get_dirlist(const char *dirname, const char *pattern, int *nfiles, int rescan); @end example @noindent where @code{dirname} is the directory name; @code{pattern} is a regular expression that is used to filter the directory entries; @code{nfiles} on return is the total number of entries in directory @code{dirname} that match the pattern specified by @code{pattern} (not exactly true, see below). The function returns the address of an array of type @code{FL_Dirlist} with @code{nfiles} if successful and @code{NULL} otherwise. By default, directory entries are cached. Passing the function a true (non-zero) value for the @code{rescan} argument requests a re-read. @code{FL_Dirlist} is a structure defined as follows @example typedef struct @{ char * name; /* file name */ int type; /* file type */ long dl_mtime; /* file modification time */ unsigned long dl_size; /* file size in bytes */ @} FL_Dirlist; @end example @noindent where @code{type} is one of the following file types @table @code @tindex FT_FILE @item FT_FILE a regular file @tindex FT_DIR @item FT_DIR a directory @tindex FT_SOCK @item FT_SOCK a socket @tindex FT_FIFO @item FT_FIFO a pipe or FIFO @tindex FT_LINK @item FT_LINK a symbolic link @tindex FT_BLK @item FT_BLK a block device @tindex FT_CHR @item FT_CHR a character device @item FT_OTHER ? @end table To free the list cache returned by @code{@ref{fl_get_dirlist()}}, use the following call @findex fl_free_dirlist() @anchor{fl_free_dirlist()} @example void fl_free_dirlist(FL_Dirlist *dl); @end example @noindent Note that a cast may be required to get rid of compiler warnings due to the @code{const} qualifier of the return value of @code{@ref{fl_get_dirlist()}}. See demo program @file{dirlist.c} for an example use of @code{@ref{fl_get_dirlist()}}. Per default not all types of files are returned by @code{@ref{fl_get_dirlist()}}. The specific rules for which types of file are returned are controlled by an additional filter after the pattern filter. It has the type @example int default_filter(const char *name, int type); @end example @noindent and is called for each entry found in the directory that matched the pattern. This filter function should return true (non-zero) if the entry is to be included in the directory list. The default filter is similar to the following @example int ffilter(const char *name, int type) @{ return type == FT_DIR || type == FT_FILE || type == FT_LINK; @} @end example @noindent i.e.@: per default only directories, normal files and symbolic links are shown (the first argument of the function, the file name, isn't used by the default filter). To change the default filter, use the following routine @tindex FL_DIRLIST_FILTER @findex fl_set_dirlist_filter() @anchor{fl_set_dirlist_filter()} @example typedef int (*FL_DIRLIST_FILTER)(const char *, int); FL_DIRLIST_FILTER fl_set_dirlist_filter(FL_DIRLIST_FILTER filter); @end example As noted before, directories are by default not subject to filtering. If, for any reason, it is desirable to filter also directories, use the following routine with a true flag @findex fl_set_dirlist_filterdir() @anchor{fl_set_dirlist_filterdir()} @example int fl_set_dirlist_filterdir(int flag); @end example @noindent The function returns the old setting. Since there is only one filter active at any time in XForms, changing the filter affects all subsequent uses of file browsers. By default, the files returned are sorted alphabetically. You can change the default sorting using the following routine: @findex fl_set_dirlist_sort() @anchor{fl_set_dirlist_sort()} @example int fl_set_dirlist_sort(int method); @end example @noindent where @code{method} can be one of the following @table @code @tindex FL_NONE @item FL_NONE Don't sort the entries @tindex FL_ALPHASORT @item FL_ALPHASORT Sort the entries in alphabetic order - this is the default @tindex FL_RALPHASORT @item FL_RALPHASORT Sort the entries in reverse alphabetic order @tindex FL_MTIMESORT @item FL_MTIMESORT Sort the entries according to the modification time @tindex FL_RMTIMESORT @item FL_RMTIMESORT Sort the entries according to the modification time, but reverse the order, i.e., latest first. @tindex FL_SIZESORT @item FL_SIZESORT Sort the entries in increasing size order @tindex FL_RSIZESORT @item FL_RSIZESORT Sort the entries in decreasing size order @tindex FL_CASEALPHASORT @item FL_CASEALPHASORT Sort the entries in alphabetic order with no regard to case @tindex FL_RCASEALPHASORT @item FL_RCASEALPHASORT Sort the entries in reverse alphabetic order with no regard to case. @end table The function returns the old sort method. For directories having large numbers of files, reading the directory can take quite a long time due to sorting and filtering. Electing not to sort and (to a lesser degree) not to filter the directory entries (by setting the filter to @code{NULL}) can speed up the directory reading considerably. xforms-1.0.93sp1/doc/part3_input_objects.texi0000644000175000017500000006747011376031776017700 0ustar jensjens@node Part III Input Objects @chapter Input Objects It is often required to obtain textual input from the user, e.g. a file name, some fields in a database, etc. To this end input fields exist in the Forms Library. An input field is a field that can be edited by the user using the keyboard. @ifnottex @menu * Adding Input Objects: Adding Input Objects * Input Types: Input Types * Input Interaction: Input Interaction * Other Input Routines: Other Input Routines * Input Attributes: Input Attributes * Remarks: Input Remarks @end menu @end ifnottex @node Adding Input Objects @section Adding Input Objects Adding an object To add an input field to a form you use the routine @findex fl_add_input() @anchor{fl_add_input()} @example FL_OBJECT *fl_add_input(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @end example @noindent The meaning of the parameters is as usual. The label is by default placed in front of the input field. @node Input Types @section Input Types The following types of input fields exist: @table @code @tindex FL_NORMAL_INPUT @anchor{FL_NORMAL_INPUT} @item FL_NORMAL_INPUT Any type of text can be typed into this field. @tindex FL_FLOAT_INPUT @anchor{FL_FLOAT_INPUT} @item FL_FLOAT_INPUT Only a float value can be typed in (e.g. -23.2e12). @tindex FL_INT_INPUT @anchor{FL_INT_INPUT} @item FL_INT_INPUT Only an integer value can be typed in (e.g. -86). @tindex FL_DATE_INPUT @anchor{FL_DATE_INPUT} @item FL_DATE_INPUT Only a date (MM/DD/YY or DD/MM/YY) can be typed in (and limited per default to 10 characters). @tindex FL_MULTILINE_INPUT @anchor{FL_MULTILINE_INPUT} @item FL_MULTILINE_INPUT An input field allowing for multiple lines. @tindex FL_SECRET_INPUT @anchor{FL_SECRET_INPUT} @item FL_SECRET_INPUT A normal input field that does not show the text (and limited per default to a maximum length of 16 characters). @tindex FL_HIDDEN_INPUT @anchor{FL_HIDDEN_INPUT} @item FL_HIDDEN_INPUT A normal input field but invisible. @end table A normal input field can contain one line of text, to be typed in by the user. A float input field can only contain a float number. If the user tries to type in something else than a float, it is not shown and the bell is sounded. Similarly, an int input field can only contain an integer number and a date input field can only contain a valid date (see below). A multi-line input field can contain multiple lines of text. A secret input field works like a normal input field but the text is not shown (or scrambled). Only the cursor is shown which does move while text is being entered. This can for example be used for getting passwords. Finally, a hidden input field is not shown at all but does collect text for the application program to use. @node Input Interaction @section Input Interaction Whenever the user presses the mouse inside an input field a cursor will appear in it (and the field will change color to indicate that it received the input focus). Further input will be directed to this field. The user can use the following keys (as in @code{emacs(1)}) to edit or move around inside the input field: @table @asis @item delete previous char @code{} @item delete next char @code{D} @item delete previous word @code{}, @code{W} @item delete next word @code{d} @item delete to end of line @code{k} @item backspace @code{H} @item jump to beginning of line @code{A}, @code{} @item jump to end of line @code{E}, @code{} @item move char backward @code{B}, @code{} @item move char forward @code{F}, @code{} @item move to next line @code{N}, @code{} @item move to previous line @code{P}, @code{} @item move to next page @code{} @item nove to previous page @code{} @item move word backward @code{b} @item move word forward @code{f} @item move to begin of field @code{!}, @code{}, @code{} @item move to end of field @code{?}, @code{}, @code{} @item clear input field @code{U} @item paste @code{y} @end table It is possible to remap the the bindings, see later for details. There are three ways to select part of the input field. Dragging, double-click and triple-click. A double-click selects the word the mouse is on and a triple-click selects the entire line the mouse is on. The selected part of the input field is removed when the user types the @code{} key or replaced by what the user types in. Also the cursor can be placed at different positions in the input field using the mouse. One additional property of selecting part of the text field is that if the selection is done with the left mouse button the selected part becomes the primary (@code{XA PRIMARY}) selection of the X Selection mechanism, thus other applications, e.g., @code{xterm}, can request this selection. Conversely, the cut-buffers from other applications can be pasted into the input field. Use the middle mouse button for pasting. Note that @code{y} only pastes the cut-buffer generated by @code{k} and is not related to the X Selection mechanism, thus it only works within the same application. When the user presses the @code{} key the input field is returned to the application program and the input focus is directed to the next input field. This also happens when the user presses the @code{} key but only if the form does not contain a return button. The order which input fields get the focus when the @code{} is pressed is the same as the order the input fields were added to the form. From within Form Designer, using the raising function you can arrange (re-arrange) the focus order, see @ref{Raising and Lowering}, in Part II for details. If the @code{} key is pressed down when the @code{} is pressed, the focus is directed to the previous input field. Leaving an input field using the @code{}) key does not work for multi-line input fields since the @code{} key is used to start a new line. Per default the input object gets returned to the application (or the callback set for the input object is invoked) when the input field is left and has been changed. Depending on the application, other options might be useful. To change the precise condition for the object to be returned (or its callback to become invoked), the following function can be used: @findex fl_set_input_return() @anchor{fl_set_input_return()} @example void fl_set_input_return(FL_OBJECT *obj, int when); @end example @noindent Where @code{when} can take one of the following values: @table @code @item @ref{FL_RETURN_NONE} Never return or invoke callback @item @ref{FL_RETURN_END_CHANGED} Default, object is returned or callback is called at the end if the field had been modified. @item @ref{FL_RETURN_CHANGED} Return or invoke the callback function whenever the field had been changed. @item @ref{FL_RETURN_END} Return or invoke the callback function at the end regardless if the field was modified or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke the callback function upon each keystroke and at the end (regardless if the field was changed or not) @end table See demo @file{objreturn.c} for an example use of this. A few additional notes: when you read "the fields has been changed" this includes the case that the user e.g.@: deleted a character and then added it back. Also this case is reported as a "change" so the term "changed" does not necessarily mean that the content of the field has changed but that the user made changes (but which still might result in the exact same content as before. Another term that may be understood differently is "end". In the versions since 1.0.91 it means that the users either hits the @code{} or the @code{} key (except for multi-line inputs) or that she clicks onto some other object that in principle allows user interaction. These events are interpreted as an indication the user is done editing the input field and thus are reported back to the program, either by returning the input object or invoking its callback. But unless the user goes to a different input object the input field edited retains the focus. Up to version 1.0.90 this was handled a bit differently: an "end of edit" event was not reported back to the program when the user clicked on a non-input object, i.e. changed to a different input object. This let to some problems when the interaction with the clicked-on non-input object dependet on the new content of the input object, just having been edited, but which hadn't been been reported back to the caller. On the other hand, some programs rely on the "old" behaviour. These programs can switch back to the traditional behaviour by calling the new function (available since 1.0.93) @findex fl_input_end_return_handling @anchor{fl_input_end_return_handling()} @example fl_input_end_return_handling(int type); @end example @noindent where @code{type} can be either @tindex FL_INPUT_END_EVENT_ALWAYS @anchor{FL_INPUT_END_EVENT_ALWAYS} @code{FL_INPUT_END_EVENT_ALWAYS}, which is now the default, or @tindex FL_INPUT_END_EVENT_CLASSIC @anchor{FL_INPUT_END_EVENT_CLASSIC} @code{FL_INPUT_END_EVENT_CLASSIC}, which switches back to the type of handing used in versions up and including to 1.0.90. The function can be used at any time to change between the two possible types of behaviour. The function returns the previous setting. There is a routine that can be used to limit the number of characters per line for input fields of type @code{@ref{FL_NORMAL_INPUT}} @findex fl_set_input_maxchars() @anchor{fl_set_input_maxchars()} @example void fl_set_input_maxchars(FL_OBJECT *obj, int maxchars); @end example @noindent To reset the limit to unlimited, set @code{maxchars} to 0. Note that input objects of type @code{@ref{FL_DATE_INPUT}} are limited to 10 characters per default and those of type @code{@ref{FL_SECRET_INPUT}} to 16. Although an input of type @code{@ref{FL_RETURN_ALWAYS}} can be used in combination with the callback function to check the validity of characters that are entered into the input field, use of the following method may simplify this task considerably: @tindex FL_INPUTVALIDATOR @anchor{FL_INPUTVALIDATOR} @findex fl_set_input_filter() @anchor{fl_set_input_filter()} @example typedef int (*FL_INPUTVALIDATOR)(FL_OBJECT *obj, const char *old, const char *cur, int c); FL_INPUTVALIDATOR fl_set_input_filter(FL_OBJECT *obj, FL_INPUTVALIDATOR filter); @end example @noindent @anchor{FL_VALID} @anchor{FL_INVALID} @anchor{FL_RINGBELL} The function @code{filter()} is called whenever a new (regular) character is entered. @code{old} is the string in the input field before the newly typed character @code{c} was added to form the new string @code{cur}. If the new character is not an acceptable character for the input field, the filter function should return @tindex FL_INVALID @code{FL_INVALID} otherwise @tindex FL_VALID @code{FL_VALID}. If @code{FL_INVALID} is returned, the new character is discarded and the input field remains unmodified. The function returns the old filter. While the built-in filters also sound the keyboard bell, this don't happpens if a custom filter only returns @code{FL_INVALID}. To also sound the keyboard bell logically or it with @tindex FL_RINGBELL @code{FL_INVALID | FL_RINGBELL}. This still leaves the possibility that the input is valid for every character entered, but the string is invalid for the field because it is incomplete. For example, 12.0e is valid for a float input field for every character typed, but the final string is not a valid floating point number. To guard against this, the filter function is also called just prior to returning the object with the argument @code{c} (for the newly entered character) set to zero. If the validator returns @code{FL_INVALID} the object is not returned to the application program, but input focus can change to the next input field. If the return value @code{FL_INVALID | FL_RINGBELL}, the keyboard bell is sound and the object is not returned to the application program and the input focus remains in the object. To facilitate specialized input fields using validators, the following validator dependent routines are available @findex fl_set_input_format() @anchor{fl_set_input_format()} @findex fl_get_input_format() @anchor{fl_get_input_format()} @example void fl_set_input_format(FL_OBJECT *obj, int attrib1, int attrib2); void fl_get_input_format(FL_OBJECT *obj, int *attrib1, int *attrib2); @end example @noindent These two routines more or less provide a means for the validator to store and retrieve some information about user preference or other state dependent information. @code{attrib1} and @code{attrib2} can be any validator defined variables. For the built-in class, only the one of type @code{@ref{FL_DATE_INPUT}} utilizes these to store the date format: for @code{attrib1}, it can take @tindex FL_INPUT_MMDD @code{FL_INPUT_MMDD} or @tindex FL_INPUT_DDMM @code{FL_INPUT_DDMM} and @code{attrib2} is the separator between month and day. For example, to set the date format to @code{dd/mm}, use @example fl_set_input_format(obj, FL_INPUT_DDMM, '/'); @end example For the built-in type @code{@ref{FL_DATE_INPUT}} the default is @code{FL_INPUT_MMDD} and the separator is @code{'/'}. There is no limit on the year other than it must be an integer and appear after month and day. The function @findex fl_validate_input() @anchor{fl_validate_input()} @example int fl_validate_input(FL_OBJECT *obj); @end example can be used to test if the value in an input field is valid. It returns @code{@ref{FL_VALID}} if the value is valid or if there is no validator function set for the input, otherwise @code{@ref{FL_INVALID}}. @node Other Input Routines @section Other Input Routines Note that the label is not the default text in the input field. To set the contents of the input field use the routine @findex fl_set_input() @anchor{fl_set_input()} @example void fl_set_input(FL_OBJECT *obj, const char *str); @end example @noindent There is very limited check for the validity of the string set for the input field. Use an empty string to clear an input field. Setting the content of an input field does not trigger object event, i.e., the object callback is not called. In some situations you might want to have the callback invoked. For this, use the the function @code{@ref{fl_call_object_callback()}} @findex fl_call_object_callback() @example void fl_call_object_callback(FL_OBJECT *obj); @end example To obtain the string in the field (when the user has changed it) use: @findex fl_get_input() @anchor{fl_get_input()} @example const char *fl_get_input(FL_OBJECT *obj); @end example @noindent This function returns a char pointer for all input types. Thus for numerical input types e.g.@: @code{strtol(3)}, @code{atoi(3)}, @code{strtod(3)}, @code{atof(3)} or @code{sscanf(3)} should be used to convert the string to the proper data type you need. For multiline input, the returned pointer points to the entire content with possibly embedded newlines. The application may not modify the content pointed to by the returned pointer, it points to the internal buffer. To select or deselect the current input or part of it, the following two routines can be used @findex fl_set_input_selected() @anchor{fl_set_input_selected()} @findex fl_set_input_selected_range() @anchor{fl_set_input_selected_range()} @example void fl_set_input_selected(FL_OBJECT *obj, int flag); void fl_set_input_selected_range(FL_OBJECT *obj, int start, int end); @end example where @code{start} and @code{end} are measured in characters. When @code{start} is 0 and @code{end} equals the number of characters in the string, @code{@ref{fl_set_input_selected()}} makes the entire input field selected. However, there is a subtle difference between this routine and @code{@ref{fl_set_input_selected()}} when called with @code{flag} set to 1: @code{@ref{fl_set_input_selected()}} always places the cursor at the end of the string while @code{@ref{fl_set_input_selected_range()}q} places the cursor at the beginning of the selection. To obtain the currently selected range, either selected by the application or by the user, use the following routine @findex fl_get_input_selected_range() @anchor{fl_get_input_selected_range()} @example const char *fl_get_input_selected_range(FL_OBJECT *obj, int *start, int *end); @end example @noindent where @code{start} and @code{end}, if not @code{NULL}, are set to the begining and end position of the selected range, measured in characters. For example, if @code{start} is 5 after the function returned and @code{end} is 7, it means the selection starts at character 6 (@code{str[5]}) and ends before character 8 (@code{str[7]}), so a total of two characters are selected (i.e., character 6 and 7). The function returns the selected string (which may not be modified). If there is currently no selection, the function returns @code{NULL} and both @code{start} and @code{end} are set to -1. Note that the @code{char} pointer returned by the function points to (kind of) a static buffer, and will be overwritten by the next call. It is possible to obtain the cursor position using the following routine @findex fl_get_input_cursorpos() @anchor{fl_get_input_cursorpos()} @example int fl_get_input_cursorpos(FL_OBJECT *obj, int *xpos, int *ypos); @end example @noindent The function returns the cursor position measured in number of characters (including newline characters) in front of the cursor. If the input field does not have input focus (thus does not have a cursor), the function returns -1. Upon function return, @code{ypos} is set to the number of the line (starting from 1) the cursor is on, and @code{xpos} set to the number of characters in front of the cursor measured from the beginning of the current line as indicated by @code{ypos}. If the input field does not have input focus the @code{xpos} is set to -1. It is possible to move the cursor within the input field programmatically using the following routine @findex fl_set_input_cursorpos() @anchor{fl_set_input_cursorpos()} @example void fl_set_input_cursorpos(FL_OBJECT *obj, int xpos, int ypos); @end example @noindent where @code{xpos} and @code{ypos} are measured in characters (lines). E.g., given the input field @code{"an arbitrary string"} the call @example fl_set_input_cursorpos(ob, 4, 1); @end example @noindent places the the cursor after the first character of the word @code{"arbitrary"}, i.e.@: directly after the first @code{a}. Shortcut keys can be associated with an input field to switch input focus. To this end, use the following routine @findex fl_set_input_shortcut() @anchor{fl_set_input_shortcut()} @example void fl_set_input_shortcut(FL_OBJECT *obj, const char *sc, int showit); @end example @noindent @c ???? By default, if an input field of type @code{@ref{FL_MULTILINE_INPUT}} contains more text than can be shown, scrollbars will appear with which the user can scroll the text around horizontally or vertically. To change this default, use the following routines @findex fl_set_input_hscrollbar() @anchor{fl_set_input_hscrollbar()} @findex fl_set_input_vscrollbar() @anchor{fl_set_input_vscrollbar()} @example void fl_set_input_hscrollbar(FL_OBJECT *obj, int how); void fl_set_input_vscrollbar(FL_OBJECT *obj, int how); @end example @noindent where @code{how} can be one of the following values @table @code @tindex FL_AUTO @item FL_AUTO The default. Shows the scrollbar only if needed. @tindex FL_ON @item FL_ON Always shows the scrollbar. @tindex FL_OFF @item FL_OFF Never show scrollbar. @end table @noindent Note however that turning off scrollbars for an input field does not turn off scrolling, the user can still scroll the field using cursor and other keys. To completely turn off scrolling for an input field (for both multiline and single line input field), use the following routine with a false value for @code{yes_no} @findex fl_set_input_scroll() @anchor{fl_set_input_scroll()} @example void fl_set_input_scroll(FL_OBJECT *obj, int yes_no); @end example There are also routines that can scroll the input field programmatically. To scroll vertically (for input fields of type @code{@ref{FL_MULTILINE_INPUT}} only), use @findex fl_set_input_topline() @anchor{fl_set_input_topline()} @example void fl_set_input_topline(FL_OBJECT *obj, int line); @end example @noindent where @code{line} is the new top line (starting from 1) in the input field. To programmatically scroll horizontally, use the following routine @findex fl_set_input_xoffset() @anchor{fl_set_input_xoffset()} @example void fl_set_input_xoffset(FL_OBJECT *obj, int pixels); @end example @noindent where @code{pixels}, which must be a positive number, indicates how many pixels to scroll to the left relative to the nominal position of the text lines. To obtain the current xoffset, use @findex fl_get_input_xoffset() @anchor{fl_get_input_xoffset()} @example int fl_get_input_xoffset(FL_OBJECT *obj); @end example It is possible to turn off the cursor of the input field using the following routine with a false value for @code{yes_no}: @findex fl_set_input_cursor_visible() @anchor{fl_set_input_cursor_visible()} @example void fl_set_input_cursor_visible(FL_OBJECT *obj, int yes_no); @end example To obtain the number of lines in the input field, call @findex fl_get_input_numberoflines() @anchor{fl_get_input_numberoflines()} @example int fl_get_input_numberoflines(FL_OBJECT *obj); @end example To obtain the current topline in the input field, use @findex fl_get_input_topline() @anchor{fl_get_input_topline()} @example int fl_get_input_topline(FL_OBJECT *obj); @end example To obtain the number of lines that fit inside the input box, use @findex fl_get_input_screenlines() @anchor{fl_get_input_screenlines()} @example int fl_get_input_screenlines(FL_OBJECT *obj); @end example For secret input field, the default is to draw the text using spaces. To change the character used to draw the text, the following function can be used @findex fl_set_input_fieldchar() @anchor{fl_set_input_fieldchar()} @example int fl_set_input_fieldchar(FL_OBJECT *obj, int field_char); @end example @noindent The function returns the old field char. @node Input Attributes @section Input Attributes Never use @code{@ref{FL_NO_BOX}} as the boxtype. The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the input field when it is not selected and the second (@code{col2}) is the color when selected. To change the color of the input text or the cursor use @findex fl_set_input_color() @anchor{fl_set_input_color()} @example void fl_set_input_color(FL_OBJECT *obj, FL_COLOR tcol, FL_COLOR ccol); @end example @noindent Here @code{tcol} indicates the color of the text and @code{ccol} is the color of the cursor. If you want to know the colors of the text and cursor use @findex fl_get_input_color() @anchor{fl_get_input_color()} @example void fl_get_input_color(FL_OBJECT *obj, FL_COLOR *tcol, FL_COLOR *ccol); @end example By default, the scrollbar size is dependent on the initial size of the input box. To change the size of the scrollbars, use the following routine @findex fl_set_input_scrollbarsize() @anchor{fl_set_input_scrollbarsize()} @example void fl_set_input_scrollbarsize(FL_OBJECT *obj, int hh, int vw); @end example @noindent where @code{hh} is the horizontal scrollbar height and @code{vw} is the vertical scrollbar width in pixels. To determine the current settings for the horizontal scrollbar height and the vertical scrollbar width use @findex fl_get_input_scrollbarsize() @anchor{fl_get_input_scrollbarsize()} @example void fl_get_input_scrollbarsize(FL_OBJECT *obj, int *hh, int *vw); @end example The default scrollbar types are @code{@ref{FL_HOR_THIN_SCROLLBAR}} and @code{@ref{FL_VERT_THIN_SCROLLBAR}}. There are two ways you can change the default. One way is to use @code{@ref{fl_set_defaults()}} or @code{@ref{fl_set_scrollbar_type()}} to set the application wide default (preferred); another way is to use @code{@ref{fl_get_object_component()}} to get the object handle to the scrollbars and change the the object type forcibly. Although the second method of changing the scrollbar type is not recommended, the object handle obtained can be useful in changing the scrollbar colors etc. As mentioned earlier, it is possible for the application program to change the default edit keymaps. The editing key assignment is held in a structure of type @tindex FL_EditKeymap @anchor{FL_EditKeymap} @code{FL_EditKeymap} defined as follows: @example typedef struct @{ long del_prev_char; /* delete previous char */ long del_next_char; /* delete next char */ long del_prev_word; /* delete previous word */ long del_next_word; /* delete next word */ long moveto_prev_line; /* one line up */ long moveto_next_line; /* one line down */ long moveto_prev_char; /* one char left */ long moveto_next_char; /* one char right */ long moveto_prev_word; /* one word left */ long moveto_next_word; /* one word right */ long moveto_prev_page; /* one page up */ long moveto_next_page; /* one page down */ long moveto_bol; /* move to begining of line */ long moveto_eol; /* move to end of line */ long moveto_bof; /* move to begin of file */ long moveto_eof; /* move to end of file */ long transpose; /* switch two char positions*/ long paste; /* paste the edit buffer */ long backspace; /* alias for del_prev_char */ long del_to_eol; /* cut to end of line */ long del_to_bol; /* cut to end of line */ long clear_field; /* delete all */ long del_to_eos; /* not implemented yet */ @} FL_EditKeymap; @end example To change the default edit keymaps, the following routine is available: @findex fl_set_input_editkeymap() @anchor{fl_set_input_editkeymap()} @example void fl_set_input_editkeymap(FL_EditKeymap *km); @end example @noindent with a filled or partially filled @code{@ref{FL_EditKeymap}} structure. The unfilled members must be set to 0 so the default mapping is retained. Change of edit keymap is global and affects all input field within the application. Calling @code{@ref{fl_set_input_editkeymap()}} with @code{km} set to @code{NULL} restores the default. All cursor keys (@code{}, @code{} etc.) are reserved and their meanings hard-coded, thus can't be used in the mapping. For example, if you try to set @code{del_prev_char} to @code{}, pressing the @code{} key will not delete the previous character. In filling the keymap structure, ASCII characters (i.e.@: characters with values below 128, including the control characters with values below 32) should be specified by their ASCII codes (@code{ C} is 3 etc.), while all others by their @code{Keysym}s (@code{XK_F1} etc.). Control and special character combinations can be obtained by adding @tindex FL_CONTROL_MASK @anchor{FL_CONTROL_MASK} @code{FL_CONTROL_MASK} to the @code{Keysym}. To specify @code{Meta} add @tindex FL_ALT_MASK @anchor{FL_ALT_MASK} @code{FL_ALT_MASK} to the key value. @example FL_EditKeymap ekm; memset(ekm, 0, sizeof ekm); /* zero struct */ ekm.del_prev_char = 8; /* control-H */ ekm.del_next_char = 127; /* delete */ ekm.del_prev_word = 'h' | FL_ALT_MASK; /* meta-H */ ekm.del_next_word = 127 | FL_ALT_MASK; /* meta-delete */ ekm.moveto_bof = XK_F1; /* F1 to bof */ ekm.moveto_eof = XK_F1 | FL_CONTROL_MASK; /* cntl-F1 to eof */ fl_set_input_editkeymap(&ekm); @end example @node Input Remarks @section Remarks Always make sure that the input field is high enough to contain a single line of text. If the field is not high enough, the text may get clipped, i.e., become invisible. See the program @file{demo06.c} for an example of the use of input fields. See @file{minput.c} for multi-line input fields. See @file{secretinput.c} for secret input fields and @file{inputall.c} for all input fields. xforms-1.0.93sp1/doc/part2.texi0000644000175000017500000000044511317660077014731 0ustar jensjens@node Part II @unnumbered @emph{Part II - The Form Designer} @menu * Part II Introduction:: * Part II Getting Started:: * Part II Command Line Arguments:: * Part II Creating Forms:: * Part II Saving and Loading Forms:: * Part II Language Filters:: * Part II Generating Hardcopies:: @end menu xforms-1.0.93sp1/doc/part4.texi0000644000175000017500000000046011317660600014720 0ustar jensjens@node Part IV @unnumbered @emph{Part IV - Designing Object Classes} @menu * Part IV Introduction:: * Part IV Global Structure:: * Part IV Events:: * Part IV The Type FL_OBJECT:: * Part IV Drawing Objects:: * Part IV An Example:: * Part IV New Buttons:: * Part IV Using a Pre-emptive Handler:: @end menu xforms-1.0.93sp1/doc/part6_images.texi0000644000175000017500000025354511376032006016263 0ustar jensjens@node Part VI Images @chapter Images Although images are not typically a part of the GUI, they are often part of an application. For this reason and others, image support is part of Forms Library. It is somewhat not unexpected that the users of a graphical user interface want some graphics support. The most important reason to have image support in the library is the amount of questions/requests on the mailing list of the Forms Library about images. It convinced us that having image support will make many Forms Library users life easier. The second reason has something to do with image support in X, which at best is cumbersome to use as the API reflects the underlying hardware, which, at the level of Xlib, is quite appropriate, but not quite what an application programmer wants to deal with. Image support in Forms Library for the large part is hardware independent. This is possible because xforms makes distinction between the real image it keeps and the image being displayed. At the expense of some flexibility and memory requirement, the high-level image support API should prove to be useful for most situations. The third reason is that image support as it is now in the library is well isolated and is only linked into an application when it is actually being used. This is not a trivial point in the consideration to include image support in the library proper. @ifnottex @menu * The Basic Image Support API:: * The @code{FL_IMAGE} Structure:: * Supported image types:: * Creating Images:: * Supported Image Formats:: * Setup and Configuration:: * Simple Image Processing:: * Utilities:: @end menu @end ifnottex @node The Basic Image Support API @section The Basic Image Support API Reading and displaying images are quite easy. It can be as simple as a couple of lines of code: @example FL_IMAGE *image; if ((image = flimage_load("imagefilename")) image->display(image, win); @end example @noindent In this example, an image is created from a file, then the image is displayed in a window, @code{win}. For most casual uses, this is really what is needed to load and display an image. As you may have guessed, an image in Forms Library is represented by a structure of type @code{FL_IMAGE}. In addition to the pixels in the image, it also keeps a variety of information about the image such as its type, dimension, lookup tables etc. Further, if the image can not be displayed directly on the display hardware (for example, the image is 24 bits, while the display is only capable of 8 bits), a separate displayable image is created and displayed. Any manipulation of the image is always performed on the original high-resolution image, and a new displayable image will be created if necessary. Writing an image is just as simple @example if (flimage_dump(image, "filename", "jpeg") < 0) fprintf(stderr,"image write failed"); @end example @noindent In this code snippet, an image in memory is written to a file in JPEG format. As you might have noticed by now, all image routines start with flimage. The exact APIs for reading and writing an image are as follows @findex flimage_load() @anchor{flimage_load()} @findex flimage_dump() @anchor{flimage_dump()} @example FL_IMAGE *flimage_load(const char *filename); int flimage_dump(FL_IMAGE *im, const char *filename, const char *fmt); @end example @noindent The function @code{@ref{flimage_load()}} takes a filename and attempts to read it. If successful, an image (or multiple images) is created and returned. If for any reason the image can't be created (no permission to read, unknown file format, out of memory etc), a null pointer is returned. As will be documented later, error reporting and progress report can be configured so these tasks are performed inside the library. The function @code{@ref{flimage_dump()}} takes an image, either returned by @code{@ref{flimage_load()}} (possibly after some processing) or created on the fly by the application, attempts to create a file to store the image. The image format written is controlled by the third parameter @code{fmt}q, which should be either the formal name or the short name of one of the supported formats (such as jpeg, ppm, gif, bmp etc., see section 23.3) or some other formats the application knows how to write. If this parameter is @code{NULL}, the original format the image was in is used. If the image is successfully written, a non-negative number is returned, otherwise a negative number. Depending on how the image support is configured, error reporting may have already occurred before the function returns. Given these two routines, a file converter (i.e., changing the image file format) is simple @example if ((image = flimage_load("inputfile")) flimage_dump(image, "outfile", "newformat"); @end example @noindent See the demo program @file{iconvert.c} for a flexible and usable image converter. To free an image, use the following routine @findex flimage_free() @anchor{flimage_free()} @example void flimage_free(FL_IMAGE *image); @end example @noindent The function first frees all memory allocated for the image, then the image structure itself. After the function returns, the image should not be referenced. The following routines are available to display an image in a window @findex flimage_display() @anchor{flimage_display()} @findex flimage_sdisplay() @anchor{flimage_sdisplay()} @example int flimage_display(FL_IMAGE *image, FL_WINDOW win); int flimage_sdisplay(FL_IMAGE *image, FL_WINDOW win); @end example @noindent where @code{win} is a window ID. If the image(s) is successfully displayed, a non-negative integer is returned, a negative integer otherwise. The difference between the two display routines is that @code{@ref{flimage_sdisplay()}} only displays a single image while @code{@ref{flimage_display()}}, built on top of @code{flimage_sdisplay()}, can display single or multiple images. For typical use, @code{@ref{flimage_display()}} or @code{image->display} should be used. @code{@ref{flimage_sdisplay()}} is useful only if you're coding your own multi-image display routine. For example, @code{@ref{flimage_display()}} is built roughly like the following @example int flimage_display(FL_IMAGE *im, FL_WINDOW win) @{ int err; for (err = 0; err >=0 && im; im = im->next) @{ err = flimage_sdisplay(im, win); fl_update_display(0); fl_msleep(im->setup->delay); @} return err; @} @end example And you can build your own multi-frame image display routine to suit your application's needs. Despite the display routine's simple look, this function performs tasks that involve the details of dealing with different hardware capabilities, a daunting task for beginners. For PseudoColor displays (i.e., using color maps or color lookup tables), a color quantization or dithering step may be performed by the function to reduce the number of colors in the image (of course, the colorreduced image is kept only for display, the original image is untouched so future processing is carried out on the original full resolution image, rather than the displayed, an approximate of the original image). In general, when the information in an image is reduced in order to display it, the original image is not altered in any way. For example, this function can display a 24bit image on a 1bit display without losing any information on the original 24bit image. By default, the entire image is displayed at the top-left corner of the window. To display the image at other locations within the window (perhaps to center it), use the @code{image->wx} and @code{image->wy} fields of the @code{FL_IMAGE} structure. These two fields specify where in the window the origin of the image should be. By repeatedly changing @code{image->wx} and @code{image->wy} and displaying, image panning can be implemented. It is also possible to display a subimage by specifying non-zero value for @code{(image->sx,image->sy)} and @code{(image->sw, image->sh)}. You can view the image as a 2D space with the origin at the top left corner. The positive y axis of the image space is pointing downward. @code{(image->sx,image->sy)} specify the subimage offset into the image (they must be non-negative) and @code{(image->sw,image->sh)} specify the width and height of the subimage. Taken the window offset and the subimage together, the more accurate statement of the functionality of the the function @code{@ref{flimage_display()}} is that it displays a subimage specified by @code{(image->sx,image->sy)} and @code{(image->sw,image->sh)} starting at @code{(image->wx, image->wy)}. You can also use clipping to display a subimage by utilizing the following functions and @code{image->gc} @example fl_set_gc_clipping(image->gc, x, y, w, h); fl_unset_gc_clipping(image->gc); @end example @noindent where the coordinates are window coordinates. Of course, by manipulating @code{image->gc} directly, more interesting clipping or masking can be achieved. Since the GC is visual dependent, a newly created image before displaying may not yet have a valid GC assoiated with it. If you must set some clipping before displaying, you can set the @code{image->gc} yourself beforehand. Note that you if you free the GC, make sure you reset it to @code{None}. To display an image in a canvas, the following can be used @example flimage_display(image, FL_ObjWin(canvas)); @end example @noindent Since this function only knows about window IDs, and writes to the window directly, it may not be sensitive to the status of the form the canvas is on, e.g., a frozen form. In your application, you should check the status of the form before calling this function. Sometimes it may be useful to find out if a specific file is an image file before attempting to read it (for example, as a file filter). To this end, the following routine exists @findex flimage_is_supported() @anchor{flimage_is_supported()} @example int flimage_is_supported(const char *file); @end example @noindent The function returns true if the specified file is a known image file. If the file is not a known image or not readable for any reason, the function return 0. @node The @code{FL_IMAGE} Structure @section The @code{FL_IMAGE} Structure Before we go into more details on image support, some comments on the image structure are in order. The image structure contains the following basic fields that describe fully the image in question and how it should be displayed. @tindex FL_IMAGE @tindex FL_PCBITS @tindex FL_PCMAX @tindex FL_PACKED @example typedef unsigned char FL_PCTYPE; /* primary color type */ #define FL_PCBITS 8 /* primary color bits */ #define FL_PCMAX ((1<map len}. Although @code{alpha lut} is always allocated for a color index image, it's currently not used by the Forms Library. @item map_len The length of the colormap (lookup table). @item app_background A packed RGB value indicating the preferred color to use for the background of an image (also known as transparent color). This field is initialized to an illegal value. Since there is no portable way to obtain the window background the application has to set this field if transparency is to be achieved. In future versions of image support, other means of doing transparency will be explored and implemented. @item wx, wy The window offset to use to display the image. @item sx, sy, sw, sh The subimage to display. @item comments This is typically set by the loading routines to convey some information about the image. The application is free to choose how to display the comment, which may have embedded newlines in it. @item io_spec This field is meant for the reading/writing routine to place format specific state information that otherwise needs to be static or global. @item spec_size This field should be set to the number of bytes @code{io_spec} contains. @item display A function you can use to display an image. The image loading routine sets this function. @item next This is a link to the next image. This is how @code{@ref{flimage_load()}} chains multiple image together. @item double_buffer If true, the display function will double-buffer the image by using a pixmap. For typical image display it's not necessary to enable double-buffering as it is very expensive (memory and speed). Double-buffering may be useful in image editing. @item pixmap The backbuffer pixmap if double-buffered. @end table Although it is generally not necessary for an application to access individual pixels, the need to do so may arise. In doing so, it is important to consult the @code{image->type} field before dereferencing any of the pixel field. That is, you should access @code{image->ci} only if you know that the image type is @code{FL_IMAGE_CI} or @code{FL_IMAGE_MONO}. @node Supported image types @section Supported image types Forms Library supports all common and not-so-common image types. For example, the supported images range from the simple @w{1 bit} bitmap to full @w{24 bit} RGB images. @w{12 bit} gray scale images (common in medical imaging) are also supported. The supported image types are denoted using the following constants, all of them (except @code{FL_IMAGE_FLEX}) using a different bit, so they can be bitwise ORed together: @tindex FL_IMAGE_MONO @tindex FL_IMAGE_GRAY @tindex FL_IMAGE_GRAY16 @tindex FL_IMAGE_CI @tindex FL_IMAGE_RGB @tindex FL_IMAGE_PACKED @tindex FL_IMAGE_FLEX @example FL_IMAGE_MONO, /* 1 bit bitmaps */ FL_IMAGE_GRAY, /* gray-scale image (8 bit) */ FL_IMAGE_GRAY16, /* gray-scale image (9 to 16 bit) */ FL_IMAGE_CI, /* generic color index image */ FL_IMAGE_RGB, /* 24 bit RGB(A) image */ FL_IMAGE_PACKED, /* 24 bit RGB(A) image. Packed storage */ FL_IMAGE_FLEX, /* All of the above */ @end example For the @w{24 bit} variety another @w{8 bit} (@code{image->alpha} and the top-most byte of the packed integer) is available for the application, perhaps storing the alpha values into it. The Forms Library does not modify or reference this extra byte. Mono (b&w) images are stored as a colormap image with a lut of length 2. The @code{FL_IMAGE_FLEX} type is mainly for the reading and loading routines to indicate the types they are capable of handling. For example, if you're coding an output routine, you use @code{FL_IMAGE_FLEX} to indicate that the output routine can take any type the image. Otherwise the driver will convert the image type before handing the image over to the actual output routine. In displaying an image of type @code{FL_IMAGE_GRAY16}, window leveling, a technique to visualize specific ranges of the data, is employed. Basically, you specify a window level (@code{level}) and a window width (@code{wwidth}) and the display function will map all pixels that fall within @code{level-width/2} and @code{level+width/2} linearly to the whole dynamic range of the intensities the hardware is capable of displaying. For example, if the display device can only display 256 shades of gray, @code{level-width/2} is mapped to 0 and @code{level+width/2} is mapped to 255, and pixels values between @code{level-width/2} and @code{level+width/2} are linearly mapped to values between 0 and 255. Pixel values that fall below @code{level-width/2} are mapped to zero and those that larger than @code{level+width/2} are mapped to 255. Use the following routine to set the window level @findex flimage_windowlevel() @anchor{flimage_windowlevel()} @example int flimage_windowlevel(FL_IMAGE *im, int level, int wwidth); @end example @noindent The function returns 1 if window level parameters are modified, otherwise 0 is returned. Setting @code{wwidth} to zero disables window leveling. Note that if @code{im} points to a multiple image, window level parameters are changed for all images. To obtain the image type name in string format, e.g., for reporting purposes, use the following routine @findex flimage_type_name() @anchor{flimage_type_name()} @example const char *flimage_type_name(int type); @end example To convert between different types of images, the following routine is available @findex flimage_convert() @anchor{flimage_convert()} @example int flimage_convert(FL_IMAGE *image, int newtype, int ncolors); @end example @noindent The parameter @code{newtype} should be one of the supported image types mentioned earlier in this section. Parameter @code{ncolors} is meaningful only if @code{newtype} is @code{FL_IMAGE_CI}. In this case, it specifies the number of colors to generate, most likely from a color quantization process. If the conversion is successful a non-negative integer is returned, otherwise a negative integaer. Depending on which quantization function is used, the number of quantized colors may not be more than 256. To keep information loss to a minimum, @code{@ref{flimage_convert()}} may elect to keep the original image in memory even if the conversion is successful. For example, converting a full color image (@w{24 bit}) into a @w{8 bit} image and then converting back can lose much information of the image if the converting function does not keep the original image. What this means is that the following sequence gets back the original image @example /* the current image is RGB. Now we reduce the full color image to 8 bit color index image. The conversion routine will keep the 24 bit color. */ flimage_convert(image, FL_IMAGE_CI, 256); /* Now convert back to RGB for image processing. The con- version routine will notice that the input image was originally converted from a 24bit image. Instead of doing the conversion, it simply retrieves the saved image and returns. */ flimage_convert(image, FL_IMAGE_RGB, 0); @end example @noindent This behavior might not always be what the application wants. To override it, you can set @code{image->force_convert} to 1 before calling the conversion routine. Upon function return the flag is reset to zero. @node Creating Images @section Creating Images With the basic fields in the image structure and image types explained, we're now in a position to tackle the problem of creating images on the fly. The data may have come from some simulations or some other means, the task now is to create an image from the data and try to display/visualize it. The first task involved in creating an image is to create an image structure that is properly initialized. To this end, the following routine is available @findex flimage_alloc() @anchor{flimage_alloc()} @example FL_IMAGE *flimage_alloc(void); @end example @noindent The function returns a pointer to a piece of dynamically allocated memory that's properly initialized. The task next is to put the existing data into the structure. This involves several steps. The first step is to figure out what type of image to create. For scalar data, there are two logical choices, either a gray-scale intensity image or a color index image with the data being interpreted as indices into some lookup table. Both of these may be useful. Gray-scale imagse are straight forward to create and the meaning of the pixel values is well defined and understood. On the other hand with color-mapped image you can selectively enhance the data range you want to visualize by choosing appropriate color-maps. For vector data, RGB image probably makes most sense. In any case it's strictly application's decision. All that is needed to make it work with Forms Library is to set the @code{image->type} field to a valid value. Of course the image dimension (width and height) also needs to be set. Once this is done, we need to copy the data into the image structure. Before we copy the data we create the destination storage using one of the following routines @findex fl_get_matrix() @anchor{fl_get_matrix()} @findex flimage_getmem() @anchor{flimage_getmem()} @example void *fl_get_matrix(int nrows, int ncols, unsigned int elem_size); int flimage_getmem(FL_IMAGE *image); @end example @noindent The @code{@ref{fl_get_matrix()}} function creates a 2-dimensional array of entities of size @code{elem_size}. The array is of @code{nrows} by @code{ncols} in size. The 2D array can be passed as a pointer to pointer and indexed as a real 2D arrays. The @code{@ref{flimage_getmem()}} routine allocates the proper amount of memory appropriate for the image type, including colormaps when needed. After the destination storage is allocated, copying the data into it is simple @example image->type = FL_IMAGE_GRAY; image->w = data_columns; image->h = data_row; flimage_getmem(image); /* or you can use the instead im->gray = fl_get_matrix(im->h, im->w, sizeof **im->gray); */ for (row = 0; row < image->h; row++) for (col = 0; col < image->w; col++) image->gray[row][col] = data_at_row_and_col; @end example Of course, if data is stored row-by-row, a @code{memcpy(3)} instead of a loop over columns may be more efficient. Also if your data are stored in a single array, @code{@ref{fl_make_matrix()}} might be a lot faster as it does not copy the data. If the created image is a color index image, in addition to copying the data to @code{image->ci}, you also need to set the lookup table length @code{image->map_len}, which should reflect the dynamic range of the data: @example image->type = FL_IMAGE_CI; image->w = A; image->h = B; image->map_len = X; flimage_getmem(image); /* this will allocate ci and lut */ for (row = 0; row < image->h; row++) for (col = 0; col < image->w; col++) image->ci[row][col] = data; for (i = 0; i < image->map_len; i++) @{ image->red_lut[i] = some_value_less_than_FL_PCMAX; image->green_lut[i] = some_value_less_than_FL_PCMAX; image->blue_lut[i] = some_value_less_than_FL_PCMAX; @} @end example If the type is @code{FL_IMAGE_GRAY16}, you also need to set @code{image->gray_maxval} to the maximum value in the data. Now we're ready to display the image @example flimage_display(image, win); @end example As mentioned before, the display routine may create a buffered, display hardware specific and potentially lower-resolution image than the original image. If for any reason, you need to modify the image, either the pixels or the lookup tables, you need to inform the library to invalidate the buffered image: @example image->modified = 1; @end example @node Supported Image Formats @section Supported Image Formats There are many file formats for image storage. The popularity, flexibility and cleanness of the different formats varies. Forms Library supports several popular ones, but these are not the only ones that are popular. Toward the end of this section, it will be outlined how to extend the image support in the Forms Library so more image file can be read by @code{@ref{flimage_load()}}. @ifnottex @menu * Built-in support:: * Adding New Formats:: * Queries:: @end menu @end ifnottex @node Built-in support @subsection Built-in support Each image file format in Forms Library is identified by any one of three pieces of information, the formal name, the short name, and the file extension. For example, for the GIF format, the formal name is @code{"CompuServe GIF"}@footnote{The Graphics Interchange Format (c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated.}, the short name is @code{"GIF"}, and file extension is @code{"gif"}. This information is used to specify the output format for @code{@ref{flimage_dump()}}. The following table summarizes the supported file formats with comments @multitable @columnfractions 0.35 0.2 0.2 0.3 @headitem FormalName @tab ShortName @tab Extension @tab Comments @item Portable Pixmap @tab ppm @tab ppm @item Portable Graymap @tab pgm @tab pgm @item Portable Bitmap @tab pbm @tab pbm @item CompuServe GIF @tab gif @tab gif @item Windows/OS2 BMP file @tab bmp @tab bmp @item JPEG/JFIF format @tab jpeg @tab jpg @item X Window Bitmap @tab xbm @tab xbm @item X Window Dump @tab xwd @tab xwd @item X PixMap @tab xpm @tab xpm @tab XPM3 only @item NASA/NOST FITS @tab fits @tab fits @tab Standard FITS and IMAGE extension @item Portable Network Graphics @tab png @tab png @tab needs netpbm @item SGI RGB format @tab iris @tab rgb @tab need pbmplus/netpbm package @item PostScript format @tab ps @tab ps @tab needs gs for reading @item Tagged Image File Format @tab tiff @tab tif @tab no compression support @end multitable @findex flimage_enable_bmp() @anchor{flimage_enable_bmp()} @findex flimage_enable_pnm() @anchor{flimage_enable_pnm()} @findex flimage_enable_genesis() @anchor{flimage_enable_genesis()} @findex flimage_enable_fits() @anchor{flimage_enable_fits()} @findex flimage_enable_gif() @anchor{flimage_enable_gif()} @findex flimage_enable_gzip() @anchor{flimage_enable_gzip()} @findex flimage_enable_jpeg() @anchor{flimage_enable_jpeg()} @findex flimage_enable_png() @anchor{flimage_enable_png()} @findex flimage_enable_ps() @anchor{flimage_enable_ps()} @findex flimage_enable_sgi() @anchor{flimage_enable_sgi()} @findex flimage_enable_tiff() @anchor{flimage_enable_tiff()} @findex flimage_enable_xbm() @anchor{flimage_enable_xbm()} @findex flimage_enable_xpm() @anchor{flimage_enable_xpm()} @findex flimage_enable_xwd() @anchor{flimage_enable_xwd()} To avoid executable bloating with unnecessary code, only ppm, pgm, pbm and compression filters (gzip and compress) are enabled by default. To enable other formats, call @code{flimage_enable_xxx()} once anywhere after @code{@ref{fl_initialize()}}, where @code{xxx} is the short name for the format. For example, to enable BMP format, @code{flimage_enable_bmp()} should be called. Further, if you enable GIF support, you're responsible for any copyright/patent and intellectual property dispute arising from it. Under no circumstance should the authors of the Forms Library be liable for the use or misuse of the GIF format. Usually there are choices on how the image should be read and written. The following is a rundown of the built-in options that control some aspects of image support. Note that these options are persistent in nature and once set they remain in force until reset. @tindex FLIMAGE_JPEG_OPTIONS @findex flimage_jpeg_output_options() @anchor{flimage_jpeg_output_options()} @example typedef struct @{ int quality; int smoothing; @} FLIMAGE_JPEG_OPTIONS; void flimage_jpeg_output_options(FLIMAGE_JPEG_OPTIONS *option); @end example @noindent The default quality factor for JPEG output is 75. In general, the higher the quality factor rhe better the image is, but the file size gets larger. The default smoothing factor is 0. @findex flimage_pnm_output_options() @anchor{flimage_pnm_output_options()} @example void flimage_pnm_output_options(int raw_format); @end example For PNM (ppm, pgm, and pbm) output, two variants are supported, the binary (raw) and ASCII format. The raw format is the default. If the output image is of type @code{FL_IMAGE_GRAY16}, ASCII format is always output. @findex flimage_gif_output_options() @anchor{flimage_gif_output_options()} @example void flimage_gif_output_options(int interlace); @end example @noindent If @code{interlace} is true, an interlaced output is generated. Transparency, comments, and text are controlled, respectively, by @code{image->tran_rgb}, @code{image->comments} and @code{image->text}. PostScript options affect both reading and writing. @findex flimage_ps_options() @anchor{flimage_ps_options()} @example FLIMAGE_PS_OPTION *flimage_ps_options(void); @end example @noindent where the control structure has the following members @table @code @item int orientation The orientation of the generated image on paper. Valid options are @code{FLPS_AUTO}, @code{FLPS_PORTRAIT} and @code{FLPS_LANDSCAPE}. The default is @code{FLPS_AUTO}. @item int auto_fit By default, the output image is scaled to fit the paper if necessary. Set it to false (0) to turn auto-scaling off. @item float xdpi, ydpi These two are the screen resolution. Typical screens these days have resolutions about @w{80 dpi}. The settings of these affect both reading and writing. @item float paper_w The paper width, in inches. The default is @w{8.5 in}. @item float paper_h The paper height, in inches. The default is @w{11.0 in} @item char* tmpdir A directory name where temporary working files go. The default is @file{/tmp}. @item float hm, vm Horizontal and vertical margins, in inches, to leave when writing images. The default is @w{0.4 in} (about @w{1 cm}). @item float xscale Default is 1.0. @item float yscale Default is 1.0. @item int first_page_only If set, only the first page of the document will be loaded even if the document is multi-paged. The default setting is false. @end table To change an option, simply call @code{@ref{flimage_ps_options()}} and change the field from the pointer returned by the function: @example void SetMyPageSize(float w, float h) @{ FLIMAGE_PS_OPTION *options = flimage_ps_options(); options->paper_w = w; options->paper_h = h; @} @end example All these option setting routines can be used either as a configuration routine or an image-by-image basis by always calling one of these routines before @code{@ref{flimage_dump()}}. For example, @example flimage_jpeg_output_options(option_for_this_image); flimage_dump(im, "file","jpeg"); @end example You can also utilize the @code{image->pre_write} function to set the options. This function, if set, is always called inside @code{@ref{flimage_dump()}} before the actual output begins. @node Adding New Formats @subsection Adding New Formats It is possible for application to add new formats to the library so @code{@ref{flimage_load()}} and @code{@ref{flimage_dump()}} know how to handle them. Basically, the application program tells the library how to identify the image format, and the image dimension, and how to read and write pixels. The API for doing so is the following @tindex FLIMAGE_Identify @tindex FLIMAGE_Description @tindex FLIMAGE_Read_Pixels @tindex FLIMAGE_Write_Image @findex flimage_add_format() @anchor{flimage_add_format()} @example typedef int (*FLIMAGE_Identify)(FILE *); typedef int (*FLIMAGE_Description)(FL_IMAGE *); typedef int (*FLIMAGE_Read_Pixels)(FL_IMAGE *); typedef int (*FLIMAGE_Write_Image)(FL_IMAGE *); int flimage_add_format(const char *formal_name, const char *short_name, const char *extension, int type, FLIMAGE_Identify identify, FLIMAGE_Description description, FLIMAGE_Read_Pixels read_pixels, FLIMAGE_Write_Image write_image); @end example @noindent where we have @table @code @item formal_name The formal name of the image format @item short_name An abbreviated name for the image format @item extension File extension, if this field is @code{NULL}, @code{short_name} will be substituted @item type The image type. This field generally is one of the supported image types (e.g.@: @code{FL_IMAGE_RGB}), but it does not have to. For image file formats that are capable of holding more than one type of images, this field can be set to indicate this by ORing the supported types together (e.g., @code{FL_IMAGE_RGB|FL_IMAGE_GRAY}). However, when description returns, the image type should be set to the actual type in the file. @item identify This function should return 1 if the file pointed to by the file pointer passed in is the expected image format (by checking signature e.g.). It should return a negative number if the file is not recognized. The decision if the file pointer should be rewound or not is between this function and the description function. @item description This function in general should set the image dimension and type fields (and colormap length for color index images) if successful, so the driver can allocate the necessary memory for read pixel. Of course, if @code{read_pixels} elects to allocate memory itself, the @code{description} function does not have to set any fields. However, if reading should continue, the function should return 1 otherwise a negative number. The function should read from input file stream @code{image->fpin}. It is likely that some information obtained in this function needs to be passed to the actual pixel reading routine. The easiest way is, of course, to make these information static within the file, but if a GUI system is in place, all the reading routines should try to be reentrant. The method to avoid static variables is to use the @code{image->io_spec} field to keep these information. If this field points to some dynamically allocated memory, you do not need to free it after @code{read_pixels} function finishes. However, if you free it or this field points to static memory, you should set to this field to @code{NULL} when finished. The following is a short example showing how this field may be utilized. @example typedef struct @{ int bits_per_pixel; int other_stuff; @} SPEC; static int description(FL_IMAGE *im) @{ SPEC *sp = fl_calloc(1, sizeof *sp); im->io_spec = sp; im->spec_size = sizeof *sp; sp->bits_per_pixel = read_from_file(im->fpin); return 0; @} static int read_pixels(FL_IMAGE *im) @{ SPEC *sp = im->io_spec; int bits_per_pixel = sp->bits_per_pixel; read_file_based_on_bits_per_pixel(im->fpin); /* You don't have to free im->io_spec, but if you do remember to set it to NULL before returning */ return 0; @} @end example @item read_pixels This function reads the pixels from the file and fills one of the pixel matrix in the image structure depending on the type. If reading is successful, a non-negative number should be returned otherwise a negative number should be returned. Upon entry, @code{image->completed} is set to zero. The function should not close the file. @item write_image This function takes an image structure and should write the image out in a format it knows. Prior to calling this routine, the driver will have already converted the image type to the type it wants. The function should return 1 on success and a negative number otherwise. If only reading of the image format is supported this parameter can be set to @code{NULL}. The function should write to file stream @code{image->fpout}. @end table By calling @code{@ref{flimage_add_format()}} the newly specified image format is added to a "recognized image format" pool in the library. When @code{@ref{flimage_load()}} is called the library, after verifying that the file is readable, loops over each of the formats and calls the @code{identify} routine until a format is identified or the pool exhausted. If the file is recognized as one of the supported formats the @code{description} routine is called to obtain the image dimension and type. Upon its return the library allocates all memory needed, then calls @code{read_pixels}. If the image format pool is exhausted before the file is recognized @code{@ref{flimage_load()}} fails. On output, when @code{@ref{flimage_dump()}} is called, the requested format name is used to look up the output routine from the image format pool. Once an output routine for the requested format is found, the library looks the image type the output is capable of writing. If the current image type is not among the types supported by the format the library converts image to the type needed prior to calling the output routine @code{write_image()}. So what @code{@ref{flimage_dump()}} does is @example int flimage_dump(FL_IMAGE *im, const char *filename, const char *formatName) @{ format = search_image_format_pool(formatName); if (!format) return -1; im->fpout = fopen(filename); if (im->pre_write) im->pre_write(im); convert image type if necessary(im); format->write_pixels(im); ... @} @end example If the name of the image format supplied by @code{@ref{flimage_add_format()}} is identical to one that is already supported, the new routines replace those that are in the pool. This way, the application can override the built-in supports. For a non-trivial example of adding a new format, see file @file{flimage_jpeg.c}. Another way of adding image formats is through external filters that convert an unsupported format into one that is. All you need to do is inform the library what external filter to use. @code{pbmplus} or @code{netpbm} are excellent packages for this purpose. The library has two functions that deal with external filters @findex flimage_description_via_filter() @anchor{flimage_description_via_filter()} @findex flimage_write_via_filter() @anchor{flimage_write_via_filter()} @example int flimage_description_via_filter(FL_IMAGE * im, char *const *cmds, const char *what, int verbose); int flimage_write_via_filter(FL_IMAGE *im, char *const *cmds, char *const formats[], int verbose); @end example @noindent where @code{cmds} are a list of shell commands (filters) that convert the format in question into one of the supported formats. Parameter @code{what} is for reporting purposes and parameter @code{verbose} controls if some information and error messages should be printed. This is mainly for debugging purposes. Let us go through one example to show how this filter facility can be used. In this example, we support SGI's rgb format via the @code{netpbm} package. As with regular image format, we first define a function that identifies the image format: @example static int IRIS_identify(FILE *fp) @{ char buf[2]; fread(buf, 1, 2, fp); return (buf[0] == '\001' && buf[1] == '\332') || (buf[0] == '\332' && buf[1] == '\001'); @} @end example Then we need to define the filter(s) that can convert a RGB file into one that's supported. Here we use @code{sgitopnm}, but you can use diferent filters if available. Function @code{@ref{flimage_description_via_filter()}} will try all the filters specified until one of them succeeds. If none does an error code is returned: @example static int IRIS_description(FL_IMAGE *im) @{ static char *cmds[] = @{"sgitopnm %s > %s", NULL /* sentinel, indicating end of list of filters */ @}; return flimage_description_via_filter(im, cmds, "Reading RGB...", 0); @} @end example All commands should be suitable format strings for function @code{sprintf()} and contain @code{%s} twice. The first one will be replaced by the input file name, the second by a filename which will be supplied by the library to hold the converted image. The list must be terminate with a @code{NULL} element. In the above example, @code{sgitopnm %s > %s} specifies the external command, @code{sgitopnm}, and how it operates. Basically, the library will do a @code{sprintf(cmdbuf, cmd[i], irisfile, tmpfile)} and then execute @code{cmdbuf}. There is really no need for a load function as the filter will have already invoked the correct load function when it returns. For the record of capability queries, a dummy load function is needed: @example static int IRIS_load(FL_IMAGE * im) @{ fprintf(stderr, "We should never get here...\n"); return -1; @} @end example Writing an image is similar: @example static int IRIS_dump(FL_IMAGE *im) @{ static char *cmds[] = @{"pnmtosgi %s > %s", NULL@}; static char *cmds_rle[] = @{"pnmtosgi -rle %s > %s", NULL@}; static char *formats[] = @{"ppm", "pgm", "pbm", NULL@}; return flimage_write_via_filter(im, rle ? cmds_rle : cmds, formats, 0); @} @end example Again, the external commands should accept two arguments. The first argument will be supplied by the library, a temporary file that holds the converted image in a format the filter understands, and the second argument will be the requested output filename. For output, an additional argument is required. The additional argument @code{formats} specifies the image format accepted by the external filter. In this case, this is the pnm format. It is important that if the filter accepts more than one format, you should specify the formats in decreasing generality, i.e. ppm, pgm, pbm. With these functions in place, finally we're ready to add iris support into the library @example void add_iris(void) @{ flimage_add_format("SGI Iris", "iris", "rgb", FL_IMAGE_RGB|FL_IMAGE_GRAY|FL_IMAGE_MONO, IRIS_identify, IRIS_description, IRIS_load, IRIS_dump); @} @end example @noindent After a call of @code{add_iris()} you can now use @code{@ref{flimage_load()}} and @code{@ref{flimage_dump()}} to read and write SGI iris format just like any other format. @node Queries @subsection Queries Since the number of formats supported by the library is dynamic in nature, some query routines are available to obtain support information. To obtain the number of currently supported image formats, use the routine @findex flimage_get_number_of_formats() @anchor{flimage_get_number_of_formats()} @example int flimage_get_number_of_formats(void); @end example @noindent The functions returns the number of formats supported, for reading or writing or both. To obtain detailed information for each format, the following can be used @tindex FLIMAGE_FORMAT_INFO @findex flimage_get_format_info() @anchor{flimage_get_format_info()} @example typedef struct @{ const char * formal_name; const char * short_name; const char * extension; int type; int read_write; int annotation; @} FLIMAGE_FORMAT_INFO; const FLIMAGE_FORMAT_INFO *flimage_get_format_info(int n); @end example where parameter @code{n} is an integer between 1 and the return value of @code{@ref{flimage_get_number_of_formats()}} . Upon function return a static buffer is returned containing the basic information about the image. The read_write field can be one of the following combinations thereof @table @code @item FLIMAGE_READABLE supports reading @item FLIMAGE_WRITABLE supports writing @end table @noindent or the bitwise OR of both. These two routines are most useful for reporting or presenting capabilities to the user @example FLIMAGE_FORMAT_INFO *info; int n = flimage_get_number_of_formats(); fprintf(stderr,"FL supports the following format\n"); for (; n; n--) @{ info = flimage_get_format_info(n); fprintf(stderr,"%s format\t(%c%c)\n", info->short_name, (info->read_write & FLIMAGE_READABLE) ? 'r' : ' ', (info->read_write & FLIMAGE_WRITABLE) ? 'w' : ' '); @} @end example @node Setup and Configuration @section Setup and Configuration Although the image support is designed with integration into a GUI system in mind, it neither assumes what the GUI system is nor does it need a GUI system to work. As a matter of fact, for the most part it doesn't even need an X connection to work (obviously without a connection, you won't be able to display images). For this reason, some of the typical (and necessary) tasks, such as progress and error reporting, are by default implemented tp only use text output (i.e.@: to @code{stderr}). Obviously, with a GUI in place this is not quite adequate. Hooks are available for application program to re-define what to do with these tasks. The interface to the library configuration is as follows @findex flimage_setup() @anchor{flimage_setup()} @example void flimage_setup(FLIMAGE_SETUP *setup); @end example @noindent where the parameter @code{setup} is a pointer to a structure defined as follows: @tindex FLIMAGE_SETUP @example typedef struct @{ void * app_data; int (*visual_cue)(FL_IMAGE *im, const char *msg); void (*error_message)(FL_IMAGE *im, const char *msg); const char * rgbfile; int do_not_clear; int max_frames; int delay; int double_buffer; int add_extension; @} FLIMAGE_SETUP; @end example @noindent with @table @code @item app_data The application can use this field to set a value so the field @code{image->app_data} in all image structures returned by the library will have this value. It's most useful to set this field to something that's persistent during the application run, such as the @code{fdui} structure of the main control panel. Note that @code{image->app_data} is different from @code{image->u_vdata} in that all image structures returned by the library have the same value of @code{image->app_data}, which is set by the library. In contrast, @code{image->u_vdata} is set by the application on an image-by-image basis. @item visual_cue This is the function that will be called by all image reading, writing and processing routines. The function is meant to give the user some visual feedback about what is happening. For lengthy tasks, this function is called repeatedly and periodically to indicate what percentage of the task is completed and to give the application program a chance to check and process GUI activities (for example, via @code{@ref{fl_check_forms()}}). The first parameter to the function is the image currently being worked on and the second parameter is a short message, indicating the name of the task, such as "Reading JPG" etc. Two fields in the image structure can be used to obtain progress information. The member fields @code{image->total} indicates the total amount of work to be done in some arbitrary units (usually number of rows in the image). @code{image->completed} indicates how much of the task has been completed. The percentage of how much is completed is then simply the ratio of @code{image->completed} and @code{image->total}, multiplied by 100. At the begin of a task @code{image->completed} is set to a value less or equal 1, and at the end of the task, @code{image->completed} is set to @code{image->total}. A special value of -1 for @code{image->completed} may be used to indicate a task of unknown length. @item error_message This is a function that is called when an error (of all severities) has occurred inside the library. It is recommanded that the application provide a means to show the messages to the user by sypplying this function. The first parameter is a pointer to the image that's being worked on, and the second parameter is a brief message, such as "memory allocation failed" etc. A convenience function, @findex flimage_error() @anchor{flimage_error()} @code{@ref{flimage_error()}}, is provided to call the error message handler. @item rgbfile This field should be set to the full path to the color name database (@file{rgb.txt}) if your system has it in non-standard locations. On most systems, this file is @file{/usr/lib/X11/rgb.txt}, which is the default if this field is not set.@footnote{The routine where this field is used searches some more locations than the default and should work on most systems automagically.} @item do_not_clear By default, @code{@ref{flimage_display()}} clears the window before displaying the image. Set this member to 1 to disable window clearing. @item no_auto_extension By default, @code{@ref{flimage_dump()}} changes the filename extension to reflect the format. Set this member to 1 to disable extension substitution. @item double_buffer If set, all image display will by default double-buffered. Double-buffering an image is very expensive (in terms of both resource and speed) as the backbuffer is simulated using a pixmap. If there are no annotations, double-buffering an image does not really improve anything. It is far better to turn double-buffering on and off on a image-by-image basis using the @code{image->double_bufffer} field. @item max_frames This field specifies the maximum number of frames to read by @code{@ref{flimage_load()}}. The default maximum is 30 frames. @item delay This field specifies the delay (in milliseconds) between successive frames. It is used by the @code{@ref{flimage_display()}} routine. @end table Note that it is always a good idea to clear the setup structure before initializing and using it @example FLIMAGE_SETUP mysetup; memset(mysetup, 0, sizeof mysetup); mysetup.max_frames = 100; mysetup.delay = 10; flimage_setup(&mysetup); @end example It is possible to modify the image loading process by utilizing the following routines @code{@ref{flimage_load()}} is based on: @findex flimage_open() @anchor{flimage_open()} @example FL_IMAGE *flimage_open(const char *name); @end example @noindent This function takes a file name and returns an image sturcture pointer if the file is a recognized image file. Otherwise @code{NULL} is returned. The function @findex flimage_read() @anchor{flimage_read()} @example FL_IMAGE *flimage_read(FL_IMAGE *im); @end example @noindent takes an image structure returned by @code{@ref{flimage_open()}} and fills the image structure. Between @code{@ref{flimage_open()}} and @code{@ref{flimage_read()}} you can inspect or modify fields in the image structure. @findex flimage_close() @anchor{flimage_close()} @example int flimage_close(FL_IMAGE *im); @end example @noindent This function closes all file streams used to create the image. @node Simple Image Processing @section Simple Image Processing Some simple image processing capabilities are present in the Forms Library image support. All the image processing routines take an image as a parameter and process it in place. If appropriate, only the subimage specified by @code{(image->subx, image->suby)} and @code{(image->subw, image->subw)} is affected (note these are different fields from those for subimage displaying). The subimage fields are best set via user interaction, perhaps by having a rubber band that the user can drag to set the size. In the following, each routine will be briefly explained. @ifnottex @menu * Convolution:: * Tint:: * Rotation:: * Image Flipping:: * Cropping:: * Scaling:: * Warping:: * General Pixel Transformation:: * Image Annotation:: * Write Your Own Routines:: @end menu @end ifnottex @node Convolution @subsection Convolution Convolution or filtering can be done easily using the following routine @findex flimage_convolve() @anchor{flimage_convolve()} @example int flimage_convolve(FL_IMAGE *im, int** kernel, int krow, int kcol); @end example This function takes a convolution kernel of @code{krow} by @code{kcol} and convolves it with the image. The result replaces the input image. The kernel size should be odd. If successful, the function returns a positive integer, otherwise a negative number. The kernel should be allocated by @code{@ref{fl_get_matrix()}}. To use a kernel that's a C 2-dimensional array (cast to a pointer to int), use the following function @findex flimage_convolvea() @anchor{flimage_convolvea()} @example int flimage_convolvea(FL_IMAGE *im, int* kernel, int krow, int kcol); @end example The difference between these two functions is in their usage syntax: @example int **kernel1 = fl_get_matrix(sizeof **kernel, n, m); int kernel2[n][m]; kernel1[x][y] = z; kernel2[x][y] = z; flimage_convolve(im, kernel1, n, m); flimage_convolvea(im, (int*) kernel2, n, m); /* note the cast */ @end example Two special built-in kernels are designated with the following symbolic constants @table @code @tindex FLIMAGE_SMOOTH @item FLIMAGE_SMOOTH indicates a 3 by 3 smoothing kernel @tindex FLIMAGE_SHARPEN @item FLIMAGE_SHARPEN indicates a 3 by 3 sharpening kernel @end table @node Tint @subsection Tint Tint as implemented in the Forms Library emulates the effect of looking at an image through a piece of colored glass. You can specify the color and transparency of the glass: @findex flimage_tint() @anchor{flimage_tint()} @example int flimage_tint(FL_IMAGE *im, unsigned int packed, double opacity); @end example where the parameter @code{packed} is a packed RGB color, specifying the color of the glass. @code{opacity} specifies how much the color of the image is absorbed by the glass. A value of 0 means the glass is totally transparent, i.e.@: the glass has no effect3, while a value of 1.0 means total opaqueness, i.e.@: all you see is the color of the glass. Any value between these two extremes results in a color that is a combination of the pixel color and the glass color. For example, to tint a part of the image bluish, you can set @code{packed} to @code{FL_PACK(0,0,200)} and use an opacity of 0@footnote{Strictly speaking, a piece of glass that is totally transparent can't have colors.}. Tint is most useful in cases where you want to put some annotations on the image, but do not want to use a uniform and opaque background that completely obscures the image behind. By using tint, you can have a background that provides some contrast to the text, yet not obscures the image beneath completely. Tint operation uses the subimage settings. @node Rotation @subsection Rotation Image rotation can be easily done with the following routine @findex flimage_rotate() @anchor{flimage_rotate()} @example int flimage_rotate(FL_IMAGE *im, int angle, int subpixel); @end example @noindent where @code{angle} is the angle in one-tenth of a degree (i.e., a 45 degree rotation should be specified as 450) with a positive sign for counter-clock rotation. The parameter @code{subpixel} should be one of the following, specifying if subpixel sampling should be enabled. It can be set to either @tindex FLIMAGE_NOSUBPIXEL @code{FLIMAGE_NOSUBPIXEL} or @tindex FLIMAGE_SUBPIXEL @code{FLIMAGE_SUBPIXEL}. If subpixel sampling is enabled, the resulting image pixels are interpolated from the original pixels. This usually has an "anti-aliasing" effect that leads to less severe jagged edges and similar artifacts commonly encountered in rotations. However, it also means that a color indexed image gets converted to a RGB image. If preserving the pixel value is important, you should not turn subpixel sampling on. @code{@ref{flimage_rotate()}} return a negative number if it for some reason (usually due to running out of memory) fails to perform the rotation. Since the rotated image has to be on a rectangular grid, the regions that are not occupied by the image are filled with a fill color, where the default is black. If a different fill color is desired you can set the @code{image->fill_ccolor} field to a packed RGB color before calling the rotation function. Note that even for color indexed images the fill color should be specified in RGB. The rotation function will search the colormap for the appropriate index if no subpixel sampling is used. Repeated rotations should be avoided if possible. If you have to call it more than once it's a good idea to crop after rotations in order to get rid of the regions that contain only fill color. @node Image Flipping @subsection Image Flipping Image flipping refers to the mirror operation in x- or y-direction at the center. For example, to flip the columns of an image, the left and right of the image are flipped (just like having a vertical mirror in the center of the image) thus the first pixel on any given row becomes the last, and the last pixel becomes the first etc. The API for flipping is as follows @findex flimage_flip() @anchor{flimage_flip()} @example int flimage_flip(FL_IMAGE *im, int what); @end example @noindent where @code{what} can be @code{'c'} or @code{'r'}. indicating if column and row flipping is desired. @node Cropping @subsection Cropping There are two functions available to crop an image @findex flimage_autocrop() @anchor{flimage_autocrop()} @findex flimage_crop() @anchor{flimage_crop()} @example int flimage_autocrop(FL_IMAGE *im, unsigned int background); int flimage_crop(FL_IMAGE *im, int xl, int yt, int xr, int yb); @end example The first function, as its name suggests, automatically crops an image using the background as the color to crop. The function works by searching the image from all four sides and removing all contiguous regions of the uniform background from the sides. The image is modified in place. If cropping is successful, a non-negative integer is returned, otherwise -1. If @code{background} is specified as the constant @tindex FLIMAGE_AUTOCOLOR @code{FLIMAGE_AUTOCOLOR}, the background is chosen as the first pixel of the image. The second function uses the parameters supplied by the user to crop the image. @code{xl} and @code{xr} are the offsets into the image from the left and the right sides, respectively, i.e.@: if both @code{xl} and @code{xr} are 1, the cropping removes the first column and the last column from the image. Parameters @code{yt} and @code{yb} specify the offsets into the image from the top and bottom of the image respectively. Note the offsets do not have to be positive. When they are negative, they indicate enlargement of the image. The additional regions are filled with the uniform color specified by @code{image->fill_color}, a packed RGB color. This can be quite useful to add a couple of pixels of border to an image. For example, the following adds a 1 pixel wide yellow border to an image @example image->fill_color = FL_PACK(255,255,0); flimage_crop(image, -1, -1, -1, -1); @end example Another function is available that can be used to obtain the auto-cropping offsets @findex flimage_get_autocrop() @anchor{flimage_get_autocrop()} @example int flimage_get_autocrop(FL_IMAGE *im, unsigned background, int *xl, int *yt, int *xl, int *yb); @end example @noindent This function works the same way as @code{@ref{flimage_autocrop()}}, except that no actual cropping is performed. Upon function return the parameters @code{xl}, @code{yt}, @code{xl} and @code{yb} are set to the offsets found by the function. The application can then make adjustment to these offsets and call @code{@ref{flimage_crop()}}. @node Scaling @subsection Scaling An image can be scaled to any desired size with or without subpixel sampling. Without subpixel sampling simple pixel replication is used, otherwise a box average algorithm is employed that yields an anti-aliased image with much less artifacts. A special option is available that scales the image to the desired size but keeps the aspect ratio of the image the same by filling the part of the image that would otherwise be empty. The main entry point to the scaling function is @findex flimage_scale() @anchor{flimage_scale()} @example int flimage_scale(FL_IMAGE *im, int newwidth, int newheight, int option); @end example @noindent where the parameters @code{newwidth} and @code{newheight} specify the desired image size. Parameter @code{option}q can be one of the following constants or the bitwise OR of them: @table @code @tindex FLIMAGE_NOSUBPIXEL @item FLIMAGE_NOSUBPIXEL scale the image with no subpixel sampling @tindex FLIMAGE_SUBPIXEL @item FLIMAGE_SUBPIXEL scale the image with subpixel sampling @tindex FLIMAGE_ASPECT @item FLIMAGE_ASPECT scale the image with no aspect ratio change @tindex FLIMAGE_CENTER @item FLIMAGE_CENTER center the scaled image if aspect @tindex FLIMAGE_NOCENTER @item FLIMAGE_NOCENTER do not center the scaled image @end table For example, @code{FLIMAGE_ASPECT|FLIMAGE_SUBPIXEL} requests fitting the image to the new size with subpixel sampling. @code{FLIMAGE_ASPECT} specifies a scaling that results in an image of the requested size (even if the scales are different for width and height) without changing the aspect ratio of the original image by filling in the stretched regions with the fill color @code{image->fill_color}, a packed RGB color: @example im->fill_color = FL_PACK(255,0,0); flimage_scale(im, im->w+2, im->h, FLIMAGE_SUBPIXEL|FLIMAGE_ASPECT); @end example @noindent This code generates an image that is two pixels wider than the original image but with the same aspect ratio. The two additional pixel columns on each side of the image are filled with the fill color (red), yielding a red border. The fitting can be useful in turning a series of images of unequal sizes into images of equal sizes with no perceptible change in image quality. Depending on what the application requires, simple scaling (zooming) with no subpixel sampling is much faster than box averaging or blending, but subpixel sampling tends to yield smoother images with less scaling artifacts. @node Warping @subsection Warping Image warping (or texture mapping in 2D) refers to the transformation of pixel coordinates. Rotation, scaling and shearing etc. are examples of (linear and non-perspective) image warping. In typical applications some of the commonly used pixel coordinate transformations are implemented using more efficient algorithms instead of a general warping. For example, image rotation is often implemented using three shears rather than a general warp (Forms Library implements rotation via image warping). Non-perspective linear image warping in general is characterized by a 2x2 warp matrix @code{W} and a translation vector @code{T} with two elements as follows @example P' = W * P + T @end example where @code{P} is a vector describing a position via it's x and y coordinates and @code{P'} is the position after warping. The elements @code{w[i][j]} of the warp matrix are constants (if the warp matrix isn't constant or is of higher order, we usually call such a transformation morphing rather than warping). Since our destination for the warped image is an array of pixels rather than a properly defined coordinate system (such as a window) the translation has no meaning. For the following discussion, we assume the translation vector is zero. (In doing the actual warping, the warped image is indeed shifted so it starts at the (0,0) element of the array representing it). Although, theoretically, any 2D matrix can be used as a warp matrix, there are practical constraints in image warping due to the discreteness of pixel coordinates. First of all, we have to snap all pixel coordinates onto a 2D rectangular integer grid. This in general will leave holes in the warped image because two pixels may get mapped to a single destination location, leaving a hole in the destination image. Secondly, truncation or rounding the resulting floating point values introduces errors. Because of these reasons, image warping is performed in reverse. That is, instead of looping over all pixel coordinates in the original image and transforming those into new coordinates, we start from the new coordinates and use inverse warping to obtain the coordinates of the pixel in the original image. This requires that the inverse of the warp matrix must exist (which is the case if @code{w[0][0] * w[1][1] != w[0][1] * w[1][0]}, i.e.@: the warp matrix has a non-vanishing determinante). With inverse warping the transformation becomes a re-sampling of the original image, and subpixel sampling (anti-aliasing) can be easily implemented. The following function is available in the library to perform warping @findex flimage_warp() @anchor{flimage_warp()} @example int flimage_warp(FL_IMAGE *im, float matrix[][2], int neww, int newh, int subpixel); @end example @noindent where @code{matrix} is the warp matrix. @code{neww} and @code{newh} specify the warped image size. To have the warp function figure out the minimum enclosing rectangle of the warped image you can pass zeros for the new width and height. Nevertheless, you can specify whatever size you want and the warp function will fill the empty grid location with the fill color. This is how the aspect ratio preserving scaling is implemented. In general, the warped image will not be rectangular in shape. To make the image rectangular the function fills the empty regions. The fill color is specified by setting the @code{image->fill_color} field with a packed RGB color. The last argument, @code{subpixel} specifies if subpixel sampling should be used. Although subpixel sampling adds processing time, it generally improves image quality significantly. The valid values for this parameter is any logical OR of @tindex FLIMAGE_NOSUBPIXEL @tindex FLIMAGE_SUBPIXEL @tindex FLIMAGE_NOCENTER @code{FLIMAGE_NOSUBPIXEL}, @code{FLIMAGE_SUBPIXEL} and @code{FLIMAGE_NOCENTER}. @code{FLIMAGE_NOCENTER} is only useful if you specify an image dimension that is larger than the warped image, and in that case the warped image is flushed top-left within the image grid, otherwise it is centered. To illustrate how image warping can be used, we show how an image rotation by an angle @code{deg} can be implemented: @example float m[2][2]; m[0][0] = m[1][1] = cos(deg * M_PI / 180.0); m[0][1] = sin(deg * M_PI / 180.0); m[1][0] = -m[0][1]; flimage_warp(im, mat, 0, 0, FLIMAGE_SUBPIXEL); @end example @noindent Please note that the transformation is done in-place, i.e.@: after the function returns the image structure pointer, @code{im}, points to the rotated image. If you specify a warp matrix with the off-diagonal elements being zero (scaling matrix), the image will only be scaled (in x-direction by @code{m[0][0]} and in y-direction by @code{m[1][1]}) without being also rotated. By experimenting with various warp matrices you can obtain some interesting images. Just keep in mind that large values of the warp matrix elements tend to make the final image larger. @node General Pixel Transformation @subsection General Pixel Transformation Many image processing tasks can be implemented as seperate RGB transformations. These transformations can be done very efficiently through the use of lookup tables. For this reason the following routine exists: @findex flimage_transform_pixels() @anchor{flimage_transform_pixels()} @example int flimage_transform_pixels(FL_IMAGE *im, int *red, int *green, int *blue); @end example @noindent where @code{red}, @code{green} and @code{blue} are the lookup tables of a length of at least @code{FL_PCMAX + 1} (typically 256). The function returns a postive number on success and the image will be replaced. Note that this routine notices the settings of the subimage, i.e., you can transform a portion of the image. To illustrate the use of this routine let's look at how a simple contrast adjustment may be implemented: @example #include #include int AdjustContrast(FL_IMAGE *im) @{ int r[FL_PCMAX+1], g[FL_PCMAX+1], b[FL_PCMAX+1]; int i, scale = 10; /* in this example rgb are adjusted the same way */ for ( i = 0; i <= FL_PCMAX; i++) r[i] = g[i] = b[i] = i * log10(1 + i * scale / FL_PCMAX ) / log10( 1 + scale ); return flimage_transform_pixels(im, r, g, b); @} @end example @node Image Annotation @subsection Image Annotation You can annotate an image with text or simple markers (arrows etc.). The location of the annotation can either be in pixel coordinate system or some application defined coordinate system. @ifnottex @menu * Using Text Strings:: * Using Markers:: * Pixelizing the Annotation:: @end menu @end ifnottex @node Using Text Strings @subsubsection Using Text Strings To place text into the image, use the following routine @findex flimage_add_text() @anchor{flimage_add_text()} @example int flimage_add_text(FL_IMAGE *im, const char *str, int len, int fstyle, int fsize, unsigned tcolor, unsigned bcolor, int nobk, double tx, double ty, int rotation); @end example @noindent where @code{fstyle} and @code{fsize} are the same as the label font style and size defined earlier in Section 3.11.3. @code{tcolor} and @code{bcolor} specify the colors to use for the text @code{str} and the background if the @code{nobk} argument is false. If @code{nobk} is true the text is drawn without a background. @code{tx} and @code{ty} specify the location of the text relative to the image origin. The location specified is the lower-right corner of the text. Note that the location specified can be in some physical space other than pixel space. For example, if the pixel-pixel distance represents 10 miles on a map, you'd like to be able to specify the text location in miles rather than pixels. The location is converted into pixel space using the following code @example tx_pixel = im->xdist_scale * tx + im->xdist_offset; ty_pixel = im->ydist_scale * ty + im->ydist_offset; @end example @noindent By default, the offsets @code{im->xdist_offset} and @code{im->yxdist_offset} are initialized to 0 and the scales @code{im->xdist_scale} and @code{im->ydist_scale} to 1. The function returns the current number of strings for the image. The interpretation of text used also used elsewhere applies, i.e.@: if @code{str} starts with character @code{@@} a symbol is drawn. There is another function, maybe more convenient depending on the application, that you can use @tindex FLIMAGE_TEXT @findex flimage_add_text_struct() @anchor{flimage_add_text_struct()} @example int flimage_add_text_struct(FL_IMAGE *im, const FLIMAGE_TEXT *text); @end example @noindent With this function instead of passing all the parameters individual;y you pass a @code{FLIMAGE_TEXT} structure to the function. The structure has the following fields: @table @code @item str The string to append to the image. @item len Length of the string in bytes. @item x, y A location relative to the image origin, given in pixels (no conversion from other coordinate systems is done) @item align Specifies the alignment of the string relative to the give location. @item style, size The font style and size to use. @item color The text color @item bcolor The background color @item nobk If true indicates that no background is to be drawn. @item angle Angle (in thenth of a degree) the text is to be rotated from the default horizontal orientation. Currently only PostScript output handles this correctly. @end table To delete the all texts you added to an image, use @findex flimage_delete_all_text() @anchor{flimage_delete_all_text()} @example void flimage_delete_all_text(FL_IMAGE *im); @end example You also can suppress the display of annotation text without deleting it. To do this, simply set @code{im->dont_display_text} to true. @node Using Markers @subsubsection Using Markers In addition to text strings you can also add simple markers (arrows, circles etc) to your image. To add a marker to an image use the following routines @findex flimage_add_marker() @anchor{flimage_add_marker()} @findex flimage_add_marker_struct() @anchor{flimage_add_marker_struct()} @example int flimage_add_marker(FL_IMAGE *im, const char *name, double x, double y, double w, double h, int linestyle, int fill, int rotation, FL_COLOR, FL_COLOR bcol); int flimage_add_marker_struct(FL_IMAGE *im, const FLIMAGE_MARKER *m); @end example @noindent where @code{name} is the marker name (see below for a list of built-in markers). The marker name must consist of regular ASCII characters. @code{linestyle} indicates the line style (@code{FL_SOLID}, @code{FL DOT} etc., see Chapter 27 for a complete list. @code{fill} indicates if the marker should be filled or not. @code{x} and @code{y} are the coordinates of the center of the marker in physical coordinates (i.e.@: the same transformation as described above for annotated texts is applied), @code{w} and @code{h} are the size of the bounding box of the marker, again in physical coordinates. Every marker has a natural orientation from which you can rotate it. The angle of rotation is given by @code{rotation} in tenth of a degree. @code{col} is the color of the marker, in packed RGB format. @code{bcol} is currently un-used. The second function takes a structure that specifies the marker. The members of the structure are as follows: @table @code @item name The name of the marker. @item x, y Position of center of the marker in pixel coordinates, relative to the origin of the image. @item w, h The size of the bounding box in pixel coordinates. @item color The color of the marker in packed RGB format. @item fill If true the marker is filled. @item thickness The line line thickness used for drawing. @item style The line style to be used for drawing. @item angle Angle of rotation in tenth of a degree from the marker's nature orientation. @end table If successful both functions return the number of markers that are currently associated with the image, otherwise a negative number. Some built-in markers in different orientations are shown in Fig. 22.1. To delete all markers added to an image use the function @findex flimage_delete_all_markers() @anchor{flimage_delete_all_markers()} @example void flimage_delete_all_markers(FL_IMAGE *im); @end example Of course the library would not be complete without the ability for applications to define new markers. The following function is provided so you can define your own markers: @findex flimage_define_marker() @anchor{flimage_define_marker()} @example int flimage_define_marker(const char *name, void (*draw)(FLIMAGE_MARKER *marker), const char *psdraw); @end example @noindent When the marker is to be drawn the function @code{draw()} is called with the marker structure. In addition to the fields listed above the following fields are filled by the library to facilitate the operation of drawing the marker @table @code @item display The display to be drawn on. @item gc The GC to be used in drawing @item win The window to draw to. @item psdraw A string that draws a marker in a square with the corner coordinates (-1, -1), (-1, 1), (1, 1) and (1, -1) in PostScript. For example the rectangle marker has the following @code{psdraw} string: @example -1 -1 moveto -1 1 lineto 1 1 lineto 1 -1 lineto closepath @end example @end table Defining new markers is the preferred method of placing arbitary drawings onto an image as it works well with double-buffering and pixelization of the markers. @node Pixelizing the Annotation @subsubsection Pixelizing the Annotation Annotations placed on the image are kept seperate from the image pixels themselves. The reasons for doing so are twofold. First, keeping the annotation seperate makes it possible to later edit the annotations. The second reason is that typically the screen has a lower resolutions than other output devices. By keeping the annotations seperate from the pixels makes it possible to obtain better image qualities when the annotations are rendered on higher-resolution devices (for example a PostScript printer). If for some reason making the annotations a part of the image pixels is desired, use the following routine @findex flimage_render_annotation() @anchor{flimage_render_annotation()} @example int flimage_render_annotation(FL_IMAGE *image, FL_WINDOW win); @end example @noindent The function returns -1 if an error occurs. The parameter @code{win} is used to create the appropriate pixmap. After the function returns the annotations are rendered into the image pixels (thus an annotation or a part of it that was outside of the image is lost). Note that during rendering the image type may change depending on the capabilities of @code{win}. Annotations that were kept separately are deleted. Note that the image must have been displayed at least once prior to calling this function for it to work correctly. You can always enlarge the image first via the cropping function with some solid borders. Then you can put annotation outside of the original image but within the enlarged image. Not all image formats support the storage of text and markers. This means if you attempt to save an image that has associated text and markers into an image format that does not support it, you may lose the annotation. All pnm formats supports the storage of annotations. To find out if a particular format supports annotation storage, look at the annotation field of the @code{FLIMAGE_FORMAT_INFO} structure. A zero value indicates it does not support it. @node Write Your Own Routines @subsection Write Your Own Routines The only communication required between an image processing routine and the rest of the image routines is to let the display routine know that the image has been modified by setting @code{image->modified} to 1. This information is used by the display routine to invalidate any buffered displayable images that were created from the original image. After displaying, @code{image->modified} is reset by the display routine. @node Utilities @section Utilities In the following some of the utilities that may come in handy when you're writing image manipulation routines are described. @ifnottex @menu * Memory Allocation:: * Color Quantization:: * Remarks:: @end menu @end ifnottex @node Memory Allocation @subsection Memory Allocation To create a matrix to be used in several of the functions listed above use either @code{@ref{fl_get_matrix()}} described above or @findex fl_make_matrix() @anchor{fl_make_matrix()} @example void *fl_make_matrix(int nrow, int ncol, unsigned int esize, void *inMem); @end example @noindent where @code{nrow} and @code{ncol} are the number of rows and columns of the matrix respectively. @code{esize} is the size (in bytes) of each matrix element. Both functions return a two-dimensional array of entities of size @code{esize}. The first function initializes all elements to zero. The second function does not allocate nor initialize memory for the matrix itself. Instead it uses the memory with address @code{inMem} that is supplied by the caller, which should be a one-dimensional array of length @code{nrow * ncol * esize}. You can use the returned pointer as a regular two-dimensional array (@code{matrix[r][c]}) or as a single array of length @code{nrow *ncol}, starting from at @code{matrix[0]}: @example short **matrix = fl_get_matrix(nrow, ncol, sizeof **matrix); /* access the matrix as a 2-d array */ matrix[3][4] = 5; /* or access it as 1D array */ *(matrix[0] + 3 * ncol + 4) = 5; /* most useful in image processing to use it as 1D array */ memcpy(saved, matrix, nrow * ncol * sizeof **matrix); @end example To free a matrix allocated using one the above functions, use @findex fl_free_matrix() @anchor{fl_free_matrix()} @example void fl_free_matrix(void *matrix); @end example @noindent The function frees all memory allocated. After the function returns the matrix cab not be de-referenced anymore. In the case where the matrix was created by @code{@ref{fl_make_matrix()}} the function will only free the memory that's allocated to hold the matrix indices but not the memory supplied by the caller. It is the caller's responsibility to free that part of the memory. There are also some useful functions that manipulate images directly. The following is a brief summary of them. @findex flimage_dup() @anchor{flimage_dup()} @example FL_IMAGE *flimage_dup(FL_IMAGE *im); @end example @noindent This function duplicates an image @code{im} and returns the duplicated image. At the moment, only the first image is duplicated even if the input image has multiple frames. Furthermore, markers and annotations are not duplicated. @findex flimage_to_pixmap() @anchor{flimage_to_pixmap()} @findex flimage_from_pixmap() @anchor{flimage_from_pixmap()} @example Pixmap flimage_to_pixmap(FL_IMAGE *im, FL_WINDOW win); int flimage_from_pixmap(FL_IMAGE *im, Pixmap pixmap); @end example The first function converts an image into a Pixmap (a server side resource) that can be used in the pixmap object (see pixmap-class???). The second function does the reverse. @code{im} must be a properly allocated image. @node Color Quantization @subsection Color Quantization In order to display a RGB image on a color-mapped device of limited depth, the number of colors in the original image will have to be reduced. Color quantization is one way of doing this. Two color quantization algorithms are available in the Forms Library. One uses Heckbert's median cut algorithm followed by Floyd-Steinberg dithering after which the pixels are mapped to the colors selected. The code implementing this is from the Independent JPEG Group's two pass quantizer (@file{jquant2.c} in the IJG's distribution), which under copyright (c) 1991-1996 by Thomas G. Lane and the IJG. Another method is based on the Octree quantization algorithm with no dithering and is implemented by Steve Lamont (@code{spl@@ucsd.edu}) and is under vopyright (c) 1998 by Steve Lamont and the National Center for Microscopy and Imaging Research. This quantization library is available from @url{ftp://ncmir.ucsd.edu/pub/quantize/libquantize.html}. The quantizer based on this library is not compiled into the image support. The source code for using this quantizer is in @code{image} subdirectory. By default, the median cut algorithm is used. You can switch to the octree based algorithm using the following call @findex flimage_select_octree_quantizer() @anchor{flimage_select_octree_quantizer()} @example void flimage_select_octree_quantizer(void); @end example To switch back to the median cut quantizer use @findex flimage_select_mediancut_quantizer() @anchor{flimage_select_mediancut_quantizer()} @example void flimage_select_mediancut_quantizer(void); @end example The median-cut quantizer tends to give better images because of the dithering step. However, in this particular implementation, the number of quantized colors is limited to 256. There is no such limit with the octree quantizer implementation. @node Remarks @subsection Remarks See @file{itest.c} and @file{ibrowser.c} for example use of the image support in Forms Library. @file{iconvert.c} is a program that converts between different file formats and does not require an X connection. Due to access limitations, not all combinations of display depth and bits per pixel (bpp) are tested. Depths of @w{1 bit} (@w{1 bpp}), @w{4 bits} (@w{8 bpp}), @w{8 bits} (@w{8 bpp}), @w{16 bits} (@w{16 bpp}), @w{24 bits} (@w{32 bpp}), @w{30 bits} (@w{32 bpp}) were tested. Although it works in @w{12 bit} PseudoColor mode, due to limitations of the default quantizer the display function does not take full advantage of the larger lookup table. Special provisions were made so a gray12 image will be displayed in 4096 shades of gray if the hardware supports 12-bit grayscale. If JPEG support (@file{image_jpeg.c}) is not compiled into the Forms Library, you can obtain the jpeg library source from @url{ftp://ftp.uu.net/graphics/jpeg}. xforms-1.0.93sp1/doc/part1.texi0000644000175000017500000000034711317657630014732 0ustar jensjens@node Part I @unnumbered @emph{Part I - Using the Forms Library} @menu * Part I Introduction:: * Part I Getting Started:: * Part I Defining Forms:: * Part I Doing Interaction:: * Part I Free Objects:: * Part I Goodies:: @end menu xforms-1.0.93sp1/doc/part2_language_filters.texi0000644000175000017500000000654211171560225020320 0ustar jensjens@node Part II Language Filters @chapter Language Filters @strong{Please note: This chapter is probably completely outdated!} This chapter discusses the language filter support in Form Designer, targeted primarily to the developers of other language bindings to Forms Library. As of this writing, the authors are aware of the following bindings @table @code @item ada95 by G.@: Vincent Castellano @email{gvc@@ocsystems.com} @item perl by Martin Bartlett @email{martin@@nitram.demon.co.uk} @item Fortran by G.@: Groten @email{zdv017@@zam212.zam.kfa-juelich.de} and Anke Haeming @email{A.Haeming@@kfa-juelich.de} @item pascal by Michael Van Canneyt @email{michael@@tfdec1.fys.kuleuven.ac.be} @item scm/guile by Johannes Leveling @email{Johannes.Leveling@@Informatik.Uni-Oldenburg.DE} @item python by Roberto Alsina @email{ralsina@@ultra7.unl.edu.ar}. It would appear that author of python binding is no longer working on it. @end table These bindings are of varying degree of beta-ness and support. It appears to the authors that the most convenient and flexible way of getting output in the targeted language is through external filters that are invoked transparently by fdesign. This way, developers of the binding would have complete control over the translation of the default output from the fdesign to the target language and at the same time have the translation done transparently. @ifnottex @menu * External Filters:: * Command Line Arguments of the Filter:: @end menu @end ifnottex @node External Filters @section External Filters An external filter is a stand-alone program that works on the output of Form Designer and translates the output to the target language. The filter can elect to work on the @code{.fd} or the C output or both simultaneously. However, in non-testing situations, the c output from Form Designer probably should be deleted by the filter once the translation is complete. By default, Form Designer only outputs the @code{.fd} and C files. If the presence of @code{-ada}, @code{-perl}, @code{-python}, @code{-fortran}, @code{-pascal} or @code{-scm} command line options to Form Designer is detected, then after emitting the default output, Form Designer invokes the the external filter with the root filename (without the @code{.fd} extension) as an argument, together with possible other flags, to the filter. Any runtime error messages are presented to the user in a browser. The filter name by default is @code{fd2xxxx} where @code{xxxx} is the language name (such as @code{fd2perl} etc.), which can be changed using the @code{-filter} command line option (or equivalent resources). The resources that are relevant to the filter are listed below @multitable @columnfractions 0.3 0.3 0.3 Resource Type Default @item language @tab string @tab C @item filter @tab string @tab None @end multitable @node Command Line Arguments of the Filter @section Command Line Arguments of the Filter Form Designer passes along the options that affect the output format to the filter. These options may or may not apply to the filter, most likely not if the filter works on the C file. For those that do not apply, the filter can simply ignore them, but shouldn't stop running because of these options. @table @code @item -callback callback stubs are generated @item -main main stub is generated @item -altformat output in alternate format @item -compensate emit size compensation code @end table xforms-1.0.93sp1/doc/part5_resources.texi0000644000175000017500000002570011337073021017014 0ustar jensjens@node Part V Resources for Forms Library @chapter Resources for Forms Library Managing resources is an important part of programming with X. Typical X programs use extensive resource database/management to customize their appearances. With the help of the Form Designer there is little or no need to specify any resources for the default appearance of an application written using the Forms Library. Because of this, complete resource support is a somewhat low-priority task and currently only minimal support is available. Nevertheless, more complete and useful resource management system specific to the Forms Library can be implemented using the services provided by the XForms. @ifnottex @menu * Current Support:: * Going Further:: @end menu @end ifnottex @node Current Support @section Current Support At the moment all built-in XForms resources have a top level class name @code{XForm} and a resource name @code{xform}. Because of this incomplete specification most of the current resources are "global", in the sense that they affect all form windows. Eventually all resources will be fully resolved, e.g., to specify attribute @code{foo} of form @code{formName}, the resource name can be @code{appName.formName.foo} instead of (the current incomplete) @code{appName.xform.foo}. The argument @code{app_opt} passed to @code{@ref{fl_initialize()}} is a table of structures listing your applications command line options. The structure is defined as follows @tindex FL_CMD_OPT @example typedef struct @{ char * option; char * specifier; XrmOptionKind argKind; void * value; @} XrmOptionDescList, FL_CMD_OPT; @end example @noindent See @code{XrmGetResource()} for details. After the initialization routine is called all command line arguments, both XForms built-in and application specific ones, are removed from @code{argc} and @code{argv} and parsed into a standard XResources database. To read your application specific options follow @code{@ref{fl_initialize()}} with the following routine @findex fl_get_app_resources() @anchor{fl_get_app_resources()} @example int fl_get_app_resources(FL_RESOURCE *resource, int nresources); @end example @noindent Here @code{resource} is a table containing application specific resources in the following format: @tindex FL_resource @example typedef struct @{ char * res_name; /* resource name without application name */ char * res_class; /* resource class */ FL_RTYPE type; /* C type of the variable */ void * var /* variable that will hold the value */ char * defval; /* default value in string form */ int nbytes; /* buffer size for string var. */ @} FL_RESOURCE; @end example @noindent and the resource type @code{FL_RTYPE} type is one of the following @tindex FL_RTYPE @anchor{FL_RTYPE} @table @code @tindex FL_SHORT @anchor{FL_SHORT} @item FL_SHORT for short variable @tindex FL_BOOL @anchor{FL_BOOL} @item FL_BOOL for boolean variable (int) @tindex FL_INT @anchor{FL_INT} @item FL_INT for int variable @tindex FL_LONG @anchor{FL_LONG} @item FL_LONG for long variable @tindex FL_FLOAT @anchor{FL_FLOAT} @item FL_FLOAT for float variable @tindex FL_FLOAT @tindex FL_STRING @anchor{FL_STRING} @item FL_STRING for char[] variable @tindex FL_FLOAT @anchor{FL_NONE} @item FL_NONE for variables not to be used (or not available) @end table Note that the variable for @code{FL_BOOL} must be of type int. It differs from @code{FL_INT} only in the way the resources are converted, not in the way their values are stored. A boolean variable is considered to be true (1) if any one of @code{True}, @code{true}, @code{Yes}, @code{yes}, @code{On}, @code{on}, or 1 is specified as its value. For string variables, the length for the destination buffer must be specified. @code{@ref{fl_get_app_resources()}} simply looks up all entries specified in the @code{FL_RESOURCE} structure in all databases after prefixing the resource name with the application name, which can be the new name introduced by the @code{-name} command line option. Summarized below are the currently recognized Forms Library built-in resources: @multitable @columnfractions 0.3 0.3 0.2 0.2 @headitem Resource Name @tab Class @tab Type @tab Default values @item rgamma @tab Gamma @tab float @tab 1.0 @item ggamma @tab Gamma @tab float @tab 1.0 @item bgamma @tab Gamma @tab float @tab 1.0 @item visual @tab Visual @tab string @tab best @item depth @tab Depth @tab int @tab best @item doubleBuffer @tab DoubleBuffer @tab bool @tab true @item privateColormap @tab PrivateColormap @tab bool @tab false @item standardColormap @tab StandardColormap @tab bool @tab false @item sharedColormap @tab SharedColormap @tab bool @tab false @item pupFontSize @tab PupFontSize @tab int @tab 12pt @item buttonFontSize @tab FontSize @tab int @tab 10pt @item sliderFontSize @tab FontSize @tab int @tab 10pt @item inputFontSize @tab FontSize @tab int @tab 10pt @item browserFontSize @tab FontSize @tab int @tab 10pt @item menuFontSize @tab FontSize @tab int @tab 10pt @item choiceFontSize @tab FontSize @tab int @tab 10pt @item ulPropWidth @tab ULPropWidth @tab bool @tab true @item ulThickness @tab ULThickness @tab int @tab 1 @item scrollbarType @tab ScrollbarType @tab string @tab thin @item coordUnit @tab CoordUnit @tab string @tab pixel @item borderWidth @tab BorderWidth @tab int @tab 1 @end multitable Again, "best" means that the Forms Library by default selects a visual that has the most depth. By default, resource files are read and merged in the order as suggested by X11 R5 as follows: @itemize @bullet @item @file{/usr/lib/X11/app-defaults/} @item @file{$XAPPRLESDIR/} @item @code{RESOURCE_MANAGER} property as set using @code{xrdb} if @code{RESOURCE_MANAGER} is empty, @file{~/.Xdefaults} @item @code{$XENVIRONMENT} if @code{$XENVIORONMENT} is empty, @file{~/.Xdefaults-hostname} @item ommand line options @end itemize All options set via resources may not be the final values used because resource settings are applied at the time an object/form is created, thus any modifications after that override the resource settings. For example @code{buttonLabelSize}, if set, is applied at the time the button is created (@code{@ref{fl_add_button()}}). Thus altering the size after the button is created via @code{@ref{fl_set_object_lsize()}} overrides whatever is set by the resource database. To run your application in @code{PseudoColor} with a depth of 8 and a thicker underline, specify the following resources @example appname*visual: PseudoColor appname*depth: 8 appname*ulThickness: 2 @end example Since resources based on a form by form basis are yet to be implemented, there is no point specifying anything more specific although also @code{appname.XForm.depth} etc.@: would work correctly. @ifnottex @menu * Resources Example:: @end menu @end ifnottex @node Resources Example @subsection Resources Example Let us assume that you have an application named @code{myapp} and it accepts the options @w{@code{-foo} @emph{level}} and @code{-bar} plus a filename. The proper way to initialize the Forms Library is as follows @example FL_CMD_OPT cmdopt[] = @{ @{"-foo", "*.foo", XrmoptionSepArg, 0 @}, @{"-bar", ".bar", XrmoptionNoArg, "True"@} @}; int foolevel, ifbar; int deftrue; /* can only be set thru resources */ FL_resource res[] = @{ @{"foo", "FooCLASS", FL_INT, &foolevel, "0"@}, @{"bar", "BarCLASS", FL_BOOL, &ifbar, "0"@}, @{"deftrue", "Whatever", FL_BOOL, &deftrue, "1"@} @}; int main(int argc, char *argv[]) @{ fl_initialize(&argc, argv ,"MyappClass", cmdopt, 2); fl_get_app_resources(res, 3); if (argc == 1) /* missing filename */ fprintf(stderr, "Usage %s: [-foo level][-bar] " "filename\n","myapp"); /* rest of the program */ @} @end example @noindent After this, both variables @code{foolevel} and @code{ifbar} are set either through resource files or command line options, with the command line options overriding those set in the resource files. In case neither the command line nor the resource files specified the options, the default value string is converted. There is another routine, a resource routine of the lowest level in XForms, which might be useful if a quick&dirty option needs to be read: @findex fl_get_resource() @anchor{fl_get_resource()} @example const char *fl_get_resource(const char *res_name, const char *res_class, FL_RTYPE type, char *defval, void *val, int nbytes); @end example @noindent @code{res_name} and @code{res_class} must be complete resource specifications (minus the application name) and should not contain wildcards of any kind. The resource will be converted according to the type and result stored in @code{type}, which is an integer of type @code{@ref{FL_RTYPE}}. @code{nbytes} is used only if the resource type is @code{@ref{FL_STRING}}. The function returns the string representation of the resource value. If a value of @code{@ref{FL_NONE}} is passed for @code{type} the resource is not converted and the pointer @code{val} is not dereferenced. There is also a routine that allows the application program to set resources programmatically: @findex fl_set_resource() @anchor{fl_set_resource()} @example void fl_set_resource(const char *string, const char *value); @end example @noindent where @code{string} and @code{value} are a resource-value pair. The string can be a fully qualified resource name (minus the application name) or a resource class. Routines @code{@ref{fl_set_resource()}} and @code{@ref{fl_get_resource()}} can be used to store and retrieve arbitrary strings and values and may be useful to pass data around. @node Going Further @section Going Further It is possible to implement your own form/object specific resources management system using the services mentioned above. For example, to implement a user-configurable form size, code similar to the following can be used, assuming the form is named @code{"myform"}: @example struct fsize @{ int width, height; @} myformsize; FL_RESOURCE res[] = @{ @{"myform.width", "XForm.width", FL_INT, &myform.width, "150"@}, @{"myform.height","XForm.height", FL_INT, &myform.height, "150"@} @}; fl_initialize(&argc, argv, app_class, 0, 0); fl_get_app_resources(res, 2); /* create the forms */ myform = fl_bgn_form(myformsize.width, myformsize.height,.....); @end example Or (more realistically) you create the form first using @code{fdesign} and then scale it before it is shown: @example fl_initialize(&argc, argv, app_class, 0, 0); fl_get_app_resources(res, 2); /*create_all_forms here */ fl_set_form_size(myform, mysformsize.width, myformsize.height); fl_show_form(myform, ...); @end example Since eventually form geometry and other things might be done via XForms internal routines it is recommended that you name your form to be the form title with all spaces removed and the first letter lower-cased, i.e., if a form is shown with a label @code{Foo Bar}, the name of the form should be @code{fooBar}. xforms-1.0.93sp1/doc/part1_doing_interaction.texi0000644000175000017500000015317511375521724020517 0ustar jensjens@node Part I Doing Interaction @chapter Doing Interaction @ifnottex @menu * Displaying a Form:: * Simple Interaction:: * Periodic Events and Non-blocking Interaction:: * Dealing With Multiple Windows:: * Using Callback Functions:: * Handling Other Input Sources:: @end menu @end ifnottex @node Displaying a Form @section Displaying a Form After having defined the forms the application program can use them to interact with the user. As a first step the program has to display the forms with which it wants the user to interact. This is done using the routine @findex fl_show_form() @example Window fl_show_form(FL_FORM *form, int place, int border, const char *name); @end example @noindent It opens a (top-level) window on the screen in which the form is shown. The parameter @code{name} is the title of the form (and its associated icon if any). The routine returns the ID of the forms window. You normally never need this. Immediately after the form becomes visible, a full draw of all objects on the form is performed. Due to the two way buffering mechanism of Xlib, if @code{@ref{fl_show_form()}} is followed by something that blocks (e.g., waiting for a device other than X devices to come online), the output buffer might not be properly flushed, resulting in the form only being partially drawn. If your program works this way, use the following function after @code{@ref{fl_show_form()}} @findex fl_update_display() @anchor{fl_update_display()} @example void fl_update_display(int blocking); @end example @noindent where @code{blocking} is false (0), the function flushes the X buffer so the drawing requests are on their way to the server. When @code{blocking} is true (1), the function flushes the buffer and waits until all the events are received and processed by the server. For typical programs that use @code{@ref{fl_do_forms()}} or @code{@ref{fl_check_forms()}} after @code{@ref{fl_show_form()}}, flushing is not necessary as the output buffer is flushed automatically. Excessive call to @code{@ref{fl_update_display()}} degrades performace. The location and size of the window to be shown on the call of @code{@ref{fl_show_form()}} are determined by the @code{place} argument. The following possibilities exist: @table @code @anchor{FL_PLACE_SIZE} @tindex FL_PLACE_SIZE @item FL_PLACE_SIZE The user can control the position but the size is fixed. Interactive resizing is not allowed once the form becomes visible. @anchor{FL_PLACE_POSITION} @tindex FL_PLACE_POSITION @item FL_PLACE_POSITION Initial position used will be the one set via @code{@ref{fl_set_form_position()}}. Interactive resizing is possible. @anchor{FL_PLACE_GEOMETRY} @tindex FL_PLACE_GEOMETRY @item FL_PLACE_GEOMETRY Place at the latest position and size (see also below) or the geometry set via @code{@ref{fl_set_form_geometry()}}. A form so shown will have a fixed size and interactive resizing is not allowed. @anchor{FL_PLACE_ASPECT} @tindex FL_PLACE_ASPECT @item FL_PLACE_ASPECT Allows interactive resizing but any new size will have the aspect ratio as that of the initial size. @anchor{FL_PLACE_MOUSE} @tindex FL_PLACE_MOUSE @item FL_PLACE_MOUSE The form is placed centered below the mouse. Interactive resizing will not be allowed unless this option is accompanied by @code{@ref{FL_FREE_SIZE}} as in @code{@ref{FL_PLACE_MOUSE}|@ref{FL_FREE_SIZE}}. @anchor{FL_PLACE_CENTER} @tindex FL_PLACE_CENTER @item FL_PLACE_CENTER The form is placed in the center of the screen. If @code{@ref{FL_FREE_SIZE}} is also specified, interactive resizing will be allowed. @anchor{FL_PLACE_FULLSCREEN} @tindex FL_PLACE_FULLSCREEN @item FL_PLACE_FULLSCREEN The form is scaled to cover the full screen. If @code{@ref{FL_FREE_SIZE}} is also specified, interactive resizing will be allowed. @anchor{FL_PLACE_FREE} @tindex FL_PLACE_FREE @item FL_PLACE_FREE Both the position and size are completely free. The initial size used is the designed size. Initial position, if setvia @code{@ref{fl_set_form_position()}}, will be used otherwise interactive positioning may be possible if the window manager allows it. @anchor{FL_PLACE_HOTSPOT} @tindex FL_PLACE_HOTSPOT @item FL_PLACE_HOTSPOT The form is placed so that mouse is on the form's "hotspot". If @code{@ref{FL_FREE_SIZE}} is also specified, interactive resizing will be allowed. @anchor{FL_PLACE_CENTERFREE} @tindex FL_PLACE_CENTERFREE @item FL_PLACE_CENTERFREE Same as @code{@ref{FL_PLACE_CENTER}|@ref{FL_FREE_SIZE}}, i.e., place the form at the center of the screen and allow resizing. @anchor{FL_PLACE_ICONIC} @tindex FL_PLACE_ICONIC @item FL_PLACE_ICONIC The form is shown initially iconified. The size and location used are the window manager's default. @end table As mentioned above, some of the settings will result in a fixed size of the form (i.e.@: a size that can't be changed by the user per default). In some cases this can be avoided by OR'ing the value with @anchor{FL_FREE_SIZE} @tindex FL_FREE_SIZE @code{FL_FREE_SIZE} as a modifier. If no size was specified, the designed (or later scaled) size will be used. Note that the initial position is dependent upon the window manager used. Some window managers allow interactive placement of the windows but some don't. You can set the position or size to be used via the following calls @findex fl_set_form_position() @example void fl_set_form_position(FL_FORM *form, FL_Coord x, FL_Coord y); @end example @noindent and @findex fl_set_form_size() @example void fl_set_form_size(FL_FORM *form, FL_Coord w, FL_Coord h); @end example @noindent or, combining both these two functions, @findex fl_set_form_geometry() @example void fl_set_form_geometry(FL_FORM form*, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h); @end example @noindent before placing the form on the screen. (Actually the routines can also be called while the form is being displayed. They will change the position and/or size of the form.) @code{x}, @code{y}, @code{w} and @code{h} indicate the position of the form on the screen and its size@footnote{The parameters should be sensitive to the coordinate unit in effect at the time of the call, but at present, they are not, i.e., the function takes only values in pixel units.}. The position is measured from the top-left corner of the screen. When the position is negative the distance from the right or the bottom is indicated. Next the form should be placed on the screen using @code{@ref{FL_PLACE_GEOMETRY}}, @code{@ref{FL_PLACE_FREE}}. E.g., to place a form at the lower-right corner of the screen use @example fl_set_form_position(form, -form->w, -form->h); fl_show_form(form, FL_PLACE_GEOMETRY, FL_TRANSIENT, "formName"); @end example To show a form so that a particular object or point is under the mouse, use one of the following two routines to set the "hotspot" @findex fl_set_form_hotspot() @anchor{fl_set_form_hotspot()} @findex fl_set_form_hotobject() @anchor{fl_set_form_hotobject()} @example void fl_set_form_hotspot(FL_FORM *form, FL_Coord x, FL_Coord y); void fl_set_form_hotobject(FL_FORM *form, FL_OBJECT *obj); @end example @noindent and then use @code{@ref{FL_PLACE_HOTSPOT}} for the @code{place} argument in the call of @code{@ref{fl_show_form()}}. The coordinates @code{x} and @code{y} are relative to the upper-left hand corner of the form (within the window decorations). In the call @code{@ref{fl_show_form()}} the argument @code{border} indicates whether or not to request window manager's decoration. @code{border} should take one of the following values: @table @code @anchor{FL_FULLBORDER} @tindex FL_FULLBORDER @item FL_FULLBORDER Full border decorations. @anchor{FL_TRANSIENT} @tindex FL_TRANSIENT @item FL_TRANSIENT Borders with (possibly) less decorations. @anchor{FL_NOBORDER} @tindex FL_NOBORDER @item FL_NOBORDER No decoration at all. @end table For some dialogs, such as demanding an answer etc., you probably do not want the window manager's full decorations. Use @code{@ref{FL_TRANSIENT}} for this. A window border is useful to let the user iconify a form, move it around or resize it. If a form is transient or has no border, it is normally more difficult (or even impossible) to move the form. A transient form typically should have less decoration, but not necessarily so. It depends on the window managers as well as their options. @code{@ref{FL_NOBORDER}} is guaranteed to have no border@footnote{Provided the window manager is compliant. If the window manager isn't compliant all bets are off.} and is immune to iconification request. Because of this, borderless forms can be hostile to other applications@footnote{Actually, they are also hostile to their sibling forms. @xref{Part V Overview of Main Functions, , Overview of Main Functions}.}, so use this only if absolutely necessary. There are other subtle differences between the different decoration requests. For instance, (small) transient forms always have @code{save_under} (see @code{XSetWindowAttributes()}) set to true by default. Some window properties, @code{WM_COMMAND} in particular, are only set for full-bordered forms and will only migrate to other full-bordered forms when the original form having the property becomes unmapped. The library has a notion of a "main form" of an application, roughly the form that would be on the screen the longest. By default, the first full-bordered form shown becomes the main form of the application. All transient windows shown afterwards will stay on top of the main form. The application can set or change the main form anytime using the following routine @findex fl_set_app_mainform() @example void fl_set_app_mainform(FL_FORM *form); @end example @noindent Setting the main form of an application will cause the @code{WM_COMMAND} property set for the form if no other form has this property. Sometimes it is necessary to have access to the window resource ID before the window is mapped (shown). For this, the following routine can be used @findex fl_prepare_form_window() @example Window fl_prepare_form_window(FL_FORM *form, int place, int border, const char *name); @end example @noindent This routine creates a window that obeys any and all constraints just as @code{@ref{fl_show_form()}} does but remains unmapped. To map such a window, the following must be used @findex fl_show_form_window() @example Window fl_show_form_window(FL_FORM *form); @end example @noindent Between these two calls, the application program has full access to the window and can set all attributes, such as icon pixmaps etc., that are not set by @code{@ref{fl_show_form()}}. You can also scale the form and all objects on it programmatically using the following routine @findex fl_scale_form() @example void fl_scale_form(FL_FORM *form, double xsc, double ysc); @end example @noindent where you indicate a scaling factor in the x- and y-direction with respect to the current size. See @file{rescale.c} for an example. When a form is scaled, either programmatically or interactively, all objects on the form per defaukt will also be scaled. This includes both the sizes and positions of the objects. For most cases, this default behavior is adequate. In some cases, e.g., to keep a group of objects together, more control is needed. To this end, the following routines can be used @findex fl_set_object_resize() @findex fl_set_object_gravity() @example void fl_set_object_resize(FL_OBJECT *obj, unsigned how_resize); void fl_set_object_gravity(FL_OBJECT *obj, unsigned nw_gravity, unsigned se_gravity); @end example The @code{how_resize} argument of @code{@ref{fl_set_object_resize()}} can be one of @table @code @anchor{FL_RESIZE_NONE} @tindex FL_RESIZE_NONE @item FL_RESIZE_NONE don't resize the object at all @anchor{FL_RESIZE_X} @tindex FL_RESIZE_X @item FL_RESIZE_X resize it in x- (horizontal) direction only @anchor{FL_RESIZE_Y} @tindex FL_RESIZE_Y @item FL_RESIZE_Y resize it in y- (vertical) direction only @anchor{FL_RESIZE_ALL} @tindex FL_RESIZE_ALL @item FL_RESIZE_ALL is an alias for @code{@ref{FL_RESIZE_X}|@ref{FL_RESIZE_Y}} and makes the object resizable in both dimension. @end table The arguments @code{nw_gravity} and @code{se_gravity} of @code{fl_set_object_gravity()} control the positioning of the upper-left and lower-right corner of the object and work analogously to the @code{win_gravity} in Xlib. The details are as follows: Let @code{P} be the corner the gravity applies to, @code{(dx1,dy1)} the distance to the upper-left corner of the form, @code{(dx2,dy2)} the distance to the lower-right corner of the form, then, @multitable @columnfractions 0.4 0.1 0.5 @headitem Value @tab @tab Effect @anchor{FL_NoGravity} @tindex FL_NoGravity @item @code{FL_NoGravity} @tab @tie{} @tab Default linear scaling, see below @anchor{FL_NorthWest} @tindex FL_NorthWest @item @code{FL_NorthWest} @tab @tab @code{dx1}, @code{dy1} constant @anchor{FL_North} @tindex FL_North @item @code{FL_North} @tab @tab @code{dy1} constant @anchor{FL_NorthEast} @tindex FL_NorthEast @item @code{FL_NorthEast} @tab @tab @code{dy1}, @code{dx2} constant @anchor{FL_West} @tindex FL_West @item @code{FL_West} @tab @tab @code{dx1} constant @anchor{FL_East} @tindex FL_East @item @code{FL_East} @tab @tab @code{dx2} constant @anchor{FL_SouthWest} @tindex FL_SouthWest @item @code{FL_SouthWest} @tab @tab @code{dx1}, @code{dy2} constant @anchor{FL_South} @tindex FL_South @item @code{FL_South} @tab @tab @code{dy2} constant @anchor{FL_SouthEast} @tindex FL_SouthEast @item @code{FL_SouthEast} @tab @tab @code{dx2}, @code{dy2} constant @anchor{ForgetGravity} @tindex ForgetGravity @item @code{ForgetGravity} @tab @tab don't consider the setting for this argument @end multitable @ifhtml @center @image{images/gravity} @end ifhtml @ifnothtml @center @image{images/gravity,7cm} @end ifnothtml Default for all object is @code{@ref{FL_RESIZE_ALL}} and @code{@ref{ForgetGravity}}. Note that the three parameters are not orthogonal and the positioning request will always override the scaling request in case of conflict. This means the resizing settings for an object are considered only if one (or both) of the gravities is @code{@ref{FL_NoGravity}}. For the special case where @code{how_resize} is @code{@ref{FL_RESIZE_NONE}} and both gravities are set to @code{ForgetGravity}, the object is left un-scaled, but the object is moved so that the new position keeps the center of gravity of the object constant relative to the form. Again, since all sizing requests go though the window manager, there is no guarantee that your request will be honored. If a form is placed with @code{@ref{FL_PLACE_GEOMETRY}} or other size-restricting options, resizing it later via @code{@ref{fl_set_form_size()}} will likely be rejected. To determine the gravity and resize settings for an object use the functions @findex fl_get_object_gravity() @findex fl_get_object_resize() @example void fl_get_object_gravity(FL_OBJECT *obj, unsigned int *nw, unsigned int *se); void fl_get_object_resize(FL_OBJECT *obj, unsigned int *resize ); @end example Sometimes, you may want to change an attribute for all objects on a particular form, to this end, the following iterator is available @findex fl_for_all_objects() @anchor{fl_for_all_objects()} @example void fl_for_all_objects(FL_FORM *form, int (*operate)(FL_OBJECT *obj, void *data), void *data); @end example @noindent where function @code{operate} is called for every object of the form @code{form} unless @code{operate()} returns nonzero, which terminates the iterator. Multiple forms can be shown at the same moment and the system will interact with all of them simultaneously. The graphical mode in which the form is shown depends on the type of machine. In general, the visual chosen by XForms is the one that has the most colors. Application programs have many ways to change this default, either through command line options, resources or programmatically. See the Part V for details. If for any reason, you would like to change the form title (as well as its associated icon) after it is shown, the following call can be used @findex fl_set_form_title() @example void fl_set_form_title(FL_FORM *form, const char *name) @end example To set or change the icon shown when a form is iconified, use the following routine @findex fl_set_form_icon() @example void fl_set_form_icon(FL_FORM *form, Pixmap icon, Pixmap mask); @end example @noindent where @code{icon} and @code{mask} can be any valid Pixmap ID. (See @ref{Other Pixmap Routines} for some of the routines that can be used to create Pixmaps.) Note that an @code{icon} previously setvia this function (if it exists) is not freed or modified in anyway. See the demo program @file{iconify.c} for an example. If the application program wants to stop interacting with a form and remove it from the screen, it has to use the call @findex fl_hide_form() @example void fl_hide_form(FL_FORM *form); @end example To check if a form is visible or not, use the following call @findex fl_form_is_visible() @example int fl_form_is_visible(FL_FORM *form); @end example @noindent The function returns one of @table @code @anchor{FL_INVISIBLE} @tindex FL_INVISIBLE @item FL_INVISIBLE if the form is not visible (0), @anchor{FL_VISIBLE} @tindex FL_VISIBLE @item FL_VISIBLE if the form is visible (1) and @anchor{FL_BEING_HIDDEN} @tindex FL_BEING_HIDDEN @item FL_BEING_HIDDEN if the form is visible but is in the process of being hidden (-1). @end table Note that if you don't need a form anymore you can deallocate its memory using the call @code{@ref{fl_free_form()}} described earlier. Window managers typically have a menu entry labeled "delete" or "close" meant to terminate an application program gently by informing the application program with a @code{WM_DELETE_WINDOW} protocol message. Although the Forms Library catches this message, it does not do anything except terminating the application. This can cause problems if the application has to do some record keeping before exiting. To perform record keeping or to elect to ignore this message, register a callback function using the following routine @findex fl_set_atclose() @anchor{fl_set_atclose()} @example int fl_set_atclose(int (*at_close)(FL_FORM *, void *), void *data); @end example @noindent The callback function @code{at_close} will be called before the Forms Library terminates the application. The first parameter of the callback function is the form that received the @code{WM_DELETE_WINDOW} message. To prevent the Forms Library from terminating the application, the callback function should return the constant @code{FL_IGNORE}. Any other value (e.g., @code{FL_OK}) will result in the termination of the application. Similar mechanism exists for individual forms @findex fl_set_form_atclose() @anchor{fl_set_form_atclose()} @example int fl_set_form_atclose(FL_FORM *, int (*at_close)(FL_FORM *, void *), void *data); @end example @noindent except that @code{FL_OK} does not terminate the application, it results in the form being closed. Of course, if you'd like to terminate the application, you can always call @code{exit(3)} yourself within the callback function. @node Simple Interaction @section Simple Interaction Once one or more forms are shown it is time to give control to the library to handle the interaction with the forms. There are a number of different ways of doing this. The first one, appropriate for most programs, is to call of @findex fl_do_forms() @example FL_OBJECT *fl_do_forms(void); @end example @noindent It controls the interaction until some object in one of the forms changes state. In this case a pointer to the changed object is returned. A change occurs in the following cases: @table @asis @item box A box never changes state and, hence, is never returned by @code{@ref{fl_do_forms()}}. @item text Also a text never changes state. @item button A button is returned when the user presses a mouse button on it and then releases the button. The change is not reported before the user releases the mouse button, except with touch buttons which are returned all the time as long as the user keeps the mouse pressed on it. (See e.g.@: @file{touchbutton.c} for the use of touch buttons.) @item slider A slider per default is returned whenever its value is changed, so whenever the user clicks on it and moves the mouse the slider object gets returned. @item input An input field is returned per default when it is deactivated, i.e., the user has selected it and then starts interacting with another object that has the ability to get returned. @end table (This list just contains a small number of objects that exist, see Part III for a list of all objects and the documentation of the exact behaviour of them.) When the (address of the) object is returned by @code{@ref{fl_do_forms()}} the application program can take action accordingly. See some of the demo programs for examples of use. Normally, after the action is taken by the application program @code{@ref{fl_do_forms()}} is called again to continue the interaction. Hence, simpler programs have the following global form: @example /* define the forms */ /* display the forms */ while (! ready) @{ obj = fl_do_forms(); if (obj == obj1) /* handle the change in obj1 */ else if (obj == obj2) /* handle the change in obj2 */ .... @} @end example For more complex programs interaction via callbacks is often preferable. For such programs, the global structure looks something like the following @example /* define callbacks */ void callback(FL_OBJECT *obj, long data) @{ /* perform tasks */ @} void terminate_callback(FL_OBJECT *obj, long data) @{ /* cleanup application */ fl_finish(); exit(0); @} main(int argc, char *argv[]) @{ /* create form and bind the callbacks to objects */ /* enter main loop */ fl_do_forms(); return 0; @} @end example @noindent In this case, @code{@ref{fl_do_forms()}} handles the interaction indefinitely and never returns. The program exits via one of the callback functions. There is also the possibility to conrol under which exact conditions the object gets returned. An application that e.g.@: doesn't want to be notified about each change of a slider but instead only want a single notification after the mouse button has been released and the value of the slider was changed in the process would call the function @findex fl_set_object_return() @anchor{fl_set_object_return()} @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example with @code{when} set to @code{FL_RETURN_END_CHANGED}. There are several values @code{when} can take: @table @code @anchor{FL_RETURN_CHANGED} @tindex FL_RETURN_CHANGED @item FL_RETURN_CHANGED Return (or call object callback) whenever there is a change in the state of the object (button was pressed, input field was changed, slider was moved etc.). @anchor{FL_RETURN_END} @tindex FL_RETURN_END @item FL_RETURN_END Return (or invoke callback) at the end of the interaction (typically when the user releases the mouse button) regardless if the objects state was changed or not. @anchor{FL_RETURN_END_CHANGED} @tindex FL_RETURN_END_CHANGED @item FL_RETURN_END_CHANGED Return (or call object callback) when interaction stops @strong{and} the state of the object changed. @anchor{FL_RETURN_SELECTION} @tindex FL_RETURN_SELECTION @item FL_RETURN_SELECTION Return when e.g.@: a line in a @code{@ref{FL_MULTI_BROWSER}} browser was selected. @anchor{FL_RETURN_DESELECTION} @tindex FL_RETURN_DESELECTION @item FL_RETURN_DESELECTION Return when e.g.@: a line in a @code{@ref{FL_MULTI_BROWSER}} browser was deselected. @anchor{FL_RETURN_ALWAYS} @tindex FL_RETURN_ALWAYS @item FL_RETURN_ALWAYS Return (or invoke callback) on any of the events that can happen to the object. @anchor{FL_RETURN_NONE} @tindex FL_RETURN_NONE @item FL_RETURN_NONE Never notiy the application about interactions with this object (i.e.@: never return it nor invoke its callback). Note: this is not meant for deactivation of an object, it will still seem to work as normal, it just doesn't get returned to the application nor does is callbak get invoked. @end table Since for different objects only subsets of these conditions make sense please read the more detailed descriptions for each of the object types in Part III. All of the values above, except @code{@ref{FL_RETURN_END_CHANGED}}, @code{@ref{FL_RETURN_ALWAYS}} and @code{@ref{FL_RETURN_NONE}} can be logically @code{OR}'ed. @code{@ref{FL_RETURN_END_CHANGED}} is different in that it only can be returned when the conditions for @code{@ref{FL_RETURN_END}} and @code{@ref{FL_RETURN_CHANGED}} are satisfied at once. If this is request @code{@ref{FL_RETURN_END}} and @code{@ref{FL_RETURN_CHANGED}} will automatically deselected. So if you want notifications about the conditions that lead to @code{@ref{FL_RETURN_END}} or @code{@ref{FL_RETURN_CHANGED}} (or both at once) ask instead for the logical @code{OR} of these two. @code{@ref{FL_RETURN_ALWAYS}} includes all conditions except @code{@ref{FL_RETURN_END_CHANGED}}. Once an object is returned (or its callback invoked) you can determine the reason it was returned by calling @findex fl_get_object_return_state() @anchor{fl_get_object_return_state()} @example int fl_get_object_return_state(FL_OBBJECT *obj); @end example The returned value is logical @code{OR} of the conditions that led to the object getting returned, where the conditions can be @code{@ref{FL_RETURN_CHANGED}}, @code{@ref{FL_RETURN_END}}, @code{@ref{FL_RETURN_SELECTION}} and @code{@ref{FL_RETURN_DESELECTION}}. (The @code{@ref{FL_RETURN_END_CHANGED}} condition is satisfied if both @code{@ref{FL_RETURN_END}} and @code{@ref{FL_RETURN_CHANGED}} are set.) Please note that calling this function only makes sense in a callback for an object or when the object has been just returned by e.g.@: @code{@ref{fl_do_forms()}}. Further interactions with the object overwrite the value! @node Periodic Events and Non-blocking Interaction @section Periodic Events and Non-blocking Interaction The interaction mentioned above is adequate for many application programs but not for all. When the program also has to perform tasks when no user action takes place (e.g. redrawing a rotating image all the time), some other means of interaction are needed. There exist two different, but somewhat similar, mechanisms in the library that are designed specifically for generating and handling periodic events or achieving non-blocking interaction. Depending on the application, one method may be more appropriate than the other. For periodic tasks, e.g., rotating an image, checking the status of some external device or application state etc., interaction via an idle callback comes in very handy. An idle callback is an application function that is registered with the system and is called whenever there are no events pending for forms (or application windows). To register an idle callback, use the following routine @findex fl_set_idle_callback() @example FL_APPEVENT_CB fl_set_idle_callback(FL_APPEVENT_CB callback, void *user_data); @end example After the registration, whenever the main loop (@code{@ref{fl_do_forms()}}) is idle, i.e., no user action or light user action, the callback function is called as @example int callback(xev, user_data); @end example @noindent where @code{user_data} is the void pointer passed to the system in @code{@ref{fl_set_idle_callback()}} through which some information about the application can be passed. The return value of the callback function is currently not used. @code{xev} is a pointer to a synthetic@footnote{I.e. @code{xev->xmotion.send_event} is true.} @code{MotionNotify} event from which some information about mouse position etc. can be obtained. To remove the idle callback, use @code{@ref{fl_set_idle_callback()}} with callback set to @code{NULL}. Timeouts are similar to idle callbacks but with somewhat more accurate timing. Idle callbacks are called whenever the system is idle, the time interval between any two invocations of the idle callback can vary a great deal depending upon many factors. Timeout callbacks, on the other hand, will never be called before the specified time is elapsed. You can think of timeouts as regularized idle callbacks, and further you can have more than one timeout callbacks. To add a timeout callback, use the following routine @tindex FL_TIMEOUT_CALLBACK @findex fl_add_timeout() @example typedef void (*FL_TIMEOUT_CALLBACK)(int, void *); int fl_add_timeout(long msec, FL_TIMEOUT_CALLBACK callback, void *data); @end example @noindent The function returns the timeout's ID@footnote{The function will not return 0 or -1 as timeout IDs, so the application program can use these values to tag invalid or expired timeouts.}. When the time interval specified by @code{msec} (in milli-second) is elapsed, the timeout is removed, then the callback function is called. The timeout ID is passed to the callback function as the first parameter. The second parameter of the callback function is passed the data pointer that was passed to @code{@ref{fl_add_timeout()}}. To remove a timeout before it triggers, use the following routine @findex fl_remove_timeout() @example void fl_remove_timeout(int id); @end example @noindent where @code{id} is the timeout ID returned by @code{@ref{fl_add_timeout()}}. There is also an @code{FL_OBJECT}, the @code{FL_TIMER} object, especially the invisible type, that can be used to do timeout. Since it is a proper Forms Library object, it may be easier to use simply because it has the same API as any other GUI elements and is supported by the Form Designer. @xref{Timer Object}, for complete information on the @code{FL_TIMER} object. Note that idle callback and timeout are not appropriate for tasks that block or take a long time to finish because during the busy or blocked period, no interaction with the GUI can take place (both idle callback and timeout are invoked by the main loop, blockage or busy executing application code prevents the main loop from performing its tasks). So what to do in situations where the application program does require a lengthy computation while still wanting to have the ability to interact with the user interface (for example, a Stop button to terminate the lengthy computation)? In these situations, the following routine can be used: @findex fl_check_forms() @example FL_OBJECT *fl_check_forms(void); @end example @noindent This function is similar to @code{@ref{fl_do_forms()}} in that it takes care of handling events and appropriate callbacks, but it does not block. Instead it always returns to the application program immediately. If a change has occurred in some object the object is returned as with @code{@ref{fl_do_forms()}}. But when no change has occurred control is also returned but this time a @code{NULL} object is returned. Thus, by inserting this statement in the middle of the computation in appropriate places in effect "polls" the user interface. The downside of using this function is that if used excessively, as with all excessive polls, it can chew up considerable CPU cycles. Therefore, it should only be used outside the inner most loops of the computation. If all objects have callbacks bound to them, @code{@ref{fl_check_forms()}} always returns @code{NULL}, otherwise, code similar to the following is needed: @example obj = fl_check_forms(); if (obj == obj1) /* handle it */ ... @end example @noindent Depending on the applications, it may be possible to partition the computation into smaller tasks that can be performed within an idle callback one after another, thus eliminating the need of using @code{@ref{fl_check_forms()}}. Handling intensive computation while maintaining user interface responsiveness can be tricky and by no means the above methods are the only options. You can, for example, fork a child process to do some of the tasks and communicate with the interface via pipes and/or signals, both of which can be handled with library routines documented later, or use multi-thread (but be careful to limit Xserver access within one thread). Be creative and have fun. For running external executables while maintaining responsiveness of the interface, see @code{@ref{fl_exe_command()}} and @code{@ref{fl_popen()}} documented later in @ref{Command Log}. @node Dealing With Multiple Windows @section Dealing With Multiple Windows It is not atypical that an application program may need to take interaction from more than one form at the same time, Forms Library provides a mechanism with which precise control can be exercised. By default, @code{@ref{fl_do_forms()}} takes interaction from all forms that are shown. In certain situations, you might not want to have interaction with all of them. For example, when the user presses a quit button in a form you might want to ask a confirmation using another form. You don't want to hide the main form because of that but you also don't want the user to be able to press buttons, etc. in this form. The user first has to give the confirmation. So you want to temporarily deactivate the main form. This can be done using the call @findex fl_deactivate_form() @example void fl_deactivate_form(FL_FORM *form); @end example To reactivate the form later again use @findex fl_activate_form() @example void fl_activate_form(FL_FORM *form); @end example It is a good idea to give the user a visual clue that a form is deactivated. This is not automatically done mainly for performance reasons. Experience shows that graying out some important objects on the form is in general adequate. Graying out an object can be accomplished by using @code{@ref{fl_set_object_lcol()}} (see @file{objinactive.c}. What objects to gray out is obviously application dependent. The following two functions can be used to register two callbacks that are called whenever the activation status of a form is changed: @tindex FL_FORM_ATACTIVATE @tindex FL_FORM_ATDEACTIVATE @findex fl_set_form_atactivate() @findex fl_set_form_atdeactivate() @example typedef void (*FL_FORM_ATACTIVATE)(FL_FORM *, void *); FL_FORM_ATACTIVATE fl_set_form_atactivate(FL_FORM *form, FL_FORM_ATACTIVATE callback, void *data); typedef void (*FL_FORM_ATDEACTIVATE)(FL_FORM *, void *); FL_FORM_ATDEACTIVATE fl_set_form_atdeactivate(FL_FORM *form, FL_FORM_ATDEACTIVATE callback, void *data); @end example It is also possible to deactivate all current forms and reactivate them again. To this end use the functions: @findex fl_deactivate_all_forms() @findex fl_activate_all_forms() @example void fl_deactivate_all_forms(void); void fl_activate_all_forms(void); @end example @noindent Note that deactivation works in an additive way, i.e., when deactivating a form say 3 times it also has to be activated 3 times to become active again. One problem remains. Mouse actions etc. are presented to a program in the form of events in an event queue. The library routines @code{@ref{fl_do_forms()}} and @code{@ref{fl_check_forms()}} read this queue and handle the events. When the application program itself also opens windows, these windows will rather likely receive events as well. Unfortunately, there is only one event queue. When both the application program and the library routines would read events from this one queue problems would occur and events missed. Hence, the application program should not read the event queue itself.. To solve this problem, the library maintains (or appears to maintain) a separate event queue for the user. This queue behaves in exactly the same way as the normal event queue. To access it, the application program must use replacements for the usual Xlib routines. Instead of using @code{XNextEvent()}, the program will use @code{@ref{fl_XNextEvent()}}, with the same parameters except the @code{Display *} argument. The following is a list of all replacement routines: @findex fl_XNextEvent() @anchor{fl_XNextEvent()} @findex fl_XPeekEvent() @anchor{fl_XPeekEvent()} @findex fl_XEventsQueued() @anchor{fl_XEventsQueued()} @findex fl_XPutbackEvent() @anchor{fl_XPutbackEvent()} @example int fl_XNextEvent(XEvent *xev); int fl_XPeekEvent(XEvent *xev); int fl_XEventsQueued(int mode); int fl_XPutbackEvent(XEvent *xev); @end example Other events routines may be directly used if proper care is taken to make sure that only events for the application windows not handled by the library are removed. These routines include @code{XWindowEvent()}, @code{XCheckWindowEvent()} etc. To help find out when an event has occurred, whenever @code{@ref{fl_do_forms()}} and @code{@ref{fl_check_forms()}} encounter an event that is not meant for handling by the library but by the application program itself they return a special object @tindex FL_EVENT @code{FL_EVENT}. Upon receiving this special event, the application program can and must remove the pending event from the queue using @code{@ref{fl_XNextEvent()}}. So the basis of a program with its own windows would look as follows: @example /* define the forms */ /* display the forms */ /* open your own window(s) */ while (! ready) @{ obj = fl_do_forms(); /* or fl_check_forms() */ if (obj == FL_EVENT) @{ fl_XNextEvent(&xevent); switch (xevent.type) @{ /* handle the event */ @} @} else if (obj != NULL) /* handle the change in obj */ /* update other things */ @} @} @end example In some situations you may not want to receive these "user" events. For example, you might want to write a function that pops up a form to change some settings. This routine might not want to be concerned with any redrawing of the main window, etc., but you also not want to discard any events. In this case you can use the routines @code{@ref{fl_do_only_forms()}} and @code{@ref{fl_check_only_forms()}} that will never return @code{FL_EVENT}. The events don't disappear but will be returned at later calls to the normal routines @code{@ref{fl_do_forms()}} etc. It can't be over-emphasized that it is an error to ignore @code{FL_EVENT} or use @code{@ref{fl_XNextEvent()}} without seeing @code{FL_EVENT}. Sometimes an application program might need to find out more information about the event that triggered a callback, e.g., to implement mouse button number sensitive functionalities. To this end, the following routines may be called @findex fl_mouse_button() @anchor{fl_mouse_button()} @example long fl_mouse_button(void); @end example @noindent This function, if needed, should be called from within a callback. The function returns one of the constants @code{@ref{FL_LEFT_MOUSE}}, @code{@ref{FL_MIDDLE_MOUSE}}, @code{@ref{FL_RIGHT_MOUSE}}, @code{@ref{FL_SCROLLUP_MOUSE}} or @code{@ref{FL_SCROLLDOWN_MOUSE}}, indicating which mouse button was pushed or released. If the callback is triggered by a shortcut, the function returns the keysym (ascii value if ASCII) of the key plus @tindex FL_SHORTCUT @code{@ref{FL_SHORTCUT}}. For example, if a button has a shortcut @code{C} (ASCII value is 3), the button number returned upon activation of the shortcut would be @code{FL_SHORTCUT + 3}. @code{@ref{FL_SHORTCUT}} can be used to determine if the callback is triggered by a shortcut or not @example if (fl_mouse_button() >= FL_SHORTCUT) /* handle shortcut */ else switch (fl_mouse_button()) @{ case FL_LEFTMOUSE: .... @} @end example More information can be obtained by using the following routine that returns the last @code{XEvent} @findex fl_last_event() @example const XEvent *fl_last_event(void); @end example @noindent Note that if this routine is used outside of a callback function, the value returned may not be the real "last event" if the program was idling and, in this case, it returns a synthetic @code{MotionNotify} event. Some of the utilities used internally by the Forms Library can be used by the application programs, such as window geometry queries etc. Following is a partial list of the available routines: @findex fl_get_winorigin() @findex fl_get_winsize() @findex fl_get_wingeometry() @example void fl_get_winorigin(Window win, FL_Coord *x, FL_Coord *y); void fl_get_winsize(Window win, FL_Coord *w, FL_Coord *h); void fl_get_wingeometry(Window win, FL_Coord *x, FL_Coord *y, FL_Coord *w, FL_Coord *h); @end example @noindent All positions are relative to the root window. There are also routines that can be used to obtain the current mouse position relative to the root window: @findex fl_get_mouse() @example Window fl_get_mouse(FL_Coord *x, FL_Coord *y, unsigned int *keymask); @end example @noindent where @code{keymask} is the same as used in @code{XQueryPointer(3X11)}. The function returns the window ID the mouse is in. To obtain the mouse position relative to an arbitrary window, the following routine may be used @findex fl_get_win_mouse() @example Window fl_get_win_mouse(Window win, FL_Coord *x, FL_Coord *y, unsigned int *keymask); @end example To print the name of an XEvent, the following routine can be used: @findex fl_print_xevent_name() @anchor{fl_print_xevent_name()} @example XEvent *fl_print_xevent_name(const char *where, const XEvent *xev); @end example @noindent The function takes an XEvent, prints out its name and some other info, e.g., @code{expose, count=n}. Parameter @code{where} can be used to indicate where this function is called: @example fl_print_xevent_name("In tricky.c", &xevent); @end example @node Using Callback Functions @section Using Callback Functions As stated earlier, the recommended method of interaction is to use callback functions. A callback function is a function supplied to the library by the application program that binds a specific condition (e.g., a button is pushed) to the invocation of the function by the system. The application program can bind a callback routine to any object. Once a callback function is bound and the specified condition is met, @code{@ref{fl_do_forms()}} or @code{@ref{fl_check_forms()}} invokes the callback function instead of returning the object. To bind a callback routine to an object, use the following @tindex FL_CALLBACKPTR @findex fl_set_object_callback() @example typedef void (*FL_CALLBACKPTR)(FL_OBJECT *obj, long argument); FL_CALLBACKPTR fl_set_object_callback(FL_OBJECT *obj, FL_CALLBACKPTR callback, long argument); @end example @noindent where @code{callback} is the callback function. @code{argument} is an argument that is passed to the callback routine so that it can take different actions for different objects. The function returns the old callback routine already bound to the object. You can change the callback routine anytime using this function. See, for example, demo program @file{timer.c}. The callback routine should have the form @example void callback(FL_OBJECT *obj, long argument); @end example @noindent The first argument to every callback function is the object to which the callback is bound. The second parameter is the argument specified by the application program in the call to @code{@ref{fl_set_object_callback()}}. See program @file{yesno_cb.c} for an example of the use of callback routines. Note that callback routines can be combined with normal objects. It is possible to change the callback routine at any moment. Sometimes it is necessary to access other objects on the form from within the callback function. This presents a difficult situation that calls for global variables for all the objects on the form. This runs against good programming methodology and can make a program hard to maintain. Forms Library solves (to some degree) this problem by creating three fields, @code{void *u_vdata}, @code{char *u_cdata} and @code{long u_ldata}, in the @code{FL_OBJECT} structure that you can use to hold the necessary data to be used in the callback function. A better and more general solution to the problem is detailed in Part II of this documentation where all objects on a form is are grouped into a single structure which can then be "hang" off of @code{u_vdata} or some field in the @code{FL_FORM} structure. Another communication problem might arise when the callback function is called and, from within the callback function, some other objects' state is explicitly changed, say, via @code{@ref{fl_set_button()}}, @code{@ref{fl_set_input()}} etc. You probably don't want to put the state change handling code of these objects in another object's callback. To handle this situation, you can simply call @findex fl_call_object_callback() @example void fl_call_object_callback(FL_OBJECT *obj); @end example When dealing with multiple forms, the application program can also bind a callback routine to an entire form. To this end it should use the routine @findex fl_set_form_callback() @example void fl_set_form_callback(FL_FORM *form, void (*callback)(FL_OBJECT *, void *), void *data); @end example Whenever @code{@ref{fl_do_forms()}} or @code{@ref{fl_check_forms()}} would return an object in form they call the routine callback instead, with the object as an argument. So the callback should have the form @example void callback(FL_OBJECT *obj, void *data); @end example With each form you can associate its own callback routine. For objects that have their own callbacks the object callbacks have priority over the form callback. When the application program also has its own windows (via Xlib or Xt), it most likely also wants to know about XEvents for the window. As explained earlier, this can be accomplished by checking for @code{FL_EVENT} objects. Another (and better) way is to add an event callback routine. This routine will be called whenever an XEvent is pending for the application's own window. To setup an event callback routine use the call @tindex FL_APPEVENT_CB @findex fl_set_event_callback() @example FL_APPEVENT_CB fl_set_event_callback(int (*callback)(XEvent *ev, void *data), void *data); @end example @noindent Whenever an event happens the callback function is invoked with the event as the first argument and a pointer to data you want it to receive. So the callback should have the form @example typedef int (*FL_APPEVENT_CB)(XEvent *ev, void *data); int callback(XEvent *xev, void *data); @end example This assumes the application program solicits the events and further, the callback routine should be prepared to handle all XEvent for all non-form windows. The callback function normally should return @code{0} unless the event isn't for one of the applcation-managed windows. This could be undesirable if more than one application window is active. To further partition and simplify the interaction, callbacks for a specific event on a specific window can be registered: @findex fl_add_event_callback() @example FL_APPEVENT_CB fl_add_event_callback(Window window, int xev_type, FL_APPEVENT_CB callback, void *user_data); @end example @noindent where @code{window} is the window for which the callback routine is to be registered. @code{xev_type} is the XEvent type you're interested in, e.g., @code{Expose} etc. If @code{xev_type} is 0, it is taken to mean that the callback routine will handle all events for the window. The newly installed callback replaces the callback already installed. Note that this function only works for windows created directly by the application program (i.e., it won't work for forms' windows or windows created by the canvas object). It is possible to access the raw events that happen on a form's window via @code{@ref{fl_register_raw_callback()}} discussed in @ref{Form Events}. @code{@ref{fl_add_event_callback()}} does not alter the window's event mask nor does it solicit events for you. That's mainly for the reason that an event type does not always correspond to a unique event mask, also in this way, the user can solicit events at window's creation and use 0 to register all the event handlers. To let XForms handle solicitation for you, call the following routine @findex fl_activate_event_callbacks() @example void fl_activate_event_callbacks(Window win); @end example @noindent This function activates the default mapping of events to event masks built-in in the Forms Library, and causes the system to solicit the events for you. Note however, the mapping of events to masks are not unique and depending on applications, the default mapping may or may not be the one you want. For example, @code{MotionNotify} event can be mapped into @code{ButtonMotionMask} or @code{PointerMotionMask}. Forms Library will use both. It is possible to control the masks you want precisely by using the following function, which can also be used to add or remove solicited event masks on the fly without altering other masks already selected: @findex fl_addto_selected_xevent() @anchor{fl_addto_selected_xevent()} @findex fl_remove_selected_xevent() @anchor{fl_remove_selected_xevent()} @example long fl_addto_selected_xevent(Window win, long mask); long fl_remove_selected_xevent(Window win, long mask); @end example Both functions return the resulting event masks that are currently selected. If event callback functions are registered via both @code{fl_set_event_callback()} and @code{@ref{fl_add_event_callback()}}, the callback via the latter is invoked first and the callback registered via @code{@ref{fl_set_event_callback()}} is called only if the first attempt is unsuccessful, that is, the handler for the event is not present. For example, after the following sequence @example fl_add_event_callback(winID, Expose, expose_cb, 0); fl_set_event_callback(event_callback); @end example and all @code{Expose} events on window @code{winID} are consumed by @code{expose_cb} then @code{event_callback()} would never be invoked as a result of an @code{Expose} event. To remove a callback, use the following routine @findex fl_remove_event_callback() @example void fl_remove_event_callback(Window win, int xev_type); @end example @noindent All parameters have the usual meaning. Again, this routine does not modify the window's event mask. If you like to change the events the window is sensitive to after removing the callback, use @code{@ref{fl_activate_event_callbacks()}}. If @code{xev_type} is 0, all callbacks for window @code{win} are removed. This routine is called automatically if @code{@ref{fl_winclose()}} is called to unmap and destroy a window. Otherwise, you must call this routine explicitly to remove all event callbacks before destroying a window using @code{XDestroyWindow()}. A program using all of these has the following basic form: @example void event_cb(XEvent *xev, void *mydata1) @{ /* Handles an X-event. */ @} void expose_cb(XEvent *xev, void *mydata2) @{ /* handle expose */ @} void form1_cb(FL_OBJECT *obj) @{ /* Handles object obj in form1. */ @} void form2_cb(FL_OBJECT *obj) @{ /* Handles object obj in form2. */ @} main(int argc, char *argv[]) @{ /* initialize */ /* create form1 and form2 and display them */ fl_set_form_callback(form1, form1cb); fl_set_form_callback(form2, form2cb); /* create your own window, winID and show it */ fl_addto_selected_xevent(winID, ExposureMask | ButtonPressMask |... ); fl_winshow(winID); fl_set_event_callback(event_cb, whatever); fl_add_event_callback(winID, Expose, expose_cb, data); fl_do_forms(); return 0; @} @end example @noindent The routine @code{@ref{fl_do_forms()}} will never return in this case. See @file{demo27.c} for a program that works this way. It is recommended that you set up your programs using callback routines (either for the objects or for entire forms). This ensures that no events are missed, events are treated in the correct order, etc. Note that different event callback routines can be written for different stages of the program and they can be switched when required. This provides a progressive path for building up programs. Another possibility is to use a free object so that the application window is handled automatically by the internal event processing mechanism just like any other forms. @node Handling Other Input Sources @section Handling Other Input Sources It is not uncommon that X applications may require input from sources other than the X event queue. Outlined in this section are two routines in the Forms Library that provide a simple interface to handle additional input sources. Applications can define input callbacks to be invoked when input is available from a specified file descriptor. The function @tindex FL_IO_CALLBACK @findex fl_add_io_callback() @anchor{fl_add_io_callback()} @example typedef void (*FL_IO_CALLBACK)(int fd, void *data); void fl_add_io_callback(int fd, unsigned condition, FL_IO_CALLBACK callback, void *data); @end example @noindent registers an input callback with the system. The argument @code{fd} must be a valid file descriptor on a UNIX-based system or other operating system dependent device specification while @code{condition} indicates under what circumstance the input callback should be invoked. The condition must be one of the following constants @table @code @tindex FL_READ @item FL_READ File descriptor has data available. @tindex FL_WRITE @item FL_WRITE File descriptor is available for writing. @tindex FL_EXCEPT @item FL_EXCEPT an I/O error has occurred. @end table When the given condition occurs, the Forms Library invokes the callback function specified by @code{callback}. The @code{data} argument allows the application to provide some data to be passed to the callback function when it is called (be sure that the storage pointed to by data has global (or static) scope). To remove a callback that is no longer needed or to stop the Forms Library's main loop from watching the file descriptor, use the following function @findex fl_remove_io_callback() @anchor{fl_remove_io_callback()} @example void fl_remove_io_callback(int fd, unsigned condition, FL_IO_CALLBACK callback); @end example The procedures outlined above work well with pipes and sockets, but can be a CPU hog on real files. To workaround this problem, you may wish to check the file periodically and only from within an idle callback. xforms-1.0.93sp1/doc/part3_container_objects.texi0000644000175000017500000005670211376031775020516 0ustar jensjens@node Part III Container Objects @chapter Container Objects @ifnottex @menu * Folder Object: Folder Object * FormBrowser Object: FormBrowser Object @end menu @end ifnottex @node Folder Object @section Folder Object A tabbed folder is a special container class that is capable of holding multiple groups of objects (folders) to maximize the utilization of the screen real estate. Each folder has its own tab the user can click on to call up a specific folder from which option can be selected. @ifhtml @center @image{images/folders} @end ifhtml @ifnothtml @center @image{images/folders,10cm} @end ifnothtml @ifnottex @menu * Adding Folder Objects: Adding Folder Objects * Folder Types: Folder Types * Folder Interaction: Folder Interaction * Other Folder Routines: Other Folder Routines * Remarks: Folder Remarks @end menu @end ifnottex @node Adding Folder Objects @subsection Adding Folder Objects To add a tabbed folder to a form use the routine @findex fl_add_tabfolder() @anchor{fl_add_tabfolder()} @example FL_OBJECT *fl_add_tabfolder(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The geometry indicated by @code{x}, @code{y}, @code{w}, and @code{h} is the total area of the tabbed folders, including the area used for the tab riders. @node Folder Types @subsection Folder Types The following types are available: @table @code @tindex FL_TOP_TABFOLDER @anchor{FL_TOP_TABFOLDER} @item FL_TOP_TABFOLDER Tabs on top of the folders. @tindex FL_BOTTOM_TABFOLDER @anchor{FL_BOTTOM_TABFOLDER} @item FL_BOTTOM_TABFOLDER Tabs at the bottom of the folders. @tindex FL_LEFT_TABFOLDER @anchor{FL_LEFT_TABFOLDER} @item FL_LEFT_TABFOLDER Tabs on the left of the folders (not yet functional). @tindex FL_RIGHT_TABFOLDER @anchor{FL_RIGHT_TABFOLDER} @item FL_RIGHT_TABFOLDER Tabs on the right of the folders (not yet functional). @end table @node Folder Interaction @subsection Folder Interaction The folders displayed by the tabbed folder class are simply regular forms (of type @code{FL_FORM}), which in turn contain objects. Each folder is associated with a name (shown on the tab rider). The folder interacts with the user just like any other form. Different from other top-level forms is that only one folder is active at any time. The user selects different folders by clicking on the tab rider associated with a folder. To set up when either the application is notified about events of the tabfolder or the tabfolders callback is invoked (if installed) use @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example @noindent where the @code{when} argument can be one of @table @code @item @ref{FL_RETURN_NONE} Never report or invoke callback even if the selected folder has been changed. @item @ref{FL_RETURN_CHANGED} @item @ref{FL_RETURN_END_CHANGED} Result in a notification whenever the a different folder from the currently active one has been selected (this is the default for the tabfolder object). @item @ref{FL_RETURN_END} @item @ref{FL_RETURN_ALWAYS} Notify when either a new or the already active folder has been selected. @end table In older releases of the library on changes of the selected folder only a callback for the older was executed (if one was installed), but the folder object wasn't reported back via e.g.@: @code{@ref{fl_do_forms()}} etc. This has changed with version 1.0.92. To get the old behaviour you have to build XForms with the @code{--enable-bwc-bs-hack} being set. To find out which folder is currently active, the following routines the tab riders are available @findex fl_get_active_folder() @anchor{fl_get_active_folder()} @findex fl_get_active_folder_number() @anchor{fl_get_active_folder_number()} @findex fl_get_active_folder_name() @anchor{fl_get_active_folder_name()} @example FL_FORM *fl_get_active_folder(FL_OBJECT *obj); int fl_get_active_folder_number(FL_OBJECT *obj); const char *fl_get_active_folder_name(FL_OBJECT *obj); @end example @noindent All three functions essentially perform the same task, i.e.@: return a handle of the active folder, but the kind of handle returned is different. The first function returns the form associated with the folder, the second function the folder sequence number starting from 1 on the left, and the third the folder name. Depending on the application setup, one routine might be more convenient than the other two. To find out what the last active folder is (which may be of greater interest than the currently active one) the following can be used: @findex fl_get_folder() @anchor{fl_get_folder()} @findex fl_get_folder_number() @anchor{fl_get_folder_number()} @findex fl_get_folder_name() @anchor{fl_get_folder_name()} @example FL_FORM *fl_get_folder(FL_OBJECT *obj) int fl_get_folder_number(FL_OBJECT *obj) const char *fl_get_folder_name(FL_OBJECT *obj) @end example @noindent Again, depending on the application, one might prefer one routine to the other two. @node Other Folder Routines @subsection Other Folder Routines To populate a tabbed folder, use the following routine @findex fl_addto_tabfolder() @anchor{fl_addto_tabfolder()} @example FL_OBJECT *fl_addto_tabfolder(FL_OBJECT *obj, const char *tab_name, FL_FORM *folder) @end example @noindent where @code{tab_name} is a string (with possible embedded newlines in it) indicating the text of the tab rider and @code{folder} is a regular form created between calls of @code{@ref{fl_bgn_form()}} and @code{@ref{fl_end_form()}}. Only the pointer to the form is required. This means that the application program should not destroy a form that has been added to a tabbed folder. The function returns the folder tab object, which is an object of class @code{FL_BUTTON}. The initial object color, label color, and other attributes (gravities, for example) of the tab button are inherited from the tabbed folder object @code{obj} and the location and size of the tab are determined automatically. You can change the attributes of the returned object just like any other objects, but not all possibilities result in a pleasing appearance. Note that although there is no specific requirement of what the backface of the folder/form should be, a boxtype other than @code{FL_FLAT_BOX} or @code{FL_NO_BOX} may not look nice. If the backface of the form is of @code{FL_FLAT_BOX} the associated tab will take on the color of the backface when activated. One thing to note is that each tab must have its own form, i.e.@: you should not associate the same form with two different tabs. However, you can create copies of a form and use these copies. To access the individual forms on the tabfolder, e.g.@: in order to modify something on it, use the following routines @findex fl_get_tabfolder_folder_bynumber() @anchor{fl_get_tabfolder_folder_bynumber()} @findex fl_get_tabfolder_folder_byname() @anchor{fl_get_tabfolder_folder_byname()} @example FL_FORM *fl_get_tabfolder_folder_bynumber(FL_OBJECT *obj, int num); FL_FORM *fl_get_tabfolder_folder_byname(FL_OBJECT *obj, const char *name); @end example @noindent where @code{num} and @code{name} are the sequence number (the first tab on the left has a sequence number 1, the second 2 etc) and the tab name, respectively. The functions return the form associated with the number or the name. If the requested number or name is invalid, @code{NULL} is returned. If there are more tabs than that can be shown, the right-most tab will be shown as "broken". Clicking on the "broken" tab scrolls the tab to the right one per each click. To scroll to the left (if there are tabs scrolled off screen from the left), clicking on the first tab scrolls right. Although a regular form (top-level) and a form used as a folder behave almost identically, there are some differences. In a top-level form, objects that do not have callbacks bound to them will be returned, when their states change, to the application program via @code{@ref{fl_do_forms()}} or @code{@ref{fl_check_forms()}}. When a form is used as a folder, objects that do not have a callback are ignored even when their states changes. The reason for this behavior is that presumably the application does not care while the changes take place and they only become relevant when the the folder is switched off and at that time the application program can decide what to do with these objects' states (apply or ignore for example). If immediate reaction is desired, just use callback functions for these objects. To obtain the number of folders in the tabfolder, the following routine can be used @findex fl_get_tabfolder_numfolders() @anchor{fl_get_tabfolder_numfolders()} @example int fl_get_tabfolder_numfolders(FL_OBJECT *obj); @end example To remove a folder, the following routine is available @findex fl_delete_folder() @anchor{fl_delete_folder()} @findex fl_delete_folder_bynumber() @anchor{fl_delete_folder_bynumber()} @findex fl_delete_folder_byname() @anchor{fl_delete_folder_byname()} @example void fl_delete_folder(FL_OBJECT *obj, FL_FORM *folder); void fl_delete_folder_bynumber(FL_OBJECT *obj, int num); void fl_delete_folder_byname(FL_OBJECT *obj, const char *name); @end example @noindent Note that after deletion, the number of folders in the tabfolder as well as the sequence numbers are updated. This means if you want to delete all folders after the second folder, you can do that by deleting the third folder repeatedly. The application program can select which folder to show by using the following routines @findex fl_set_folder() @anchor{fl_set_folder()} @findex fl_set_folder_bynumber() @anchor{fl_set_folder_bynumber()} @findex fl_set_folder_byname() @anchor{fl_set_folder_byname()} @example void fl_set_folder(FL_OBJECT *obj, FL_FORM *folder); void fl_set_folder_bynumber(FL_OBJECT *obj, int num); void fl_set_folder_byname(FL_OBJECT *obj, const char *tab); @end example Since the area occupied by the tabbed folder contains the space for tabs, the following routine is available to obtain the actual folder size @findex fl_get_folder_area() @anchor{fl_get_folder_area()} @example void fl_get_folder_area(FL_OBJECT *obj, FL_Coord *x, FL_Coord *y, FL_OBJECT *w, FL_OBJECT *h) @end example @noindent where @code{x} and @code{y} are relative to the (top-level) form the tabbed folder belongs to. The size information may be useful for resizing the individual forms that has to go into the tabbed folder. Note that the folder area may not be constant depending on the current tabs (For example, adding a multi-line tab will reduce the area for the folders). Since tab size can vary depending on monitor/font resolutions, it is in general not possible to design the forms (folders) so they fit exactly into the folder area. To dynamically adjust the sizes of the folders so they fit, the following routine is available @findex fl_set_tabfolder_autofit() @anchor{fl_set_tabfolder_autofit()} @example int fl_set_tabfolder_autofit(FL_OBJECT *obj, int how); @end example @noindent where @code{how} can be one of the following constants: @table @code @tindex FL_NO @item FL_NO Do not scale the form. @tindex FL_FIT @item FL_FIT Always scale the form. @tindex FL_ENLARGE_ONLY @item FL_ENLARGE_ONLY Scale the form only if it is smaller than the folder area. @end table @noindent The function returns the old setting. @node Folder Remarks @subsection Remarks By default, the tab for each folder is drawn with a corner of 3 pixels so it appears to be a trapezoid rather than a square. To change the appearance of the tabs, you can adjust the corner pixels using the following routine @findex fl_set_default_tabfolder_corner() @anchor{fl_set_default_tabfolder_corner()} @example int fl_set_default_tabfolder_corner(int n); @end example @noindent where @code{n} is the number of corner pixels. A value of 1 or 0 makes the tabs appear to be squarish. The function returns the old value. A tabbed folder is a composite object consisting of a canvas and several foldertab buttons. Each individual form is shown inside the canvas. Folder switching is accomplished by some internal callbacks bound to the foldertab button. Should the application change the callback functions of the foldertab buttons, these new callback functions must take the responsibility of switching the active folder. @code{fl_free_object(tabfolder)} does not free the individual forms that make up the tabfolder. See demo program @file{folder.c} for an example use of tabbed folder class. A nested tabfolder might not work correctly at the moment. @node FormBrowser Object @section FormBrowser Object A form browser is another container class that is capable of holding multiple forms, the height of which in aggregate may exceed the screen height. The form browser also works obviously for a single form that has a height that is larger than the screen height. This object class was developed with contributed code from Steve Lamont of UCSD and the National Center for Microscopy and Imaging Research (@email{spl@@ucsd.edu}). @ifnottex @menu * Adding FormBrowser Objects: Adding FormBrowser Objects * FormBrowser Types: FormBrowser Types * FormBrowser Interaction: FormBrowser Interaction * Other FormBrowser Routines: Other FormBrowser Routines * Remarks: FormBrowser Remarks @end menu @end ifnottex @node Adding FormBrowser Objects @subsection Adding FormBrowser Objects Adding an object To add a formbrowser object to a form use the routine @findex fl_add_formbrowser() @anchor{fl_add_formbrowser()} @example FL_OBJECT *fl_add_formbrowser(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The geometry indicated by @code{x}, @code{y}, @code{w} and @code{h} is the total area of the formbrowser, including scrollbars. @node FormBrowser Types @subsection FormBrowser Types There's only a single type of formbrowser available, the @tindex FL_NORMAL_FORMBROWSER @code{FL_NORMAL_FORMBROWSER}. @node FormBrowser Interaction @subsection FormBrowser Interaction Once a formbrowser is populated with forms, you can scroll the forms with the scrollbars and interact with any of the forms. All objects on the forms act, for the most part, the same way as they would if they were on separate forms, i.e., if there are callback functions bound to the objects, they will be invoked by the main loop when the states of the objects change. However, objects on the form that do not have callbacks bound to them will not be returned by @code{@ref{fl_do_forms()}} or @code{@ref{fl_check_forms()}}. Your application can be notified about changes of the scrollbars of the formbrowser. To set up under which conditions the application is notified or the formbrowsers callback is invoked (if installed) use @example void fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example @noindent where the @code{when} argument can be one of @table @code @item @ref{FL_RETURN_NONE} Never report or invoke callback (this is the default for the formbrowser object) @item @ref{FL_RETURN_CHANGED} Result in a notification whenever the position of one of the scrollbars has changed. @item @ref{FL_RETURN_END_CHANGED} Notification is sent if the position of a scrollbar has changed and the mouse button has been released. @item @ref{FL_RETURN_END} Notification on release of the mouse button. @item @ref{FL_RETURN_ALWAYS} Notify if the position of a scrollbar has changed or the mouse button has been released. @end table @node Other FormBrowser Routines @subsection Other FormBrowser Routines To populate a formbrowser, use the following routine @findex fl_addto_formbrowser() @anchor{fl_addto_formbrowser()} @example int fl_addto_formbrowser(FL_OBJECT *obj, FL_FORM *form); @end example @noindent where @code{form} is a pointer to a regular form created between calls of @code{@ref{fl_bgn_form()}} and @code{@ref{fl_end_form()}}. Only the form pointer is passed to the function, which means that the form should be valid for the duration of the formbrowser and the application program should not destroy a form that is added to a formbrowser before deleting the form from the formbrowser first. The function returns the total number of forms in the formbrowser. Note that although there is no specific requirement on what the backface of the form should be, not all boxtypes look nice. The form so added is appended to the list of forms that are already in the formbrowser. You can also use the following routine to obtain the total number of forms in a formbrowser @findex fl_get_formbrowser_numforms() @anchor{fl_get_formbrowser_numforms()} @example int fl_get_formbrowser_numforms(FL_OBJECT *formbrowser); @end example Although a regular form (top-level) and a form used inside a formbrowser behave almost identically, there are some differences. In a top-level form, objects that do not have callbacks bound to them will be returned to the application program when their states change via @code{@ref{fl_do_forms()}} or @code{@ref{fl_check_forms()}}. When a form is used as member of a formbrowser those objects that do not have callbacks are ignored even when their states change. To remove a form from the formbrowser, the following routine is available @findex fl_delete_formbrowser() @anchor{fl_delete_formbrowser()} @findex fl_delete_formbrowser_bynumber() @anchor{fl_delete_formbrowser_bynumber()} @example int fl_delete_formbrowser(FL_OBJECT *obj, FL_FORM *form); FL_FORM* fl_delete_formbrowser_bynumber(FL_OBJECT *obj, int num); @end example @noindent In the first function you specify the form to be removed from the formbrowser by a pointer to the form. The function returns the current (after deletion) number of forms in the formbrowser if the form is removed successfully else it returns -1. In the second function, you indicate the form to be removed with a sequence number, an integer between 1 and the number of forms in the browser. The sequence number is basically the order in which forms were added to the formbrowser. After a form is removed, the sequence numbers are re-adjusted so they are always consecutive. The function returns @code{NULL} if the @code{num} is invalid, otherwise it returns address of the form that is removed. To replace a form in formbrowser, the following routine is available @findex fl_replace_formbrowser() @anchor{fl_replace_formbrowser()} @example FL_FORM *fl_replace_formbrowser(FL_OBJECT *obj, int num, FL_FORM *form); @end example @noindent where @code{num} is the sequence number of the form that is to be replaced by @code{form}. For example, to replace the first form in the browser with a different form, you should use 1 for @code{num}. The function returns the form that has been replaced on success, otherwise @code{NULL} is returned. You can also insert a form into a formbrowser at arbitrary locations using the following routine @findex fl_insert_formbrowser() @anchor{fl_insert_formbrowser()} @example int fl_insert_formbrowser(FL_OBJECT *obj, int num, FL_FORM *form); @end example @noindent where @code{num} is the sequence number before which the new form @code{form} is to be inserted into the formbrowser. If successful the function returns the number of forms in the formbrowser, otherwise -1. To find out the sequence number of a particular form, the following routine is available @findex fl_find_formbrowser_form_number() @anchor{fl_find_formbrowser_form_number()} @example int fl_find_formbrowser_form_number(FL_OBJECT *obj, FL_FORM *form); @end example To obtain the form handle from the sequence number, use the following routine @findex fl_get_formbrowser_form() @anchor{fl_get_formbrowser_form()} @example int fl_get_formbrowser_form(FL_OBJECT *obj, int num); @end example By default, if the size of the forms exceeds the size of the formbrowser, scrollbars are added automatically. You can use the following routines to control the scrollbars @findex fl_set_formbrowser_hscrollbar() @anchor{fl_set_formbrowser_hscrollbar()} @findex fl_set_formbrowser_vscrollbar() @anchor{fl_set_formbrowser_vscrollbar()} @example void fl_set_formbrowser_hscrollbar(FL_OBJECT *obj, int how); void fl_set_formbrowser_vscrollbar(FL_OBJECT *obj, int how); @end example @noindent where @code{how} can be one of the following @table @code @tindex FL_ON @item FL_ON Always on. @tindex FL_OFF @item FL_OFF Always off. @tindex FL_AUTO @item FL_AUTO On when needed. This is the default. @end table The vertical scrollbar by default scrolls a fixed number of pixels. To change it so each action of the scrollbar scrolls to the next forms, the following routine is available @findex fl_set_formbrowser_scroll() @anchor{fl_set_formbrowser_scroll()} @example void fl_set_formbrowser_scroll(FL_OBJECT *how) @end example @noindent where @code{how} can be one of the following @table @code @tindex FL_SMOOTH_SCROLL @anchor{FL_SMOOTH_SCROLL} @item FL_SMOOTH_SCROLL The default. @tindex FL_JUMP_SCROLL @anchor{FL_JUMP_SCROLL} @item FL_JUMP_SCROLL Scrolls in form increments. @end table To obtain the form that is currently the first form in the formbrowser visible to the user, the following can be used @findex fl_get_formbrowser_topform() @anchor{fl_get_formbrowser_topform()} @example FL_FORM *fl_get_formbrowser_topform(FL_OBJECT *obj); @end example You can also set which form to show by setting the top form using the following routine @findex fl_set_formbrowser_topform() @anchor{fl_set_formbrowser_topform()} @findex fl_set_formbrowser_topform_bynumber() @anchor{fl_set_formbrowser_topform_bynumber()} @example int fl_set_formbrowser_topform(FL_OBJECT *obj, FL_FORM *form); FL_FORM* fl_set_formbrowser_topform_bynumber(FL_OBJECT *obj, int num); @end example @noindent The first function returns the sequence number of the form and the second function returns the form with sequence number @code{num}. Since the area occupied by the formbrowser contains the space for the scrollbars, the following routine is available to obtain the actual size of the forms area @findex fl_get_formbrowser_area() @anchor{fl_get_formbrowser_area()} @example void fl_get_formbrowser_area(FL_OBJECT *obj, int *x, int *y, int *w, int *h); @end example @noindent where @code{x} and @code{y} are relative to the (top-level) form the formbrowser belongs to. To programatically scroll within a formbrowser in horizontal and vertical direction, the following routines are available @findex fl_set_formbrowser_xoffset() @anchor{fl_set_formbrowser_xoffset()} @findex fl_set_formbrowser_yoffset() @anchor{fl_set_formbrowser_yoffset()} @example int fl_set_formbrowser_xoffset(FL_OBJECT *obj, int offset); int fl_set_formbrowser_yoffset(FL_OBJECT *obj, int offset); @end example @noindent where @code{offset} is a positive number, measuring in pixels the offset from the the natural position from the left and the top, respectively. In other words, 0 indicates the natural position of the content within the formbrowser. An x-offset of 10 means the content is scrolled 10 pixels to the leftleft. Similarly a y-offset of 10 means the content is scrolled by 10 pixels upwards. To obtain the current offsets, use the following routines @findex fl_get_formbrowser_xoffset() @anchor{fl_get_formbrowser_xoffset()} @findex fl_get_formbrowser_yoffset() @anchor{fl_get_formbrowser_yoffset()} @example int fl_get_formbrowser_xoffset(FL_OBJECT *obj); int fl_get_formbrowser_yoffset(FL_OBJECT *obj); @end example @node FormBrowser Remarks @subsection Remarks A call of @code{fl_free_object(formbrowser)} does not free the individual forms, it only frees the formbrowser object itself. See demo program @file{formbrowser.c} for an example use of formbrowser class. A nested formbrowser might not work correctly at the moment. xforms-1.0.93sp1/doc/part4_an_example.texi0000644000175000017500000001166211211743031017110 0ustar jensjens@node Part IV An Example @chapter An Example Let us work through an example of how to create a simple object class named @code{colorbox}. Assume that we want a class with the following behavior: it should normally be red. When the user presses the mouse on it it should turn blue. When the user releases the mouse button the object should turn red again and be returned to the application program. Further, the class module should keep a total count how many times the box got pushed. The first thing to do is to define some constants in a file named @file{colbox.h}. This file should at least contain the class number and one or more types: @example /* Class number must be between FL_USER_CLASS_START and FL_USER_CLASS_END */ #define FL_COLBOX (FL_USER_CLASS_START + 1) #define FL_NORMAL_COLBOX 0 /* The only type */ @end example Note that the type must start from zero onward. Normally it should also contain some defaults for the boxtype and label alignment etc. The include file also has to declare all the functions available for this object class. I.e., it should contain: @example extern FL_OBJECT *fl_create_colbox(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); extern FL_OBJECT *fl_add_colbox(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); extern int fl_get_colorbox(FL_OBJECT *); @end example Now we have to write a module @file{colbox.c} that contains the different routines. First of all we need routines to create an object of the new type and to add it to the current form. We also need to have a counter that keeps track of number of times the colbox is pushed. They would look as follows: @example typedef struct @{ int counter; /* no. of times pushed */ @} COLBOX_SPEC; FL_OBJECT *fl_create_colbox(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @{ FL_OBJECT *obj; /* create a generic object class with an appropriate ID */ obj = fl_make_object(FL_COLBOX, type, x, y, w, h, label, handle_colbox); /* initialize some members */ obj->col1 = FL_RED; obj->col2 = FL_BLUE; /* create class specific structures and initialize */ obj->spec = fl_malloc(sizeof *obj->spec); obj->spec->counter = 0; return obj; @} FL_OBJECT *fl_add_colbox(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @{ FL_OBJECT *obj = fl_create_colbox(type, x, y, w, h, label); fl_add_object(fl_current_form, obj); return obj; @} @end example The fields @code{col1} and @code{col2} are used to store the two colors red and blue such that the user can change them when required with the routine @code{@ref{fl_set_object_color()}}. What remains is to write the handling routine @code{handle_colbox()}. It has to react to three types of events: @code{FL_DRAW}, @code{FL_PUSH} and @code{FL_RELEASE}. Also, when the box is pushed, the counter should be incremented to keep a total count. Note that whether or not the mouse is pushed on the object is indicated in the field @code{obj->pushed}. Hence, when pushing and releasing the mouse the only thing that needs to be done is redrawing the object. This leads to the following piece of code: @example static int handle_colbox(FL_OBJECT *obj, int event, FL_Coord mx, FL_Coord my, int key, void *xev) @{ switch (event) @{ case FL_DRAW: /* Draw box */ fl_drw_box(obj->boxtype, obj->x,obj->y, obj->w, obj->h, obj->pushed ? obj->col2 : obj->col1, obj->bw); /* fall through */ case FL_DRAWLABEL: /* Draw label */ fl_draw_object_label(obj); break; case FL_PUSH: ((COLBOX_SPEC *) obj->spec)->counter++; fl_redraw_object(obj); break; case FL_RELEASE: fl_redraw_object(obj); return 1; /* report back to application! */ case FL_FREEMEM: fl_free(obj->spec); break; @} return 0; @} @end example That is the whole piece of code. Of course, since the @code{COLBOX_SPEC} structure is invisible outside of @file{colbox.c}, the following routine should be provided to return the total number of times the colbox was pushed: @example int fl_get_colbox(FL_OBJECT *obj) @{ if (!obj || obj->objclass != FL_COLBOX) @{ fprintf(stderr, "fl_get_colbox: Bad argument or wrong type); return -1; @} return ((COLBOX_SPEC *) obj->spec)->counter; @} @end example To use it, compile it into a file @file{colbox.o}. An application program that wants to use the new object class simply should include @file{colbox.h} and link with @file{colbox.o} when compiling the program. It can then use the routine @code{fl_add_colbox()} to add objects of the new type to a form. xforms-1.0.93sp1/doc/part4_events.texi0000644000175000017500000003636711376032002016315 0ustar jensjens@node Part IV Events @chapter Events As indicated above, the main module of the Forms Library communicates with the objects by calling the associated handling routine with, as one of the arguments, the particular event for which action must be taken. In the following we assume that @code{obj} is the object to which the event is sent. The following types of events can be sent to an object: @table @code @tindex FL_DRAW @anchor{FL_DRAW} @item FL_DRAW The object has to be (re)drawn. To figure out the actual size of the object you can use the fields @code{obj->x}, @code{obj->y}, @code{obj->w} and @code{obj->h}. Many Xlib drawing routines require a window ID, which you can obtain from the object pointer using @code{FL_ObjWin(obj)}. Some other aspects might also influence the way the object has to be drawn. E.g., you might want to draw the object differently when the mouse is on top of it or when the mouse is pressed on it. This can be figured out the following way: The field @code{obj->belowmouse} tells you whether the object is below the mouse. The field @code{obj->pushed} indicates whether the object is currently being pushed with the mouse. Finally, @code{obj->focus} indicate whether input focus is directed towards this object. Note that drawing of the object is the full responsibility of the object class, including the bounding box and the label, which can be found in the field @code{obj->label}. The Forms Library provides a large number of routines to help you draw object. @xref{Part IV Drawing Objects, , Drawing Objects}, for more details on drawing objects and an overview of all available routines. One important caution about your draw event handling code: none of the high level routines (@code{@ref{fl_freeze_form()}}, @code{@ref{fl_deactivate_form()}}) etc.@: can be used. The only routines allowed to be used are (direct) drawing functions and object internal book keeping routines. Attribute modifying routines, such as @code{@ref{fl_set_object_color()}} etc.@: are not allowed (using them can lead to infinite recursions). In addition, (re)drawing of other objects using @code{@ref{fl_redraw_object()}} while handling @code{@ref{FL_DRAW}} will also not work. Due to the way double buffering is handled, at the time the @code{FL_DRAW} event is passed to the handling function (and only then) @code{FL_ObjWin(obj)} might return a pixmap used as the backbuffer (at least if the object is double buffered). What that means is that @code{FL_ObjWin(obj)} should not be used when a real window is needed. For a real window you can change the window's cursor or query the mouse position within it. You can't do either of these with the backbuffer pixmap. If there is a need to obtain the real window ID the following routine can be used: @findex fl_get_real_object_window() @anchor{fl_get_real_object_window()} @example Window fl_get_real_object_window(FL_OBJECT *) @end example To summarize: use @code{FL_ObjWin(obj)} when drawing and use @code{@ref{fl_get_real_object_window()}} for cursor or pointer routines. This distinction is important only while handling @code{FL_DRAW} events, @code{FL_ObjWin(obj)} should be used anywhere else. @tindex FL_DRAWLABEL @anchor{FL_DRAWLABEL} @item FL_DRAWLABEL This event typically follows @code{FL_DRAW} and indicates that the object label needs to be (re)drawn. If the object in question always draws its label inside the bounding box and this is taken care of by handing @code{FL_DRAW}, you can ignore this event. @tindex FL_ENTER @anchor{FL_ENTER} @item FL_ENTER This event is sent when the mouse has entered the bounding box and might require some action. Note also that the field @code{obj->belowmouse} in the object is being set. If entering an objects area only changes its appearance, redrawing it normally suffices. Don't do this directly! Always redraw the object by calling @code{@ref{fl_redraw_object()}}. It will send an @code{FL_DRAW} event to the object but also does some other things (like setting window IDs and taking care of double buffering etc.). @tindex FL_LEAVE @anchor{FL_LEAVE} @item FL_LEAVE The mouse has left the bounding box. Again, normally a redraw is enough (or nothing at all). @tindex FL_MOTION @anchor{FL_MOTION} @item FL_MOTION Motion events get sent between @code{FL_ENTER} and @code{FL_LEAVE} events when the mouse position changes on the object. The mouse position is given as an argument to the handle routine. @tindex FL_PUSH @anchor{FL_PUSH} @item FL_PUSH The user has pushed a mouse button on the object. Normally this requires some actual action. The number of the mouse button pushed is given in the @code{key} parameter, having one of the following values: @table @code @tindex FL_LEFT_MOUSE @anchor{FL_LEFT_MOUSE} @tindex FL_MBUTTON1 @item FL_LEFT_MOUSE, FL_MBUTTON1 Left mouse button was pressed. @tindex FL_MIDDLE_MOUSE @anchor{FL_MIDDLE_MOUSE} @tindex FL_MBUTTON2 @item FL_MIDDLE_MOUSE, FL_MBUTTON2 Middle mouse button was pressed. @tindex FL_RIGHT_MOUSE @anchor{FL_RIGHT_MOUSE} @tindex FL_MBUTTON3 @item FL_RIGHT_MOUSE, FL_MBUTTON3 Right mouse button was pressed. @tindex FL_SCROLLUP_MOUSE @anchor{FL_SCROLLUP_MOUSE} @tindex FL_MBUTTON4 @item FL_SCROLLUP_MOUSE, FL_MBUTTON4 Mouse scroll wheel was rotated in up direction. @tindex FL_SCROLLDOWN_MOUSE @anchor{FL_SCROLLDOWN_MOUSE} @tindex FL_MBUTTON5 @item FL_SCROLLDOWN_MOUSE, FL_MBUTTON5 Mouse scroll wheel was rotated in down direction. @end table @tindex FL_RELEASE @anchor{FL_RELEASE} @item FL_RELEASE The user has released the mouse button. This event is only sent if a @code{@ref{FL_PUSH}} event was sent before. @code{@ref{FL_PUSH}} event. @tindex FL_DBLCLICK @anchor{FL_DBLCLICK} @item FL_DBLCLICK The user has pushed a mouse button twice within a certain time limit @tindex FL_CLICK_TIMEOUT (@code{FL_CLICK_TIMEOUT}), which by default is @w{400 msec}. This event is sent after two @code{FL_PUSH}, @code{FL_RELEASE} sequence. Note that @code{FL_DBLCLICK} is only generated for objects that have non-zero @code{obj->click timeout} fields and it will not be generated for events from the scroll wheel. @tindex FL_TRPLCLICK @anchor{FL_TRPLCLICK} @item FL_TRPLCLICK The user has pushed a mouse button three times within a certain time window. This event is sent after a @code{@ref{FL_DBLCLICK}}, @code{@ref{FL_PUSH}}, @code{@ref{FL_RELEASE}} sequence. Set click timeout to none-zero to activate @code{FL_TRPLCLICK}. @tindex FL_FOCUS @anchor{FL_FOCUS} @item FL_FOCUS Input got focussed to this object. This type of event and the next two are only sent to objects for which the field @code{obj->input} is set to 1 (see below). @tindex FL_UNFOCUS @anchor{FL_UNFOCUS} @item FL_UNFOCUS Input is no longer focussed on the object. @tindex FL_KEYPRESS @anchor{FL_KEYPRESS} @item FL_KEYPRESS A key was pressed. The ASCII value (or KeySym if non-ASCII) is passed to the routine via the @code{key} argument, modifier keys can be retrieved from the @code{state} member of the XEvent also passed to the function via @code{xev}. This event only happens between @code{@ref{FL_FOCUS}} and @code{@ref{FL_UNFOCUS}} events. Not all objects are sent keyboard events, only those that have non-zero value in field @code{obj->input} or @code{obj->wantkey}. @tindex FL_SHORTCUT @anchor{FL_SHORTCUT} @item FL_SHORTCUT The user used a keyboard shortcut. The shortcut used is given in the parameter key. See below for more on shortcuts. @tindex FL_STEP @anchor{FL_STEP} @item FL_STEP A @code{FL_STEP} event is sent all the time (typically about 20 times a second but possibly less often because of system delays and other time-consuming tasks) to objects for which the field @code{obj->automatic} has been set to a non-zero value. The handling routine receives a synthetic @code{MotionNotify} event as the XEvent. This can be used to make an object change appearance without user action. Clock and timer objects use this type of event. @tindex FL_UPDATE @anchor{FL_UPDATE} @item FL_UPDATE An @code{FL_UPDATE} event, like the @code{@ref{FL_STEP}} event, also gets send about every @w{50 msec} (but less often under high load) to objects while they are "pushed", i.e.@: between receiving a @code{@ref{FL_PUSH}} and a @code{@ref{FL_RELEASE}} event if the @code{obj->want_update} field is set for the object. Like for the @code{FL_STEP} event the handling routine receives a synthetic @code{MotionNotify} event as the XEvent. This is typically used by objects that have to perform tasks at regular time intervals while they are "pushed" (e.g.@: counters that need to count up or down while the mouse is pushed on one of its buttons). @tindex FL_FREEMEM @anchor{FL_FREEMEM} @tindex FL_FREEMEM @item FL_FREEMEM This event is sent when the object is to be freed. All memory allocated for the object must be freed when this event is received. @tindex FL_OTHER @anchor{FL_OTHER} @item FL_OTHER Events other than the above. These events currently include ClientMessage, Selection and possibly other window manager events. All information about the event is contained in @code{xev} parameter and @code{mx} and @code{my} may or may not reflect the actual position of the mouse. @end table Many of these events might make it necessary that the object has to be redrawn or partially redrawn. Always do this using the routine @code{@ref{fl_redraw_object()}}. @ifnottex @menu * Shortcuts:: @end menu @end ifnottex @node Shortcuts @section Shortcuts The Forms Library has a mechanism of dealing with keyboard shortcuts. In this way the user can use the keyboard rather than the mouse for particular actions. Obviously, only "active" objects can have shortcuts (i.e.@: not objects like boxes, texts etc.). The mechanism works as follows. There is a routine @findex fl_set_object_shortcut() @anchor{fl_set_object_shortcut()} @example void fl_set_object_shortcut(FL_OBJECT *obj, const char *str, int showit); @end example @noindent with which one can bind a series of keys to an object. E.g., when @code{str} is @code{"acE#d^h"} the keys @code{'a'}, @code{'c'}, @code{'E'}, @code{d} and @code{h} are associated with the object. The precise format is as follows: Any character in the string is considered as a shortcut, except @code{'^'} and @code{'#'}, which stand for combinations with the @code{} and @code{} keys. (The case of the key following @code{'#'} or @code{'^'} is not important, i.e.@: no distiction is made between e.g. @code{"^C"} and @code{"^c"}, both encode the key combination @code{C} as well as @code{C}.) The key @code{'^'} itself can be set as a shortcut key by using @code{"^^"} in the string defining the shortcut. The key @code{'#'} can be obtained as a shortcut by using th string @code{"^#"}. So, e.g.@: @code{"#^#"} encodes @code{#}. The @code{} key can be given as @code{"^["}. Another special character not mentioned yet is @code{'&'}, which indicates function and arrow keys. Use a sequence starting with @code{'&'} and directly followed by a number between 1 and 35 to represent one of the function keys. For example, @code{"&2"} stands for the @code{} function key. The four cursors keys (up, down, right, and left) can be given as @code{"&A"}, @code{"&B"}, @code{"&C"} and @code{"&D"}, respectively. The key @code{'&'} itself can be obtained as a shortcut by prefixing it with @code{'^'}. The argument @code{showit} tells whether the shortcut letter in the object label should be underlined if a match exists. Although the entire object label is searched for matches, only the first alphanumerical character in the shortcut string is used. E.g., for the object label @code{"foobar"} the shortcut @code{"oO"} would result in a match at the first @code{o} in @code{"foobar"} while @code{"Oo"} would not. However, @code{"^O"} and @code{"#O"} would match since for keys used in combination with @code{} and @code{} no distiction is made between upper and lower case. To use other special keys not described above as shortcuts, the following routine must be used @findex fl_set_object_shortcutkey() @anchor{fl_set_object_shortcutkey()} @example void fl_set_object_shortcutkey(FL_OBJECT *obj, unsigned int key); @end example @noindent where @code{key} is an X KeySym, for example @code{XK_Home}, @code{XK_F1} etc. Note that the function @code{@ref{fl_set_object_shortcutkey()}} always appends the key specified to the current shortcuts while @code{@ref{fl_set_object_shortcut()}} resets the shortcuts. Of course, special keys can't be underlined. Now, whenever the user presses one of these keys, an @code{@ref{FL_SHORTCUT}} event is sent to the object. The key pressed is passed to the handle routine (in the argument @code{key}). Combinations with the @code{} key are given by adding @code{@ref{FL_ALT_MASK}} (currently the 25th bit, i.e., @code{0x1000000}) to the ASCII value of the key. E.g.@: the key combinations @code{E} and @code{e} are passed as @code{@ref{FL_ALT_MASK} + 'E'}. The object can now take action accordingly. If you use shortcuts to manipulate class object specific things, you will need to create a routine to communicate with the user, e.g., @code{fl_set_NEW_shortcut()}, and do your own internal bookkeeping to track what keys do what and then call @code{@ref{fl_set_object_shortcut()}} to register the shortcut in the event dispatching module. The idea is NOT that the user himself calls @code{@ref{fl_set_object_shortcut()}} but that the class provides a routine for this that also keeps track of the required internal bookkeeping. Of course, if there is no internal bookkeeping, a macro to this effect will suffice. For example @code{@ref{fl_set_button_shortcut()}} is defined as @code{@ref{fl_set_object_shortcut()}}. The order in which keys are handled is as follows: First for a key it is tested whether any object in the form has the key as a shortcut. If yes, the first of those objects gets the shortcut event. Otherwise, the key is checked to see if it is @code{} or @code{}. If it is, the @code{obj->wantkey} field is checked. If the field does not contain @code{@ref{FL_KEY_TAB}} bit, input is focussed on the next input field. Otherwise the key is sent to the current input field. This means that input objects only get a @code{} or @code{} key sent to them if in the @code{obj->wantkey} field the @code{@ref{FL_KEY_TAB}} bit is set. This is e.g.@: used in multi-line input fields. If the object wants all cursor keys (including @code{} etc.), the @code{obj->wantkey} field must have the @code{@ref{FL_KEY_SPECIAL}} bit set. To summarize, the @code{obj->wantkey} field can take on the following values (or the bit-wise or of them): @table @code @tindex FL_KEY_NORMAL @anchor{FL_KEY_NORMAL} @item FL_KEY_NORMAL The default. The object receives left and right cursor, @code{} and @code{} keys plus all normal keys (0-255) except @code{} @code{}. @tindex FL_KEY_TAB @anchor{FL_KEY_TAB} @item FL_KEY_TAB Object receives the @code{}, @code{} as well as the @code{} and @code{} cursor keys. @tindex FL_KEY_SPECIAL @anchor{FL_KEY_SPECIAL} @item FL_KEY_SPECIAL The object receives all keys with a KeySym above 255 which aren't already covered by @code{FL_KEY_NORMAL} and @code{FL_KEY_TAB} (e.g.@: function keys etc.) @tindex FL_KEY_ALL @anchor{FL_KEY_ALL} @item FL_KEY_ALL Object receives all keys. @end table @noindent This way it is possible for a non-input object (i.e.@: if @code{obj->input} is zero) to obtain special keyboard event by setting @code{obj->wantkey} to @code{@ref{FL_KEY_SPECIAL}}. xforms-1.0.93sp1/doc/xforms.css0000644000175000017500000000025711320240016015014 0ustar jensjensp {font-family:Tahoma,Verdana} code {font-family:monospace;font-weight:bold;color:#333} .example {margin:-0.15em 0 -0.3em 0;font-family:monospace;font-weight:bold;color:#333} xforms-1.0.93sp1/doc/part2_creating_forms.texi0000644000175000017500000005217411375526371020023 0ustar jensjens@node Part II Creating Forms @chapter Creating Forms @ifnottex @menu * Creating and Changing Forms:: * Adding Objects:: * Selecting Objects:: * Moving and Scaling:: * Aligning Objects:: * Raising and Lowering:: * Setting Attributes:: * Generic Attributes:: * Object Specific Attributes:: * Cut, Copy and Paste: Copy and Paste * Groups:: * Hiding and Showing Objects:: * Testing Forms:: @end menu @end ifnottex @node Creating and Changing Forms @section Creating and Changing Forms To create a new form press the button labeled "New Form", indicate the enclosing box of the form and type in a (unique) name for the form. The form is shown in the main window and objects can be added to it. There are two ways to change the size of a form at a later stage. The easiest way is to simply change the size of the main window and the form will resize itself to fit the new size. Or you can select the bottom box of the form, using the right mouse button. Next grab the box using the middle mouse at the lower-right corner and scale it. Note that objects lying outside the form will be invisible when the form is shown by the application program. To change the name of the current visible form, press the button labeled "Rename Form" above the list of forms. You will be prompted for the new form name. To delete a form, press the button labeled "Delete Form". The current form will be removed. @node Adding Objects @section Adding Objects To add an object, choose the class of the object from the list of object classes in the middle of the control panel. Next drag the left mouse button within the form and an outline showing the current size of the object will appear. When the size is correct release the mouse button. Note that the position and size of the object is rounded to multiples of 10 pixels. This can be changed. See below on alignments. @node Selecting Objects @section Selecting Objects To perform operations on objects that are already visible in the form, we first have to select them. Any mouse button can be used for selecting objects. Simply single-click on the object you want to select. A red outline will appear, indicating that the object is selected. In some cases when the currently selected object is large and encloses some smaller objects in it, using the left mouse button might not allow selection of the enclosed small objects. In this case use the the right mouse button. Another way of selecting objects is to use the @code{} key or the @code{} or the button labeled @code{F11}, which iterates over the object list and selects a new object upon each press. It is also possible to select multiple objects. To this end, draw a box by dragging the mouse around all the objects you want to select. All objects that lie fully inside the box will be selected. Each selected object will get a red outline and a red bounding box is drawn around all of them. To add objects to an already existing selection, hold down the @code{} key and press the right mouse button inside the object. You can remove objects from the selection by doing the same on an already selected object. It is possible to select all objects (except for the backface) at once using the function key @code{}. One note on the backface of the form: Although this is a normal object, it can not be treated in the same way as the other objects. It can be selected, but never in combination with other objects. Only two operations are allowed on it: changing its attributes and scaling it (which scales the size of the form). @node Moving and Scaling @section Moving and Scaling Moving and scaling of objects is done using the middle mouse button. To move an object or a collection of objects to a new place, first select it (them) as described above. Next press the middle mouse button inside the bounding box (not near one of the corners) and move the box to its new position. To scale the object or objects, pick up the bounding box near one of its corners (inside the red squares) and scale it. When holding the @code{} key while moving an object or group of objects, first a copy of the object(s) is made and the copy is moved. This allows for a very fast way of duplicating (cloning) objects on the form: First put one on the form, change the attributes as required and next copy it. For precise object movement, the cursor keys can be used. Each press of the four directional cursors keys moves the object by 5 pixels. To change the step size, precede the cursor keys with 0-9 with 0 indicating 10 pixels. If @code{} key is kept pressed down, instead of moving the object, the object size is increased or decreased by the step size. @node Aligning Objects @section Aligning Objects Sometimes you have a number of objects and you want to align them in some way, e.g. centered or all starting at the same left position, etc. To this end press the button labeled "Align". A special form will appear in the top right corner. You can leave this form visible as long as you want. You can hide it using the button labeled "Dismiss" on the form or by clicking the "Align" button again. First select the objects you want to align. Next, press one of the alignment buttons in the form. The buttons in the top row have the following meaning: flush left, center horizontally, flush right, and make the objects have equal distances in horizontal direction (see below). The buttons in the bottom row mean: align to bottom, center vertically, align to top, and make all objects have the same vertical distance. Note that alignments are relative to the selection box, not to the form. Equal distance alignment means that between all the objects an equal sized gap is placed. The objects are kept in the same left to right or bottom to top order. In the alignment form you can also indicate the "snapping size" using the counter at the bottom. Choose 0 if you don't want to snap positions. Default snapping is 10 pixels. Snapping helps in making objects of the same size and aligning them nicely. @ifhtml @center @image{images/fd_align} @end ifhtml @ifnothtml @center @image{images/fd_align,9cm} @end ifnothtml The "Undo" button undoes the last alignment change. It is an undo with a depth of 1, i.e.@: you can only undo the last change and an undo after an undo will undo itself. Note however, that any modification to the selected objects invalidates the undo buffer. @node Raising and Lowering @section Raising and Lowering The objects in a form are drawn in the order in which they are added. Sometimes this is undesirable. For example, you might decide at a later stage to put a box around some buttons. Because you add this box later, it will be drawn over the buttons thus making the buttons invisible (if you put a framebox over a button, the button will be visible but appears to be inactive!). This is definitely not what you want. The Form Designer makes it possible to raise objects (bring them to the top) or lower them (put them at the bottom). So you can lower e.g.@: a box to move it under some buttons. Raising or lowering objects is very simple. First select the objects using the right mouse button and next press the function key @code{} to lower the selection or @code{} to raise it. Another use of raising and lowering is to change the order in which input field receive focus via the @code{} key. Input fields focus order is the same as the order in which they are added to the form. This can become a problem if another input field is needed after the form is designed because this extra input field will always be the last among all input field on the form. Raising the objects becomes handy to solve this problem. What really happens when a object is raised is that the raised object becomes the last object added to the form. This means you can re-arrange the focus order by raising all input fields one by one in the exact order you want the focus order to be, and they will be added to the form in the order you raised them, thus the input focus order is what you intended. @node Setting Attributes @section Setting Attributes To set attributes like type, color, label, etc., of an object first select it (using the right mouse button) and next press the function key @code{} (or click on the button labeled "F1"). If only one object is selected you can change all its attributes, including its label, name, etc. It is also possible to change the attributes of multiple objects as long as they all are of the same class. In this case you cannot change the label, name, etc. because you probably want them to remain different for the objects. A form will appear in which you can indicate the different settings. Before we continue, the organization of the attributes form and classification of attributes need a little explanation. Attributes of an object are divided into two categories. The generic attributes are shared by all objects. These include type, color, label, callback function etc. The specific attributes are those that are specific to a particular object class, such as slider bounds, precision etc. When the attribute form is first shown, only the generic attributes are shown. Press on tab rider "Spec" to get to a form for the object class specific attributes (press the tab rider "Generic" to switch back to the generic attributes part). @node Generic Attributes @section Generic Attributes The form for setting generic attributes contains four fields for setting different groups of generic object properties, discussed in the following. Once you are satisfied with the settings, press the button labeled "Accept" and the form will disappear. If you don't want to change the attributes after all press the button labeled "Cancel". You may also reset the values to their initial settings by clicking on the "Restore" button. @ifnottex @menu * Basic Attributes:: * Font:: * Misc. Attributes:: * Colors:: @end menu @end ifnottex @node Basic Attributes @subsection Basic Attributes The basic attributes include the type, boxtype, name, label string, the callback function with its arguments associated with the object and a shortcut. For most object classes several different types exist. The type of the object under consideration can be selected via a choice object. Most objects can also be drawn using different boxtypes. Normally, the default should do, but using the choice object labeled "BoxType" you can switch to a different box type (but note that not all choices may result in a different way the object is drawn). Nearly all objects have a label that can be drawn at different positions within or outside of the object. The input field labeled "Label" lets you set this label string (it may also include return characters, i.e. @code{\n}, for line breaks). An object may have a name by which it can be accessed within the program. This name must be a valid C (or simple C++) variable identifier and can be set via the input field labeled "Name". You need to make sure that there are no objects with the same name! If instead of having e.g.@: the function @code{@ref{fl_do_forms()}} return when an object is triggered a callback is to be called you can set the name of the callback function in the input field labeled "Callback". Obviously, this must be a valid C or C++ function name. When a callback function is set you must also specify the argument passed to the callback function together with the object's address via the input field labeled "Argument". This normally will be a (long) integer (defaulting to 0 if not specified). Using this value it is e.g.@: possible to distinguish between different objects, all using the same callback function. @node Font @subsection Font In the field labeled "Font" you can set properties of the font to be used for the label of the object. You can select between different types of fonts, the style the label is drawn in (normal, shadowed, engraved or embossed) and the size of the font to be used. All three types of properties can be selected via choice objects. @node Misc. Attributes @subsection Misc. Attributes The field labeled "Misc. Attributes" allows the setting of a number of attributes that don't fit into any other category. First you can set the alignment of the object's label. It can be placed inside the object or outside of it and in 9 different positions. Use the choice objects labeled "Label/Align" and "In/Out" for this purpose. Another important property of an object is how it reacts if the size of the form it belongs to is changed. It may keep its original size or may be resized in x- or y-direction or both. The details are controlled via its resize and gravity properties as described in chapter 4. With the choice objects labeled "Resize" you can control if an object is to be resized in x- or y-direction or both or none. You may also specify if the object's upper left hand corner or its lower right hand corner is supposed to keep a fixed distance from the form's borders via the choice objects labeled "NW Gravity" and "SE Gravity". Please note that these properties aren't orthogonal, with the NWGravity and SEGravity overriding the resize property if necessary (also see the program @file{grav} in the @file{demo} directory that lets you experiment with these properties). @node Colors @subsection Colors Within the "Color" field you can set three colors for the object. The colors of the object itself are controlled via the buttons labeled "Color 1" and "Color 2", while the button labeled "LabelColor" is for setting the color the label is drawn in. Clicking on any of the three buttons will result in a new form being shown in which you can select one of the predefined colors from the internal colormap. You also can select one of the "free" colors but since these colors aren't set yet they will appear as black in the form for selecting the color. While it's rather obvious what the label color is, the meaning of "Color 1" and "Color 2" is less well-defined and varies with the class and type of the object. E.g.@: for (normal buttons the first color is the normal color of the button while the second one is the color it's drawn with while the button is pressed while for a browser that allows selection the first color is the background color and the second color is the color selected lines are highlighted with. Since there are too many combinations of object classes and types to be discussed here comprehensively please refer to a following chapter where the exact properties of all objects are described in detail. @node Object Specific Attributes @section Object Specific Attributes Many objects have attributes that are considered to be intrinsic to the objects, such as slider bounds, precision etc. You can access these attributes (if existent_ via the tab rider "Spec". In most cases the meaning of these attributes hopefully is self-explanatory (otherwise see the detailed description of the different object classes in Part III) and all changes made are shown immediately so you can see what effects the changes have on the object. Once satisfactory results have been achieved press button labeled "Accept" to accept the settings (clicking on the tab rider "Generic" has the same effect). Two additional buttons, "Cancel" and "Restore", are available to cancel the changes (and quit the attributes setting form) and restore the defaults, respectively. One particular aspect of the pixmap/bitmap button initialization needs a little more explanation as the setting of button labeled "Use data" has no effect on the appearance of the button but nonetheless affects the generated code. By default, the "Use data" button is off, indicating the pixmap/bitmap file specified is to be loaded dynamically at run time via @code{@ref{fl_set_pixmapbutton_file()}} (or the bitmap counterpart). If "Use data" is on, the specified file and its associated data will be @code{#include}'d at compile time so the data becomes part of the code. Depending on the application setup, you may choose one method over the other. In general, including the data in the code will make the code slightly larger, but it avoids problems with not finding the specified file at runtime. The button labeled "Full Path" only applies if "Use Data" is on. If "Full Path" is also on, the pixmap file will be @code{#include}'d using the full path, otherwise only the filename is used, presumably the compile process will take care of the path via @code{-I} flag in some system dependent way. In general, not using the full path is more flexible. @node Copy and Paste @section Cut, Copy and Paste You can remove objects from the form by first selecting them and next pressing function key @code{} or simply by double-clicking the left mouse button. The objects will disappear but are in fact saved in a buffer. You can put them back in the form, or in another form, by pasting them using @code{}. Note that only the last collection of deleted objects is saved in the buffer. It is also possible to put a copy of the selection in the buffer using @code{}. This selection can now be put into the same form or into a different form. This allows for a simple mechanism of making multiple copies of a set of objects and for moving information from one form to another. To clone the currently selected object, hold down the @code{} key and then drag the selected object to a new position. The cloned object will have exactly the same attributes as the original object except for object name and shortcut keys. Should these be cloned, the generated code would not be compilable (or cause runtime misbehavior). @node Groups @section Groups As described in the tutorial about the Forms Library, sets of radio buttons must be placed inside groups. Groups are also useful for other purposes. E.g.@: you can hide a group inside an application program with one command. Hence, the Form Designer has some mechanism to deal with groups. In the control panel there is a list of groups in the current form. As long as you don't have groups, this list will be empty. To create a group, select the objects that should come in the group and press the function key @code{}. You will be prompted for the name of the group. This should be a legal C variable name (under which the group will be known to the application program) or should be left empty. This name will be added to the list. In this way you can create many groups. Note that each object can be in only one group. So if you select it again and put it in a new group, it will be removed from its old group. Groups that become empty this way automatically disappear from the list. (When putting objects in a group they will be raised. This is unavoidable due to the structure of groups.) In the list of groups it is always indicated which groups are part of the current selection. (Only the groups that are fully contained in the selection are indicated, not those that are only partially contained in it.) It is also possible to add or delete groups in the current selection by pushing the mouse on their name in the list. Note that there is no mechanism to add an object to a group directly. This can, however, be achieved using the following procedure. Select the group and the new object and press @code{} to group them. The old group will be discarded and a new group will be created. You only have to type in the group name again. Sometimes you may want to un-group the objects in an existing group, i.e.@: get them out of the group they are currently in. To this end simply select the group and press @code{}. (This only works if one group is selected.) You can use the menu "Rename group" from the "Group" menu to change the name of a selected group. If multiple groups are selected only the name of the first group gets changed. @node Hiding and Showing Objects @section Hiding and Showing Objects Sometimes it is useful to temporarily hide some objects in your form, in particular when you have sets of overlapping objects. To this end, select the objects you want to hide and press @code{}. The objects (though still selected) are now invisible. To show them again press @code{}. A problem might occur here. When you press @code{} only the selected objects will be shown again. But once an object is invisible it can no longer be selected. Fortunately, you can always use @code{} to select all objects, including the invisible ones, and press @code{} after that. It is better, though, to first group the objects before hiding them. Now you can select them by pressing the mouse on the group name in the group browser. @node Testing Forms @section Testing Forms To test the current form, press the button labeled "Test". The form will be displayed in the center of the screen anf a panel appears at the top right corner of the screen. This panel shows you the objects as they are returned and the callback routines called when working with the form. In this way you can verify whether the form behaves correctly and whether all objects have either callback routines or names (or both) associated with them. You can also resize the form (if the backface of the form allows resizing) to test the gravity and resizing settings. You can play with the form as long as you want. When ready, press the "Stop Testing" button. Note that any changes you made to the form while testing (including its size) do not show up when saving the form. E.g.@: filling in an input field or setting a slider does not mean that in the saved code the input field will be filled in or the slider's preset value. xforms-1.0.93sp1/doc/part4_drawing_objects.texi0000644000175000017500000007615111376032001020147 0ustar jensjens@node Part IV Drawing Objects @chapter Drawing Objects An important aspect of a new object class (or a free object) is how to draw it. As indicated above this should happen when the event @code{FL_DRAW} is received by the object. The place, i.e.@: bounding box, where the object has to be drawn is indicated by the fields @code{obj->x}, @code{obj->y}, @code{obj->w} and @code{obj->h}. Forms are drawn in the Forms Library default visual or the user requested visual, which could be any of the X supported visuals. Hence, preferably your classes should run well in all visuals. The Forms Library tries to hide as much as possible the information about graphics mode and, in general, using the built-in drawing routines is the best approach. Here are some details about graphics state in case such information is needed. All state information is kept in a global structure of type @tindex FL_State @code{FL_State} and there is a total of six such structures, @code{fl_state[6]}, each for every visual class. The structure contains among others the following members: @table @code @item XVisualInfo *xvinfo Many properties of the current visual can be obtained from this member. @item int depth The depth of the visual. Same as what you get from @code{xvinfo}. @item int vclass The visual class, @code{PseudoColor}, @code{TrueColor} etc. @item Colormap colormap Current active colormap valid for the current visual for the entire Forms Library (except @code{FL_CANVAS}). You can allocate colors from this colormap, but you should never free it. @item Window trailblazer This is a valid window resource ID created in the current visual with the colormap mentioned above. This member is useful if you have to call, before the form becomes active (thus don't have a window ID), some Xlib routines that require a valid window. A macro, @findex fl_default_window() @anchor{fl_default_window()} @code{fl_default_window()}, is defined to return this member and use of the macro is encouraged. @item GC gc[16 ] A total of 16 GCs appropriate for the current visual and depth. The first (@code{gc[0]}) is the default @code{GC} used by many internal routines and should be modified with care. It is a good idea to use only the top 8 @code{GC}s (8-15) for your free object so that future Forms Library extensions won't interfere with your program. Since many internal drawing routines use the Forms Library's default @code{GC} (@code{gc[0]}), it can change anytime whenever drawing occurs. Therefore, if you are using this GC for some of your own drawing routines make sure to always set the proper value before using it. @end table The currently active visual class (@code{TrueColor}, @code{PseudoColor} etc.) can be obtained by the following function/macro: @findex fl_get_form_vclass() @anchor{fl_get_form_vclass()} @findex fl_get_vclass() @anchor{fl_get_vclass()} @example int fl_get_form_vclass(FL_FORM *form); int fl_get_vclass(void); @end example @noindent The value returned can be used as an index into the array @code{fl_state} of @code{FL_State} structures. Note that @code{@ref{fl_get_vclass()}} should only be used within a class/new object module where there can be no confusion what the "current" form is. Other information about the graphics mode can be obtained by using visual class as an index into the @code{fl_state} structure array. For example, to print the current visual depth, code similar to the following can be used: @example int vmode = fl_get_vclass(); printf("depth: %d\n", fl_state[vmode].depth); @end example @noindent Note that @code{fl_state[]} for indices other than the currently active visual class might not be valid. In almost all Xlib calls, the connection to the X server and current window ID are needed. The Forms Library comes with some utility functions/macros to facilitate easy utilization of Xlib calls. Since the current version of Forms Library only maintains a single connection, the global variable @w{@code{Display *fl_display}} can be used where required. However, it is recommended that you use @findex fl_get_display() @anchor{fl_get_display()} @code{fl_get_display()} or @findex FL_FormDisplay(form) @anchor{FL_FormDisplay(form)} @code{FL_FormDisplay(form)} instead since the function/macro version has the advantage that your program will remain compatible with future (possibly multi-connection) versions of the Forms Library. There are a couple of ways to find out the "current" window ID, defined as the window ID the object receiving dispatcher's messages like @code{FL_DRAW} etc.@: belongs to. If the object's address is available, @code{FL_ObjWin(obj)} will suffice. Otherwise the function @code{@ref{fl_winget()}} (see below) can be used. There are other routines that might be useful: @findex fl_win_to_form() @anchor{fl_win_to_form()} @example FL_FORM *fl_win_to_form(Window win); @end example @noindent This function takes a window ID win and returns the form the window belongs to or @code{None} on failure. As mentioned earlier, Forms Library keeps an internal colormap, initialized to predefined colors. The predefined colors do not correspond to pixel values the server understands but are indexes into the colormap. Therefore, they can't be used in any of the @code{GC} altering or Xlib routines. To get the actual pixel value the X server understands, use the following routine @findex fl_get_pixel() @anchor{fl_get_pixel()} @example FL_COLOR fl_get_pixel(FL_COLOR color); @end example @noindent To e.g.@: get the pixel value of the red color, use @example unsigned long red_pixel; red_pixel = fl_get_pixel(FL_RED); @end example To change the foreground color in the Forms Library's default @code{GC} (@code{gc[0]}) use @findex fl_color() @anchor{fl_color()} @example void fl_color(FL_COLOR col); @end example To set the background color in the default @code{GC} use instead @findex fl_bk_color() @anchor{fl_bk_color()} @example void fl_bk_color(FL_COLOR color); @end example To set foreground or background in @code{GC}s other than the Forms Library's default, the following functions exist: @findex fl_set_foreground() @anchor{fl_set_foreground()} @findex fl_set_background() @anchor{fl_set_background()} @example void fl_set_foreground(GC gc, FL_COLOR color); void fl_set_background(GC gc, FL_COLOR color); @end example @noindent which is equivalent to the following Xlib calls @example XSetForeground(fl_get_display(), gc, fl_get_pixel(color)); XSetBackground(fl_get_display(), gc, fl_get_pixel(color)); @end example To free allocated colors from the default colormap, use the following routine @findex fl_free_colors() @anchor{fl_free_colors()} @example void fl_free_colors(FL_COLOR *cols, int n); @end example @noindent This function frees the @code{n} colors stored in the array of colormap indices @code{cols}. You shouldn't do that for the reserved colors, i.e.@: colors with indices below @code{FL_FREE_COL1}. In case the pixel values (instead of the index into the colormap) are known, the following routine can be used to free the colors from the default colormap @findex fl_free_pixels() @anchor{fl_free_pixels()} @example void fl_free_pixels(unsigned long *pixels, int n); @end example @noindent Note that the internal colormap maintained by the Forms Library is not updated. This is in general harmless. To modify or query the internal colormap, use the following routines: @findex fl_mapcolor() @anchor{fl_mapcolor()} @findex fl_mapcolorname() @anchor{fl_mapcolorname()} @findex fl_getmcolor() @anchor{fl_getmcolor()} @example unsigned long fl_mapcolor(FL_COLOR color, int red, int green, int blue) long fl_mapcolorname(FL_COLOR color, const char *name); unsigned long fl_getmcolor(FL_COLOR color, int *red, int *green, int *blue); @end example @noindent The first function, @code{@ref{fl_mapcolor()}} sets a the color indexed by @code{color} to the color given by the @code{red}, @code{green} and @code{blue}, returning the colors pixel value. The second function, @code{@ref{fl_mapcolorname()}}, sets the color in the colormap indexed by @code{color} to the color named @code{name}, where @code{name} must be a valid name from the system's color database file @file{rgb.txt}. It also returns the colors pixel value or -1 on failure. The last function, @code{@ref{fl_getmcolor()}}, returns the RGB values of the color indexed by @code{color} in the second to third argument pointers and the pixel value as the return value (or -1, cast to @code{unsigned long}, on failure). The coordinate system used corresponds directly to that of the screen. But object coordinates are relative to the upper-left corner of the form the object belongs to. To obtain the position of the mouse relative to a certain form or window, use the routines @findex fl_get_form_mouse() @anchor{fl_get_form_mouse()} @findex fl_get_win_mouse() @anchor{fl_get_win_mouse()} @example Window fl_get_form_mouse(FL_FORM *form, FL_Coord *x, FL_Coord *y, unsigned *keymask) Window fl_get_win_mouse(Window win, FL_Coord *x, FL_Coord *y, unsigned *keymask); @end example @noindent The functions return the ID of the window the mouse is in. Upon return @code{x} and @code{y} are set to the mouse position relative to the form or window and @code{keymask} contains information on modifier keys (same as the the corresponding @code{XQueryPointer()} argument). A similar routine exists that can be used to obtain the mouse location relative to the root window @findex fl_get_mouse() @anchor{fl_get_mouse()} @example Window fl_get_mouse(FL_Coord *x, FL_Coord *y, unsigned *keymask); @end example @noindent The function returns the ID of the window the mouse is in. To move the mouse to a specific location relative to the root window, use the following routine @findex fl_set_mouse() @anchor{fl_set_mouse()} @example void fl_set_mouse(FL_Coord x, FL_Coord y); @end example @noindent Use this function sparingly, it can be extremely annoying for the user if the mouse position is changed by a program. To avoid drawing outside a box the following routine exists: @findex fl_set_clipping() @anchor{fl_set_clipping()} @example void fl_set_clipping(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h); @end example @noindent It sets a clipping region in the Forms Library's default @code{GC}. @code{x}, @code{y}, @code{w} and @code{h} define the area drawing is to restrict to and are relative to the window/form that will be drawn to. In this way you can prevent drawing over other objects. When finished with drawing always use @findex fl_unset_clipping() @anchor{fl_unset_clipping()} @example void fl_unset_clipping(void); @end example @noindent to stop clipping. Similar functions are available to set the clipping for a specific @code{GC}: @findex fl_set_gc_clipping() @anchor{fl_set_gc_clipping()} @findex fl_unset_gc_clipping() @anchor{fl_unset_gc_clipping()} @example void fl_set_gc_clipping(GC gc, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h); void fl_unset_gc_clipping(GC gc); @end example To obtain the bounding box of an object with the dimension and location of the label taken into account (compare with @code{@ref{fl_get_object_geometry()}} the following routine exists: @findex fl_get_object_bbox() @example void fl_get_object_bbox(FL_OBJECT *obj, FL_Coord *x, FL_Coord *y, FL_Coord *w, FL_Coord *h); @end example To set clippings for text, which uses a different GC, the following routine should be used @findex fl_set_text_clipping() @anchor{fl_set_text_clipping()} @findex fl_set_untext_clipping() @anchor{fl_set_untext_clipping()} @example void fl_set_text_clipping(FL_Coord x,FL_Coord y,FL_Coord w,FL_Coord h); void wfl_unset_text_clipping(void); @end example For drawing text at the correct places you will need some information about the sizes of characters and strings. The following routines are provided: @findex fl_get_char_height() @anchor{fl_get_char_height()} @findex fl_get_char_width() @anchor{fl_get_char_width()} @example int fl_get_char_height(int style, int size, int *ascend, int *descend) int fl_get_char_width(int style, int size); @end example @noindent These two routines return the maximum height and width of the font used, where size indicates the point size for the font and style is the style in which the text is to be drawn. The first function, @code{@ref{fl_get_char_height()}}, also returns the height above and below the baseline of the font via the @code{ascend} and @code{descend} arguments. A list of valid styles can be found in Section 3.11.3. To obtain the width and height information on a specific string, use the following routines @findex fl_get_string_width() @anchor{fl_get_string_width()} @findex fl_get_string_height() @anchor{fl_get_string_height()} @example int fl_get_string_width(int style, int size, const char *str, int len); int fl_get_string_height(int style, int size, const char *str, int len, int *ascend, int *descend); @end example where @code{len} is the length of the string @code{str}. The functions return the width and height of the string, respectively. The second function also returns the height above and below the fonts baseline. There exists also a routine that returns the width and height of a string in one call. In addition, the string passed can contain embedded newline characters @code{'\n'} and the routine will make proper adjustment so the values returned are (just) large enough to contain the multiple lines of text @findex fl_get_string_dimension() @anchor{fl_get_string_dimension()} @example void fl_get_string_dimension(int style, int size, const char *str, int len, int *width, int *height); @end example Sometimes it can be useful to get the X font structure for a particular size and style as used in the Forms Library. For this purpose, the following routine exists: @findex fl_get_fontstruct() @anchor{fl_get_fontstruct()} @example [const] XFontStruct *fl_get_fontstruct(int style, int size); @end example @noindent The structure returned can be used in, say, setting the font in a particular @code{GC}: @example XFontStruct *xfs = fl_get_fontstruct(FL_TIMESBOLD_STYLE, FL_HUGE_SIZE); XSetFont(fl_get_display(), mygc, xfs->fid); @end example @noindent The caller should not free the structure returned by @code{@ref{fl_get_fontstruct()}}. There are a number of routines that help you draw objects on the screen. All XForms's internal drawing routine draws into the "current window", defined as the window the object that uses the drawing routine belongs to. If that's not what you need, the following routines can be used to set or query the current window: @findex fl_winset() @anchor{fl_winset()} @findex fl_winget() @anchor{fl_winget()} @example void fl_winset(Window win); Window fl_winget(void); @end example @noindent One caveat about @code{@ref{fl_winget()}} is that it can return @code{None} if called outside of an object's event handler, depending on where the mouse is. Thus, the return value of this function should be checked when called outside of an object handler. It is important to remember that unless the following drawing commands are issued while handling the @code{FL_DRAW} or @code{FL_DRAWLABEL} event (which is not generally recommended), it is the application's responsibility to set the proper drawable using @code{@ref{fl_winset()}}. The most basic drawing routines are for drawing rectangles: @findex fl_rectf() @anchor{fl_rectf()} @findex fl_rect() @anchor{fl_rect()} @example void fl_rectf(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c); void fl_rect(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c); @end example @noindent Both draw a rectangle on the screen in color @code{col}. The difference is that @code{@ref{fl_rectf()}} draws a filled rectangle while @code{@ref{fl_rect()}} just draws an outline. To draw a filled rectangle with a black border use @findex fl_rectbound() @anchor{fl_rectbound()} @example void fl_rectbound(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c); @end example To draw a rectangle with rounded corners (filled or just the outline) employ @findex fl_roundrectf() @anchor{fl_roundrectf()} @findex fl_roundrect() @anchor{fl_roundrect()} @example void fl_roundrectf(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col); void fl_roundrect(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col); @end example To draw a general polygon, use one of the following routines @tindex FL_POINT @findex fl_polyf() @anchor{fl_polyf()} @findex fl_polyl() @anchor{fl_polyl()} @findex fl_polybound() @anchor{fl_polybound()} @example typedef struct @{ short x, y; @} FL_POINT; void fl_polyf(FL_POINT *xpoint, int n, FL_COLOR col); void fl_polyl(FL_POINT *xpoint, int n, FL_COLOR col); void fl_polybound(FL_POINT *xpoint, int n, FL_COLOR col); @end example @noindent @code{@ref{fl_polyf()}} draws a filled polygon defined by @code{n} points, @code{@ref{fl_polyl()}} the ouline of a polygon and @code{@ref{fl_polybound()}} a filled polygon with a black outline. Note all polygon routines @strong{require} that the array @code{xpoint} has to have enough spaces to hold @code{n+1} points! To draw an ellipse. either filled or open, the following routines can be used (use @code{w} equal to @code{h} to get a circle): @findex fl_ovalf() @anchor{fl_ovalf()} @findex fl_ovall() @anchor{fl_ovall()} @findex fl_ovalbound() @anchor{fl_ovalbound()} @example void fl_ovalf(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c); void fl_ovall(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c); void fl_ovalbound(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c); @end example To draw circular arcs, either open or filled, the following routines can be used @findex fl_arc() @anchor{fl_arc()} @findex fl_arcf() @anchor{fl_arcf()} @example void fl_arc(FL_Coord x, FL_Coord y, FL_Coord radius, int start_theta, int end_theta, FL_COLOR col); void fl_arcf(FL_Coord x, FL_Coord y, FL_Coord radius, int start_theta, int end_theta, FL_COLOR col); @end example where @code{start_theta} and @code{end_theta} are the starting and ending angles of the arc in units of tenths of a degree (where 0 stands for a direction of 3 o'clock, i.e.@: the right-most point of a circle), and @code{x} and @code{y} are the center of the arc. If the difference between @code{theta_end} and @code{theta_start} is larger than 3600 (360 degrees), drawing is truncated to 360 degrees. To draw elliptical arcs the following routine should be used: @findex fl_pieslice() @anchor{fl_pieslice()} @example void fl_pieslice(int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int start_theta, int end_theta, FL_COLOR col); @end example @noindent The center of the arc is the center of the bounding box specified by @code{x}, @code{y}, @code{w}, @code{h}, @code{w} and @code{h} specifing the axes of the ellipse.. @code{start_theta} and @code{end_theta}, to be given in tenth of a degree, specify the starting and ending angles measured from zero degrees (3 o'clock). Depending on circumstance, elliptical arc may be more easily drawn using the following routine @findex fl_ovalarc( @anchor{fl_ovalarc(} @example void fl_ovalarc(int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int theta, int dtheta, FL_COLOR col); @end example @noindent Here @code{theta} specifies the starting angle (again measured in tenth of a degree and with 0 at the 3 o'clock position), and @code{dtheta} specifies both the direction and extent of the arc. If @code{dtheta} is positive the arc is drawn in counter-clockwise direction from the starting point defined by @code{theta}, otherwise in clockwise direction. If @code{dtheta} is larger than 3600 it is truncated to 3600. To connect two points with a straight line, use @findex fl_line() @anchor{fl_line()} @example void fl_line(FL_Coord x1, FL_Coord y1, FL_Coord x2, FL_Coord y2, FL_COLOR col); @end example There is also a routine to draw a line along the diagonal of a box (to draw a horizontal line set @code{h} to 1, not to 0): @findex fl_diagline() @anchor{fl_diagline()} @example void fl_diagline(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col); @end example To draw connected line segments between @code{n} points use @findex fl_lines() @anchor{fl_lines()} @example void fl_lines(FL_POINT *points, int n, FL_COLOR col); @end example @noindent All coordinates in points are relative to the origin of the drawable. There are also routines to draw one or more pixels @findex fl_point() @anchor{fl_point()} @findex fl_points() @anchor{fl_points()} @example void fl_point(FL_Coord x, FL_Coord y, FL_COLOR col); void fl_points(FL_POINT *p, int np, FL_COLOR col); @end example @noindent As usual, all coordinates are relative to the origin of the drawable. Note that these routines are meant for you to draw a few pixels, not images consisting of tens of thousands of pixels of varying colors. For that kind of drawing @code{XPutImage(3)} should be used. Or better yet, use the image support in the Forms Library (see @ref{Part VI Images, , Images}). Also it's usually better when drawing multiple points to use fl_points(), even if that means that the application program has to pre-sort and group the pixels of the same color. To change the line width or style, the following convenience functions are available @findex fl_linewidth() @anchor{fl_linewidth()} @findex fl_linestyle() @anchor{fl_linestyle()} @example void fl_linewidth(int lw); void fl_linestyle(int style); @end example @noindent Set @code{lw} to 0 to reset the line width to the servers default. Line styles can take on the following values (also see @code{XChangeGC(3)}) @table @code @tindex FL SOLID @item FL SOLID Solid line. Default and most efficient. @tindex FL DOT @item FL DOT Dotted line. @tindex FL DASH @item FL DASH Dashed line. @tindex FL DOTDASH @item FL DOTDASH Dash-dot-dash line. @tindex FL LONGDASH @item FL LONGDASH Long dashed line. @tindex FL USERDASH @item FL USERDASH Dashed line, but the dash pattern is user definable via @code{@ref{fl_dashedlinestyle()}}. Only the odd numbered segments are drawn with the foreground color. @tindex FL USERDOUBLEDASH @item FL USERDOUBLEDASH Similar to @code{FL_LINE_USERDASH} but both even and odd numbered segments are drawn, with the even numbered segments drawn in the background color (as set by @code{@ref{fl_bk_color()}}). @end table The following routine can be used to change the dash pattern for @code{FL_USERDASH} and @code{FL USERDOUBLEDASH}: @findex fl_dashedlinestyle() @anchor{fl_dashedlinestyle()} @example void fl_dashedlinestyle(const char *dash, int ndashes) @end example Each element of the array @code{dash} is the length of a segment of the pattern in pixels. Dashed lines are drawn as alternating segments, each with the length of an element in @code{dash}. Thus the overall length of the dash pattern, in pixels, is the sum of all elements of @code{dash}. When the pattern is used up but the line to draw is longer it used from the start again. The following example code specifies a long dash (9 pixels) to come first, then a skip (3 pixels), a short dash (2 pixels) and then again a skip (3 pixels). After this sequence, the pattern repeats. @example char ldash_sdash[] = @{9, 3, 2, 3@}; fl_dashedlinestyle(ldash_sdash, 4); @end example It is important to remember to call @code{@ref{fl_dashedlinestyle()}} whenever @code{FL_USERDASH} is used to set the dash pattern, otherwise whatever the last pattern was will be used. To use the default dash pattern you can pass @code{NULL} as the dash parameter to @code{@ref{fl_dashedlinestyle()}}. By default, all lines are drawn so they overwrite the destination pixel values. It is possible to change the drawing mode so the destination pixel values play a role in the final pixel value. @findex fl_drawmode() @anchor{fl_drawmode()} @example void fl_drawmode(int mode); @end example @noindent There are 16 different possible settings for @code{mode} (see a Xlib programming manual for all the gory details). A of the more useful ones are @table @code @item GXcopy Default overwrite mode. Final pixel value = Src @item GXxor Bitwise XOR (exclusive-or) of the pixel value to be drawn with the pixel value already on the screen. Useful for rubber-banding. @item GXand Bitwise AND of the pixel value to be drawn with the pixel value already on the screen. @item GXor Bitwise OR of the pixel value to be drawn with the pixel value already on the screen. @item GXinvert Just invert the pixel values already on the screen. @end table To obtain the current settings of the line drawing attributes use the following routines @findex fl_get_linewidth() @anchor{fl_get_linewidth()} @findex fl_get_linestyle(() @anchor{fl_get_linestyle(()} @findex fl_get_drawmode(() @anchor{fl_get_drawmode(()} @example int fl_get_linewidth(void); int fl_get_linestyle(void); int fl_get_drawmode(void); @end example There are also a number of high-level drawing routines available. To draw boxes the following routine exists. Almost any object class will use it to draw the bounding box of the object. @findex fl_drw_box() @anchor{fl_drw_box()} @example void fl_drw_box(int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int bw); @end example @noindent @code{style} is the type of the box, e.g.@: @code{FL_DOWN_BOX}. @code{x}, @code{y}, @code{w}, and @code{h} indicate the size of the box. @code{col} is the color and @code{bw} is the width of the boundary, which typically should be given the value @code{obj->bw} or @code{FL_BOUND_WIDTH}. Note that a negative border width indicates a "softer" up box. See the demo program @file{borderwidth.c} for the visual effect of different border widths. There is also a routine for drawing a frame: @findex fl_drw_frame() @anchor{fl_drw_frame()} @example void fl_drw_frame(int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int bw) @end example @noindent All parameters have the usual meaning except that the frame is drawn outside of the bounding box specified. To draw a slider of various types and shapes use @findex fl_drw_slider) @anchor{fl_drw_slider)} @example void fl_drw_slider(int boxtype, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col1, FL_COLOR col2, int slider_type, double slider_size, double slider_value, char *label, int parts, int inverted, FL_Coord bw); @end example @noindent where @code{slider_type} is one of the different slider types like @code{FL_VERT_SLIDER} etc., see @ref{Slider Object}, for a complete list. Other parameters have the obvious meaning except for @code{parts}, which can be one of the following @table @code @item FL_SLIDER_NONE Don't draw anything. @item FL_SLIDER_BOX Draw the bounding box only. @item FL_SLIDER_KNOB Draw the knob only. @item FL_SLIDER_ALL Draw the entire slider. @end table For drawing text there are two routines: @findex fl_drw_text() @anchor{fl_drw_text()} @findex fl_drw_text_beside() @anchor{fl_drw_text_beside()} @example void fl_drw_text(int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int style, int size, const char *str); void fl_drw_text_beside(int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int style, int size, const char *str); @end example @noindent where @code{align} is the alignment, namely, @code{FL ALIGN LEFT}, @code{FL ALIGN CENTER} etc. @code{x}, @code{y}, @code{w} and @code{h} indicate the bounding box, @code{col} is the color of the text, @code{size} is the size of the font to use (in points) and @code{style} is the font style to be used (see @ref{Label Attributes and Fonts}, for valid styles). Finally, @code{str} is the string itself, possibly containing embedded newline characters. @code{@ref{fl_drw_text()}} draws the text inside the bounding box according to the alignment requested while @code{@ref{fl_drw_text_beside()}} draws the text aligned outside of the box. These two routines interpret a text string starting with the character @code{@@} differently in drawing some symbols instead. Note that @code{@ref{fl_drw_text()}} puts a padding of 5 pixels in vertical direction and 4 in horizontal around the text. Thus the bounding box should be 10 pixels wider and 8 pixels higher than required for the text to be drawn. The following routine can also be used to draw text and, in addition, a cursor can optionally be drawn @findex fl_drw_text_cursor() @anchor{fl_drw_text_cursor()} @example void fl_drw_text_cursor(int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int style, int size, char *str, int FL_COLOR ccol, int pos); @end example @noindent where @code{ccol} is the color of the cursor and @code{pos} is its position which indicates the index of the character in @code{str} before which to draw the cursor (-1 means show no cursor). This routine does no interpretion of the special character @code{@@} nor does it add padding around the text. Given a bounding box and the size of an object (e.g.@: a label) to draw, the following routine can be used to obtain the position of where to draw it with a certain alignment and including padding: @findex fl_get_align_xy() @anchor{fl_get_align_xy()} @example void fl_get_align_xy(int align, int x, int y, int w, int h, int obj_xsize, int obj_ysize, int xmargin, int ymargin, int *xpos, int *ypos); @end example @noindent This routine works regardless if the object is to be drawn inside or outside of the bounding box specified by @code{x}, @code{y}, @code{w} and @code{h}. @code{obj_xsize} and @code{obj->ysize} are the width and height of the object to be drawn and @code{xmargin} and @code{ymargin} is the additional padding to use. @code{xpos} and @code{ypos} return the position to be used for drawing the object. For drawing object labels the following routines might be more convenient: @findex fl_draw_object_label() @anchor{fl_draw_object_label()} @findex fl_draw_object_label_outside() @anchor{fl_draw_object_label_outside()} @example void fl_draw_object_label(FL_OBJECT *obj) void fl_draw_object_label_outside(FL_OBJECT *obj); @end example @noindent Both routines assume that the alignment is relative to the full bounding box of the object. The first routine draws the label according to the alignment, which could be inside or outside of the bounding box. The second routine will always draw the label outside of the bounding box. An important of aspect of (re)drawing an object is efficiency which can result in flicker and non-responsiveness if not handled with care. For simple objects like buttons or objects that do not have "movable parts", drawing efficiency is not a serious issue although you can never be too fast. For complex objects, especially those that a user can interactively change, special care should be taken. The most important rule for efficient drawing is not to draw if you don't have to, regardless how simple the drawing is. Given the networking nature of X, simple or not depends not only on the host/server speed but also the connection. What this strategy entails is that the drawing should be broken into blocks and depending on the context, draw/update only those parts that need to. xforms-1.0.93sp1/doc/part3_other_objects.texi0000644000175000017500000014174011376031777017654 0ustar jensjens@node Part III Other Objects @chapter Other Objects @ifnottex @menu * Timer Object: Timer Object * XYPlot Object: XYPlot Object * Canvas Object: Canvas Object @end menu @end ifnottex @node Timer Object @section Timer Object Timer objects can be used to make a timer that runs down toward 0 or runs up toward a pre-set value after which it starts blinking and returns itself to the application program. This can be used in many different ways, for example, to give a user a certain amount of time for completing a task, etc. Also hidden timer objects can be created. In this case the application program can take action at the moment the timer expires. For example, you can use this to show a message that remains visible until the user presses the "OK" button or until a certain amount of time has passed. The precision of the timer is not very high. Don't count on anything better than, say, 50 milli-seconds. Run demo @file{timerprec.c} for an actual accuracy measurement. @ifnottex @menu * Adding Timer Objects: Adding Timer Objects * Timer Types: Timer Types * Timer Interaction: Timer Interaction * Other Timer Routines: Other Timer Routines * Timer Attributes: Timer Attributes * Remarks: Timer Remarks @end menu @end ifnottex @node Adding Timer Objects @subsection Adding Timer Objects To add a timer to a form you use the routine @findex fl_add_timer() @anchor{fl_add_timer()} @example FL_OBJECT *fl_add_timer(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. @node Timer Types @subsection Timer Types There are at the moment three types of timers: @table @code @tindex FL_NORMAL_TIMER @item FL_NORMAL_TIMER Visible, Shows a label in a box which blinks when the timer expires. @tindex FL_VALUE_TIMER @item FL_VALUE_TIMER Visible, showing the time left or the elapsed time. Blinks if the timer expires. @tindex FL_HIDDEN_TIMER @item FL_HIDDEN_TIMER Not visible. @end table @node Timer Interaction @subsection Timer Interaction When a visible timer expires it starts blinking. The user can stop the blinking by pressing the mouse on it or by resetting the timer to 0. The timer object is returned to the application program or its callback called when the timer expired per default. You can also switch off reporting the expiry of the timer by calling @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when) @end example with @code{when} set to @code{@ref{FL_RETURN_NONE}}. To re-enable reporting call it with one of @code{@ref{FL_RETURN_CHANGED}}, @code{@ref{FL_RETURN_END}}, @code{@ref{FL_RETURN_END_CHANGED}} or @code{@ref{FL_RETURN_ALWAYS}}. @node Other Timer Routines @subsection Other Timer Routines To set the timer to a particular value use @findex fl_set_timer() @anchor{fl_set_timer()} @example void fl_set_timer(FL_OBJECT *obj, double delay); @end example @noindent @code{delay} gives the number of seconds the timer should run. Use 0.0 to reset/de-blink the timer. To obtain the time left in the timer use @findex fl_get_timer() @anchor{fl_get_timer()} @example double fl_get_timer(FL_OBJECT *obj); @end example By default, a timer counts down toward zero and the value shown (for @code{FL_VALUE_TIMER}s) is the time left until the timer expires. You can change this default so the timer counts up and shows elapsed time by calling @findex fl_set_timer_countup() @anchor{fl_set_timer_countup()} @example void fl_set_timer_countup(FL_OBJECT *obj, int yes_no); @end example @noindent with a true value for the argument @code{yes_no}. A timer can be temporarily suspended (stopwatch) using the following routine @findex fl_suspend_timer() @anchor{fl_suspend_timer()} @example void fl_suspend_timer(FL_OBJECT *obj); @end example @noindent and later be resumed by @findex fl_resume_timer() @anchor{fl_resume_timer()} @example void fl_resume_timer(FL_OBJECT *obj); @end example @noindent Unlike @code{@ref{fl_set_timer()}} a suspended timer keeps its internal state (total delay, time left etc.), so when it is resumed, it starts from where it was suspended. Finally there is a routine that allows the application program to change the way the time is presented in @code{FL_VALUE_TIMER}: @tindex FL_TIMER_FILTER @findex fl_set_timer_filter() @anchor{fl_set_timer_filter()} @example typedef char *(FL_TIMER_FILTER)(FL_OBJECT *obj, double secs); FL_TIMER_FILTER fl_set_timer_filter(FL_OBJECT *obj, FL_TIMER_FILTER filter); @end example @noindent The function @code{filter} receives the timer ID and the time left for count-down timers and the elapsed time for up-counting timers (in units of seconds) and should return a string representation of the time. The default filter returns the time in a @code{hour:minutes:seconds.fraction} format. @node Timer Attributes @subsection Timer Attributes Never use @code{FL_NO_BOX} as the boxtype for @code{FL_VALUE_TIMER}s. The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the timer, the second (@code{col2}) is the blinking color. @node Timer Remarks @subsection Remarks Although having different APIs and the appearance of a different interaction behaviour, the way timers and timeout callbacks work is almost identical with one exception: you can deactivate a timer by deactivating the form it belongs to. While the form is deactivated, the timers callback will not be called, even if it expires. The interaction will only resume when the form is activated again. See @file{timer.c} for the use of timers. @node XYPlot Object @section XYPlot Object A xyplot object gives you an easy way to display a tabulated function generated on the fly or from an existing data file. An active xyplot is also available to model and/or change a function. @ifnottex @menu * Adding XYPlot Objects: Adding XYPlot Objects * XYPlot Types: XYPlot Types * XYPlot Interaction: XYPlot Interaction * Other XYPlot Routines: Other XYPlot Routines * XYPlot Attributes: XYPlot Attributes * Remarks: XYPlot Remarks @end menu @end ifnottex @node Adding XYPlot Objects @subsection Adding XYPlot Objects To add an xyplot object to a form use the routine @findex fl_add_xyplot() @anchor{fl_add_xyplot()} @example FL_OBJECT *fl_add_xyplot(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent It shows an empty box on the screen with the label per default below it. @node XYPlot Types @subsection XYPlot Types The following types are available: @table @code @tindex FL_NORMAL_XYPLOT @item FL_NORMAL_XYPLOT A solid line is drawn through the data points. @tindex FL_SQUARE_XYPLOT @item FL_SQUARE_XYPLOT Data drawn as a solid line plus squares at data points. @tindex FL_CIRCLE_XYPLOT @item FL_CIRCLE_XYPLOT Data drawn as a solid line plus circles at data points. @tindex FL_FILL_XYPLOT @item FL_FILL_XYPLOT Data drawn as a solid line with the area under the curve filled. @tindex FL_POINTS_XYPLOT @item FL_POINTS_XYPLOT Only data points are drawn with. per default, stars. @tindex FL_LINEPOINTS_XYPLOT @item FL_LINEPOINTS_XYPLOT Data drawn as a solid line plus, per default, stars at data point. @tindex FL_DASHED_XYPLOT @item FL_DASHED_XYPLOT Data drawn as a dashed line. @tindex FL_DOTTED_XYPLOT @item FL_DOTTED_XYPLOT Data drawn as a dotted line. @tindex FL_DOTDASHED_XYPLOT @item FL_DOTDASHED_XYPLOT Data drawn as a dash-dot-dash line. @tindex FL_IMPULSE_XYPLOT @item FL_IMPULSE_XYPLOT Data drawn by vertical lines. @tindex FL_ACTIVE_XYPLOT @item FL_ACTIVE_XYPLOT Data drawn as a solid line plus squares at data points, accepting manipulations. @tindex FL_EMPTY_XYPLOT @item FL_EMPTY_XYPLOT Only the axes are drawn. @end table All xyplots display the curve auto-scaled to fit the plotting area. Although there is no limitation on the actual data, a non-monotonic increasing (or decreasing) x-axis might be plotted incorrectly. For @code{FL_ACTIVE_PLOT} the x-coordinate of the data must be monotonically increasing. XYPlots of type @code{FL_POINTS_XYPLOT} and @code{FL_LINEPOINTS_XYPLOT} are special in that the application can change the symbol drawn on the data point. @node XYPlot Interaction @subsection XYPlot Interaction Only @code{FL_ACTIVE_XYPLOT} report mouse events by default. Clicking and dragging the data points (marked with little squares) will change the data and result in the object getting returned to the application (or the object's callback getting invoked). By default, the reporting happens only when the mouse is released. In some situations, reporting changes as soon as they happen might be desirable. To control when mouse events are returned use the function @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when); @end example where @code{when} can have the folowing values: @table @code @item @ref{FL_RETURN_NONE} Never return or invoke callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end (mouse release) if one of the points has been moved to a different place. This is the default. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever a point has been moved. @item @ref{FL_RETURN_END} Return or invoke callback at end (mouse release) regardless if a point has been moved is changed or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback when a point has been moved or the mouse button has been release). @end table Please note: a object can also been in inspect mode (see function @code{@ref{fl_set_xyplot_inspect()}} below). In this case the object gets returned (or its callback invoked) for all of the above settings except (@code{@ref{FL_RETURN_NONE}}) when the mouse was released on top of such one of the points. To obtain the current value of the point that has changed, use the routine @findex fl_get_xyplot() @anchor{fl_get_xyplot()} @example void fl_get_xyplot(FL_OBJECT *obj, float *x, float *y, int *i); @end example @noindent where via @code{i} the data index (starting from 0) is returned while @code{x}, @code{y} is the actual data point. If no point is changed, @code{i} is set to -1. It is possible to not to draw the squares that mark an active plot using the following routine @findex fl_set_xyplot_mark_active() @anchor{fl_set_xyplot_mark_active()} @example void fl_set_xyplot_mark_active(FL_OBJECT *obj, int yes_no); @end example @noindent with @code{yes_no} being set to false (0). To set or replace the data for an xyplot, use @findex fl_set_xyplot_data() @anchor{fl_set_xyplot_data()} @findex fl_set_xyplot_data_double() @anchor{fl_set_xyplot_data_double()} @example void fl_set_xyplot_data(FL_OBJECT *obj, float *x, float *y, int n, const char *title, const char *xlabel, const char *ylabel); void fl_set_xyplot_data_double(FL_OBJECT *obj, double *x, double *y, int n, const char *title, const char *xlabel, const char *ylabel); @end example @noindent (The @code{fl_set_xyplot_data_double()} function allows to pass data of type @code{double} but which get "demoted" to @code{float} type when assigned to the xyplot object.) Here @code{x}, @code{y} is the tabulated function, and @code{n} is the number of data points. If the xyplot object being set exists already, old data will be cleared. Note that the tabulated function is copied internally so you can free or do whatever you want with the @code{x} and @code{y} arrays after the function returns. @code{title} is a title that is drawn above the XYPlot and @code{xlabel} and @code{ylabel} are the labels drawn at the x- and y-axes. You can also load a tabulated function from a file using the following routine @findex fl_set_xyplot_file() @anchor{fl_set_xyplot_file()} @example int fl_set_xyplot_file(FL_OBJECT *obj, const char *filename, const char *title, const char *xlabel, const char *ylabel); @end example @noindent The data file should be an ASCII file consisting of data lines. Each data line must have two columns, indicating the (x,y) pair with a space, tab or comma (@code{,}) separating the two columns. Lines that start with any of @code{!}, @code{;} or @code{#} are considered to be comments and are ignored. The functions returns the number of data points successfully read or 0 if the file can't be opened/ To get a copy of the current XYPLot data, use @findex fl_get_xyplot_data() @anchor{fl_get_xyplot_data()} @example void fl_get_xyplot_data(FL_OBJECT *obj, float x[], float y[], int *n); @end example @noindent The caller must supply the space for the data. All XYPlot objects can be made aware of mouse clicks by using the following routine @findex fl_set_xyplot_inspect() @anchor{fl_set_xyplot_inspect()} @example void fl_set_xyplot_inspect(FL_OBJECT *obj, int yes_no); @end example @noindent Once an XYPlot is in inspect mode, whenever the mouse is released and the mouse position is on one of the data point, the object is returned to the caller or its callback is invoked. You can use @code{@ref{fl_get_xyplot()}} to find out which point the mouse was clicked on. Another, perhaps even more general, way to read-off the values from an XYPlot is to use a posthandler or an overlay positioner. See demo @file{xyplotall.c} for the use of posthandler and @file{positionerXOR.c} for an example of reading-off xyplot values using an overlap positioner. @node Other XYPlot Routines @subsection Other XYPlot Routines There are several routines to change the appearance of an XYPlot. First of all, you can change the number of tic marks using the following routine @findex fl_set_xyplot_xtics() @anchor{fl_set_xyplot_xtics()} @findex fl_set_xyplot_ytics() @anchor{fl_set_xyplot_ytics()} @example void fl_set_xyplot_xtics(FL_OBJECT *obj, int major, int minor); void fl_set_xyplot_ytics(FL_OBJECT *obj, int major, int minor); @end example @noindent where @code{major} and @code{minor} are the number of tic marks to be placed on the plot and the number of divisions between major tic marks. In particular, -1 suppresses the tic marks completely while 0 restores the default settings. Note that the actual scaling routine may choose a value other than that requested if it decides that this would make the plot look nicer, thus @code{major} and @code{minor} are only taken as a hint to the scaling routine. However, in almost all cases the scaling routine will not generate a major that differs from the requested value by more than 3. It is possible to label the major tic marks with alphanumerical characters instead of numerical values. To this end, use the following routines @findex fl_set_xyplot_alphaxtics() @anchor{fl_set_xyplot_alphaxtics()} @findex fl_set_xyplot_alphaytics() @anchor{fl_set_xyplot_alphaytics()} @example void fl_set_xyplot_alphaxtics(FL_OBJECT *obj, const char *major, const char *minor); void fl_set_xyplot_alphaytics(FL_OBJECT *obj, const char *major, const char *minor); @end example @noindent where @code{major} is a string specifying the labels with the embedded character @code{|} that specifies major divisions. For example, to label a plot with Monday, Tuesday etc, @code{major} should be given as @code{Monday|Tuesday|...}. Parameter @code{minor} is currently unused and the minor divisions are set to 1, i.e, no divisions between major tic marks. Naturally the number of major/minor divisions set by this routine and @code{@ref{fl_set_xyplot_xtics()}} and @code{@ref{fl_set_xyplot_ytics()}} can't be active at the same time and the one that gets used is the one that was set last. The above two functions can be used to specify non-uniform and arbitary major divisions. To achieve this, you should embed the major tic location information in the alphanumerical text. The location information is introduced by the @ symbol and followed by a float number specifying the coordinates in world coordinates. The entire location info should follow the label. For example, @code{"Begin@@1.0|3/4@@0.75|1.9@@1.9"} will produce three major tic marks at 0.75, 1.0, and 1.9 and labeled "3/4", "begin", and "1.9". To get a gridded XYPlot, use the following routine @findex fl_set_xyplot_xgrid() @anchor{fl_set_xyplot_xgrid()} ffindex fl_set_xyplot_ygrid() @example void fl_set_xyplot_xgrid(FL_OBJECT *obj, int xgrid); void fl_set_xyplot_ygrid(FL_OBJECT *obj, int ygrid); @end example @noindent where @code{xgrid} and @code{ygrid} can be one of the following @table @code @tindex FL_GRID_NONE @item FL_GRID_NONE No grid. @tindex FL_GRID_MAJOR @item FL_GRID_MAJOR Grid for the major divisions. @tindex FL_GRID_MINOR @item FL_GRID_MINOR Grid for the major and minor divisions. @end table The grid line by default is drawn using a dotted line, which you can change using the following routine @findex fl_set_xyplot_grid_linestyle() @anchor{fl_set_xyplot_grid_linestyle()} @example int fl_set_xyplot_grid_linestyle(FL_OBJECT *obj, int style); @end example @noindent where @code{style} is the line style (@code{FL_SOLID}, @code{FL_DASH} etc. @xref{Part IV Drawing Objects, , Drawing Objects}, for a complete list). The function returns the old grid linestyle. By default, the plotting area is automatically adjusted for tic labels and titles so that a maximum plotting area results. This can be undesirable in certain situations. To control the plotting area manually, the following routines can be used @findex fl_set_xyplot_fixed_xaxis() @anchor{fl_set_xyplot_fixed_xaxis()} @findex fl_set_xyplot_fixed_yaxis() @anchor{fl_set_xyplot_fixed_yaxis()} @example void fl_set_xyplot_fixed_xaxis(FL_OBJECT *obj, const char *lm, const char *rm) void fl_set_xyplot_fixed_yaxis(FL_OBJECT *obj, const char *bm, const char *tm) @end example @noindent where @code{lm} and @code{rm} specify the right and left margin, respectively, and @code{bm} and @code{tm} the bottom and top margins. The pixel amounts are computed using the current label font and size. Note that even for y-axis margins the length of the string, not the height, is used as the margin, thus to leave space for one line of text, a single character (say @code{m}) or two narrow characters (say @code{ii}) should be used. To restore automatic margin computation, set all margins to @code{NULL}. To change the size of the symbols drawn at data points, use the following routine @findex fl_set_xyplot_symbolsize() @anchor{fl_set_xyplot_symbolsize()} @example void fl_set_xyplot_symbolsize(FL_OBJECT *obj, int size); @end example @noindent where @code{size} should be given in pixels. The default is 4. For @code{FL_POINTS_XYPLOT} and @code{FL_LINEPOINTS_XYPLOT} (main plot or overlay), the application program can change the symbol using the following routine @tindex FL_XYPLOT_SYMBOL @findex fl_set_xyplot_symbol() @anchor{fl_set_xyplot_symbol()} @example typedef void (*FL_XYPLOT_SYMBOL)(FL_OBJECT *, int id, FL_POINT *p, int n, int w, int h); FL_XYPLOT_SYMBOL fl_set_xyplot_symbol(FL_OBJECT *obj, int id, FL_XYPLOT_SYMBOL symbol); @end example @noindent where @code{id} is the overlay id (0 means the main plot, and you can use -1 to indicate all), and @code{symbol} is a pointer to the function that will be called to draw the symbols on the data point. The parameters passed to this function are the object pointer, the overlay @code{id}, the center of the symbol (@code{p->x}, @code{p->y}), the number of data points (@code{n}) and the preferred symbol size (@code{w}, @code{h}). If the type of the XYPlot corresponding to @code{id} is not @code{FL_POINTS_XYPLOT} or @code{FL_LINESPOINTS_XYPLOT}, the function will not be called. To change or example a @code{FL_LINEPOINTS_XYPLOT} XYPlot to plot filled small circles instead of the default crosses, the following code could be used @example void drawsymbol(FL_OBJECT *obj, int id, FL_POINT *p, int n, int w, int h) @{ int r = (w + h) / 4; FL_POINT *ps = p + n; for (; p < ps; p++) fl_circf(p->x, p->y, r, FL_BLACK); @} ... fl_set_xyplot_symbol(xyplot, 0, drawsymbol); ... @end example If a Xlib drawing routine is used it should use the current active window (@code{FL_ObjWin(obj)}) and the current GC. Take care not to call routines inside the @code{drawsymbol()} function that could trigger a redraw of the XYPlot (such as @code{@ref{fl_set_object_color()}}, @code{@ref{fl_set_xyplot_data()}} etc.). To use absolute bounds as opposed to actual bounds in data, use the following routines @findex fl_set_xyplot_xbounds() @anchor{fl_set_xyplot_xbounds()} @findex fl_set_xyplot_ybounds() @anchor{fl_set_xyplot_ybounds()} @example void fl_set_xyplot_xbounds(FL_OBJECT *obj, double min, double max); void fl_set_xyplot_ybounds(FL_OBJECT *obj, double min, double max); @end example @noindent Data that fall outside of the range set this way will be clipped. To restore autoscaling, call the function with @code{max} and @code{min} set to exactly the same value. To reverse the axes (e.g., @code{min} at right and @code{max} at left), set @code{min > max} for that axis. To get the current bounds, use the following routines @findex fl_get_xyplot_xbounds() @anchor{fl_get_xyplot_xbounds()} @findex fl_get_xyplot_ybounds() @anchor{fl_get_xyplot_ybounds()} @example void fl_get_xyplot_xbounds(FL_OBJECT *obj, float *min, float *max); void fl_get_xyplot_ybounds(FL_OBJECT *obj, float *min, float *max); @end example @noindent Note that the bounds returned are the bounds used in clipping the data, which are not necessarily the bounds used in computing the world/screen mapping due to tic rounding. To replace the value of a particular point use the routine @findex fl_replace_xyplot_point() @anchor{fl_replace_xyplot_point()} @example void fl_replace_xyplot_point(FL_OBJECT *obj, int index, double x, double y); @end example @noindent Here @code{index} is the index of the value to be replaced. The first value has an index of 0. It is possible to overlay several plots together using the following call @findex fl_add_xyplot_overlay() @anchor{fl_add_xyplot_overlay()} @example void fl_add_xyplot_overlay(FL_OBJECT *obj, int id, float *x, float *y, int npoints, FL_COLOR col); @end example @noindent where @code{id} must be between 1 and @tindex FL_MAX_XYPLOTOVERLAY @code{FL_MAX_XYPLOTOVERLAY} (currently 32). Again, the data is copied to an internal buffer (old data are freed if necessary). As for the base data, a data file can be used to specify the (x,y) function @findex fl_add_xyplot_overlay_file() @anchor{fl_add_xyplot_overlay_file()} @example int fl_add_xyplot_overlay_file(FL_OBJECT *obj, int ID, const char *file, FL_COLOR col); @end example @noindent The function returns the number of data points successfully read. The type (@code{FL_NORMAL_XYPLOT} etc.) used in overlay plot is the same as the object itself. To change an overlay style, use the following call @findex fl_set_xyplot_overlay_type() @anchor{fl_set_xyplot_overlay_type()} @example void fl_set_xyplot_overlay_type(FL_OBJECT *obj, int id, int type); @end example @noindent Note that although the API of adding an overlay is similar to adding an object, an XYPlot overlay is not a separate object. It is simply a property of an already existing XYPlot object. To get the data of an overlay, use the following routine @findex fl_get_xyplot_overlay_data() @anchor{fl_get_xyplot_overlay_data()} @example void fl_get_xyplot_overlay_data(FL_OBJECT *obj, int id, float x[], float y[], int *n); @end example @noindent where @code{id} specifies the overlay number between 1 and @code{FL_MAX_XYPLOTOVERLAY} or the number set via @code{@ref{fl_set_xyplot_maxoverlays()}} (see below). (Actually, when @code{id} is zero, this function returns the base data). The caller must supply the storage space for the data. Upon function return, @code{n} will be set to the number of data points retrieved. Sometimes it may be more convenient and efficient to get the pointer to the data rather than a copy of the data. To this end, the following routine is available @findex fl_get_xyplot_data_pointer() @anchor{fl_get_xyplot_data_pointer()} @example void fl_get_xyplot_data_pointer(FL_OBJECT *obj, int id, float **x, float **y, int *n); @end example @noindent Upon function return, @code{x} and @code{y} are set to point to the data storage. You're free to modify the data and redraw the XYPlot (via @code{@ref{fl_redraw_object()}}). The pointers returned may not be freed. If needed, the maximum number of overlays an object can have (which by default is 32) can be changed using the following routine @findex fl_set_xyplot_maxoverlays() @anchor{fl_set_xyplot_maxoverlays()} @example int fl_set_xyplot_maxoverlays(FL_OBJECT *obj, int maxoverlays); @end example @noindent The function returns the previous maximum number of overlays. To obtain the number of data points, use the following routine @findex fl_get_xyplot_numdata() @anchor{fl_get_xyplot_numdata()} @example int fl_get_xyplot_numdata(FL_OBJECT *obj, int id); @end example @noindent where @code{id} is the overlay ID with 0 being the base data set. To insert a point into an xyplot, use the following routine @findex fl_insert_xyplot_data() @anchor{fl_insert_xyplot_data()} @example void fl_insert_xyplot_data(FL_OBJECT *obj, int id, int n, double x, double y); @end example @noindent where @code{id} is the overlay ID; @code{n} is the index of the point after which the data new point specified by @code{x} and @code{y} is to be inserted. Set @code{n} to -1 to insert the point in front. To append to the data, set @code{n} to be equal or larger than the return value of @code{fl_get_xyplot_numdata(obj, id)}. To delete an overlay, use the following routine @findex fl_delete_xyplot_overlay() @anchor{fl_delete_xyplot_overlay()} @example void fl_delete_xyplot_overlay(FL_OBJECT *obj, int id); @end example It is possible to place inset texts on an XYPlot using the following routine (up to @code{FL_MAX_XYPLOTOVERLAY} or the value set via @code{@ref{fl_set_xyplot_maxoverlays()}} of such insets can be accommodated): @findex fl_add_xyplot_text() @anchor{fl_add_xyplot_text()} @example void fl_add_xyplot_text(FL_OBJECT *obj, double x, double y, const char *text, int align, FL_COLOR col); @end example @noindent where @code{x} and @code{y} are the coordinates where text is to be placed and align specifies the placement options relative to the specified point (See @code{@ref{fl_set_object_lalign()}} for valid options). If you for example specify @code{FL_ALIGN_LEFT}, the text will appear on the left of the point and flushed toward the point (see Fig. 21.1). This is mostly consistent with the label alignment except that now the bounding box (of the point) is of zero dimension. Normal text interpretation applies, i.e., if text starts with @code{@@} a symbol is drawn. To remove an inset text, use the following routine @findex fl_delete_xyplot_text() @anchor{fl_delete_xyplot_text()} @example void fl_delete_xyplot_text(FL_OBJECT *obj, const char *text); @end example Another kind of inset is the "keys" to the plots. A key is the combination of drawing a segment of the plot line style with a piece of text that describes what the corrsponding line represents. Obviously, keys are most useful when you have more than one plot (i.e.@: overlays). To add a key to a particular plot, use the following routine @findex fl_set_xyplot_key() @anchor{fl_set_xyplot_key()} @example void fl_set_xyplot_key(FL_OBJECT *obj, int id, const char *keys); @end example @noindent where @code{id} again is the overlay ID. To remove a key, set the key to @code{NULL}. All the keys will be drawn together inside a box. The position of the keys can be set via @findex fl_set_xyplot_key_position() @anchor{fl_set_xyplot_key_position()} @example void fl_set_xyplot_key_position(FL_OBJECT *obj, float x, float y, int align) @end example @noindent where @code{x} and @code{y} should be given in world coordinate system. @code{align} specifies the alignment of the entire key box relative to the given position (see Fig.21.1). The following routine combines the above two functions and may be more convenient to use @findex fl_set_xyplot_keys() @anchor{fl_set_xyplot_keys()} @example void fl_set_xyplot_keys(FL_OBJECT *obj, char *keys[], float x, float y, int align); @end example @noindent where @code{keys} specifies the keys for each plot. The last element of the array must be @code{NULL} to indicate the end. The array index is the plot id, i.e., @code{key[0]} is the key for the base plot, @code{key[1]} the key for the the first overlay etc. To change the font the key text uses, the following routine is available @findex fl_set_xyplot_key_font() @anchor{fl_set_xyplot_key_font()} @example void fl_set_xyplot_key_font(FL_OBJECT *obj, int style, int size); @end example Data may be interpolated using an nth order Lagrangian polynomial: @findex fl_set_xyplot_interpolate() @anchor{fl_set_xyplot_interpolate()} @example void fl_set_xyplot_interpolate(FL_OBJECT *obj, int id, int degree, double grid); @end example @noindent where @code{id} is the overlay ID (use 0 for the base data set); @code{degree} is the order of the polynomial to use and @code{grid} is the working grid onto which the data are to be interpolated. To restore the default linear interpolation, use @code{degree} set to 0 or 1. To change the line thickness of an xyplot (base data or overlay), the follow routine is available: @findex fl_set_xyplot_linewidth() @anchor{fl_set_xyplot_linewidth()} @example void fl_set_xyplot_linewidth(FL_OBJECT *obj, int id, int width); @end example Again, use a @code{id} of value 0 to indicate the base data. Setting @code{width} to zero restores the server default and typically is the fastest. By default, a linear scale in both the x and y direction is used. To change the scaling, use the following call @findex fl_set_xyplot_xscale() @anchor{fl_set_xyplot_xscale()} @findex fl_set_xyplot_yscale() @anchor{fl_set_xyplot_yscale()} @example void fl_set_xyplot_xscale(FL_OBJECT *obj, int scale, double base); void fl_set_xyplot_yscale(FL_OBJECT *obj, int scale, double base); @end example @noindent where the valid scaling options for scale are @tindex FL_LINEAR @tindex FL_LOG @code{FL_LINEAR} and @code{FL_LOG}, and @code{base} is used only for @code{FL_LOG} and in that case it is the base of the logarithm to be used. Use the following routine to clear an xyplot @findex fl_clear_xyplot() @anchor{fl_clear_xyplot()} @example void fl_clear_xyplot(FL_OBJECT *obj); @end example @noindent This routine frees all data associated with an XYPlot, including all overlays and all inset texts. This routine does not reset all plotting options, such as line thickness, major/minor divisions etc.@: nor does it free all memories associated with the XYPlot, for this @code{@ref{fl_free_object()}} is needed. The mapping between the screen coordinates and data can be obtained using the following routines @findex fl_get_xyplot_xmapping() @anchor{fl_get_xyplot_xmapping()} @findex fl_get_xyplot_ymapping() @anchor{fl_get_xyplot_ymapping()} @example void fl_get_xyplot_xmapping(FL_OBJECT *obj, float *a, float *b); void fl_get_xyplot_xmapping(FL_OBJECT *obj, float *a, float *b); @end example @noindent where @code{a} and @code{b} are the mapping constants and are used as follows: @example screenCoord = a * data + b (linear scale) screenCoord = a * log(data) / log(p) + b (log scale) @end example @noindent where p is the base of the requested logarithm. If you need to do conversions only occasionally (for example, converting the position of a mouse click to a data point or vice versa) the following routines might be more convenient @findex fl_xyplot_s2w() @anchor{fl_xyplot_s2w()} @example void fl_xyplot_s2w(FL_OBJECT *obj, double sx, double sy, float *wx, float *wy); void fl_xyplot_w2s(FL_OBJECT *obj, double wx, double wy, float *sx, float *sy); @end example @noindent where @code{sx} and @code{sy} are the screen coordinates and @code{wx} and @code{wy} are the world coordinates. @node XYPlot Attributes @subsection XYPlot Attributes Don't use @code{FL_NO_BOX} as the boxtype of an XYPlot object that is to be changed dynamically. To change the font size and style for the tic labels, inset text etc., use @code{@ref{fl_set_object_lsize()}} and @code{@ref{fl_set_object_lstyle()}}. The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the box and the second (@code{col2}) the actual XYPlot color. @node XYPlot Remarks @subsection Remarks The interpolation routine is public and can be used in the application program @findex fl_interpolate() @anchor{fl_interpolate()} @example int fl_interpolate(const float *inx, const float *iny, int num_in, float *outx, float *outy, double grid, int ndeg); @end example @noindent If successful, the function returns the number of points in the interpolated function (@code{(inx[num_in - 1] - inx[0]) / grid + 1.01}), otherwise it returns -1. Upon return, @code{outx} and @code{outy} are set to the interpolated values. The caller must allocate the storage for @code{outx} and @code{outy}. See @file{xyplotall.c} and @code{xyplotactive.c} for examples of the use of XYPlot objects. There is also an example program called @file{xyplotover.c}, which shows the use of overlays. In addition, @code{xyplotall.c} shows a way of getting all mouse clicks without necessarily using an active XYPlot. It is possible to generate a PostScript output of an XYPlot. See the function @code{@ref{fl_object_ps_dump()}} documented in Part V. @node Canvas Object @section Canvas Object A canvas is a managed plain X (sub)window. It it different from the free object in that a canvas is guaranteed to be associated with a window that is not shared with any other object, thus an application program has more freedom in utilizing a canvas, such as using its own colormap or rendering double-buffered OpenGL in it etc. A canvas is also different from a raw application window because a canvas is decorated differently and its geometry is managed, e.g., you can use @code{@ref{fl_set_object_resize()}} to control its position and size after its parent form is resized. @ifnottex @menu * Adding Canvas Objects: Adding Canvas Objects * Canvas Types: Canvas Types * Canvas Interaction: Canvas Interaction * Other Canvas Routines: Other Canvas Routines * Canvas Attributes: Canvas Attributes * OpenGL Canvas: OpenGL Canvas @end menu @end ifnottex @node Adding Canvas Objects @subsection Adding Canvas Objects Adding an object To add a canvas to a form you use the routine @findex fl_add_canvas() @anchor{fl_add_canvas()} @example FL_OBJECT *fl_add_canvas(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is not drawn but used as the window name for possible resource and playback purposes. If label is empty, the window name will be generated on the fly as @code{flcanvasn}, where @code{n = 0, 1,...}. @node Canvas Types @subsection Canvas Types The only types of canvases currently available is @tindex FL_NORMAL_CANVAS @code{FL_NORMAL_CANVAS}. @node Canvas Interaction @subsection Canvas Interaction The canvas class is designed to maximize the programmer's ability to deal with situations where standard form classes may not be flexible enough. With canvases, the programmer has complete control over everything that can happen to a window. It thus doesn't work like other objects that get returned by @code{@ref{fl_do_forms()}} etc.@: or have their callbacks invoked. Instead the user can request that for specific @code{X} events (not XForms object events like @code{FL_PRESS}, @code{FL_KEYPRESS} etc.!) callbacks are invoked that receive all information about the @code{XEvent} that led to their invocation. This obviously requires some understanding of how the X Window system works. The interaction with a canvas is typically set up as follows. First, you register the @code{X} events you're interested in and their handlers using the following routine @tindex FL_HANDLE_CANVAS @findex fl_add_canvas_handler() @anchor{fl_add_canvas_handler()} @example typedef int (*FL_HANDLE_CANVAS)(FL_OBJECT *obj, Window win, int win_width, int win_height, XEvent *xev, void *user_data); void fl_add_canvas_handler(FL_OBJECT *obj, int event, FL_HANDLE_CANVAS handler, void *user_data); @end example @noindent where @code{event} is the @code{XEvent} type, e.g. @code{Expose} etc. The @code{@ref{fl_add_canvas_handler()}} function first registers a procedure with the event dispatching system of the Forms Library, then it figures out the event masks corresponding to the event @code{event} and invokes @code{@ref{fl_addto_selected_xevent()}} to solicit the event from the server. Other book keeping (e.g.@: drawing the box that encloses the canvas, etc.) is done by the object handler. When a canvas handler is installed the library tries to set the correct mask for the the @code{Xevent} (which then tells the X Window system which events to pass on to the Forms Library). But since translation from an @code{Xevent} to a @code{Xevent} mask is not unique, the default translation of the @code{Xevent} to a mask may or may not match exactly the intention of the application. Two events, namely @code{MotionNotify} and @code{ButtonPress}, are likely candidates that need further clarification from the application. There are two functions to add or delete from the mask, @code{@ref{fl_addto_selected_xevent()}} and @code{@ref{fl_remove_selected_xevent()}}. By default, when a mouse motion handler (i.e.@: for the @code{MotionNotify} events) is registered, it is assumed that, while the application wants to be informed about mouse movements, it's not interested in a continous motion monitoring (tracking), thus per default @code{MotionNotify} events are requested with @code{PointerMotionHintMask} being set in the mask to reduce the number of events generated. If this is not the case and in fact the application wants to use the mouse motion as some type of graphics control, the default behavior would appear "jerky" as not every mouse motion is reported. To change the default behavior so that every mouse motion is reported, you need to call @code{@ref{fl_remove_selected_xevent()}} with mask set to @code{PointerMotionHintMask}. Furthermore, the mouse motion is reported regardless if a mouse button is pressed or not. If the application is interested in mouse motion only when a mouse button is pressed @code{@ref{fl_remove_selected_xevent()}} should be called with a mask of @code{PointerMotionMask|PointerMotionHintMask}. With @code{ButtonPress} events you need to call @code{@ref{fl_addto_selected_xevent()}} with a mask of @code{OwnerGrabButtonMask} if you are to add or remove other canvas handlers in the button press handler. To remove a registered handler, use @findex fl_remove_canvas_handler() @anchor{fl_remove_canvas_handler()} @example void fl_remove_canvas_handler(FL_OBJECT *obj, int event, FL_CANVAS_HANDLER handler); @end example @noindent After this function call the canvas ceases to receive the events for @code{event}. The corresponding default bits in the @code{XEvent} mask as were set by @code{@ref{fl_add_canvas_handler()}} are cleared. If you added extra ones with @code{@ref{fl_addto_selected_xevent()}} you should reset them using @code{@ref{fl_remove_selected_xevent()}}. To obtain the window ID of a canvas, use @findex fl_get_canvas_id() @anchor{fl_get_canvas_id()} @example Window fl_get_canvas_id(FL_OBJECT *obj); @end example @noindent or use the generic function (macro) (recommended) @findex FL_ObjWin() @anchor{FL_ObjWin()} @example Window FL_ObjWin(FL_OBJECT *obj); @end example @noindent Of course, the window ID only has a meaning after the form/canvas is shown. When the canvas or the form the canvas is on is hidden (via @code{@ref{fl_hide_object()}} or @code{@ref{fl_hide_form()}}), the canvas window may be destroyed. If the canvas is shown again, a new window ID for the canvas may be created. Thus recording the canvas window ID in a static variable is not the right thing to do. It is much safer (and it doesn't add any run-time overhead) to obtain the canvas window ID via @code{@ref{FL_ObjWin()}} whenever it's needed. If your application must show and hide the canvas/form repeatedly, you might consider to "unmap" the window, a way of removing the window from the screen without actually destroying it and later re-mapping the window to show it. The Xlib API functions for doing this are @code{XUnmapWindow()} and @code{XMapWindow()}. Both require two arguments. the display, which you can determine by calling @code{@ref{fl_get_display()}} and the window ID, which can be obtained by using @code{form->window} if you want to (un)map a form or @code{FL_ObjWin(obj)} for a canvas. @node Other Canvas Routines @subsection Other Canvas Routines Upon canvas creation, all its window related attributes, e.g.@: visual, depth and colormap etc., are inherited from its parent (i.e.@: the window of the form the canvas belongs to). To modify any attributes of the canvas, use the following routine @findex fl_set_canvas_attributes() @anchor{fl_set_canvas_attributes()} @example void fl_set_canvas_attributes(FL_OBJECT *obj, unsigned mask, XSetWindowAttributes *xswa); @end example @noindent See @code{XSetWindowAttributes()} for the definition of the structure members. Note that this routine should not be used to manipulate events. Other functions exists that can be used to modify the color/visual property of a canvas: @findex fl_set_canvas_colormap() @anchor{fl_set_canvas_colormap()} @findex fl_get_canvas_colormap() @anchor{fl_get_canvas_colormap()} @findex fl_set_canvas_visual() @anchor{fl_set_canvas_visual()} @findex fl_set_canvas_depth() @anchor{fl_set_canvas_depth()} @findex fl_get_canvas_depth() @anchor{fl_get_canvas_depth()} @example void fl_set_canvas_colormap(FL_OBJECT *obj, Colormap map); Colormap fl_get_canvas_colormap(FL_OBJECT *obj); void fl_set_canvas_visual(FL_OBJECT *obj, Visual *vi); void fl_set_canvas_depth(FL_OBJECT *obj, int depth); int fl_get_canvas_depth(FL_OBJECT *obj); @end example @noindent Note that changing visual or depth does not generally make sense once the canvas window is created (which happens when the parent form is shown). Also, typically if you change the canvas visual, you probably should also change the canvas depth to match the visual. Caution should also applied when using @code{@ref{fl_set_canvas_colormap()}}: when the canvas window goes away, e.g.@: as a result of a call of @code{@ref{fl_hide_form()}}, the colormap associated with the canvas is freed (destroyed). This likely will cause problems if a single colormap is used for multiple canvases as each canvas will attempt to free the same colormap, resulting in an X error. If your application works this way, i.e.@: the same colormap is used on multiple canvases (via @code{@ref{fl_set_canvas_colormap()}}), you should use the following routine to prevent the canvas from freeing the colormap: @findex fl_share_canvas_colormap() @anchor{fl_share_canvas_colormap()} @example void fl_share_canvas_colormap(FL_OBJECT *obj, Colormap colormap); @end example @noindent This function works the same way as @code{@ref{fl_set_canvas_colormap()}} except that it also sets a internal flag so the colormap isn't freed when the canvas goes away. By default, canvases are decorated with an @code{FL_DOWN_FRAME}. To change the decoration, change the the boxtype of the canvas and the boxtype will be translated into a frame that best approximates the appearance of the request boxtype (e.g.@: a @code{FL_DOWN_BOX} is translated into a @code{FL_DOWN_FRAME} etc). Note that not all frame types are appropriate for decorations. The following routine is provided to facilitate the creation of a colormap appropriate for a given visual to be used with a canvas: @findex fl_create_colormap() @anchor{fl_create_colormap()} @example Colormap fl_create_colormap(XVisualInfo *xvinfo, int n_colors); @end example @noindent where @code{n_colors} indicates how many colors in the newly created colormap should be filled with XForms' default colors (to avoid flashing effects). Note however, that the colormap entry 0 is allocated with either black or white even if you specify 0 for @code{n_colors}. To prevent this from happening (so you get a completely empty colormap), set @code{n_colors} to -1. @xref{Part IV Drawing Objects, , Drawing Objects}, on how to obtain the @code{XVisualInfo} for the window. Depending on the window manager, a colormap other than the default may not get installed correctly. If you're working with such a window manager, you may have to install the colormap yourself when the mouse pointer enters the canvas using @code{XInstallColormap()}. By default, objects with shortcuts appearing on the same form as the canvas will "steal" keyboard inputs if they match the shortcuts. To disable this feature, use the following routine with a false (0) value for @code{yes_no}: @findex fl_canvas_yield_to_shortcut() @anchor{fl_canvas_yield_to_shortcut()} @example void fl_canvas_yield_to_shortcut(FL_OBJECT *obj, int yes_no); @end example @node Canvas Attributes @subsection Canvas Attributes Some of the attributes, such as boxtype, do not apply to the canvas class. The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} can be used to set the background color of the canvas (by default, a canvas has no background color). The second argument (@code{col2}) controls the decoration color (if applicable). @node OpenGL Canvas @subsection OpenGL Canvas Deriving specialized canvases from the general canvas object is possible. See the next subsection for general approaches how this is done. The following routines work for OpenGL (under X) as well as Mesa, a free OpenGL clone. To add an OpenGL canvas to a form, use the following routine @findex fl_add_glcanvas() @anchor{fl_add_glcanvas()} @example FL_OBJECT *fl_add_glcanvas(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent where @code{type} is the same as for a normal canvas. A "glcanvas" created this way will have the following attributes by default @example GLX_RGBA, GLX_DEPTH_SIZE: 1, GLX_RED_SIZE: 1, GLX_GREEN_SIZE: 1, GLX_BLUE_SIZE: 1, GLX_DOUBLEBUFFER @end example The application program can modify these defaults using the following routine (before the creation of glcanvases) @findex fl_set_glcanvas_defaults() @anchor{fl_set_glcanvas_defaults()} @example void fl_set_glcanvas_defaults(const int *attributes); @end example @noindent See @code{glXChooseVisual()} for a list of valid attributes. To get the current defaults use @findex fl_get_glcanvas_defaults() @anchor{fl_get_glcanvas_defaults()} @example void fl_get_glcanvas_defaults(int *attributes); @end example It is also possible to change the attributes on a canvas by canvas basis by utilizing the following routine: @findex fl_set_glcanvas_attributes() @anchor{fl_set_glcanvas_attributes()} @example void fl_set_glcanvas_attributes(FL_OBJECT *obj, const int *attributes); @end example @noindent Note that this routine can be used to change a glcanvas attributes on the fly even if the canvas is already visible and active. To obtain the attributes of a particular canvas, use the following routine @findex fl_get_glcanvas_attributes() @anchor{fl_get_glcanvas_attributes()} @example void fl_get_glcanvas_attributes(FL_OBJECT *obj, int attributes[]); @end example @noindent The caller must supply the space for the attribute values. To obtain the the glx context (for whatever purposes), use @findex fl_get_glcanvas_context() @anchor{fl_get_glcanvas_context()} @example GLXContext fl_get_glcanvas_context(FL_OBJECT *obj); @end example Note that by default the rendering context created by a glcanvas uses direct rendering (i.e., by-passing the Xserver). To change this default, i.e.@: to always render through the Xserver, use the following routine: @findex fl_set_glcanvas_direct() @anchor{fl_set_glcanvas_direct()} @example void fl_set_glcanvas_direct(FL_OBJECT *obj, int yes_no); @end example @noindent with the argument @code{yes_no} set to false (0). Remember that OpenGL drawing routines always draw into the window the current context is bound to. For application with a single canvas, this is not a problem. In case of multiple canvases, the canvas driver takes care of setting the proper context before invoking the expose handler. In some cases, the application may want to draw into canvases actively. In this case, explicit drawing context switching may be required. To this end, use the following routine @findex fl_activate_glcanvas() @anchor{fl_activate_glcanvas()} @example void fl_activate_glcanvas(FL_OBJECT *obj); @end example @noindent before drawing into glcanvas object. Finally there is a routine that can be used to obtain the @code{XVisual} information that is used to create the context @findex fl_get_glcanvas_xvisualinfo() @anchor{fl_get_glcanvas_xvisualinfo()} @example XVisualInfo *fl_get_glcanvas_xvisualinfo(FL_OBJECT *obj); @end example @noindent See demo program @code{gl.c} for an example use of a glcanvas. xforms-1.0.93sp1/doc/part5.texi0000644000175000017500000000036111317660743014731 0ustar jensjens@node Part V @unnumbered @emph{Part V - General Informations} @menu * Part V Overview of Main Functions:: * Part V Some Useful Functions:: * Part V Resources for Forms Library:: * Part V Dirty Tricks:: * Part V Trouble Shooting:: @end menu xforms-1.0.93sp1/doc/part3_popups.texi0000644000175000017500000015267111376032000016331 0ustar jensjens@node Part III Popups @chapter Popups Popup is not an object class. In contrast to normal objects popups are only shown for a short time in their own window and, while they are shown, no interaction with other objects is possible. So they don't fit directly into the normal event loop where one waits for user actions via @code{@ref{fl_do_forms()}}. Instead, when used stand-alone (e.g.@: for a context menu) they are shown on a call of the function @code{@ref{fl_popup_do()}}, which returns when the the user is done with the popup and it has been removed from the screen. Only idle callbacks and timers etc.@: are executed in the background while a popup is being shown. Popups are the building blocks for menu and selector objects, which internally create and use popups. Thus it might be helpful to understand how popups work to get the most out of these objects. All functions dealing with popups have names starting with @code{'fl_popup_'}, functions for individual entries start with @code{'fl_popup_entry_'} and typedefs as well as macros with @code{'FL_POPUP_'}. @ifnottex @menu * Adding Popups: Adding Popups * Popup Interaction: Popup Interaction * Other Popup Routines: Other Popup Routines * Popup Attributes: Popup Attributes @end menu @end ifnottex @node Adding Popups @section Adding Popups There are two ways to create and populate a popup with entries. The first method, that allows more fine-grained control consists of first generating a popup and then adding entries. Using this method all the properties of entries can be set immediately. The second method, to be discussed later, is simpler and may be sufficient for many applications, and internally uses the first method. To define a new popup using the more general interface call @findex fl_popup_add() @anchor{fl_popup_add()} @example FL_POPUP *fl_popup_add(Window win, const char *title); @end example @noindent The function returns the address of the new popup on success and @code{NULL} on failure. @code{win} is the window of a parent object (use @code{@ref{FL_ObjWin()}} to find out about it). You can also use @code{fl_root} for the root window, with @code{None} having the same effect . @code{title} is an optional string that gets shown at the top of the popup in a framed box. If not wanted pass an empty string or @code{NULL}. The function returns a pointer to a new popup or @code{NULL} on failure. The title may contain embedded newline characters, this allows to create titles that span more than one line.) There is no built-in limit to the number of popups that can be created. Once you have popup you may add one or more entries by using @findex fl_popup_add_entries() @anchor{fl_popup_add_entries()} @example FL_POPUP_ENTRY *fl_popup_add_entries(FL_POPUP *popup, const char *entries, ...); @end example @noindent On success the return value is the address of the first entry created and @code{NULL} on failure. The first argument, @code{entries}, is a pointer to the popup the new entry (or entries) is added to. The second argument, @code{entries}, encodes information about the entries to add. In the most simple case it consists just of the entries texts, separated by @code{|} characters, e.g. @w{@code{"Item 1|Item 2|Item 3"}}. This would create three simple entries in the popup with labels @code{"Item 1"}, @code{"Item 2"} and @code{"Item 3"}. The @code{entries} string may contain newline characters which allows to create entries that span more than a single line. There's no built-in limit to the number of entries than be added to a popup. @code{@ref{fl_popup_add_entries()}} can be called repeatedly to append further entries to a popup. It often is necessary to have more complex entries. E.g.@: one may want to have keyboard shortcuts for entries, which are shown on the right hand side of an entry, one may want to have sub-popups or set callbacks etc. This can be achieved by embedding special character sequences within the string describing the entries and passing further arguments to the function, similar to the use of a format string in e.g.@: @code{printf(3)}. All special sequences start with a @code{%}. The following sequences are recognized: @table @code @item %x Set a value of type @code{long int} that's passed to all callback routines for the entry. The value must be given in the arguments following the @code{entries} string. @item %u Set a @code{user_void} pointer that's passed to all callbacks of the entry. The pointer must be specified in the arguments following the @code{entries} string. @item %f Set a callback function that gets called when the entry is selected. The function is of type @example int callback(FL_POPUP_RETURN *r); @end example Information about the entry etc.@: gets passed to the callback function via the @code{FL_POPUP_RETURN} structure (see below) and the return value of the function can be used to keep the selection being reported back to the caller of @code{@ref{fl_popup_do()}} by returning a value of @code{FL_IGNORE} (-1). The functions address must be given in the arguments following the @code{entries} string. @item %E Set a callback routine that gets called each time the mouse enters the entry (as long as the entry isn't disabled or hidden). The type of the function is the same as that of the callback function for the selection of the item but it's return value is never used. The functions address must be given in the arguments following the @code{entries} string. @item %L Set a callback routine that gets called each time the mouse leaves the entry. The type of the function is the same as that of the callback function for the selection of the entry but it's return value is never used. The functions address must be given in the arguments following the @code{entries} string. @item %m When this is specified a sub-popup gets opened when the mouse enters the entry (the entry itself thus can't be selected). The sub-popup to be opened must be an already existing popup and its address must be given in the arguments following the @code{entries} string. A triangle will be drawn on the right of the entry to indicate that it's an entry for a sub-popup. Mutually exclusive with @code{%t}, @code{%T}, @code{%r}, @code{%R} and @code{%l}. @item %t @itemx %T This makes the entry a "toggle" entry, an entry that represents binary states and gets a check-mark drawn on its left if in "on" state. If created with @code{%t} its in "off" state at the start, if created with @code{"T"} its in "on" state. Switching states happens automatically when the entry is selected. Mutually exclusive with @code{%m}, @code{%r}, @code{%R} and @code{%l}. @item %r @itemx %R This makes the entry a "radio" entry, i.e.@: it becomes part of a group of entries of which only one can be "on" at a time. The group, an integer value (don't use @code{INT_MIN} and @code{INT_MIN}), must be given in the arguments following the @code{entries} string. Radio entries are drawn with a small circle to the left, with the one for the entry in "on" state filled with a color (blue per default). When a radio entry is selected by the user that was in "off" state the entry of the group that was is "on" state before is automatically switched to "off" state. If the entry gets created with @code{%r} the entry is in "off" state, if created with @code{%R} it's in "on" state (in that case all entries created before in "on" state are reset to "off" state, i.e.@: the one created last "wins"). Mutually exclusive with @code{%m}, @code{%t}, @code{%T} and @code{%l}. @item %l This creates not a real entry but indicates that a line is to be drawn to visually group other entries. While other properties can be set for such an "entry" only the "hidden" property (see below) is taken into acount. Mutually exclusive with @code{%m}, @code{%t}, @code{%T}, @code{%} and @code{%R}. @item %d Marks the entry as disabled, i.e.@: it can't be selected and its text is per default drawn in a different color @item %h Marks the entry as hidden, i.e.@: it is not shown while in this state. @item %S For entries with shortcut keys it's quite common to have them shown on the right hand side. Using @code{%S} you can split the entrys text into two parts, the first one (before @code{%S}) being drawn flushed left and the second part flushed right. Note that using this special sequence doesn't automatically sets a shortcut key, this still has to be done using @code{%s}. @item %s Sets one or more shortcut keys for an entry. Requires a string with the shortcuts in the arguments following the @code{entries} string. @xref{Shortcuts}, for details on how to define shortcuts. Please note that the character in the label identical to the shortcut character is only shown as underlined if @code{%S} isn't used. @item %% Use this to put a @code{%} character within the text of an entry. @end table Please note that since @code{@ref{fl_popup_add_entries()}} is a variadic function (i.e.@: it takes a variable number of arguments) only very limited error checking is possible and thus it is of importance that the arguments passed to the function have exactly the required types! The return value of @code{@ref{fl_popup_add_entries()}} is a pointer to the first of the entries created. Since entries are stored as a linked list this value can be used to iterate over the list (see below for more information about the @code{@ref{FL_POPUP_ENTRY}} structure). If the function returns @code{NULL} no entries were created. A typical piece of code creating a popup may look like this: @example int save_cb(FL_POPUP_RETURN *result) @{ ... @} int main(int argc, char *argv[]) @{ FL_POPUP *popup; File *fp; ... popup = fl_popup_add(None, NULL); fl_popup_add_entries(popup, "Save%SCtrl+S%s%f%u|" "Quit%SEsc%s|" "%l|" "Work Offline%SCtrl+O%T%s", "^S", save_cb, (void *) fp, "^[", "^O"); ... @} @end example @noindent This creates a popup with three entries. The first one has the label @code{"Save"} shown at the left and @code{"Ctrl+S"} at the right can be selected by pressing @code{S}, in which case the function @code{save_cb()} will be invoked with a pointer to a structure that, beside other informations, contains the file pointer @code{fp}. The second entry has the labels @code{"Quit"} and @code{"Esc"} and it's shortcut key is set to @code{}. Below this entry a separator line is drawn, followed by the third entry with labels @code{"Work Offline"} and @code{"Ctrl+O"} and shortcut key @code{O}. This label is a "toggle" entry in "on" state, thus a check-marker is shown beside it. A few remarks about the callback routines. All have a type of @code{FL_POPUP_CB} as given by this @code{typedef}: @anchor{FL_POPUP_CB} @tindex FL_POPUP_CB @example typedef int (*FL_POPUP_CB)(FL_POPUP_RETURN *); @end example @noindent There are three kinds of callbacks, all with the same type. Whenever an item is entered (by moving the mouse on top of it or with the keyboard) its enter callback function is invoked (if one is set). Exceptions are entries that are disabled or hidden or entries, that just stand for separator lines. When an entry that can receive enter callbacks is left, its leave callback is invoked. Leave callbacks are not called when a selection has been made. Instead, only the selection callback for the selected entry is invoked. A "sub-popup entry", i.e.@: an entry that when entered results in a sub-popup to open, also can have an enter callback. Its leave callback is not called when the user moves the mouse onto the sub-popup but only once the sub-popup has been closed again and the mouse has been moved off the sub-popup entry. While enter and leave callback functions are defined to return an integer value, it's never used. But for the third kind of callback, invoked on selection of an entry, this isn't true. Instead, the callbacks return value is important: if it is @code{FL_IGNORE} (-1), the selection isn't reported back to the caller (and following callbacks also aren't called). This can be useful when the callback function already does everything required and nothing is left to be done. All callbacks receive a pointer to a structure of the type @code{FL_POPUP_RETURN}: @anchor{FL_POPUP_RETURN} @tindex FL_POPUP_RETURN @example typedef struct @{ long int val; /* value assigned to entry */ void *user_data; /* pointer to user data */ const char *text; /* text of selected popup entry */ const char *label; /* text drawn on left */ const char *accel; /* text drawn on right */ const FL_POPUP_ENTRY *entry; /* selected popup entry */ const FL_POPUP *popup; /* (sub-) popup it belongs to */ @} FL_POPUP_RETURN; @end example @code{val} is the value set by @code{"%x"}. If @code{"%x"} wasn't given, it's an automatically generated value: when a popup is created with @code{@ref{fl_popup_add_entries()}} a counter is initalized to 0. Whenever an entry gets added the value of the counter is assigned to the entry and then incremented. Unless a different value is set explicitely via @code{"%x"} the first entry added to a popup thus gets a value @code{val} of 0, the second one gets 1 etc. This even holds for entries that just stand for separator lines. In simple situations the value of @code{val} is probably sufficient to identify which entry got selected. Please note: it is possible that by setting the @code{val} members two or more structures for items of the same popup get the same value. It is the programmers responsibility to avoid that (unless, of course, that's just what you intended). The @code{user_data} member of the structure is the @code{user_void} pointer set via @code{"%u"}. It allows to pass more complex data to the callback function (or have returned on selection of an entry. The @code{text} member is exactly the string used to create the entry, including all the special sequences starting with @code{'%'}. @code{label} is what's left after all those sequences as well as backspace characters have been removed, tabs replaced by single spaces and the string is split at @code{"%S"}. I.e.@: it's exactly what's drawn left-flushed for the entry in the popup. @code{accel} is then what's left after clean-up and came after @code{"%S"}, i.e.@: it's what appears as the right-flushed text of the entry. Please note that one or more of these pointers could under some circumstances be @code{NULL}. Finally, the two member @code{entry} and @code{popup} are pointers to the entry itself and the popup the callback function is invoked for - to find out the popup the selected entry itself belongs to use the @code{popup} member of the entrys @code{@ref{FL_POPUP_ENTRY}} structure. Please note: while in a callback you are only allowed to change the values of the @code{val} and @code{user_data} members. This can be useful in the case of a cascade of selection callback calls since all the selection callbacks receive the same structure (and this is also the structure that finally gets passed back to the caller of @code{@ref{fl_popup_do()}}) at the end in order to implement more complex information interchange between the callbacks involved. The elements of a @code{FL_POPUP_ENTRY} structure that might be of interest) are @anchor{FL_POPUP_ENTRY} @tindex FL_POPUP_ENTRY @example typedef @{ FL_POPUP_ENTRY *prev; /* previous popup entry */ FL_POPUP_ENTRY *next; /* next popup entry */ int type; /* normal, toggle, radio, sub-popup, line*/ unsigned int state; /* disabled, hidden, checked */ int group; /* group (for radio entries only) */ FL_POPUP *sub; /* sub-popup bound to entry */ ... @} FL_POPUP_ENTRY; @end example @noindent Note that you should not change the members of a @code{@ref{FL_POPUP_ENTRY}} structure directly! Use the appropriate functions documented below to modify them instead. @code{prev} and @code{next} are pointers to the previous and the following popup entry (or @code{NULL} if none exists). @code{type} tells what kind of popup entry this is. There are five different types: @table @code @anchor{FL_POPUP_NORMAL} @tindex FL_POPUP_NORMAL @item FL_POPUP_NORMAL Normal popup entry with no special properties @anchor{FL_POPUP_TOGGLE} @tindex FL_POPUP_TOGGLE @item FL_POPUP_TOGGLE "Toggle" or "binary" entry, drawn with a check-mark to its left if in "on" state @anchor{FL_POPUP_RADIO} @tindex FL_POPUP_RADIO @item FL_POPUP_RADIO Radio entry, drawn with a circle to its left (color-filled when "on". The @code{group} member of the @code{@ref{FL_POPUP_ENTRY}} structure determines to which group the entry belongs. @anchor{FL_POPUP_SUB} @tindex FL_POPUP_SUB @item FL_POPUP_SUB Entry for a sub-popup. The @code{sub} member of its @ref{FL_POPUP_ENTRY} structure is a pointer to the sub-popup that gets shown when the mouse enters the entry. @anchor{FL_POPUP_LINE} @tindex FL_POPUP_LINE @item FL_POPUP_LINE Not a "real" entry, just indicates that a separator line is to be drawn between the previous and the next entry. @end table Finally, the @code{state} member can have the following values: @table @code @anchor{FL_POPUP_NONE} @tindex FL_POPUP_NONE @item FL_POPUP_NONE No special state is set for the entry, the default. @anchor{FL_POPUP_DISABLED} @tindex FL_POPUP_DISABLED @item FL_POPUP_DISABLED The entry is disabled, i.e.@: isn't selectable (and normally is drawn in a way to indicate this). @anchor{FL_POPUP_HIDDEN} @tindex FL_POPUP_HIDDEN @item FL_POPUP_HIDDEN The entry is not drawn at all (and thus can't be selected). @anchor{FL_POPUP_CHECKED} @tindex FL_POPUP_CHECKED @item FL_POPUP_CHECKED Only relevant for toggle and radio entries. Indicates that the state of a toggle entry is "on" (drawn with a check-marker) and for a radio entry that it is the one in "on" state of its group. @end table @noindent The state can be a combination of the above constants by using a bitwise OR. The more interesting members of a @code{FL_POPUP} structure are @tindex FL_POPUP @example typedef struct @{ FL_POPUP *next; /* previously created popup */ FL_POPUP *prev; /* later created popup */ FL_POPUP *parent; /* for sub-popups: direct parent */ FL_POPUP *top_parent; /* and top-most parent */ Window win; /* window of the popup */ FL_POPUP_ENTRY *entries; /* pointer to list of entries */ char *title; /* title string of the popup */ ... @} FL_POPUP; @end example @noindent Note again that you are not supposed to change the members of the structure. Like popup entries also popups are stored in a (doubly) linked list. Thus the @code{prev} and @code{next} members of the structure are pointers to popups created earlier or later. If a popup is a sub-popup of another popup then @code{parent} points to the next higher level popup (otherwise it's @code{NULL}). In case there's a cascade of popups the @code{top_parent} member points to the "root" popup (i.e.@: the top-level popup), while for popups that aren't sub-popups it always points back to the popup itself (in that case @code{parent} is @code{NULL}). @code{win} is the window created for the popup. It's @code{None} (0) while the popup isn't shown, so it can be used to check if the popup is currently visible. The @code{entries} member points to the first element of the list of entries of the popup. See the @code{@ref{FL_POPUP_ENTRY}} structure documented above on how to iterate over all entries. Finally, @code{title} is the title shown at the top of the popup (if one is set). Never try to change it directly, there's the function @code{@ref{fl_popup_set_title()}}, described below, for that. To remove a popup entry use @findex fl_popup_entry_delete() @anchor{fl_popup_entry_delete()} @example int fl_popup_entry_delete(FL_POPUP_ENTRY *entry); @end example @noindent The function return 0 on success and -1 if it failed for some reasons. Note that the function for a sub-popup entry also deletes the popup that was associated with the entry! You may also insert one or more entries into a popup at arbitrary places using @tindex fl_popup_insert_entries() @example FL_POPUP_ENTRY *fl_popup_insert_entries(FL_POPUP *popup, FL_POPUP_ENTRY *after, const char *entries, ...); @end example @noindent @code{popup} is the popup the entries are to be inserted in, @code{after} is the entry after which the new entries are to be added (use @code{NULL} if the new entries are to be inserted at the very first position), and @code{entries} is the same kind if string as already used in @code{@ref{fl_popup_add_entries()}}, including all the available special sequences. The arguments indicated by @code{...} have to be given according to the @code{entries} string. Finally, when you don't need a popup anymore simply call @tindex fl_popup_delete() @example int fl_popup_delete(FL_POPUP *popup); @end example @noindent The function returns 0 on success and -1 on failure. It's not possible to call the function while the popup is still visible on the screen. Calling it from any callback function is problematic unless you know for sure that the popup to be deleted (and sub-popups of it) won't be used later and thus normally should be avoided. Above was described how to first generate a popup and then populate it. But there's also a (though less general) method to create and populate a popup in a single function call. For this use @findex fl_popup_create() @anchor{fl_popup_create()} @example FL_POPUP *fl_popup_create(Window win, const char *title, FL_POPUP_ITEM *items); @end example @noindent The @code{win} and @code{title} arguments are the same as used in @code{@ref{fl_popup_add()}}, i.e.@: they are parent window for the popup (or @code{fl_root} or @code{None}) and the (optional, can be @code{NULL}) title for the popup. @code{items} is a pointer to an array of structures of the following form: @anchor{FL_POPUP_ITEM} @tindex FL_POPUP_ITEM @example typedef struct @{ const char *text; /* text of entry */ FL_POPUP_CB callback; /* (selection) callback */ const char *shortcut; /* keyboard shortcut description */ int type; /* type of entry */ int state; /* disabled, hidden, checked */ @} FL_POPUP_ITEM; @end example @noindent The array must contain one structure for each entry of the popup and must end in a structure where at least the @code{text} member is set to @code{NULL}. The @code{text} member describes the text of the entry. If it contains the string @code{"%S"} the text is split up at this position and the first part is used as the label drawn left-flushed for the entry and the second part for the right-flushed part (for showing accelerator keys etc.). Two more characters have a special meaning if they appear at the very start of the string (and which then do not become part of the label shown): @table @code @item '_' Draw a separator line above this entry. @item '/' This entry is a sub-popup entry and the following elements of the @code{items} array (until the first element with @code{text} set to @code{NULL} define the entries of the sub-popup. @end table @noindent Both @code{'_'} and @code{'/'} can appear at the start of the string, it doesn't matter which one comes first. The @code{callback} member is a function to be invoked when the entry is selected (irrelevant for sub-popup entries). @code{shortcut} is a string, encoding which keyboard shortcut keys can be used to select the item (@pxref{Shortcuts}, for details on how such a string has to be assembled). @code{type} describes the type of the entry and must be one of @code{@ref{FL_POPUP_NORMAL}}, @code{@ref{FL_POPUP_RADIO}} (all radio entries automatically belong to the same group (numbered @code{INT_MIN}). You can't use @code{@ref{FL_POPUP_LINE}} or @code{@ref{FL_POPUP_SUB}}. If you want a sub-popup entry use @code{@ref{FL_POPUP_NORMAL}} and set @code{'/'} as the first character of the @code{text} member of the structure. If you need a separator line put a @code{'_'} at the start of the @code{text} member string of the entry which comes after the separator line. Finally, the @code{state} member can be 0 or the bitwise or of @code{@ref{FL_POPUP_DISABLED}}, @code{@ref{FL_POPUP_HIDDEN}} and @code{@ref{FL_POPUP_CHECKED}}. The first one makes the entry appear disabled and non-selectable, the second will keep the entry from being drawn at all, and the third one puts the entry into "on" state (relevant for toggle and radio entries only). If you try to set @code{@ref{FL_POPUP_CHECKED}} for more than a single radio entry the last one you set if for "wins", i.e.@: only this one will be in "on" state. See below for a more detailed discussion of these entry properties. @code{@ref{fl_popup_create()}} does not allow to associate values or pointers to user data to individual entries, set titles for sub-popups, have radio entries belong to different groups or set enter or leave callback functions (though there exist a number of functions to remedy the situation in case such things are needed). The function returns a pointer to the newly created popup (or @code{NULL} on failure). You are guaranteed that each entry has been assigned a unique value, starting at 0 and which is identical to the index of corresponding element in the @code{items} array, i.e.@: the first element results in an entry assigned 0, the second entry gets 1 etc. All functions working on popups or entries can, of course, be used on popups and their entries generated via @code{@ref{fl_popup_create()}}. They can be employed to remedy some of the limitations imposed by the simpler popup creation API. Here's an example of how to create a popup using @code{fl_popup_create()}: @example FL_POPUP *popup; FL_POPUP_ITEMS items[] = @{ @{"Item 1%S^1", NULL, "^1", FL_POPUP_NORMAL, FL_POPUP_NONE @}, @{"Item 2%S^2", NULL, "^2", FL_POPUP_RADIO, FL_POPUP_CHECKED @}, @{"Item 3%S^3", NULL, "^3", FL_POPUP_RADIO, FL_POPUP_NONE @}, @{"_/Item 4", NULL, NULL, FL_POPUP_NORMAL, FL_POPUP_NONE @}, @{"Sub-item A", cbA, "^A", FL_POPUP_NORMAL, FL_POPUP_DISABLED@}, @{"Sub-item B", cbB, "^B", FL_POPUP_TOGGLE, FL_POPUP_NONE @}, @{NULL, NULL, NULL, 0, 0 @}, @{"Item 5", NULL, NULL, FL_POPUP_NORMAL, FL_POPUP_NONE @}, @{NULL, NULL, NULL, 0, FL_POPUP_NONE @} @}; popup = fl_popup_create(None, "Test", items); @end example @noindent This creates a new popup with the title @code{"Test"} and 5 entries as well as a a sub-popup with two entries, that gets opened when the mouse is over the entry labeled @code{"Item 4"}. The first entry in the main popup has the label @code{"Item 1"} on the left and @code{"^1"} of the right side. It has no callback routine and can be selected via the @code{1} shortcut. It's just a normal menu entry. The second entry has the label @code{"Item 2"} on the left and @code{"^2"} of the right side, also no callack and @code{2} as its keyboard shortcut. It's a radio entry that is in "on" state. The third entry is like the second, labels are @code{"Item 3"} and @code{"^3"} and it reacts to @code{3}, except that it's in "off" state. The second and third label belong to the same group (with the group number set to @code{INT_MIN}), i.e.@: when the third entry gets selected the second one gets switched to "off" state (and vice versa). Before the fourth entry a separator line will be drawn (that's the effect of its text starting with @code{'_'}. It's a sub-popup entry (due to the @code{'/'} at the start of its text). It's label is simply @code{"Item 4"} and no right hand label (but that isn't supposed to indicate that sub-entries couldn't have shortcuts!). It has no selection callback (which wouldn't sense make sense for a sub-popup entry anyway). The following three elements of the @code{items} array are for the sub-popup that gets opened when the mouse is over the fourth item of the main popup. In the sub-popup we first have an normal entry with label @code{"Sub-item A"}. The function @code{cbA()} will be called when this entry of the sub-popup is selected. Then we have a second entry, labled @code{"Sub-item B"}, which is a currently disabled toggle entry in "off" state. If it weren't disabled its selection would result in the callback function @code{cbB()} getting called. The next element of the @code{items} array, having @code{NULL} as its @code{text} member, signifies the end of the sub-popup. Now that we're done with the sub-popup another entry in the main popup follows, a normal entry with just a left-label of @code{Item 5}. The final element of @code{items}, where @code{text} is set to @code{NULL} then signifies that this is the end of the popup. As there are functions to append to and insert entries into a popup with a kind of format string, followed by a variable list of arguments, there are also functions for adding and inserting entries using an array of @code{@ref{FL_POPUP_ITEM}}. These are @anchor{fl_popup_add_items()} @findex fl_popup_add_items() @anchor{fl_popup_insert_items()} @findex fl_popup_insert_items() @example FL_POPUP_ENTRY *fl_popup_add_items(FL_POPUP *popup, FL_POPUP_ITEM *items); FL_POPUP_ENTRY *fl_popup_insert_items(FL_POPUP *popup, FL_POPUP_ENTRY *after, FL_POPUP_ITEM *items); @end example @noindent Both functions return the address of the first entry created on success and @code{NULL} on error. The first argument is the popup the entries are to be appended to or inserted into, the last argument the array of items (as in the case of @code{@ref{fl_popup_create()}} at least the @code{text} member of the last element must be a @code{NULL} pointer to indicate the end). @code{fl_popup_insert_items()} takes another argument, @code{after}, the entry after which the new entries are to be inserted (if called with @code{after} set to @code{NULL} the new entries are inserted at the very start of the popup). @node Popup Interaction @section Popup Interaction A popup will be drawn on the screen when the function @tindex fl_popup_do() @anchor{fl_popup_do()} @example FL_POPUP_RETURN *fl_popup_do(FL_POPUP *popup); @end example @noindent is called. It only returns when the user either selects an entry or closes it in some other way (e.g.@: by clicking outside the popup's area). When a selection was made the function returns a pointer to a @code{@ref{FL_POPUP_RETURN}} structure with information about the entry that was selected (please note that the structure is internal storage belonging to the Forms Library and is re-used when the popup is shown again, so copy out all data you may need to keep). If no selection was made (or one of the invoked callback routines returned a value of @code{FL_IGNORE} (-1) @code{NULL} is returned. While the popup is shown the user can interact with the popup using the mouse or the keyboard. When the mouse is hovering over a selectable entry of the popup the entry is highlighted, when the mouse reaches an entry for a sub-popup, the associated sub-popup automatically gets opened. A selection is made by clicking on an entry (or, in case that the popup was opened while a mouse button was pressed down, when the mouse button is released). Clicking outside the popups window (or, depending on the "policy", see below, releasing the mouse button somewhere else than over a selectable item) closes the popup without a selection being made. Popups also can be controlled via the keyboard. First of all, on pressing a key, the shortcuts set for items are evaluated and, if a match is found, the corresponding entry is returned as selected (if the popup currently shown is a sub-popup, first the shortcuts for this sub-popup are checked, then those of its parent etc.@: until the top-most popup has been reached and checked for). The user can also navigate through the selectable entires using the @code{} and @code{} arrow keys and open and close sub-popups with the @code{} and @code{} cursor keys. Pressing the @code{} key highlights the first (selectable) entry in the popup, @code{} the last one. By using the @code{} key (or @code{} if available) the currently shown popup is closed (if an entry in a sub-popup was highlighted just this sub-popup is closed). Finally, pressing @code{} while on a selectable entry results in this entry being reported as selected. Once the user has selected an entry its callback function is invoked with a @code{@ref{FL_POPUP_RETURN}} structure as the argument. When this function returns, the callback for the popup the entry belongs to is called with exactly the same structure. If the popup is a sub-popup, next the callback for its "parent" popup is invoked, again with the same structure (except that the @code{popup} member is changed each time to indicate which popup the call is made for). Repeat until the callback for the top-most popup has been called. Finally the structure used in all those callback invocations is returned from @code{@ref{fl_popup_do()}}. This chain of callback calls is interrupted when one of the callbacks returns a value of @code{FL_IGNORE} (-1). In that case no further callbacks are invoked and @code{@ref{fl_popup_do()}} returns @code{NULL}, i.e.@: from the callers perspective it looks as if no selection has been made. This can be useful when one of the callbacks was already was able to do all the work required on a selection. Per default a popup stays open when the user releases the mouse button anywhere else than on a selectable entry. It only gets closed when the user either selects an entry or clicks somewhere outside of the popup area. An alternative is a "drag-down" popup that gets closed whenever the mouse button is released, even if the mouse isn't on the area of the popup or a selectable entry. To achieve this effect you can change the "policy" using the function @findex fl_popup_set_policy() @anchor{fl_popup_set_policy()} @example int fl_popup_set_policy(FL_POPUP *popup, int policy); @end example @noindent There are two values @code{policy} can have: @table @code @anchor{FL_POPUP_NORMAL_SELECT} @tindex FL_POPUP_NORMAL_SELECT @item FL_POPUP_NORMAL_SELECT Default, popup stays open until mouse button is released on a selectable entry or button is clicked outside the popups area. @anchor{FL_POPUP_DRAG_SELECT} @tindex FL_POPUP_DRAG_SELECT @item FL_POPUP_DRAG_SELECT Popup is closed when the mouse button is released anywhere. @end table @noindent The function can be called with either a (valid) popup address, in which case the policy for that popup is changed, or with a @code{NULL} pointer to change the default setting of the policy, used in the creation of new popups. The function returns the previous policy value or -1 on errors. It's also possible to determine the policy setting by using @findex fl_popup_get_policy() @anchor{fl_popup_get_policy()} @example int fl_popup_get_policy(Fl_POPUP *popup); @end example If called with the address of a (valid) popup the policy for this popup (or its parent if one exists) gets returned. If called with a @code{NULL} pointer the default policy used in creating new popups is returned. On error -1gets returned. Calling the function with @code{NULL} as the @code{popup} argument changes the default setting for the popups created afterwards. If the popup is partially off-screen the user can push the mouse at the screen borders in the direction of the currently invisible popup entries. This results in the popups window getting moved so that previosuly invisible entries become accessible. The popup window gets shifted vertically in single entry steps, in horizontal direction by a tenth of the screen width. The delay between shifts is about @w{100 ms}. @node Other Popup Routines @section Other Popup Routines When @code{@ref{fl_popup_do()}} is called the popup per default is shown with its left upper corner at the mouse position (unless the popup wouldn't fit onto the screen). Using @findex fl_popup_set_position() @anchor{fl_popup_set_position()} @example void fl_popup_set_position(FL_POPUP *popup, int x, int y); @end example @noindent the position where the popup is drawn can be changed (but if it wouldn't fit onto the screen at that position it will also changed automatically). @code{x} and @code{y}. to be given relative to the root window, define the position of the upper left hand corner. Using this function for sub-popups is useless, they always get opened as near as possible to the corresponding sub-popup entry. When setting the position of a popup it can be useful to know the exact sizes of its window in advance. These can be obtained by calling @findex fl_popup_get_size() @anchor{fl_popup_get_size()} @example int fl_popup_get_size(FL_POPUP *popup, unsigned int *w, unsigned int *h); @end example @noindent The function returns 0 on success and -1 on error (in case the supplied @code{popup} argument isn't valid). Please note that the reported values are only valid until the popup is changed, e.g.@: by adding, deleting or changing entries or changing the appearance of the popup. A callback function @code{cb()} of type @code{@ref{FL_POPUP_CB}}, to be called when a entry (or an entry of a sub-popup) is selected, can be associated with a popup (or changed) using @findex fl_popup_set_callback() @anchor{fl_popup_set_callback()} @example typedef int (*FL_POPUP_CB)(FL_POPUP_RETURN *); FL_POPUP_CB fl_popup_set_callback(FL_POPUP *popup, FL_POPUP_CB cb); @end example @noindent The function returns the old setting of the callback routine (on error @code{NULL} is returned, which may indistinguishable from the case that no callback was set before). For an entry all three associated callback functions can be set via @findex fl_popup_entry_set_callback() @anchor{fl_popup_entry_set_callback()} @findex fl_popup_entry_set_enter_callback() @anchor{fl_popup_entry_set_enter_callback()} @findex fl_popup_entry_set_leave_callback() @anchor{fl_popup_entry_set_leave_callback()} @example FL_POPUP_CB fl_popup_entry_set_callback(FL_POPUP_ENTRY *entry, FL_POPUP_CB cb); FL_POPUP_CB fl_popup_entry_set_enter_callback(FL_POPUP_ENTRY *entry, FL_POPUP_CB enter_cb) FL_POPUP_CB fl_popup_entry_set_leave_callback(FL_POPUP_ENTRY *entry, FL_POPUP_CB leave_cb); @end example @noindent The first function sets the callback invoked when the entry is selected, the second when the mouse enters the area of the entry and the third, when the mouse leaves that area. All function return the previously set callback or @code{NULL} when none was set or an error occured. @code{NULL} also gets returned on errors. There are three properties that can be set for a popup entry @table @code @tindex FL_POPUP_DISABLED @item FL_POPUP_DISABLED The entry is is shown as disabled and can't be selected. @tindex FL_POPUP_HIDDEN @item FL_POPUP_HIDDEN The entry is not shown when the popup is opened. @tindex FL_POPUP_CHECKED @item FL_POPUP_CHECKED Relevant only for toggle and redio entries. When set beside the label of a toggle entry a check-marker is drawn while the circle beside a radio button is drawn colored. @end table @noindent The "state" of an entry is the binary OR of these values which can be set and queried using the functions @findex fl_popup_entry_set_state() @anchor{fl_popup_entry_set_state()} @findex fl_popup_entry_get_state() @anchor{fl_popup_entry_get_state()} @example unsigned int fl_popup_entry_set_state(FL_POPUP_ENTRY *entry, unsigned int state); unsigned int fl_popup_entry_get_state(FL_POPUP_ENTRY *entry); @end example @noindent @code{@ref{fl_popup_entry_set_state()}} returns the previous state on success and @code{UINT_MAX} (a value with all bits set) on failure. Note that when setting @code{@ref{FL_POPUP_CHECKED}} for a radio entry all other radio entries belonging to the same group automatically lose their "on" (checked) property. There are also three convenience function for clearing, raising and toggling bits in the state of an entry. Normally to clear a certain bit of the state you have to first call @code{@ref{fl_popup_entry_get_state()}}, then clear the bit in the return value and finally call @code{@ref{fl_popup_entry_set_state()}} with the result to set the new state. Use of these convenience functions allows to change state bits in a single call. @findex fl_popup_entry_clear_state() @anchor{fl_popup_entry_clear_state()} @findex fl_popup_raise_clear_state() @anchor{fl_popup_raise_clear_state()} @findex fl_popup_toggle_clear_state() @anchor{fl_popup_toggle_clear_state()} @example unsigned int fl_popup_entry_clear_state(FL_POPUP_ENTRY *entry, unsigned int what); unsigned int fl_popup_entry_raise_state(FL_POPUP_ENTRY *entry, unsigned int what); unsigned int fl_popup_entry_toggle_state(FL_POPUP_ENTRY *entry, unsigned int what); @end example The @code{what} argument can be any value resulting from a bitwise OR of @code{@ref{FL_POPUP_DISABLED}}, @code{@ref{FL_POPUP_HIDDEN}} and @code{@ref{FL_POPUP_CHECKED}} (thus you can clear, set or toggle one or more bits of the state in a single call). The functions all return the original value of the state. You may search for an entry in a popup by different criteria (please note that the search also includes sub-popups of the popup, you can identify them by checking the @code{popup} member of the @ref{FL_POPUP_ENTRY} structure). The search obviously will only deliver reasonable results if what you're searching for is unique between all the entries. First, you can ask for the entry that had been created with a certain text, including all the special sequences, by calling @findex fl_popup_entry_get_by_text() @anchor{fl_popup_entry_get_by_text()} @example FL_POPUP_ENTRY *fl_popup_entry_get_by_text(FL_POPUP *popup, const char *text); @end example @noindent The function returns either a pointer to the entry found or @code{NULL} on failure (because either no entry with this text was found or the popup doesn't exist). You may as well search by the left-flushed label parts of the entries as shown on the screen (note that tab characters @code{'\t'} originally embedded in the text used when creating the label have been replaced by single spaces and backspace characters @code{'\b'} were removed as well as all special sequences) @findex fl_popup_entry_get_by_label() @anchor{fl_popup_entry_get_by_label()} @example FL_POPUP_ENTRY *fl_popup_entry_get_by_label(FL_POPUP *popup, const char *label); @end example @noindent Thus, since an entry created via a string like @code{"I\bt%Tem\t1%SCtrl+X"} will shown with a left-flushed label part of @code{"Item 1"}, this will found when searching with this string. Another way to search for an entry is by its value as either specified via the @code{"%x"} special sequence or assigned automatically by @findex fl_popup_entry_get_by_value() @anchor{fl_popup_entry_get_by_value()} @example FL_POPUP_ENTRY *fl_popup_entry_get_by_value(FL_POPUP *popup, long value); @end example Also the @code{user_data} pointer associated with the entry can be used as the search criterion: @findex fl_popup_entry_get_by_user_data() @anchor{fl_popup_entry_get_by_user_data()} @example FL_POPUP_ENTRY *fl_popup_entry_get_by_user_data(FL_POPUP *popup, void *user_data); @end example Finally one can try to find an entry by its current position in the popup (note that here sub-popups aren't taken into consideration since that would make the meaning of "position" rather hard to define) by @findex fl_popup_entry_get_by_position() @anchor{fl_popup_entry_get_by_position()} @example FL_POPUP_ENTRY *fl_popup_entry_get_by_position(FL_POPUP *popup, long position); @end example @noindent where @code{posistion} is starting with 0, so when called with 0 the first entry will be returned, when called with 1 you get the second entry etc. Note that separator lines aren't counted but entries currently being hidden are. @node Popup Attributes @section Popup Attributes Using @findex fl_popup_set_title() @anchor{fl_popup_set_title()} @findex fl_popup_get_title() @anchor{fl_popup_get_title()} @example void fl_popup_set_title(FL_POPUP *popup, const char *title); const char *fl_popup_set_title(FL_POPUP *popup); @end example @noindent the title of a popup can be changed or the currently set title determined. To query or set the font the popups title is drawn in use @findex fl_popup_get_title_font() @anchor{fl_popup_get_title_font()} @findex fl_popup_set_title_font() @anchor{fl_popup_set_title_font()} @example void fl_popup_get_title_font(FL_POPUP *popup, int *size, int *style); void fl_popup_set_title_font(FL_POPUP *popup, int size, int style); @end example @noindent @xref{Label Attributes and Fonts}, for details about the sizes and styles that should be used. The default size and style are @code{@ref{FL_NORMAL_SIZE}} and @code{@ref{FL_EMBOSSED_STYLE}}. This setting also applies to sub-popups of the popup, thus setting a title font for sub-popups is useless. When called with the @code{popup} argument set to @code{NULL} the default settings for popups generated later are returned or set. Also the font for the entries of a popup can be queried or and set via @findex fl_popup_entry_set_font() @anchor{fl_popup_entry_set_font()} @example void fl_popup_entry_get_font(FL_POPUP *popup, int *style, int *size); void fl_popup_entry_set_font(FL_POPUP *popup, int style, int size); @end example @noindent The defalt size is @code{@ref{FL_NORMAL_SIZE}} and the default style is @code{@ref{FL_NORMAL_STYLE}}. Again, the returned or set values also apply to all sub-popups, so calling the function for sub-popups doesn't make sense. When called with @code{popup} set to @code{NULL} the default settings for popups are returned or changed. The width of a popup is calculated using the widths of the title and the entries. You can influence this width by setting a minimum width a popup should have. There are two functions for the minimum width: @findex fl_popup_get_min_width() @anchor{fl_popup_get_min_width()} @findex fl_popup_set_min_width() @anchor{fl_popup_set_min_width()} @example int fl_popup_get_min_width(FL_POPUP *popup); int fl_popup_set_min_width(FL_POPUP *popup, int min_width); @end example @noindent The first one returns the currently set minimum width (a negative return value indicates an error). The second allows sets a new minimum width. Setting the minimum width to 0 or a negative value switches the use of the minimum width off. It returns the previous value (or a negative value on error). You can query or set the border width popups are drawn width (per default it's set to @code{1}). To this purpose call @findex fl_popup_get_bw() @anchor{fl_popup_get_bw()} @findex fl_popup_set_bw() @anchor{fl_popup_set_bw()} @example int fl_popup_get_bw(FL_POPUP *popup); int fl_popup_set_bw(FL_POPUP *popup, int bw); @end example @noindent Please note that the border width setting is automatically applied also to sub-popups, so there's no good reason to call these functions for sub-popups. The default border width is the same as that for objects. The functions can also be called with @code{popup} set to @code{NULL} in which case the default setting for the border width is returned or set, respectively. To change the cursor that is displayed when a popup is shown use @findex fl_popup_set_cursor() @anchor{fl_popup_set_cursor()} @example void fl_popup_set_cursor(FL_POPUP *popup, int cursor_name); @end example @noindent Use one of the symbolic cursor names (shapes) defined by standard X or the integer value returned by @code{@ref{fl_create_bitmap_cursor()}} or one of the Forms Library's pre-defined symbolic names for the @code{cursor_name} argument. Per default the cursor named @code{"XC_sb_right_arrow"} is used. If the function is called with @code{popup} set to @code{NULL} the default cursor for popups generated afterwards is changed. There are several colors used in drawing a popup. These can be set or queried with the functions @findex fl_popup_set_color() @anchor{fl_popup_set_color()} @findex fl_popup_get_color() @anchor{fl_popup_get_color()} @example FL_COLOR fl_popup_set_color(FL_POPUP *popup, int type, FL_COLOR color); FL_COLOR fl_popup_get_color(FL_POPUP *popup, int type); @end example @noindent where @code{type} can be one of the following values: @table @code @anchor{FL_POPUP_BACKGROUND_COLOR} @tindex FL_POPUP_BACKGROUND_COLOR @item FL_POPUP_BACKGROUND_COLOR Background color of the popup, default is @code{FL_MCOL}. @anchor{FL_POPUP_HIGHLIGHT_COLOR} @tindex FL_POPUP_HIGHLIGHT_COLOR @item FL_POPUP_HIGHLIGHT_COLOR Backgroud color an entry is drawn with when it's selectable and the mouse is on top of it, default is @code{FL_BOTTOM_BCOL}. @anchor{FL_POPUP_TITLE_COLOR} @tindex FL_POPUP_TITLE_COLOR @item FL_POPUP_TITLE_COLOR Color used for the title text of a popup, default is @code{FL_BLACK}. @anchor{FL_POPUP_TEXT_COLOR} @tindex FL_POPUP_TEXT_COLOR @item FL_POPUP_TEXT_COLOR Color normal used for entry texts, default is @code{FL_BLACK}. @anchor{FL_POPUP_HIGHLIGHT_TEXT_COLOR} @tindex FL_POPUP_HIGHLIGHT_TEXT_COLOR @item FL_POPUP_HIGHLIGHT_TEXT_COLOR Color of the entry text when it's selectable and the mouse is on top of it, default is @code{FL_WHITE}. @anchor{FL_POPUP_DISABLED_TEXT_COLOR} @tindex FL_POPUP_DISABLED_TEXT_COLOR @item FL_POPUP_DISABLED_TEXT_COLOR Color for drawing the text of disabled entries, default is @code{FL_INACTIVE_COL}. @anchor{FL_POPUP_RADIO_COLOR} @tindex FL_POPUP_RADIO_COLOR @item FL_POPUP_RADIO_COLOR Color the circle drawn for radio entris in "on" state is drawn in. @end table When setting a new color the color previously used is returned by @code{@ref{fl_popup_set_color()}}. Calling these functions for sub-popups doesn't make sense since sub-popups are always drawn in the colors set for the parent popup. When called with @code{popup} set to @code{NULL} the functions return or set the default colors of popups created afterwards. To change the text of a popup entry call @findex fl_popup_entry_set_text() @anchor{fl_popup_entry_set_text()} @example int fl_popup_entry_set_text(FL_POPUP_ENTRY *entry, const char *text); @end example @noindent Please note that in the text no special sequences except @code{"%S"} (at which place the text is split to make up the left- and right-flushed part of the label drawn) are recognized. The shortcut keys for a popup label can be changed using @findex fl_popup_entry_set_shortcut() @anchor{fl_popup_entry_set_shortcut()} @example void fl_popup_entry_set_shortcut(FL_POPUP_ENTRY *entry, const char *shortcuts); @end example @noindent @xref{Shortcuts}, for details on how such a string has to look like. The value assigned to a popup entry can be changed via @findex fl_popup_entry_set_value() @anchor{fl_popup_entry_set_value()} @example long fl_popup_entry_set_value(FL_POPUP_ENTRY *entry, long value); @end example @noindent The function returns the previous value. Also the user data pointer associated with a popup entry can be modified by calling @findex fl_popup_entry_set_user_data() @anchor{fl_popup_entry_set_user_data()} @example void *fl_popup_entry_set_user_data(FL_POPUP_ENTRY *entry, void *user_data); @end example @noindent The function returns the previous setting of @code{user_data}. To determine to which group a radio entry belongs call @findex fl_popup_entry_get_group() @anchor{fl_popup_entry_get_group()} @example int fl_popup_entry_get_group(FL_POPUP_ENTRY *entry); @end example @noindent Obviously, this function only makes much sense when applied to radio entries. It returns the group number on success and @code{INT_MAX} on failure (that's why @code{INT_MAX} shouldn't be used for group numbers). To assign a radio entry to a different group call @findex fl_popup_entry_set_group() @anchor{fl_popup_entry_set_group()} @example int fl_popup_entry_set_group(FL_POPUP_ENTRY *entry, int group); @end example @noindent Again, for obvious reasons, the function should normally only be called for radio entries. It returns the previous group number on success and @code{INT_MAX} on failure. If one of the entries of the new group was in "on" state the entries state will be reset to "off" if necessary. For entries other than radio entries the group isn't used at all. So, theoretically, it could be used to store a bit of additional information. If that would be good programming practice is another question... Finally, the sub-popup associated with a sub-popup-entry can be queried or changed using the functions @findex fl_popup_entry_get_subpopup() @anchor{fl_popup_entry_get_subpopup()} @findex fl_popup_entry_set_subpopup() @anchor{fl_popup_entry_set_subpopup()} @example FL_POPUP *fl_popup_entry_get_subpopup(FL_POPUP_ENTRY *entry); FL_POPUP *fl_popup_entry_get_subpopup(FL_POPUP_ENTRY *entry, FL_POPUP *subpopup); @end example @noindent Obviously, calling these functions only makes sense for sub-popup entries. @code{@ref{fl_popup_entry_get_subpopup()}} returns the address of the sub-popup associated with the entry or @code{NULL} on failure. To change the sub-popup of an entry a valid sub-popup must be passed to @code{@ref{fl_popup_entry_set_subpopup()}}, i.e.@: the sub-popup must not already be a sub-popup of another entry or the popup the entry belongs to itself. You also can't set a new sub-popup while the old sub-popup associated with the entry or the popup to become the new sub-popup is shown. On success the address of the new sub-popup is returned, on failure @code{NULL}. Note that this function deletes the old sub-popup that was associated with the popup. xforms-1.0.93sp1/doc/Makefile.in0000644000175000017500000005306011377311601015044 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am $(xforms_TEXINFOS) subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/xforms.info TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/config DVIS = xforms.dvi PDFS = xforms.pdf PSS = xforms.ps HTMLS = xforms.html TEXINFOS = xforms.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D info_TEXINFOS = xforms.texi xforms_TEXINFOS = part0_preface.texi \ part1.texi \ part1_defining_forms.texi \ part1_doing_interaction.texi \ part1_free_objects.texi \ part1_getting_started.texi \ part1_goodies.texi \ part1_introduction.texi \ part2.texi \ part2_command_line.texi \ part2_creating_forms.texi \ part2_generating_hardcopies.texi \ part2_getting_started.texi \ part2_introduction.texi \ part2_language_filters.texi \ part2_saving_loading.texi \ part3.texi \ part3_buttons.texi \ part3_choice_objects.texi \ part3_container_objects.texi \ part3_deprecated_objects.texi \ part3_input_objects.texi \ part3_introduction.texi \ part3_other_objects.texi \ part3_popups.texi \ part3_static_objects.texi \ part3_valuator_objects.texi \ part4.texi \ part4_an_example.texi \ part4_drawing_objects.texi \ part4_events.texi \ part4_fl_object.texi \ part4_global_structure.texi \ part4_introduction.texi \ part4_new_buttons.texi \ part4_preemptive_handler.texi \ part5_dirty_tricks.texi \ part5_overview.texi \ part5_resources.texi \ part5.texi \ part5_trouble_shooting.texi \ part5_useful_functions.texi \ part6.texi \ part6_images.texi all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $< $(srcdir)/xforms.info: xforms.texi $(xforms_TEXINFOS) xforms.dvi: xforms.texi $(xforms_TEXINFOS) xforms.pdf: xforms.texi $(xforms_TEXINFOS) xforms.html: xforms.texi $(xforms_TEXINFOS) .dvi.ps: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf xforms.aux xforms.cp xforms.cps xforms.fn xforms.fns xforms.ky \ xforms.kys xforms.log xforms.pg xforms.pgs xforms.tmp \ xforms.toc xforms.tp xforms.tps xforms.vr xforms.vrs clean-aminfo: -test -z "xforms.dvi xforms.pdf xforms.ps xforms.html" \ || rm -rf xforms.dvi xforms.pdf xforms.ps xforms.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) installdirs: for dir in "$(DESTDIR)$(infodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-aminfo clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d$$p"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ clean-libtool clean-local dist-info distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \ uninstall-html-am uninstall-info-am uninstall-pdf-am \ uninstall-ps-am .texi.html: texi2html --init-file xforms.init xforms.texi /bin/mkdir -p xforms.html mv index.html xforms_*.html xforms.html cp -r images xforms.html clean-local: -rm -r xforms.info* xforms.pdf xforms.html *~ install-html: /bin/mkdir -p $(htmldir)/xforms.html /bin/mkdir -p $(htmldir)/xforms.html/images /usr/bin/install -c -m 644 xforms.html/*.html $(htmldir)/xforms.html /usr/bin/install -c -m 644 images/*.png $(htmldir)/xforms.html/images # 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: xforms-1.0.93sp1/doc/part4_fl_object.texi0000644000175000017500000004375311376032003016736 0ustar jensjens@node Part IV The Type FL_OBJECT @chapter The Type @code{FL_OBJECT} Each object has a number of attributes. Some of them are used by the main routine, some have a fixed meaning and should never be altered by the class routines and some are free for the class routines to use. Please always use accessor methods when available instead of using or changing the object's properties directly. Below we consider some of them that are likely to be used in new classes. @table @code @item int objclass This indicates the class of the object (e.g.@: @code{FL_BUTTON}, @code{FL_SLIDER}, @code{FL_NEW} etc.) The user can query the class of an object using the function @code{@ref{fl_get_object_objclass()}}. @item int type This indicates the type of the object within the class. Types are integer constants that should be defined in a header file named after the object class, e.g.@: @file{NEW.h}. Their use is completely free. For example, in the slider class the type is used to distinguish between horizontal and vertical sliders. At least one type should exist and the user should always provide it (just for consistency). They should be numbered from 0 upwards. The user can query the type of an object using the function @code{@ref{fl_get_object_type()}}. @item int boxtype This is the type of the bounding box for the object. The handling routine for the object, e.g.@: @code{handle_NEW()}, has to take care that this is actually drawn. Note that there is a routine for drawing boxes, see below. The user can change or query the boxtype of an object with the functions @code{@ref{fl_set_object_boxtype()}} and @code{@ref{fl_get_object_boxtype()}}. @item FL_Coord x, y, w, h These are the coordinates and sizes that indicate the bounding box of the object. They always have to be provided when adding an object. The system uses them e.g.@: to determine if the object is below the mouse. The class routines should use them to draw the object in the correct size, etc. Note that these values will change when the user resizes the form window. So never assume anything about their values but always recheck them when drawing the object. The routines @code{@ref{fl_get_object_geometry()}}, @code{@ref{fl_get_object_position()}} and @code{@ref{fl_get_object_size()}} should be used to determine position and/or size. To change the position and/or size of an object never change the elements of the structures directly (except in a function like @code{fl_add_NEW()}) but always use @code{@ref{fl_set_object_geometry()}}, @code{@ref{fl_set_object_position()}} and @code{@ref{fl_set_object_size()}}! @item unsigned int resize Controls if the object should be resized if the form it is on is resized. The options are @code{FL_RESIZE_NONE}, @code{FL_RESIZE_X}, @code{FL_RESIZE_Y} and @code{FL_RESIZE_ALL}. The default is @code{FL_RESIZE_ALL} which is the bitwise OR of @code{FL_RESIZE_X} and @code{FL_RESIZE_Y}. Instead of accessing this element directly better use the functions @code{@ref{fl_get_object_resize()}} and @code{@ref{fl_set_object_resize()}}. @item unsigned int nwgravity, segravity These two variables control how the object is placed relative to its position prior to resizing. Instead of accessing these elements directly use @code{@ref{fl_get_object_gravity()}} and @code{@ref{fl_set_object_gravity()}}. @item FL_COLOR col1, col2 These are two color indices in the internal color lookup table. The class routines are free to use them or not. The user can change them using the routine @code{@ref{fl_set_object_color()}} or inspect the colors with @code{@ref{fl_get_object_color()}}. The routine @code{fl_add_NEW()} should fill in defaults. @item char *label This is a pointer to a text string. This can be used by class routines to provide a label for the object. The class routines may not forget to allocate storage for it when it sets the pointer itself, i.e.@: doesn't use @code{@ref{fl_set_object_label()}} - an empty label should be the empty string and not just a @code{NULL} pointer. The user can change it using the routine @code{@ref{fl_set_object_label()}} or ask for it using @code{@ref{fl_get_object_label()}}. The label must be drawn by the routine handling the object when it receives a @code{FL_DRAWLABEL} event (or it could be part of the code for @code{FL_DRAW} event). For non-offsetted labels, i.e.@: the alignment is relative to the entire bounding box, simply calling @code{@ref{fl_draw_object_label()}} should be enough. @item FL_COLOR lcol The color of the label. The class routines can freely use this. The user can set it with @code{@ref{fl_set_object_lcol()}} and test it with @code{@ref{fl_get_object_lcol()}}. @item int lsize The size of the font used to draw the label. The class routines can freely use this. The user can set it with @code{@ref{fl_set_object_lsize()}}. and test it with @code{@ref{fl_get_object_lsize()}}. @item int lstyle The style of the font the label os drawn in, i.e.@: the number of the font in which it should be drawn. The class routines can freely use this. The user can set it with @code{@ref{fl_set_object_lstyle()}} and test it with @code{@ref{fl_get_object_lstyle()}}. @item int align The alignment of the label with respect to the object. Again it is up to the class routines to do something useful with this. The possible values are @code{@ref{FL_ALIGN_LEFT}}, @code{@ref{FL_ALIGN_RIGHT}}, @code{@ref{FL_ALIGN_TOP}}, @code{@ref{FL_ALIGN_BOTTOM}}, @code{@ref{FL_ALIGN_CENTER}}, @code{@ref{FL_ALIGN_LEFT_TOP}}, @code{@ref{FL_ALIGN_RIGHT_TOP}}, @code{@ref{FL_ALIGN_LEFT_BOTTOM}} and @code{@ref{FL_ALIGN_RIGHT_BOTTOM}}. The value should be bitwise ORed with @code{@ref{FL_ALIGN_INSIDE}} if the label will be within the bounding box of the object. The user can set this using the routine @code{@ref{fl_set_object_lalign()}} and test it with @code{@ref{fl_set_object_lalign()}}. @item int bw An integer indicating the border width of the object. Negative values indicate the up box should look "softer" (in which case no black line of 1 pixel width is drawn around the objects box). The user can set a different border width using @code{@ref{fl_set_object_bw()}}. @item long *shortcut A pointer to long containing all shortcuts (as keysyms) defined for the object (also see the previous chapter). You should never need them because they are fully handled by the main routines. @item void *spec This is a pointer that points to any class specific information. For example, for sliders it stores the minimum, maximum and current value of the slider. Most classes (except the most simple ones like boxes and texts) will need this. The function for adding a new object (@code{fl_add_NEW()}) has to allocate storage for it. Whenever the object receives the event @code{FL_FREEMEM} it should free this memory. @item int visible Indicates whether the object is visible. The class routines don't have to do anything with this variable. When the object is not visible the main routine will never try to draw it or send events to it. By default objects are visible. The visisbility of an object can be tested using the @code{@ref{fl_object_is_visible()}} function. Note that a this doesn't guarantee that the object is visible on the screen, for this also the form the object belongs to needs to be visible, in which case @code{@ref{fl_form_is_visible()}} returns true. @item int active Indicates whether the object is active, i.e.@: wants to receive events other than @code{FL_DRAW}. Static objects, such as text and boxes are inactive. This property should be set in the @code{fl_add_NEW()} routine if required. By default objects are active. This attribute can be changed by using the functions @code{@ref{fl_deactivate_object()}} and @code{@ref{fl_activate_object()}} and the current state can be determined by calling @code{@ref{fl_object_is_active()}}. @item int input Indicates whether this object can receive keyboard input. If not, events related to keyboard input are not sent to the object. The default value of @code{input} is false. It should be set by @code{fl_add_NEW()} if required. Note that not all keys are sent (see member @code{wantkey} below). @item int wantkey An input object normally does not receive @code{} or @code{} keystrokes or any other keys except those that have values between 0-255, the @code{} and @code{} arrow keys and @code{} and @code{} (@code{} and @code{} are normally used to switch between input objects). By setting this field to @code{FL_KEY_TAB} enforces that the object receives also these two keys as well as the @code{} and @code{} arrow keys and @code{} and @code{} when it has the focus. To receive other special keys (e.g.@: function keys) @code{FL_KEY_SPECIAL} must be set in @code{wantkey}. By setting @code{wantkey} to @code{FL_KEY_ALL} all keys are sent to the object. @item unsigned int click_timeout If non-zero this indicates the the maximum elapsed time (in msec) between two mouse clicks to be considered a double click. A zero value disables double/triple click detection. The user can set or query this value using the functions @code{@ref{fl_set_object_dblclick()}} and @code{@ref{fl_get_object_dblclick()}}. @c The following is incorrect. The current implementation works only @c for buttons since it explictely calls @code{@ref{fl_get_button()}}, @c so one can't create radio objects of any other sort. @c @c @item int radio This indicates whether this object is a radio @c object. This means that, whenever it is pushed, other radio objects @c in the same group in the form that are pushed are released (and @c their pushed value is reset). Radio buttons use this. The default @c is false. The @code{fl_add_NEW()} routine should set it if @c required. @item int automatic An object is automatic if it automatically (without user actions) has to change its contents. Automatic objects get a @code{FL_STEP} event about every @w{50 msec}. For example the object class @code{FL_CLOCK} is automatic. @code{automatic} by default is false. To set this property use @code{@ref{fl_set_object_automatic()}} (don't set the object member directly except from within a function like @code{fl_add_NEW()}, in other contexts some extra work is required) and to test the object for it use @code{@ref{fl_object_is_automatic()}}. @item int belowmouse This indicates whether the mouse is on this object. It is set and reset by the main routine. The class routines should never change it but can use it to draw or handle the object differently. @item int pushed This indicates whether the mouse is pushed within the bounding box of the object. It is set and reset by the main routine. Class routines should never change it but can use it to draw or handle objects differently. @item int focus Indicates whether keyboard input is sent to this object. It is set and reset by the main routine. Never change it but you can use its value. @item FL_HANDLEPTR handle This is a pointer to the interaction handling routine for the object. @code{fl_add_NEW()} sets this by providing the correct handling routine. Normally it is never used (except by the main routine) or changed although there might be situations in which you want to change the interaction handling routine for an object, due to some user action. @item FL_OBJECT *next, *prev @itemx FL_FORM *form These are pointers to other objects in the form and to the form itself. They are used by the main routines. The class routines should not change them. @item void *c_vdata A void pointer for the class routine. The main module does not reference or modify this field in any way. The object classes, including the built-in ones, may use this field. @item char *c_cdata A char pointer for the class routine. The main module does not reference or modify this field in any way. The object classes, including the built-in ones, may use this field. @item long c_ldata A long variable for the class routine. The main module does not reference or modify this field in any way. The object classes, including the built-in ones, may use this field. @item void *u_vdata A void pointer for the application program. The main module does not reference or modify this field in any way and neither should the class routines. @item char *u_cdata A char pointer for the application program. The main module does not reference or modify this field in any way and neither should the class routines. @item long u_ldata A long variable provided for the application program. @item FL_CALLBACKPTR object_callback The callback routine that the application program assigned to the object and that the system invokes when the user does something with the object. @item long argument The argument to be passed to the callback routine when invoked. @item int how_return Determines under what circumstances the object is returned by e.g.@: @code{@ref{fl_do_forms()}} or the callback function for the object is invoked. This can be either @table @code @item @ref{FL_RETURN_NONE} Object gets never returned or its callback invoked @item @ref{FL_RETURN_CHANGED} Return object or invoke callback when state of object changed. @item @ref{FL_RETURN_END} Return object or invoke callback at end of interaction, normally when the mouse key is released or, in the case of input objects, the object has lost focus. @item @ref{FL_RETURN_END_CHANGED} Return object or invoke callback only when interaction has ended and the state of the object has changed. @item @ref{FL_RETURN_SELECTION} Return object or invoke callback if e.g.@: in a browser a line was selected. @item @ref{FL_RETURN_SELECTION} Return object or invoke callback if e.g.@: in a browser a line was deselected. @item @ref{FL_RETURN_ALWAYS} Return object or invoke callback whenever interaction has ended or the state of the object has changed. @end table Never change this element of the structure directly but use the function @code{@ref{fl_set_object_return()}} instead! Especially in the case of objects having child objects also the corresponding settings for child objects may need changes and which automatically get adjusted when the above function is used. @item int returned Set to what calling the object handling function did return (and pruned to what the object is supposed to return according to the @code{how_return} element). Can be either @table @code @item @ref{FL_RETURN_NONE} Handling function did @code{FL_RETURN_NONE} (i.e.@: @code{0}). @item @ref{FL_RETURN_CHANGED} Handling function detected a change of the objects state. @item @ref{FL_RETURN_END} Handling function detected end of interaction with object. @end table @code{@ref{FL_RETURN_CHANGED}} and @code{@ref{FL_RETURN_END}} are bits that can be bitwise ored. If both are set this indicates that the objects state was changed and the interaction ended. @end table The generic object construction routine @tindex FL_HANDLEPTR @findex fl_make_object() @anchor{fl_make_object()} @example typedef int (*FL_HANDLEPTR)(FL_OBJECT *obj, int event, FL_Coord mx, FL_Coord my, int key, void *raw_event); FL_OBJECT *fl_make_object(int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_HANDLEPTR handle); @end example @noindent allocates a chunk of memory appropriate for all object classes and initializes the newly allocated object to the following state: @example obj->resize = FL_RESIZE_X | FL_RESIZE_Y; obj->nwgravity = obj->segravity = FL_NoGravity; obj->boxtype = FL_NO_BOX; obj->align = FL_ALIGN_CENTER | FL_ALIGN_INSIDE; obj->lcol = FL_BLACK; obj->lsize = FL_DEFAULT_SIZE; obj->lstyle = FL_NORMAL_STYLE; obj->col1 = FL_COL1; obj->col2 = FL_MCOL; obj->wantkey = FL_KEY_NORMAL; obj->active = 1; obj->visible = 1; obj->bw = borderWidth_resource_set ? resource_val : FL_BOUND_WIDTH; obj->u_ldata = 0; obj->u_vdata = 0; obj->spec = NULL; obj->how_return = FL_RETURN_CHANGED @end example In some situations it can be also useful to make an object a child of another object. An example is the scrollbar object. It has three child objects, a slider and two buttons, which all three are children of the scrollbar object. To make an object @code{child} a child object of an object named @code{parent} use the function @findex fl_add_child() @anchor{fl_add_child()} @example void fl_add_child(FL_OBJECT *parent, FL_OBJECT *child); @end example When creating a composite object you will typically add callbacks for the child object that handle what happens on events for these child objects (e.g.@: for the scrollbar the buttons have callbacks that update the internal state for the scrollbar object and result in the slider getting shifted). Within these callback functions the @code{returned} elements of the parent can be changed to influence if and what gets reported to the application via @code{@ref{fl_do_forms()}}. There is rarely any need for the new object class to know how the object is added to a form and how the Forms Library manages the geometry, e.g.@: does an object have its own window etc. Nonetheless if this information is required, use @code{@ref{FL_ObjWin()}} on the object to obtain the window resource ID of the window the object belongs to. Beware that an object window ID may be shared with other objects@footnote{The only exception is the canvas class where the window ID is guaranteed to be non-shared.}. Always remove an object from the screen with @code{@ref{fl_hide_object()}}. The class routine/application may reference the following members of the @code{FL FORM} structure to obtain information on the status of the form, but should not modify them directly: @table @code @item int visible Indicates if the form is visible on the screen (mapped). Never change it directly, use @code{@ref{fl_show_form()}} or @code{@ref{fl_hide_form()}} instead. @item int deactivated Indicates if the form is deactivated. Never change it directly, use @code{@ref{fl_activate_form()}} or @code{@ref{fl_deactivate_form()}} instead. @item FL OBJECT *focusobj This pointer points to the object on the form that has the input focus. @item FL OBJECT *first The first object on the form. Pointer to a linked list. @item Window window The forms window. @end table xforms-1.0.93sp1/doc/part2_saving_loading.texi0000644000175000017500000002376211375573362020010 0ustar jensjens@node Part II Saving and Loading Forms @chapter Saving and Loading Forms To save the set of forms created select the item "Save" or "Save As" from the "File" menu. You will be prompted for a file name using the file selector if the latter is selected. Choose a name that ends with @code{.fd}, e.g. @file{ttt.fd}. The program will now generate three files: @file{ttt.c}, @file{ttt.h} and @file{ttt.fd}. If these files already exist, backup copies of these are made (by appending @code{.bak} to the already existing file names). @file{ttt.c} contains a piece of C-code that builds up the forms and @file{ttt.h} contains all the object and form names as indicated by the user. It also contains declaration of the defined callback routines. Depending on the options selected from the "Options" menu, two more files may be emitted. Namely the main program and callback function templates. They are named @file{ttt_main.c} and @file{ttt_cb.c} respectively. There are two different kind of formats for the C-code generated. The default format allows more than one instance of the form created and uses no global variables. The other format, activated by the @code{altformat} option given on the command line or switched on via the "Options" menu by selecting "Alt Format", uses global variables and does not allow more than one instantiation of the designed forms. However, this format has a global routine that creates all the forms defined, which by default is named @code{create_the_forms()} but that can be changed (see below). Depending on which format is output, the application program typically only needs to include the header file and call the form creation routine. To illustrate the differences between the two output formats and the typical way an application program is setup, we look at the following hypothetical situation: We have two forms, @code{foo} and @code{bar}, each of which contains several objects, say @code{fnobj1}, @code{fnobj2} etc. where @code{n = 1, 2}. The default output format will generate the following header file (@file{foobar.h}): @example #ifndef FD_foobar_h_ #define FD_foobar_h_ /* call back routines if any */ extern void callback(FL_OBJECT *, long); typedef struct @{ FL_FORM * foo; void * vdata; char * cdata; long ldata; FL_OBJECT * f1obj1; FL_OBJECT * f1obj2; @} FD_foo; typedef struct @{ FL_FORM * bar; void * vdata; char * cdata; long ldata; FL_OBJECT * f2obj1; FL_OBJECT * f2obj2; @} FD_bar; extern FD_foo *create_form_foo(void); extern FD_bar *create_form_bar(void); #endif /* FD_foobar_h */ @end example @noindent and the corresponding C file: @example #include #include "foobar.h" FD_foo *create_form_foo(void) @{ FD_foo *fdui = fl_calloc(1, sizeof *dhui); fdui->foo = fl_bgn_form(....); fdui->f1obj1 = fl_add_aaaa(....); fdui->f1obj1 = fl_add_bbbb(....); fl_end_form(); fdui->foo->fdui = fdui; return fdui; @} FD_bar *create_form_foo(void) @{ FD_bar *fdui = fl_calloc(1, sizeof *fdui); fdui->bar = fl_bgn_form(....); fdui->f2obj1 = fl_add_cccc(....); fdui->f2obj2 = fl_add_dddd(....); fl_end_form(); fdui->bar->fdui = fdui; return fdui; @} @end example The application program would look something like the following: @example #include #include "foobar.h" /* add call back routines here */ int main(int argc, char *argv[]) @{ FD_foo *fd_foo; FD_bar *fd_bar; fl_initialize(...); fd_foo = create_form_foo(); init_fd_foo(fd_foo); /* application UI init routine */ fd_bar = create_form_bar(); init_fd_bar(fd_bar) /* application UI init routine */ fl_show_form(fd_foo->foo, ...); /* rest of the program */ @} @end example As you see, @code{fdesign} generates a structure that groups together all objects on a particular form and the form itself into a structure for easy maintenance and access. The other benefit of doing this is that the application program can create more than one instances of the form if needed. It is difficult to avoid globals in an event-driven callback scheme with the most difficulties occurring inside the callback function where another object on the same form may need to be accessed. The current setup makes this possible and relatively painless to achieve this. There are a couple of ways to do this. The easiest and most robust way is to use the member @code{form->fdui}, which fdesign set up to point to the @code{FD_} structure in which the form is a member. To illustrate how this is done, let's take the above two forms and try to access a different object from within a callback function. @example fd_foo = create_form_foo(); ... @end example @noindent and in the callback function of @code{ob} on form @code{foo}, you can access other objects as follows: @example void callback(FL_OBJECT *obj, long data) @{ FD_foo *fd_foo = obj->form->fdui; fl_set_object_dddd(fd_foo->f1obj2, ....); @} @end example Of course this setup still leaves the problems accessing objects on other forms unsolved although you can manually set the @code{form->u_vdata} to the other @code{FD_} structure: @example fd_foo->form->u_vdata = fd_bar; @end example @noindent or use the @code{vdata} field in the @code{FD_} structure itself: @example fd_foo->vdata = fd_bar; @end example The other method, not as easy as using @code{form->fdui} (because you get no help from fdesign), but just as workable, is simply use the @code{u_vdata} field in the @code{FD_} structure to hold the ID of the object that needs to be accessed. In case of the need to access multiple objects, there is a field @code{u_vdata} in both the @code{FL_FORM} and @code{FL_OBJECT} structures you can use. You simply use the field to hold the @code{FD_} structure: @example fd_foo = create_form_foo(); fd_foo->foo->u_vdata = fd_foo; ... @end example @noindent and in the callback function you can access other objects as follows: @example void callback(FL_OBJECT *obj, long data) @{ FD_foo *fd_foo = obj->form->u_vdata; fl_set_object_dddd(fd_foo->f1obj2, ....); @} @end example Not pretty, but adequate for practical purposes. Note that the @code{FD_} structure always has a pointer to the form as the first member, followed by @code{vdata}, @code{cdata} and @code{ldata}. There's also a @code{typedef} for a structure of type @code{FD_Any} in @code{forms.h}: @example typedef struct @{ FL_FORM * form; void * vdata; char * cdata; long ldata; @} FD_Any; @end example @noindent you can use to cast a specific @code{FD_} structure get at @code{vdata} etc. Another alternative is to use the @code{FD_} structure as the user data in the callback@footnote{Unfortunately, this scheme isn't legal C as a pointer may be longer than a long, but in practice, it should work out ok on virtually all platforms.} @example fl_set_object_callback(obj, callback, (long) fdui); @end example @noindent and use the callback as follows @example void callback(FL_OBJECT *obj, long arg) @{ FD_foo *fd_foo = (FD_foo *) arg; fl_set_object_lcol(fd + foo->f1obj1, FL_RED); ... @} @end example Avoiding globals is, in general, a good idea, but as everything else, also an excess of a good things can be bad. Sometimes, simply making the @code{FD_} structure global makes a program clearer and more maintainable. There still is another difficulty that might arise with the current setup. For example, in @code{f1obj1}'s callback we change the state of some other objects , say, @code{f1obj2} via @code{@ref{fl_set_button()}} or @code{@ref{fl_set_input()}}. Now the state of @code{f1obj2} is changed and it needs to be handled. You probably don't want to put much code for handling @code{f1obj2} in @code{f1obj1}'s callback. In this situation, the following function comes in handy @example void fl_call_object_callback(FL_OBJECT *obj); @end example @noindent @code{fl_call_object_callback(fdfoo->f1obj2)} will invoke the callback for @code{f1obj2} callback in exactly the same way the main loop would do and as far as @code{f1obj2} is concerned, it just handles the state change as if the user changed it. The alternative format outputs something like the following: @example /* callback routines */ extern void callback(FL_OBJECT *, long); extern FL_FORM *foo, *bar; extern FL_OBJECT *f1obj1, *f1obj2, ...; extern FL_OBJECT *f2obj1, *f2obj2, ...; extern void create_form_foo(void); extern create_form_bar(void); extern void create_the_forms(void); @end example The C-routines: @example FL_FORM *foo, *bar; FL_OBJECT *f1obj1, *f1obj2, ...; FL_OBJECT *f2obj1, *f2obj2, ...; void create_form_foo(void) @{ if (foo) return; foo = fl_bgn_form(....); ... @} void create_form_bar(void) @{ if (bar) return; bar = fl_bgn_form(....); ... @} void create_the_forms(void) @{ create_form_foo(); create_form_bar(); @} @end example Normally the application program would look something like this: @example #include #include "foobar.h" /* Here go the callback routines */ .... int main(int argc, char *argv[]) @{ fl_initialize(....); create_the_forms(); /* rest of the program follows*/ ... @} @end example Note that although the C-routine file in both cases is easily readable, editing it is strongly discouraged. If you were to do so, you will have to redo the changes whenever you call fdesign again to modify the layout. The third file created, @file{ttt.fd}, is in a format that can be read in by the Form Designer. It is easy readable ASCII but you had better not change it because not much error checking is done when reading it in. To load such a file select the "Open" item from the "File" menu. You will be prompted for a file name using the file selector. Press your mouse on the file you want to load and press the button labeled "Ready". The current set of forms will be discarded, and replaced by the new set. You can also merge the forms in a file with the current set. To this end select "Merge" from the "File" menu. xforms-1.0.93sp1/doc/xforms.texi0000644000175000017500000001132011375527052015210 0ustar jensjens\input texinfo @setfilename xforms.info @settitle XForms (Forms Library)@*A Graphical User Interface Toolkit for X@*Version 1.0.93 @set lastupdate May 21, 2010 @paragraphindent 0 @titlepage @title XForms @sp 8 @center @titlefont{Forms Library} @sp 1 @center @titlefont{A Graphical User Interface Toolkit for X} @sp 8 @center Library Version 1.0.93 @sp 2 @center May 2010 @sp 8 @end titlepage @dircategory Development @direntry * XForms: (xforms). Graphical user interface toolkit for X @end direntry @contents @node Top @top @ifnottex @menu * Preface: Preface * Part I - Using The Forms Library: Part I * Introduction: Part I Introduction * Getting Started: Part I Getting Started * Defining Forms: Part I Defining Forms * Doing Interaction: Part I Doing Interaction * Free Objects: Part I Free Objects * Free Objects: Part I Goodies * Part II - The Form Designer: Part II * Introduction: Part II Introduction * Getting Started: Part II Getting Started * Command Line Arguments: Part II Command Line Arguments * Creating Forms: Part II Creating Forms * Saving and Loading Forms: Part II Saving and Loading Forms * Language Filters: Part II Language Filters * Generating Hardcopies: Part II Generating Hardcopies * Part III - Object Classes: Part III * Introduction: Part III Introduction * Static Objects: Part III Static Objects * Button-like Objects: Part III Button-like Objects * Valuator Objects: Part III Valuator Objects * Input Objects: Part III Input Objects * Choice Objects: Part III Choice Objects * Container Objects: Part III Container Objects * Other Objects: Part III Other Objects * Popups: Part III Popups * Deprecated Objects: Part III Deprecated Objects * Part IV - Designing Object Classes: Part IV * Introduction: Part IV Introduction * Global Structure: Part IV Global Structure * Events: Part IV Events * The Type @code{FL_OBJECT}: Part IV The Type FL_OBJECT * Drawing Objects: Part IV Drawing Objects * An Example: Part IV An Example * New Buttons: Part IV New Buttons * Using a Pre-emptive Handler: Part IV Using a Pre-emptive Handler * Part V - General Informations: Part V * Overview of Main Functions: Part V Overview of Main Functions * Some Useful Functions: Part V Some Useful Functions * Resources for Forms Library: Part V Resources for Forms Library * Dirty Tricks: Part V Dirty Tricks * Trouble Shooting: Part V Trouble Shooting * Part VI - Image Supprt API: Part VI * Part VI Images:: * Index of Functions:: * Index of Constants:: @end menu @end ifnottex @include part0_preface.texi @include part1.texi @include part1_introduction.texi @include part1_getting_started.texi @include part1_defining_forms.texi @include part1_doing_interaction.texi @include part1_free_objects.texi @include part1_goodies.texi @include part2.texi @include part2_introduction.texi @include part2_getting_started.texi @include part2_command_line.texi @include part2_creating_forms.texi @include part2_saving_loading.texi @include part2_language_filters.texi @include part2_generating_hardcopies.texi @include part3.texi @include part3_introduction.texi @include part3_static_objects.texi @include part3_buttons.texi @include part3_valuator_objects.texi @include part3_input_objects.texi @include part3_choice_objects.texi @include part3_container_objects.texi @include part3_other_objects.texi @include part3_popups.texi @include part3_deprecated_objects.texi @include part4.texi @include part4_introduction.texi @include part4_global_structure.texi @include part4_events.texi @include part4_fl_object.texi @include part4_drawing_objects.texi @include part4_an_example.texi @include part4_new_buttons.texi @include part4_preemptive_handler.texi @include part5.texi @include part5_overview.texi @include part5_useful_functions.texi @include part5_resources.texi @include part5_dirty_tricks.texi @include part5_trouble_shooting.texi @include part6.texi @include part6_images.texi @node Index of Functions @unnumbered Index of Functions @printindex fn @node Index of Constants @unnumbered Index of Constants @printindex tp @bye xforms-1.0.93sp1/doc/part5_useful_functions.texi0000644000175000017500000004771311376032005020405 0ustar jensjens@node Part V Some Useful Functions @chapter Some Useful Functions @ifnottex @menu * Misc. Functions:: * Windowing Support:: * Cursors:: * Clipboard:: @end menu @end ifnottex @node Misc. Functions @section Misc. Functions The following routine can be used to sound the keyboard bell (if capable): @findex fl_ringbell() @anchor{fl_ringbell()} @example void fl_ringbell(int percent); @end example @noindent where @code{percent} can range from -100 to 100 with 0 being the default volume setting of the keyboard. A value of 100 indicates maximum volume and a value of -100 minimum volume (off). Note that not all keyboards support volume variations. To get the user name who's running the application you can use the routine @findex fl_whoami() @anchor{fl_whoami()} @example const char *fl_whoami(void); @end example To get a string form of the current date and time, the following routine is available: @findex fl_now() @anchor{fl_now()} @example const char *fl_now(void); @end example @noindent The format of the string is of the form @code{"Wed Jun 30 21:49:08 1993"}. The following time related routine might come in handy @findex fl_gettime() @anchor{fl_gettime()} @example void fl_gettime(unsigned long *sec, unsigned long *usec); @end example @noindent Upon function return @code{sec} and @code{usec} are set to the current time, expressed in seconds and microseconds since 00:00 GMT January, 1970. This function is most useful for computing time differences. Th function @findex fl_mode_capable() @anchor{fl_mode_capable()} @example int fl_mode_capable(int mode, int warn); @end example @noindent allows to determine the visual classes the system is capable of. @code{mode} must be one of @code{GrayScale}, @code{StaticGray}, @code{PseudoColor}, @code{StaticColor}, @code{DirectColor} and @code{TrueColor} and the function returns 1 if the system is capable of displaying in this visual class and 0 otherwise. If @code{warn} is set a warning is printed out in case the capability asked for isn't available. Finally @findex fl_msleep() @anchor{fl_msleep()} @example int fl_msleep(usigned long msec); @end example @noindent allows to wait for a number of milli-seconds (with the best resolution possible on your system). @node Windowing Support @section Windowing Support Some of the following routines are also used internally by the Forms Library as an attempt to localize window system dependencies and may be of some general use. Be warned that these routines may be subject to changes, both in their API and/or functionality. You can create and show a window with the following routines @findex fl_wincreate() @anchor{fl_wincreate()} @findex fl_winshow() @anchor{fl_winshow()} @example Window fl_wincreate(const char *name); Window fl_winshow(Window win); @end example @noindent where the parameter @code{win} of @code{@ref{fl_winshow()}} is the window ID returned by @code{@ref{fl_wincreate()}}. The title of the window is set by the @code{name} argument. Between the creation and showing of the window other attributes of the window can be set. Note that a window opened this way is always a top level window and uses all the Forms Library's defaults (visual, depth etc.). Another thing about @code{@ref{fl_winshow()}} is that it will wait for and gobble up the first @code{Expose} event and you can draw into the window immediately after the function returns. It is sometimes more convenient to create and show a window in a single call using @findex fl_winopen() @anchor{fl_winopen()} @example Window fl_winopen(const char *name); @end example @noindent This will open a (top-level) window with the title @code{name}. A window so opened can be drawn into as soon as the function returns, i.e.@: @code{@ref{fl_winopen()}} waits until the window is ready to be drawn to. The newly opened window will have the following default attributes @table @code @item event_mask @code{ExposureMask}, @code{KeyPressMask}, @code{KeyReleaseMask}, @code{ButtonPressMask}, @code{ButtonReleaseMask}, @code{OwnerGrabButtonMask}, @code{ButtonMotionMask}, @code{PointerMotionMask}, @code{PointerMotionHintMask}, @code{StructureNotifyMask} @item backing_store as set by @code{fl_cntl.backingStore} @item class @code{InputOutput} @item visual same as Forms Library's default @item colormap same as Forms Library's default @end table To make a top-level window a sub-window of another window use the following routine @findex fl_winreparent() @anchor{fl_winreparent()} @example int fl_winreparent(Window win, Window new_parent); @end example @noindent The origin of the window @code{win} will be at the origin of the parent window @code{new_parent}. At the time of the function call, both the window and the parent window must be valid windows. By default, a newly opened window will have a size of 320 by 200 pixels and no other constraints. You can modify the default or constraints using the following routines prior to calling @code{@ref{fl_winopen()}}: @findex fl_initial_winsize() @anchor{fl_initial_winsize()} @findex fl_winsize() @anchor{fl_winsize()} @example void fl_initial_winsize(FL_Coord w, FL_Coord h); void fl_winsize(FL_Coord w, FL_Coord h); @end example @noindent These two routines set the preferred window size. @code{w} and @code{h} are the width and height of the window in pixels. @code{@ref{fl_winsize()}} in addition will make the window non-resizeable (but you can still resize the window programmatically) by setting the minimum and maximum window size to the requested size via @code{WMHints}. The effect of a window having this property is that it can't be interactively resized (provided the window manager cooperates). It is sometimes desirable to have a window that is resizeable but only within a useful range. To set such a constraint use the following functions: @findex fl_winminsize() @anchor{fl_winminsize()} @findex fl_winmaxsize() @anchor{fl_winmaxsize()} @example void fl_winminsize(Window window, FL_Coord minw, FL_Coord minh); void fl_winmaxsize(Window window, FL_Coord maxw, FL_Coord maxh); @end example @noindent These two routines can also be used after a window has become visible. For windows still to be created/opened, use @code{None} for the window parameter. For example, if we want to open a window of 640 by 480 pixels and have it remain resizeable but within a permitted range, code similar to the following can be used: @example fl_initial_winsize(640, 480); fl_winminsize(None, 100,100); fl_winmaxsize(None, 1024,768) win = fl_winopen("MyWin"); @end example In addition to the window size preference you can also set the preferred position of a window to be opened: @findex fl_winposition() @anchor{fl_winposition()} @example void fl_winposition(FL_Coord x, FL_Coord y); @end example @noindent where @code{x} and @code{y} are the coordinates of the upper-left corner of the window relative to the root window. Alternatively, you can set the geometry (position and size) in a single function call: @findex fl_initial_wingeometry() @anchor{fl_initial_wingeometry()} @findex fl_wingeometry() @anchor{fl_wingeometry()} @example void fl_initial_wingeometry(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h); void fl_wingeometry(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h); @end example @noindent Again, windows for which @code{@ref{fl_wingeometry()}} had been created will not allow interactive resizing later on. There are further routines that can be used to change other aspects of the window to be created: @findex fl_winaspect() @anchor{fl_winaspect()} @example void fl_winaspect(Window win, FL_Coord x, FL_Coord y); @end example @noindent This will set the aspect ratio of the window for later interactive resizing. To change the window title (and its associated icon title) use @findex fl_wintitle() @anchor{fl_wintitle()} @example void fl_wintitle(Window win, const char *title); @end example To change the icon title only use the routine @findex fl_winicontitle() @anchor{fl_winicontitle()} @example void fl_winicontitle(Window win, const char *title); @end example To install an icon for the window use @findex fl_winicon() @anchor{fl_winicon()} @example void fl_winicon(Window win, Pixmap icon, Pixmap mask); @end example You can suppress the window manager's decoration or make a window a transient one by using the following routines prior to creating the window @findex fl_noborder() @anchor{fl_noborder()} @findex fl_transient() @anchor{fl_transient()} @example void fl_noborder(void); void fl_transient(void); @end example You can also set the background of the window to a certain color using the following call @findex fl_winbackground() @anchor{fl_winbackground()} @example void fl_winbackground(Window win, unsigned long pixel); @end example It is possible to set the steps by which the size of a window can be changed by using @findex fl_winstepsize() @anchor{fl_winstepsize()} @example void fl_winstepsize(Window win, int xunit, int yunit); @end example @noindent where @code{xunit} and @code{yunit} are the number of pixels of changes per unit in x- and y- directions, respectively. Changes to the window size will be multiples of these units after this call. Note that this only applies to interactive resizing. To change constraints (size and aspect ratio) on an active window, you can use the following routine @findex fl_reset_winconstraints() @anchor{fl_reset_winconstraints()} @example void fl_reset_winconstraints(Window win); @end example The following routines are available to get information about an active window win: @findex fl_get_winsize() @anchor{fl_get_winsize()} @findex fl_get_winorigin() @anchor{fl_get_winorigin()} @findex fl_get_wingeometry() @anchor{fl_get_wingeometry()} @example void fl_get_winsize(Window win, FL_Coord *w, FL_Coord *h); void fl_get_winorigin(Window win, FL_Coord *x, FL_Coord *y); void fl_get_wingeometry(Window win, FL_Coord *x, FL_Coord *y, FL_Coord *w, FL_Coord *h); @end example @noindent All returned values are in pixels. The origin of a window is measured from the upper left corner of the root window. To change the size of window programmatically the following routine is available: @findex fl_winresize() @anchor{fl_winresize()} @example int fl_winresize(Window win, FL_Coord neww, FL_Coord newh); @end example @noindent In addition to resizing the window, this routine will keep the original constraints. For example, if a window was not permitted to be interactively resized it will remains unresizeable after the resize. Resizing is done by keeping the origin constant relative to the root window. To move a window without resizing it, use the following call @findex fl_winmove() @anchor{fl_winmove()} @example void fl_winmove(Window win, FL_Coord newx, FL_Coord newy); @end example To move and resize a window, use the following routine @findex fl_winreshape() @anchor{fl_winreshape()} @example void fl_winreshape(Window win, FL_Coord newx, FL_Coord newy, FL_Coord neww, FL_Coord newh); @end example The following routine is available to iconify a window @findex fl_iconify() @anchor{fl_iconify()} @example void fl_iconify(Window win); @end example To make a window invisible use @findex fl_winhide() @anchor{fl_winhide()} @example void fl_winhide(Window win); @end example @noindent A window hidden this way can be shown again later using @code{@ref{fl_winshow()}}. To hide and destroy a window, use the following calls @findex fl_winclose() @anchor{fl_winclose()} @example void fl_winclose(Window win); @end example @noindent There will be no events generated from @code{@ref{fl_winclose()}}, i.e.@: the function waits and gobbles up all events for window @code{win}. In addition, this routine also removes all callbacks associated with the closed window. The following routine can be used to check if a window ID is valid or not @findex fl_winisvalid() @anchor{fl_winisvalid()} @example int fl_winisvalid(Window win); @end example @noindent Note that excessive use of this function may negatively impact performance. Usually an X application should work with window managers and accepts the keyboard focus assignment. In some special situations, explicit override of the keyboard focus might be warranted. To this end, the following routine exists: @findex fl_winfocus() @anchor{fl_winfocus()} @example void fl_winfocus(Window win); @end example @noindent After this call keyboard input is directed to window @code{win}. @node Cursors @section Cursors XForms provides a convenience function to change the cursor shapes: @findex fl_set_cursor() @anchor{fl_set_cursor()} @example void fl_set_cursor(Window win, int name); @end example @noindent where @code{win} must be a valid window identifier and @code{name} is one of the symbolic cursor names (shapes) defined by standard X or the integer values returned by @code{@ref{fl_create_bitmap_cursor()}} or one of the Forms Library's pre-defined symbolic names. The X standard symbolic cursor names (all starts with @code{XC_}) are defined in @code{} (you don't need to explicitly include this as @code{} already does this for you). For example, to set a watch-shaped cursor for form @code{form} (after the form is shown), the following call may be made @example fl_set_cursor(form->window, XC_watch); @end example The Forms Library defines a special symbolic constants, @tindex FL_INVISIBLE_CURSOR @code{FL_INVISIBLE_CURSOR} that can be used to hide the cursor for window @code{win}: @example fl_set_cursor(win, FL_INVISIBLE_CURSOR); @end example Depending on the structure of the application program, a call of @code{XFlush(fl_get_display());} may be required following @code{@ref{fl_set_cursor()}}. To reset the cursor to the XForms's default (an arrow pointing northwest), use the following routine @findex fl_reset_cursor() @anchor{fl_reset_cursor()} @example void fl_reset_cursor(Window win); @end example To change the color of a cursor use the following routine @findex fl_set_cursor_color() @anchor{fl_set_cursor_color()} @example void fl_set_cursor_color(int name, FL_COLOR fg, FL_COLOR bg); @end example @noindent where @code{fg} and @code{bg} are the foreground and background color of the cursor, respectively. If the cursor is being displayed, the color change is visible immediately. It is possible to use cursors other than those defined by the standard cursor font by creating a bitmap cursor with @findex fl_create_bitmap_cursor() @anchor{fl_create_bitmap_cursor()} @example int fl_create_bitmap_cursor(const char *source, const char *mask, int w, int h, int hotx, int hoty); @end example @noindent where @code{source} and @code{mask} are two (x)bitmaps. The mask defines the shape of the cursor. The pixels set to 1 in the mask define which source pixels are displayed. If @code{mask} is @code{NULL} all bits in @code{source} are displayed. @code{hotx} and @code{hoty} are the hotspot of the cursor (relative to the source's origin). The function returns the cursor ID which can be used in calls of @code{@ref{fl_set_cursor()}} and @code{@ref{fl_set_cursor_color()}} etc. Finally, there is a routine to create animated cursors where several cursors are displayed one after another: @findex fl_create_animated_cursor() @anchor{fl_create_animated_cursor()} @example int fl_create_animated_cursor(int *cur_names, int interval); @end example @noindent The function returns the cursor name (ID) that can be shown later via @code{@ref{fl_set_cursor()}}. In the function call @code{cur_names} is an array of cursor names (either X standard cursors or cursor names returned by @code{@ref{fl_create_bitmap_cursor()}}), terminated by -1. Parameter @code{interval} indicates the time each cursor is displayed before it is replaced by the next in the array. An interval about @w{150 msec} is a good value for typical uses. Note that there is currently a limit of 24 cursors per animation sequence. Internally animated cursor works by utilizing the timeout callback. This means that if the application blocks (thus the main loop has no chance of servicing the timeouts), the animation will stop. See demo program @file{cursor.c} for an example use of the cursor routines. @node Clipboard @section Clipboard Clipboard is implemented in the Forms Library using the X selection mechanism, more specifically the @code{XA_PRIMARY} selection. X selection is a general and flexible way of sharing arbitrary data among applications on the same server (the applications are of course not necessarily running on the same machine). The basic (and over-simplified) concept of the X selection can be summarized as follows: the X Server is the central point of the selection mechanism and all applications running on the server communicate with other applications through the server. The X selection is asynchronous in nature. Every selection has an owner (an application represented by a window) and every application can become owner of the selection or lose the ownership. The clipboard in Forms Library is a lot simpler than the full-fledged X selection mechanism. The simplicity is achieved by hiding and handling some of the details and events that are of no interests to the application program. In general terms, you can think of a clipboard as a read-write buffer shared by all applications running on the server. The major functionality you want with a clipboard is the ability to post data onto the clipboard and request the content of the clipboard. To post data onto the clipboard, use the following routine @tindex FL_LOSE_SELECTION_CB @findex fl_stuff_clipboard() @anchor{fl_stuff_clipboard()} @example typedef int (*FL_LOSE_SELECTION_CB)(FL_OBJECT *obj, long type); int fl_stuff_clipboard(FL_OBJECT *obj, long type, const void *data, long size, FL_LOSE_SELECTION_CB callback); @end example @noindent where @code{size} is the size (in bytes) of the content pointed to by @code{data}. If successful, the function returns a positive value and the data will have been copied onto the clipboard. The callback is the function that will be called when another application takes ownership of the clipboard. For textual content the application that loses the clipboard should typically undo the visual cues about the selection. If no action is required when losing the ownership a @code{NULL}q callback can be passed. The @code{obj} argument is used to obtain the window (owner) of the selection. @code{type} is currently unused. At the moment the return value of @code{lose_selection_callback()} is also unused. The data posted onto the clipboard are available to all applications that manipulate @code{XA_PRIMARY}, such as xterm etc. To request the current clipboard content use the following routine @tindex FL_SELECTION_CB @findex fl_request_clipboard() @anchor{fl_request_clipboard()} @example typedef int (*FL_SELECTION_CB)(FL_OBJECT *obj, long type, const void * data, long size); int fl_request_clipboard(FL_OBJECT *obj, long type, FL_SELECTION_CB callback); @end example @noindent where @code{callback} is the callback function that gets called when the clipboard content is obtained. The content @code{data} passed to the callback function should not be modified. One thing to remember is that the operation of the clipboard is asynchronous. Requesting the content of the clipboard merely asks the owner of the content for it and you will not have the content immediately (unless the asking object happens to own the selection). XForms main event loop takes care of the communication between the requesting object and the owner of the clipboard and breaks up and re-assembles the content if it exceeds the maximum protocol request size (which has a guaranteed minimum of @w{16 kB}, but typically is larger). If the content of the clipboard is successfully obtained the main loop invokes the lose selection callback of the prior owner and then the requesting object's callback function. The function returns a positive number if the requesting object owns the selection (i.e.@: the callback could beinvoked before the function returned) and 0 otherwise. If there is no selection the selection callback is called with an empty buffer and the length of the buffer is set to 0. In that case @code{@ref{fl_request_clipboard()}} returns -1. xforms-1.0.93sp1/doc/part6.texi0000644000175000017500000000014111317661221014716 0ustar jensjens@node Part VI @unnumbered @emph{Part VI - Image Support API} @menu * Part VI Images:: @end menu xforms-1.0.93sp1/doc/part3_choice_objects.texi0000644000175000017500000017413111376031775017763 0ustar jensjens@node Part III Choice Objects @chapter Choice Objects @ifnottex @menu * Select Object: Select Object * Nmenu Object: Nmenu Object * Browser Object: Browser Object @end menu @end ifnottex @node Select Object @section Select Object A select object is a rather simple object that allows the user to pick alternatives from a linear list that pops up when he clicks on the object. It remembers the last selected item, which is also shown on top of the select object. The select object internally uses a popup (@pxref{Part III Popups}) and thus it can be helpful to understand at lest some aspects of how popups work to fully grasp the functionality of select objects. @ifnottex @menu * Adding Select Objects: Adding Select Objects * Select Interaction: Select Interaction * Other Select Routines: Other Select Routines * Select Attributes: Select Attributes * Remarks: Select Remarks @end menu @end ifnottex @node Adding Select Objects @subsection Adding Select Objects To add a select object to a form use @findex fl_add_select() @anchor{fl_add_select()} @example FL_OBJECT *fl_add_select(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) @end example @noindent There are currently three types which just differ by the way they look: @table @code @tindex FL_NORMAL_SELECT @anchor{FL_NORMAL_SELECT} @item FL_NORMAL_SELECT Per default this type is drawn as a rounded, flat box (but you can change that by setting a different boxtype for the object) with the text of the currently selected item in its center. @tindex FL_MENU_SELECT @tindex MENU_SELECT @anchor{MENU_SELECT} @item FL_MENU_SELECT This select object looks like a button with a little extra box at its right side (just like a @code{FL_MENU_BUTTON}) and the text of the currently selected item is drawn on the button-like object. @tindex FL_DROPLIST_SELECT @anchor{FL_DROPLIST_SELECT} @item FL_DROPLIST_SELECT This type looks like a button with the text of the currently selected item on top of it and a second square button directly beside it with an downward pointing arrow on it. @end table Per default @code{label} is drawn outside and to the left of the object. Once a new select object has been created items have to be added to it. For this the following function exists: @findex fl_add_select_items() @anchor{fl_add_select_items()} @example FL_POPUP_ENTRY *fl_add_select_items(FL_OBJECT *obj, const char items,...); @end example @noindent @code{items} is a string with the items to add, separated by the @code{|} character. In the simplest case you would just use something like @code{"Item 1|Item 2|Item 3"} to add three items to the list. If there weren't any items before the first item will be automatically shown as the selected one. As also described in the documentation for the similar function @code{@ref{fl_popup_add_entries()}} (@pxref{Adding Popups}) the text for an item may contain "special sequences" that start with the character @code{%} and the may require an additional argument passed to the function after the @code{items} argument: @table @code @item %x Set a value of type @code{long int} that's passed to all callback routines for the item. The value must be given in the arguments following the @code{items} string. @item %u Set a @code{user_void} pointer that's passed to all callbacks of the item. The pointer must be specified in the arguments following the @code{items} string. @item %f Set a callback function that gets called when the item is selected. The function is of type @example int callback(FL_POPUP_RETURN *r); @end example @noindent Information about the item etc.@: gets passed to the callback function via the @code{@ref{FL_POPUP_RETURN}} structure and the return value of the function can be used to keep the selection from becoming reported back to the user made by returning a value of @code{FL_IGNORE} (-1). The function's address must be given in the arguments following the @code{items} string. @item %E Set a callback routine that gets called each time the mouse enters the item (as long as the item isn't disabled or hidden). The type of the function is the same as that of the callback function for the selection of the item but it's return value is never used. The functions address must be given in the arguments following the @code{items} string. @item %L Set a callback routine that gets called each time the mouse leaves the item. The type of the function is the same that as of the callback function for the selection of the item but it's return value is never used. The functions address must be given in the arguments following the @code{items} string. @item %d Marks the item as disabled, i.e.@: it can't be selected and its text is per default drawn in a different color @item %h Marks the item as hidden, i.e.@: it is not shown while in this state. @item %S For items with shortcut keys it's quite common to have them shown on the right hand side. Using @code{"%S"} you can split the items text into two parts, the first one (before @code{"%S"}) being drawn flushed left and the second part flushed right. Note that using this special sequence doesn't automatically sets a shortcut key, this still has to be done using @code{"%s"}. @item %s Sets one or more shortcut keys for an item. Requires a string with the shortcuts in the arguments following the @code{items} string. @xref{Shortcuts}, for details on how to define shortcuts. Please note that the character in the label identical to the shortcut character is only shown as underlined if @code{"%S"} isn't used. @item %% Use this to get a @code{'%'} within the text of an item. @end table @noindent If you compare this list of "special sequences" with those listed for the @code{@ref{fl_popup_add_entries()}} function you will find that aome are missing. This is because a select object is a simple linear list of items that uses only parts of the popups functionalities. Another way to set up the popup of a select object is to use the function @findex fl_set_select_items() @anchor{fl_set_select_items()} @example long fl_set_select_items(FL_OBJECT *obj, FL_POPUP_ITEM *item); @end example @noindent Here @code{item} is an array of structures of type @code{@ref{FL_POPUP_ITEM}} with the @code{text} member of the very last element of the array being set to @code{NULL}, indicating the end of the array. The @code{text} member is the text of the item. It may only contain one "special sequence", @code{"%S"} to indicate that the string is to be split at that position into the part of the item label to be drawn to the left and on the right side (also prepending the string with @code{'_'} or @code{'/'} has no effect). @code{callback} is a callback function to be invoked on selection of the item. @code{shortcut} is a string for setting keybord shortcuts for the item. @code{type} has no function at all here (there can be only items of type @code{@ref{FL_POPUP_NORMAL}} in a select objects popup) and @code{state} can be set to @code{@ref{FL_POPUP_DISABLED}} and/or @code{@ref{FL_POPUP_HIDDEN}}. Please note: when the select object already had items before the call of @code{@ref{fl_set_select_items()}} then they are removed before the new ones are set. The values assigned to the items start at 0. A third way to "populate" a select object is to create a popup directly and then associate it with the select object using @findex fl_set_select_popup() @anchor{fl_set_select_popup()} @example int fl_set_select_popup(FL_OBJECT *obj, FL_POPUP *popup); @end example @noindent If the select object already had a popup before this will be deleted and replaced by the new popup passed as the second argument. Please note that the popup the argument @code{popup} points to may not contain any entries other than those of type @code{@ref{FL_POPUP_NORMAL}} (and, of course, the popup can't be a sub-popup of another popup). @node Select Interaction @subsection Select Interaction The simplest interaction with a select object consists of clicking onto the object and then selecting an item in the popup that gets shown directly beside the mouse position. If you click with the left or right mouse button onto the select object previous or next item, respectively, will be selected. If youl keep the left or mouse button pressed down for a longer time slowly all alternatives are selected, one after each other. You finally can also use the scroll wheel of your mouse to select the next or previous item (scrolling down selects the next, scrolling up the previous item). On every selection of an item (also if the already selected item is re-selected) a callback that may have been associated with the item is executed. The callback receives as its argument a pointer to a structure of type @code{@ref{FL_POPUP_RETURN}}. Its @code{val} member is a integer value associated with the entry. It can be set explicitely on creation of the item using the @code{"%x"} "special sequence". If not given then first item gets the value 0, the next 1 etc. @code{user_data} is a pointer to some user data, which can be set on creation of the item using @code{"%u"}. @code{text} is the string used in creating the item, including all "special sequences", while @code{label} is the string shown in the popup for the item. If there was a special sequence of @code{"%S"} in the string that was used to create the item @code{accel} is the text that appears right-flushed in the popup for the item. @code{entry} is a pointer to the popup entry that represents the item in the select object and, finally, @code{popup} is the popup associated with the select object. Normally, when a new item is selected this is reported back to the caller either by calling the select objects callback (if one exists) or by returning the object as the result of a call of e.g.@: @code{@ref{fl_do_forms()}}. But if the callback for the item itself returns @code{FL_IGNORE} then the latter doesn't happen. This can be useful for cases where all work for a change of the selection can already be done within the items callback and the "main loop" shouldn't get involved anymore. As for all other normal objects the condition under which a @code{FL_SELECT} object gets returned to the application (or an associate callback is called) can be influenced by calling the function @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when) @end example where @code{when} can have the following values @table @code @item @ref{FL_RETURN_NONE} Never return or invoke a callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback if end of interaction and selection of an item coincide. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever an item is selected (this is the default). @item @ref{FL_RETURN_END} Return or invoke callback on end of an interaction. @item @ref{FL_RETURN_ALWAYS} Return (or invoke callback) whenever the interaction ends and/or an item is selected. @end table Per default the popup of a select objects remains shown when the user releases the mouse somewhere outside the popup window (or on its title area). The alternative is to close the popup immediately when the user releases the mouse, independent of where it is. Using the function @findex fl_set_select_policy() @anchor{fl_set_select_policy()} @example int fl_set_select_policy(FL_OBJECT *obj, int policy); @end example @noindent the program can switch between these two modes of operation, where @code{policy} can be on of two values: @table @code @tindex FL_POPUP_NORMAL_SELECT @item FL_POPUP_NORMAL_SELECT Keeps the popup opened when the mouse isn't released on one of the selectable items. @tindex FL_POPUP_DRAG_SELECT @item FL_POPUP_DRAG_SELECT Close the popup immediately when the mouse button is released. @end table @noindent The function returns on success the previous setting of the "policy" and -1 on error. @node Other Select Routines @subsection Other Select Routines To find out which item is currently selected use @findex fl_get_select_item() @anchor{fl_get_select_item()} @example FL_POPUP_RETURN *fl_get_select_item(FL_OBJECT *obj); @end example @noindent It returns a pointer to a structure of type @code{@ref{FL_POPUP_RETURN}} as already described above, containing all needed information about the selected item. For some actions, e.g.@: deletion of an item etc., it is necessary to know the popup entry that represents it. Therefore it's possible to search the list of items according to several criteria: @findex fl_get_select_item_by_value() @anchor{fl_get_select_item_by_value()} @findex fl_get_select_item_by_label() @anchor{fl_get_select_item_by_label()} @findex fl_get_select_item_by_text() @anchor{fl_get_select_item_by_text()} @example FL_POPUP_ENTRY *fl_get_select_item_by_value(FL_OBJECT *obj, long val); FL_POPUP_ENTRY *fl_get_select_item_by_label(FL_OBJECT *obj, const char *label); FL_POPUP_ENTRY *fl_get_select_item_by_text(FL_OBJECT *obj, const char *text); @end example The first function, @code{@ref{fl_get_select_item_by_value()}}, searches through the list of items and returns the first one with the @code{val} associated with the item (or @code{NULL} if none is found). The second, @code{@ref{fl_get_select_item_by_label()}} searches for a certain label as displayed for the item in the popup. The third, @code{@ref{fl_get_select_item_by_text()}} searches for the text the item was created by (that might be the same as the label text in simple cases). Please note that all functions return a structure of type @code{@ref{FL_POPUP_ENTRY}} (and not @code{@ref{FL_POPUP_RETURN}}, which gives you direct access to the entry in the popup for the item. Using e.g.@: the result of one of the functions above you can also set the currently selected item via your program using @findex fl_set_select_item() @anchor{fl_set_select_item()} @example FL_POPUP_RETURN *fl_set_select_item(FL_OBJECT *obj, FL_POPUP_ENTRY *entry); @end example Or you could use the result to delete an item: @findex fl_delete_select_item() @anchor{fl_delete_select_item()} @example int fl_delete_select_item(FL_OBJECT *obj, FL_POPUP_ENTRY *entry); @end example @noindent Please note that the values associated with items won't change due to removing an item. Alternatively, you can replace an item by one or more new ones. To do that use @findex fl_replace_select_item() @anchor{fl_replace_select_item()} @example FL_POPUP_ENTRY *fl_replace_select_item(FL_OBJECT *obj, FL_POPUP_ENTRY *old, const char *new_items, ...); @end example @noindent @code{old} designates the item to be removed and @code{new_items} is a string exactly like it would be used in @code{@ref{fl_add_select_items()}} for the @code{items} argument, that defines the item(s) to replace the existing item. Please note that, unless values to be associated with the items (see the @code{val} member of the @code{@ref{FL_POPUP_RETURN}} structure) there's a twist here. When items get created they per default receive increasing values, starting at 0. This also holds for items that get created in the process of replacement. The result is that the ordering of those values in that case wont represent the order in which they appear in the select objects popup. Another sometimes useful function allows insertion of new items somewhere in the middle of a list of already existing items: @findex fl_insert_select_item() @anchor{fl_insert_select_item()} @example FL_POPUP_ENTRY *fl_insert_select_item(FL_OBJECT *obj, FL_POPUP_ENTRY *after, const char *new_items, ...); @end example @noindent @code{after} is the entry after which the new item(s) are to be inserted (if it's @code{NULL} the new items are inserted at the very start). The rest of the arguments are the same as for @code{@ref{fl_replace_select_item()}} and the same caveats about the values associated automatically with the new items holds. It's possible to remove all items from a select object by calling @findex fl_clear_select() @anchor{fl_clear_select()} @example int fl_clear_select(FL_OBJECT *obj); @end example @noindent Afterwards you have to call again e.g.@: @code{@ref{fl_add_select_items()}} to set new entries. Note that if you used @code{@ref{fl_set_select_popup()}} to set a popup for the select object then that popup gets deleted automatically on calling @code{@ref{fl_clear_select()}}! The values automatically associated with items when calling @code{@ref{fl_add_select_items()}} will start at 0 again. @node Select Attributes @subsection Select Attributes The two color arguments, @code{clo1} and @code{col2}, of the function @code{@ref{fl_set_object_color()}} set the background color of the object normally and when the mouse is hovering over it, respectively. With the functions @findex fl_set_select_text_color() @anchor{fl_set_select_text_color()} @findex fl_get_select_text_color() @anchor{fl_get_select_text_color()} @example FL_COLOR fl_set_selection_text_color(FL_OBJECT *obj, FL_COLOR color); FL_COLOR fl_get_selection_text_color(FL_OBJECT *obj); @end example @noindent the color of the text of the currently selected item on top of the object can be set or queried. To control (or determine) the alignment of the text with the currently selected item on top of the select object use @findex fl_set_select_text_align() @anchor{fl_set_select_text_align()} @findex fl_get_select_text_align() @anchor{fl_get_select_text_align()} @example int fl_set_select_text_align(FLOBJECT *obj, int align); int fl_get_select_text_align(FLOBJECT *obj); @end example @noindent Please note that the @code{@ref{FL_ALIGN_INSIDE}} flag should be set with @code{align} since the text always will be drawn within the boundaries of the object. On success the function return the old setting for the alignment or -1 on error. Finally, the font style and size of the text can be set or obtained using @findex fl_set_select_text_font() @anchor{fl_set_select_text_font()} @findex fl_get_select_text_font() @anchor{fl_get_select_text_font()} @example int fl_set_select_text_font(FL_OBJECT *obj, int style, int size); int fl_get_select_text_font(FL_OBJECT *obj, int *style, int *size); @end example @noindent The rest of the appearance of a select object concerns the popup that is used. To avoid bloating the API unnecessarily no functions for select objects were added that would just call popup functions. The popup belonging to a select object can be easily found from either a @code{@ref{FL_POPUP_ENTRY}} structure as returned by the functions for searching for items or the @code{@ref{FL_POPUP_RETURN}} structure passed to all callbacks and also returned by @code{@ref{fl_get_select_item()}}. Both structures have a member called @code{popup} that is a pointer to the popup associated with the select object. For popup functions operation on indiviual items just use the pointer to the @code{@ref{FL_POPUP_ENTRY}} structure itself or the @code{entry} member of the @code{@ref{FL_POPUP_RETURN}} structure. There's also a convenience function for finding out the popup used for a select object: @findex fl_get_select_popup() @anchor{fl_get_select_popup()} @example FL_POPUP *fl_get_select_popup(FL_OBJECT *obj); @end example @noindent During the lifetime of a select object the popup never changes as long as @code{@ref{fl_set_select_popup()}} isn't called. Per default the popup of a select object does not have a title drawn on top of it. To change that use @code{@ref{fl_popup_set_title()}}. To change the various colors and fonts used when drawing the popup use the functions @code{@ref{fl_popup_set_color()}} and @code{@ref{fl_popup_entry_set_font()}} (and @code{@ref{fl_popup_set_title_font()}}). To change the border width or minimum width of the popup use @code{@ref{fl_popup_set_bw()}} and @code{@ref{fl_popup_set_min_width()}}. To disable or hide (or do the reverse) an item use the functions @code{@ref{fl_popup_entry_set_state()}} and @code{@ref{fl_popup_entry_get_state()}}. The keyboard shortcut for an entry can be set via @code{@ref{fl_popup_entry_set_shortcut()}}. The callback functions (selection, enter and leave callback) for individual items can be set via @code{@ref{fl_popup_entry_set_callback()}}, @code{@ref{fl_popup_entry_set_enter_callback()}} and @code{@ref{fl_popup_entry_set_leave_callback()}}, a callback for the whole popup with @code{@ref{fl_popup_set_callback()}}. Finally, to assign a different (long) value to an item or set a pointer to user data use @code{@ref{fl_popup_entry_set_value()}} and @code{@ref{fl_popup_entry_set_user_data()}}. @node Select Remarks @subsection Remarks See the demo program @file{select.c} for an example of the use of select objects. @node Nmenu Object @section Nmenu Object Another object type that heavily depends on popups is the "nmenu" object type. It is meant to be used for menus and the "n" in front of the name stands for "new" since this is a re-implementation of the old menu object type (which is now deprecated since it is based on @ref{XPopup}). @ifnottex @menu * Adding Nmenu Objects: Adding Nmenu Objects * Nmenu Interaction: Nmenu Interaction * Other Nmenu Routines: Other Nmenu Routines * Nmenu Attributes: Nmenu Attributes * Remarks: Nmenu Remarks @end menu @end ifnottex @node Adding Nmenu Objects @subsection Adding Nmenu Objects To add a nmenu object use @findex fl_add_nmenu() @anchor{fl_add_nmenu()} @example FL_OBJECT *fl_add_nmenu(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent There are currently three types: @table @code @tindex FL_NORMAL_NMENU @anchor{FL_NORMAL_NMENU} @item FL_NORMAL_NMENU Probably the most often used type: shown as text on a borderless background, popup gets opened when clicked on. @tindex FL_NORMAL_TOUCH_NMENU @anchor{FL_NORMAL_TOUCH_NMENU} @item FL_NORMAL_TOUCH_NMENU Also shown as text on a borderless background, but popup gets opened when the mouse is moved on top of it without any further user action required. @tindex FL_BUTTON_NMENU @anchor{FL_BUTTON_NMENU} @item FL_BUTTON_NMENU When not active shown as text on borderless background, when clicked on popup is shown and the object itself being displayed as a button. @tindex FL_BUTTON_TOUCH_NMENU @anchor{FL_BUTTON_TOUCH_NMENU} @item FL_BUTTON_TOUCH_NMENU When not active shown as text on borderless background, when mouse is moved onto it the popup is shown and the object itself is displayed as a button. @end table Once a new nmenu object has been created items have to be added to it. For this the following function exists: @findex fl_add_nmenu_items() @anchor{fl_add_nmenu_items()} @example FL_POPUP_ENTRY *fl_add_nmenu_items(FL_OBJECT *obj, const char items, ...); @end example @noindent (The function can also be used to append new items to a nmenu object that already has items.) The function returns a pointer to the first menu entry added on success and @code{NULL} on failure. @code{items} is a string with the items to add, separated by the @code{'|'} character. In the simplest case you would just use something like @code{"Item 1|Item 2|Item 3"} to add three items to the list. As also described in the documentation for the similar function @code{@ref{fl_popup_add_entries()}} the text for an item may contain "special sequences" that start with the character @code{'%'} and then may require an additional argument passed to the function after the @code{items} argument. All of those described in detail in the documentation for the @code{@ref{fl_popup_add_entries()}} function can also be used for nmenus. Another way to set up the popup of a select object, using an array of @ref{FL_POPUP_ITEM} structures, is via the function @findex fl_set_nmenu_items() @anchor{fl_set_nmenu_items()} @example FL_POPUP_ENTRY *fl_set_nmenu_items(FL_OBJECT *obj, FL_POPUP_ITEM *item); @end example @noindent The function returns a pointer to the first menu item on success and @code{NULL} on failure. The function expects as arguments a pointer to the nmenu object and an array of @code{@ref{FL_POPUP_ITEM}} structuress, with the very last element having @code{NULL} as the @code{text} member to mark the end of the array. The @code{text} member of the structure may contain the character sequence @code{"%S"} to have the text drawn for the item split up at that position and with everything before @code{"%S"} drawn left-flushed and the rest right-flushed. Moreover, @code{text} may start with the character @code{'/'} and/or @code{'_'}. For an underline character a line is drawn above the item. And if there's a slash this item marks the begin of a sub-menu with all further items belonging to the sub-menu until a structure with member @code{text} being set to @code{NULL} is found in the array. (The @code{'/'} and @code{'_'} characters are, of course, not drawn.) @code{type} indicates the type of the item. It can be @table @code @tindex FL_POPUP_NORMAL @item FL_POPUP_NORMAL A normal, plain item. @tindex FL_POPUP_TOGGLE @item FL_POPUP_TOGGLE An item that represents one of two states and is drawn with a check-marker when in "on" state. @tindex FL_POPUP_RADIO @item FL_POPUP_RADIO A radio item, i.e.@: it belongs to a group of items of which only one can be in "on" state at a time. They are drawn with a circle to the left with the circle for the "selected" item being filled with a color. @end table @noindent Please note that if @code{text} starts with a @code{'/'} the type @strong{must} be @code{FL_POPUP_NORMAL}. The @code{state} member per default is @code{@ref{FL_POPUP_NONE}}. It can be set to @table @code @tindex FL_POPUP_NONE @item FL_POPUP_NONE No special flags are set for the state of the item. @tindex FL_POPUP_DSABLED @item FL_POPUP_DSABLED The item is disabled and can't be selected. @tindex FL_POPUP_HIDDEN @item FL_POPUP_HIDDEN The item is hidden, i.e.@: does not get shown (and thus can't be selected). @tindex FL_POPUP_CHECKED @item FL_POPUP_CHECKED Only relevant for toggle or radio items, marks it as in "on" state. @end table @code{callback} is a function that will be called if the item is selected. The callback function has the following type: @example typedef int (*FL_POPUP_CB)(FL_POPUP_RETURN *); @end example @noindent It receives a pointer to a structure that contains all information about the entry selected by the user: @example typedef struct @{ long int val; /* value assigned to entry */ void *user_data; /* pointer to user data */ const char *text; /* text of selected popup entry */ const char *label; /* text drawn on left side */ const char *accel; /* text drawn on right side */ const FL_POPUP_ENTRY *entry; /* selected popup entry */ const FL_POPUP *popup; /* (sub-)popup it belongs to */ @} FL_POPUP_RETURN; @end example @noindent @code{val} is a value that has been associated with the entry and @code{user_data} is a pointer that can be used to store the location of further information. @code{text} is the text that was used to create the entry (including all "special" characters), while @code{label} and @code{accel} are the texts shown for the entry on the left and right. @code{entry} is the pointer to the structure for the entry selected and @code{popup} to the (sub-) popup the entry belongs to (@pxref{Part III Popups}, for more details on these structures). If the callback function already does all the work required on selection of the item have it return the value @code{FL_IGNORE} to keep the selection from being reported back to the main loop of the program. Finally, @code{shortcut} is a string encoding the keybord shortcut to be used for the item. There's also a third method to "populate" a menu. If you already created a popup than you can set it as the menu's popup via a call of @findex fl_set_nmenu_popup() @anchor{fl_set_nmenu_popup()} @example int fl_set_nmenu_popup(FL_POPUP *popup); @end example @noindent Of course, the popup you associate with the nmenu object in this way can't be a sub-popup. @node Nmenu Interaction @subsection Nmenu Interaction There are, if seen interaction-wise, two types of nmenu objects, normal ones and touch nmenus. For normal nmenus a popup is opened when the user clicks on the area of the nmenu object while for touch nmenus the popup already is shown when the user moves the mouse unto the area. In other respects they behave identical: the user just selects one of the items in the popup (or one of the sub-popups) and then the popup is closed again. The selection can now be handled within a callback function and/or reported back to the main loop of the program. The popup is always shown directly below the nmenu object (except for the case that the popup is that long that it wouldn't fit on the screen, in which case the popup is drawn above the nmenu's area. The most natural way to deal with a selection by the user is probably via a callback for the item that was selected. But also a callback for the popup as a whole or the object itself can be used. Item and popup callback functions are of type @code{@ref{FL_POPUP_CB}} described above (and in even more detail in @ref{Part III Popups}), while object callbacks are "normal" XForms callback functions. The condition under which a @code{FL_NMENU} object gets returned to the application (or an associate callback is invoked) can be influenced by calling the function @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when) @end example where @code{when} can have the following values @table @code @item @ref{FL_RETURN_NONE} Never return or invoke a callback. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback if end of interaction and selection of an item coincide. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever an item is selected (this is the default). @item @ref{FL_RETURN_END} Return or invoke callback on end of an interaction. @item @ref{FL_RETURN_ALWAYS} Return (or invoke callback) whenever the interaction ends and/or an item is selected. @end table One detail of the interaction that can be adjusted is under which conditions the nmenu's popup gets closed. Per default the popup is closed when an item is selected or (without a selection) when the user clicks somehwere outside of the popups area. This can be changed so that the popup also gets closed (without a selection) when the mouse button is clicked or released on a non-selectable item (giving the impression of a "pull-down" menu). For this purpose there's the @findex fl_set_nmenu_policy() @anchor{fl_set_nmenu_policy()} @example int fl_set_nmenu_policy(FL_OBJECT *obj, int policy); @end example @noindent function where @code{policy} can be one of two values: @table @code @tindex FL_POPUP_NORMAL_SELECT @item FL_POPUP_NORMAL_SELECT Default, popup stays open until mouse button is released on a selectable entry or button is clicked outside the popups area. @tindex FL_POPUP_DRAG_SELECT @item FL_POPUP_DRAG_SELECT Popup is closed when the mouse button is released. @end table @noindent The function returns on success the previous setting of the "policy" and -1 on error. @node Other Nmenu Routines @subsection Other Nmenu Routines To find out which item of a nmenu object was selected last use @findex fl_get_nmenu_item() @anchor{fl_get_nmenu_item()} @example FL_POPUP_RETURN *fl_get_nmenu_item(FL_OBJECT *obj); @end example @noindent The function returns either a pointer to a @code{@ref{FL_POPUP_RETURN}} structure with informations about the selected item (as already discussed above when talking about callbacks) or @code{NULL} if no selection was made the last time the nmenu object was used. For some actions, e.g.@: deletion of an item etc., it is necessary to know the popup entry that represents it. Therefore it's possible to search the list of items according to several criteria: @findex fl_get_nmenu_item_by_value() @anchor{fl_get_nmenu_item_by_value()} @findex fl_get_nmenu_item_by_label() @anchor{fl_get_nmenu_item_by_label()} @findex fl_get_nmenu_item_by_text() @anchor{fl_get_nmenu_item_by_text()} @example FL_POPUP_ENTRY *fl_get_nmenu_item_by_value(FL_OBJECT *obj, long val); FL_POPUP_ENTRY *fl_get_nmenu_item_by_label(FL_OBJECT *obj, const char *label); FL_POPUP_ENTRY *fl_get_nmenu_item_by_label(FL_OBJECT *obj, const char *text); @end example The first function, @code{@ref{fl_get_nmenu_item_by_value()}}, searches through the list of all items (including items in sub-popups) and returns the first one with the @code{val} associated with the item (or @code{NULL} if none is found). The second, @code{@ref{fl_get_nmenu_item_by_label()}} searches for a certain label as displayed for the item in the popup. The third, @code{@ref{fl_get_nmenu_item_by_text()}} searches for the text the item was created by (that might be the same as the label text in simple cases). Please note that all functions return a structure of type @code{@ref{FL_POPUP_ENTRY}} (and not @code{@ref{FL_POPUP_RETURN}}, which gives you direct access to the entry in the popup for the item. Using e.g.@: the results of the above searches a nmenu item can be deleted: @findex fl_delete_nmenu_item() @anchor{fl_delete_nmenu_item()} @example int fl_delete_nmenu_item(FL_OBJECT *obj, FL_POPUP_ENTRY *item); @end example Alternatively, an item can be replaced by one or more items: @findex fl_replace_nmenu_item() @anchor{fl_replace_nmenu_item()} @example FL_POPUP_ENTRY *fl_replace_nmenu_item(FL_OBJECT *obj, FL_POPUP_ENTRY *old, const char *new_items, ...); @end example where @code{old} is the item to replace and @code{new_items} is a string exactly as used for @code{@ref{fl_add_nmenu_items()}} with informations about the new item(s). One also may insert additional items using @findex fl_insert_nmenu_items() @anchor{fl_insert_nmenu_items()} @example FL_POPUP_ENTRY *fl_insert_nmenu_items(FL_OBJECT *obj, FL_POPUP_ENTRY *after, const char *new_items, ...); @end example @noindent where @code{after} is the item after which the new items are to be inserted (use @code{NULL} to insert at the very start) and @code{new_items} is a string just like used with @code{@ref{fl_add_nmenu_items()}} with informations about the additional item(s). As you may remember, there are two different ways to "populate" a nmenu object. In one case you pass a kind of format string plus a variable number of arguments and in the other case an array of @code{@ref{FL_POPUP_ITEM}} structures. The previously listed functions for inserting and replacing used the first "interface". But there are also three functions for using the alternative interface: @anchor{fl_add_nmenu_items2()} @findex fl_add_nmenu_items2() @anchor{fl_insert_nmenu_items2()} @findex fl_insert_nmenu_items2() @anchor{fl_replace_nmenu_items2()} @findex fl_replace_nmenu_items2() @example FL_POPUP_ENTRY *fl_add_nmenu_items2(FL_OBJECT *obj, FL_POPUP_ITEM *items); FL_POPUP_ENTRY *fl_insert_nmenu_items2(FL_OBJECT *obj, FL_POPUP_ENTRY *after, FL_POPUP_ITEM *items); FL_POPUP_ENTRY *fl_replace_nmenu_items2(FL_OBJECT *obj, FL_POPUP_ENTRY *old_item, FL_POPUP_ITEM *items); @end example @noindent All three functions return a pointer to the first new entry in the nmenu's popup on success and @code{NULL} on failure. The all take a pointer to the nmenu object as their first argument. @code{@ref{fl_add_nmenu_items2()}} appends the items given by the list specified via the second argument to the nmenu's popup. @code{@ref{fl_insert_nmenu_items2()}} inserts one or more new items (as given by the last argument) after the entry specified by @code{after} (if @code{after} is @code{NULL} the new items are inserted before all existing items). Finally, @code{@ref{fl_replace_nmenu_items2()}} replaces the existing entry @code{old_item} with a new (or a list of new items specified by @code{items}. Finally, there's a function to remove all items from a nmenu object at once: @findex fl_clear_nmenu() @anchor{fl_clear_nmenu()} @example in fl_clear_nmenu(FL_OBJECT *obj); @end example @node Nmenu Attributes @subsection Nmenu Attributes While not "active" the background of the nmenu object is drawn in the color that can be controlled via the first color argument, @code{col1}, of @code{@ref{fl_set_object_color()}}. When "active" (i.e.@: while the popup is shown) its background is drawn in the color of second color argument, @code{col2}, of the same function. The color of the label when "inactive" is controlled via @code{@ref{fl_set_object_lcol()}}. When in "active" state the color use for the label can be set via the function @findex fl_set_nmenu_hl_text_color() @anchor{fl_set_nmenu_hl_text_color()} @example FL_COLOR fl_set_nmenu_hl_text_color(FL_OBJECT *obj, FL_COLOR color); @end example @noindent The function returns the old color on success or @code{@ref{FL_MAX_COLORS}} on failure. Per default this color is @code{FL_BLACK} for nmenus that are shown as a button while being "active" while for normal nmenus it's the same color that is used items in the popup when the mouse is hovering over them. The size and style of the font used for the label of the nmenu object can be set via @code{@ref{fl_set_object_lsize()}} and @code{@ref{fl_set_object_lstyle()}}. The rest of the appearance of a nmenu object is given by the appearance of the popup. These can be directly set via the functions for setting the popup appearance as described in @ref{Popup Attributes}. To find out which popup is associated with the nmenu object use the function @findex fl_get_nmenu_popup() @anchor{fl_get_nmenu_popup()} @example FL_POPUP *fl_get_nmenu_popup(FL_OBJECT *obj); @end example @noindent and then use the popup specific functions to set the appearance. The same also holds for the appearance etc.@: of the items of the popup, a lot of functions exist that allow to set the attributes of entries of a popup, @pxref{Popup Attributes}. @node Nmenu Remarks @subsection Remarks See the demo program @file{menu.c}. @node Browser Object @section Browser Object The browser object class is probably the most powerful that currently exists in the Forms Library. A browser is a box that contains a number of lines of text. If the text does not fit inside the box, a scrollbar is automatically added so that the user can scroll through it. A browser can be used for building up a help facility or to give messages to the user. It is possible to create a browser from which the user can select lines. In this way the user can make its selections from a (possible) long list of choices. Both single lines and multiple lines can be selected, depending on the type of the browser. @ifnottex @menu * Adding Browser Objects: Adding Browser Objects * Browser Types: Browser Types * Browser Interaction: Browser Interaction * Other Browser Routines: Other Browser Routines * Browser Attributes: Browser Attributes * Remarks: Browser Remarks @end menu @end ifnottex @node Adding Browser Objects @subsection Adding Browser Objects To add a browser to a form use the routine @findex fl_add_browser() @anchor{fl_add_browser()} @example FL_OBJECT *fl_add_browser(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The meaning of the parameters is as usual. The label is placed below the box by default. @node Browser Types @subsection Browser Types The following types of browsers exist (see below for more information about them): @table @code @tindex FL_NORMAL_BROWSER @anchor{FL_NORMAL_BROWSER} @item FL_NORMAL_BROWSER A browser in which no selections can be made. @tindex FL_SELECT_BROWSER @anchor{FL_SELECT_BROWSER} @item FL_SELECT_BROWSER In this case the user can make single line selections. @tindex FL_HOLD_BROWSER @anchor{FL_HOLD_BROWSER} @item FL_HOLD_BROWSER Same but the selection remains visible till the next selection. @tindex FL_MULTI_BROWSER @anchor{FL_MULTI_BROWSER} @item FL_MULTI_BROWSER Multiple selections can be made and remain visible till de-selected. @end table Hence, the differences only lie in how the selection process works. @node Browser Interaction @subsection Browser Interaction The user can change the position of the slider or use keyboard cursor keys (including @code{}, @code{}, etc.) to scroll through the text. When he/she presses the left mouse below or above the slider, the browser scrolls one page up or down. Any other mouse button scrolls one line at a time (except wheel mouse buttons). When not using an @code{@ref{FL_NORMAL_BROWSER}} the user can also make selections with the mouse by pointing to a line or by using the cursor keys. For @code{@ref{FL_SELECT_BROWSER}}'s, as long as the user keeps the mouse pressed, the current line under the mouse is highlighted. Whenever he releases the mouse the highlighting disappears and the browser is returned to the application program. The application program can now figure out which line was selected using a call of @code{@ref{fl_get_browser()}} to be described below. It returns the number of the last selected line (with the topmost line being line 1.) An @code{@ref{FL_HOLD_BROWSER}} works exactly the same except that, when the mouse is released, the selection remains highlighted. An @code{@ref{FL_MULTI_BROWSER}} allows the user to select and de-select multiple lines. Whenever he selects or de-selects a line the browser is returned to the application program that can next figure out (using @code{@ref{fl_get_browser()}} described below) which line was selected. It returns the number of the last selected line. When the last line was de-selected it returns the negation of the line number. I.e., if line 10 was selected last the routine returns 10 and if line 10 was de-selected last, it returns -10. When the user presses the mouse on a non-selected line and then moves it with the mouse button still pressed down, he will select all lines he touches with his mouse until he releases it. All these lines will become highlighted. When the user starts pressing the mouse on an already selected line he de-selects lines rather than selecting them. Per default a browser gets only returned or the associated callback invoked on selection of a line (and, in the case of @code{@ref{FL_MULTI_BROWSER}}, on deselections). This behaviour can be changed by using the function @example int fl_set_object_return(FL_OBJECT *obj, unsigned int when) @end example where @code{when} can have the following values @table @code @item @ref{FL_RETURN_NONE} Never return or invoke callback. @item @ref{FL_RETURN_SELECTION} Return or invoke callback on selection of a line. Please note that for @code{@ref{FL_MULTI_BROWSER}} the browser may be returned just once for a number of lines having been selected. @item @ref{FL_RETURN_DESELECTION} Return or invoke callback on deselection of a line. This only works for @code{@ref{FL_MULTI_BROWSER}} browsers and the browser may be returned just once for a number of lines having been deselected. @item @ref{FL_RETURN_END_CHANGED} Return or invoke callback at end (mouse release) if the text in the browser has been scrolled. @item @ref{FL_RETURN_CHANGED} Return or invoke callback whenever the text in the browser has been scrolled. @item @ref{FL_RETURN_END} Return or invoke callback on end of an interaction for scrolling the text in the browser regardless if the text was scrolled or not. @item @ref{FL_RETURN_ALWAYS} Return or invoke callback on selection, deselection or scrolling of text or end of scrolling. @end table The default setting for @code{when} for a browser object is @code{@ref{FL_RETURN_SELECTION}|@ref{FL_RETURN_DESELECTION}} (unless during the built of XForms you set the configuration flag @code{--enable-bwc-bs-hack} in which case the default is @code{@ref{FL_RETURN_NONE}} to keep backward compatibility with earlier releases of the library). @node Other Browser Routines @subsection Other Browser Routines There are a large number of routines to change the contents of a browser, select and de-select lines, etc. To remove all lnes from a browser use @findex fl_clear_browser() @anchor{fl_clear_browser()} @example void fl_clear_browser(FL_OBJECT *obj); @end example To add a line to a browser use @findex fl_add_browser_line() @anchor{fl_add_browser_line()} @example void fl_add_browser_line(FL_OBJECT *obj, const char *text); @end example The line may contain embedded newline characters (@code{'\n'}). These will result in the text being split up into several lines, separated at the newline characters. A second way of adding a line to the browser is to use the call @findex fl_addto_browser() @anchor{fl_addto_browser()} @example void fl_addto_browser(FL_OBJECT *obj, const char *text); @end example @noindent The difference to @code{@ref{fl_add_browser_line()}} is that with this call the browser will be shifted such that the newly appended line is visible. This is useful when e.g.@: using the browser to display messages. Sometimes it may be more convenient to add characters to a browser without starting of a new line. To this end, the following routine exists @findex fl_addto_browser_chars() @anchor{fl_addto_browser_chars()} @example void fl_addto_browser_chars(FL_OBJECT *obj, const char *text); @end example @noindent This function appends text to the last line in the browser without advancing the line counter. Again the text may contain embedded newline characters (@code{'\n'}). In that case, the text before the first embedded newline is appended to the last line, and everything afterwards is put onto new lines. As in the case of @code{@ref{fl_addto_browser()}} the last added line will be visible in the browser. You can also insert a line in front of a given line. All lines after it will be shifted. Note that the top line is numbered 1 (not 0). @findex fl_insert_browser_line() @anchor{fl_insert_browser_line()} @example void fl_insert_browser_line(FL_OBJECT *obj, int line, const char *text); @end example @noindent Please note that on insertion (as well as replacements, see below) embedded newline characters don't result in the line being split up as it's done in the previous functions. Instead they will rather likely appear as strange looking characters in the text shown. The only exception is when inserting into an empty browser or after the last line, then this function works exactly as if you had called @code{@ref{fl_add_browser_line()}}. To delete a line (shifting the following lines) use: @findex fl_delete_browser_line() @anchor{fl_delete_browser_line()} @example void fl_delete_browser_line(FL_OBJECT *obj, int line); @end example One can also replace a line using @findex fl_replace_browser_line() @anchor{fl_replace_browser_line()} @example void fl_replace_browser_line(FL_OBJECT *obj, int line, const char *text); @end example As in the case of @code{@ref{fl_insert_browser_line()}} newline characters embedded into the replacement text don't have any special meaning, i.e.@: they don't result in replacement of more than a single line. Making many changes to a visible browser after another, e.g.@: clearing it and then adding a number of new lines, is slow because the browser is redrawn on each and every change. This can be avoided by using calls of @code{@ref{fl_freeze_form()}} and @code{@ref{fl_unfreeze_form()}}. So a piece of code that fills in a visible browser should preferably look like the following @example fl_freeze_form(browser->form); fl_clear_browser(browser); fl_add_browser_line(browser, "line 1"); fl_add_browser_line(browser, "line 2"); ... fl_unfreeze_form(brow->form); @end example @noindent where @code{browser->form} is the form that contains the browser object named @code{browser}. To obtain the contents of a particular line in the browser, use @findex fl_get_browser_line() @anchor{fl_get_browser_line()} @example const char *fl_get_browser_line(FL_OBJECT *obj, int line); @end example @noindent It returns a pointer to the text of that line, exactly as it were passed to the function that created the line. It is possible to load an entire file into a browser using @findex fl_load_browser() @anchor{fl_load_browser()} @example int fl_load_browser(FL_OBJECT *obj, const char *filename); @end example @noindent The routine returns @code{1} when file could be successfully loaded, otherwise @code{0}. If the file name is an empty string (or the file could not be opened for reading) the browser is just cleared. This routine is particularly useful when using the browser for a help facility. You can create different help files and load the needed one depending on context. The application program can select or de-select lines in the browser. To this end the following calls exist with the obvious meaning: @findex fl_select_browser_line() @anchor{fl_select_browser_line()} @findex fl_deselect_browser() @anchor{fl_deselect_browser()} @findex fl_deselect_browser_line() @anchor{fl_deselect_browser_line()} @example void fl_select_browser_line(FL_OBJECT *obj, int line); void fl_deselect_browser_line(FL_OBJECT *obj, int line); void fl_deselect_browser(FL_OBJECT *obj); @end example @noindent The last call de-selects all lines. To check whether a line is selected, use the routine @findex fl_isselected_browser_line() @anchor{fl_isselected_browser_line()} @example int fl_isselected_browser_line(FL_OBJECT *obj, int line); @end example The routine @findex fl_get_browser_maxline() @anchor{fl_get_browser_maxline()} @example int fl_get_browser_maxline(FL_OBJECT *obj); @end example @noindent returns the number of lines in the browser. For example, when the application program wants to figure out which lines in a @code{@ref{FL_MULTI_BROWSER}} are selected code similar to the following can be used: @example int total_lines = fl_get_browser_maxline(browser); for (i = 1; i <= total_lines; i++) if (fl_isselected_browser_line(browser, i)) /* Handle the selected line */ @end example Sometimes it is useful to know how many lines are visible in the browser. To this end, the following call can be used @findex fl_get_browser_screenlines() @anchor{fl_get_browser_screenlines()} @example int fl_get_browser_screenlines(FL_OBJECT *obj); @end example Please note that this count only includes lines that are shown completely in the browser, lines that are partially obscured aren't counted in. To obtain the last selection made by the user, e.g.@: when the browser is returned, the application program can use the routine @findex fl_get_browser() @anchor{fl_get_browser()} @example int fl_get_browser(FL_OBJECT *obj); @end example @noindent It returns the line number of the last selection being made (0 if no selection was made). When the last action was a de-selection (only for @code{@ref{FL_MULTI_BROWSER}}) the negative of the de-selected line number is returned. The following function allows to find out the (unobscured) line that is currently shown at the top of the browser: @findex fl_get_browser_topline() @anchor{fl_get_browser_topline()} @example int fl_get_browser_topline(FL_OBJECT *obj); @end example @noindent Note that the index of the top line is 1, not 0. It is possible to register a callback function that gets called when a line is double-clicked on. To do so, the following function is available: @findex fl_set_browser_dblclick_callback() @anchor{fl_set_browser_dblclick_callback()} @example void fl_set_browser_dblclick_callback(FL_OBJECT *obj, void (*cb)(FL_OBJECT *, long), ` long data); @end example @noindent Of course, double-click callbacks make most sense for @code{@ref{FL_HOLD_BROWSER}}s. The part if the text visible within the browser can be set programmatically in a number of ways. With the functions @findex fl_set_browser_topline() @anchor{fl_set_browser_topline()} @findex fl_set_browser_bottomline() @anchor{fl_set_browser_bottomline()} @example void fl_set_browser_topline(FL_OBJECT *obj, int line); void fl_set_browser_bottomline(FL_OBJECT *obj, int line); @end example @noindent the line shown at the top or the bottom can be set (note again that line numbers start with 1). Instead of by line number also the amount the text is scrolled in horizontal and vertical direction can be set with the functions @findex fl_set_browser_xoffset() @anchor{fl_set_browser_xoffset()} @findex fl_set_browser_rel_xoffset() @anchor{fl_set_browser_rel_xoffset()} @findex fl_set_browser_yoffset() @anchor{fl_set_browser_yoffset()} @findex fl_set_browser_rel_yoffset() @anchor{fl_set_browser_rel_yoffset()} @example void fl_set_browser_xoffset(FL_OBJECT *obj, FL_Coord xoff); void fl_set_browser_rel_xoffset(FL_OBJECT *obj, double xval); void fl_set_browser_yoffset(FL_OBJECT *obj, FL_Coord yoff); void fl_set_browser_rel_yoffset(FL_OBJECT *obj, double yval); @end example @noindent where @code{xoff} and @code{yoff} indicate how many pixels to scroll horizontally (relative to the left margin) or vertically (relative to the top of the text), while @code{xval} and @code{yval} stand for positions relative to the total width or height of all of the text and thus have to be numbers between @code{0.0} and @code{1.0}. There are also a number of functions that can be used to obtain the current amount of scrolling: @findex fl_get_browser_xoffset() @anchor{fl_get_browser_xoffset()} @findex fl_get_browser_rel_xoffset() @anchor{fl_get_browser_rel_xoffset()} @findex fl_get_browser_yoffset() @anchor{fl_get_browser_yoffset()} @findex fl_get_browser_rel_yoffset() @anchor{fl_get_browser_rel_yoffset()} @example FL_Coord fl_get_browser_xoffset(FL_OBJECT *obj); FL_Coord fl_get_browser_rel_xoffset(FL_OBJECT *obj); FL_Coord fl_get_browser_yoffset(FL_OBJECT *obj); FL_Coord fl_get_browser_rel_yoffset(FL_OBJECT *obj); @end example Finally, there's a function that tells you the vertical position of a line in pixels: @findex fl_get_browser_line_yoffset() @anchor{fl_get_browser_line_yoffset()} @example int fl_get_browser_line_yoffset(FL_OBJECT *obj, imt line); @end example @noindent The return value is just the value that would have to be passed to @code{@ref{fl_set_browser_yoffset()}} to make the line appear at the top of the browser. If the line does not exist it returns @code{-1} instead. @node Browser Attributes @subsection Browser Attributes Never use the boxtype @code{@ref{FL_NO_BOX}} for browsers. The first color argument (@code{col1}) to @code{@ref{fl_set_object_color()}} controls the color of the browser's box, the second (@code{col2}) the color of the selection. The text color is the same as the label color, @code{obj->lcol}. To set the font size used inside the browser use @findex fl_set_browser_fontsize() @anchor{fl_set_browser_fontsize()} @example void fl_set_browser_fontsize(FL_OBJECT *obj, int size); @end example To set the font style used inside the browser use @findex fl_set_browser_fontstyle() @anchor{fl_set_browser_fontstyle()} @example void fl_set_browser_fontstyle(FL_OBJECT *obj, int style); @end example @noindent @xref{Label Attributes and Fonts}, for details on font sizes and styles. It is possible to change the appearance of individual lines in the browser. Whenever a line starts with the symbol @code{'@@'} the next letter indicates the special characteristics associated with this line. The following possibilities exist at the moment: @table @code @item f Fixed width font. @item n Normal (Helvetica) font. @item t Times-Roman like font. @item b Boldface modifier. @item i Italics modifier. @item l Large (new size is @code{@ref{FL_LARGE_SIZE}}). @item m Medium (new size is @code{@ref{FL_MEDIUM_SIZE}}). @item s Small (new size is @code{@ref{FL_SMALL_SIZE}}). @item L Large (new size = current size + 6) @item M Medium (new size = current size + 4) @item S Small (new size = current size - 2). @item c Centered. @item r Right aligned. @item _ Draw underlined text. @item - An engraved separator. Text following @code{'-'} is ignored. @item C The next number indicates the color index for this line. @item N Non-selectable line (in selectable browsers). @item @@@@ Regular @code{'@@'} character. @end table The modifiers (bold and itatic) work by adding @code{@ref{FL_BOLD_STYLE}} and @code{@ref{FL_ITALIC_STYLE}} to the current active font index to look up the font in the font table (you can modify the table using @code{@ref{fl_set_font_name()}}). More than one option can be used by putting them next to each other. For example, @code{"@@C1@@l@@f@@b@@cTitle"} will give you the red, large, bold fixed font, centered word @code{"Title"}. As you can see the font change requests accumulate and the order is important, i.e., @code{"@@f@@b@@i"} gives you a fixed bold italic font while @code{"@@b@@i@@f"} gives you a (plain) fixed font. Depending on the font size and style lines may have different heights. In some cases the character @code{'@@'} might need to be placed at the beginning of the lines without introducing the special meaning mentioned above. In this case you can use @code{"@@@@"} or change the special character to something other than @code{'@@'} using the following routine @findex fl_set_browser_specialkey() @anchor{fl_set_browser_specialkey()} @example void fl_set_browser_specialkey(FL_OBJECT *obj, int key); @end example To align different text fields on a line, tab characters (@code{'\t'}) can be embedded in the text. See @code{@ref{fl_set_tabstop()}} on how to set tabstops. There are two functions to turn the scrollbars on and off: @findex fl_set_browser_hscrollbar() @anchor{fl_set_browser_hscrollbar()} @findex fl_set_browser_vscrollbar() @anchor{fl_set_browser_vscrollbar()} @example void fl_set_browser_hscrollbar(FL_OBJECT *obj, int how); void fl_set_browser_vscrollbar(FL_OBJECT *obj, int how); @end example @noindent @code{how} can be set to the following values: @table @code @tindex FL_ON @item FL_ON Always on. @tindex FL_OFF @item FL_OFF Always off. @tindex FL_AUTO @item FL_AUTO On only when needed (i.e.@: there are more lines/chars than could be shown at once in the browser). @end table @noindent @code{FL_AUTO} is the default. Please note that when you switch the scrollbars off the text can't be scrolled by the user anymore at all (i.e.@: also not using methods that don't use scrollbars, e.g.@: using the cursor keys). Sometimes, it may be desirable for the application to obtain the scrollbar positions when they change (e.g., to use the scrollbars of one browser to control other browsers). There are two ways to achieve this. You can use these functions: @tindex FL_BROWSER_SCROLL_CALLBACK @findex fl_set_browser_hscroll_callback() @anchor{fl_set_browser_hscroll_callback()} @findex fl_set_browser_vscroll_callback() @anchor{fl_set_browser_vscroll_callback()} @example typedef void (*FL_BROWSER_SCROLL_CALLBACK)(FL_OBJECT *, int, void *); void fl_set_browser_hscroll_callback(FL_OBJECT *obj, FL_BROWSER_SCROLL_CALLBACK cb, void *cb_data); void fl_set_browser_vscroll_callback(FL_OBJECT *obj, FL_BROWSER_SCROLL_CALLBACK cb, void *cb_data); @end example @noindent After scroll callbacks are set whenever the scrollbar changes position the callback function is called as @example cb(ob, offset, cb_data); @end example @noindent The first argument to the callback function @code{cb} is the browser object, the second argument is the new xoffset for the horizontal scrollbar or the new top line for the vertical scrollbar. The third argument is the callback data specified as the third argument in the function calls to install the callback. To uninstall a scroll callback, use a @code{NULL} pointer as the callback function. As an alternative you could request that the browser object gets returned (or a callback invoked) when the the scrollbar positions are changed. This can be done e.g.@: by passing @code{@ref{FL_RETURN_CHANGED}} (if necessary @code{OR}'ed with flags for also returning on selection/deselections). Within the code for dealing with the event you could check if this is a change event by using the function @findex fl_get_object_return_state() @example int fl_get_object_return_state(FL_OBJECT *obj); @end example and test if @code{@ref{FL_RETURN_CHANGED}} is set in the return value (by just logically @code{AND}'ing both) and then handle the change. By default, the scrollbar size is based on the relation between the size of the browser and the size of the text. To change the default, use the following routine @findex fl_set_browser_scrollbarsize() @anchor{fl_set_browser_scrollbarsize()} @example void fl_set_browser_scrollbarsize(FL_OBJECT *obj, int hh, int vw); @end example @noindent where @code{hh} is the horizontal scrollbar height and @code{vw} is the vertical scrollbar width. Use 0 to indicate the default. The default scrollbar type is @code{FL_THIN_SCROLLBAR}. There are two ways you can change the default. One way is to use @code{@ref{fl_set_defaults()}} or @code{@ref{fl_set_scrollbar_type()}} to set the application wide default, another way is to use @code{@ref{fl_get_object_component()}} to get the object handle to the scrollbars and change the the object type forcibly. The first method is preferable because the user can override the setting via resources. Although the second method of changing the scrollbar type is not recommended, the object handle obtained can be useful in changing the scrollbar colors etc. Finally there is a routine that can be used to obtain the browser size in pixels for the text area @findex fl_get_browser_dimension() @anchor{fl_get_browser_dimension()} @example void fl_get_browser_dimension(FL_OBJECT *obj, FL_Coord *x, FL_Coord *y, FL_COORD *w, FL_COORD *h); @end example @noindent where @code{x} and @code{y} are measured from the top-left corner of the form (or the smallest enclosing window). To establish the relationship between the text area (a function of scrollbar size, border with and text margin), you can compare the browser size and text area size. @node Browser Remarks @subsection Remarks Since version 1.0.92 there isn't a limit on the maximum length of lines in a browser anymore. (The macro @code{FL_BROWSER_LINELENGTH} still exists and is set to 2048 for backward compatibility but has no function anymore). See @file{fbrowse1.c} for an example program using a @code{@ref{FL_NORMAL_BROWSER}} to view files. @file{browserall.c} shows all different browsers. @file{browserop.c} shows the insertion and deletion of lines in a @code{@ref{FL_HOLD_BROWSER}}. For the browser class, especially multi browsers, interaction via callbacks is strongly recommended. xforms-1.0.93sp1/doc/part4_preemptive_handler.texi0000644000175000017500000000722011317661676020674 0ustar jensjens@node Part IV Using a Pre-emptive Handler @chapter Using a Pre-emptive Handler Pre-emptive handlers came into being due to reasons not related to developing new classes. They are provided for the application programs to have access to the current state or event of a particular object. However, with some care, this preemptive handler can be used to override parts of the original built-in handler thus yielding a new class of objects. As mentioned earlier, an object module communicates with the main module via events. Central part of the module is the event handler, which determines how an object responds to various events such as mouse clicks or a key presses. Now a pre-emptive handler is a function which, if installed, gets called first by the main module when an event for the object occurs. The pre-emptive handler has the option to override the built-in handler by informing the main module not to call the built-in handler (and a possibly also installed post handler), thus altering the behavior of the object. A post handler, on the other hand, is called when the object handler has finished its tasks and thus does not offer the capability of overriding the built-in handler. It is much safer, however. The API to install a pre- or post-handler for an object is as follows @tindex FL_HANDLEPTR @findex fl_set_object_prehandler() @anchor{fl_set_object_prehandler()} @findex fl_set_object_posthandler() @anchor{fl_set_object_posthandler()} @example typedef int (*FL_HANDLEPTR)(FL_OBJECT *obj, int event, FL_Coord mx, FL_Coord my, int key, void *raw_event); void fl_set_object_prehandler(FL_OBJECT *obj, FL_HANDLEPTR pre_handler); void fl_set_object_posthandler(FL_OBJECT *obj, FL_HANDLEPTR post_handler); @end example @noindent @code{event} is a generic event of the Forms Library, that is, @code{@ref{FL_DRAW}}, @code{@ref{FL_ENTER}} etc. Parameters @code{mx} and @code{my} are the mouse position and @code{key} is the key pressed. The last parameter @code{raw_event} is a pointer to the XEvent (cast to a void pointer due to the different types of Xevents) that caused the invocation of the pre- or post-handler. But note: not all events of the Form Library have a corresponding Xevent and thus dereferencing of @code{xev} should only be done after making sure it is not @code{NULL}. The pre- and post-handler have the same function prototype as the built-in handler. Actually they are called with exactly the same parameters by the event dispatcher. The pre-handler should return @tindex FL_PREEMPT @anchor{FL_PREEMPT} @code{FL_PREEMPT} to prevent the dispatcher from calling the normal object handler for events and @code{!FL_PREEMPT} if the objects handler for is to be invoked next. The post-handler may return whatever it wants since the return value is not used. Note that a post-handler will receive all events even if the object the post-handler is registered for does not. For example, a post-handler for a box (a static object that only receives @code{@ref{FL_DRAW}}) receives all events. Note that when an object has been de-activated using @code{@ref{fl_deactivate_object()}} (or the whole form the object belongs to is de-activated via calls of @code{@ref{fl_deactivate_form()}} or @code{@ref{fl_deactivate_all_forms()}}) also pre-emptive and post-handlers won't get invoked for the object. See the demo programs @file{preemptive.c} and @file{xyplotall.c} for examples. Bear in mind that modifying the built-in behavior is in general not a good idea. Using a pre-emptive handler for the purpose of "peeking", however, is quite legitimate and can be useful in some situations. xforms-1.0.93sp1/doc/part2_generating_hardcopies.texi0000644000175000017500000001166011375573536021345 0ustar jensjens@node Part II Generating Hardcopies @chapter Generating Hardcopies A variety of tools are available that can be used to turn your carefully constructed (and hopefully pleasing) user interfaces into printed hardcopies or something appropriate for inclusion in your program document. Most of these involves saving a snapshot of your interface on the screen into a file. Then this file is translated into something that a printer can understand, such as @code{PostScript}. While this approach works, the resulting file is typically huge. Further, by taking a snapshot of the screen, the resolution of the output is limited by the screen resolution, which typically is much lower than the printer resolution. This is especially evident for text. Another approach is to design the printing capabilities into the objects themselves so the GUI is somewhat output device independent in that it can render to different devices and X or the printer is just one of the devices. While this approach works better than screen snapshot, in general, it bloats the library unnecessarily. It is our observation that most of the time when a hardcopy of the interface is desired, it is for use in the application documentation. Thus we believe that there are ways to meet the needs of wanting hardcopies without bloating the library. Of course, some object classes, such as xyplot, charts and possibly canvas (if vector graphics), that are dynamic in nature, probably should have some hardcopy output support in the library, but even then, the relevant code should only be loaded when these specific support is actually used. This fattening problem is becoming less troublesome as computers get faster and typically have more RAMs nowadays. @code{fd2ps} was designed to address the need of having a hardcopy of the interface for application documentation development. Basically, @code{fd2ps} is a translator that translates the Form Designer output directly into @code{PostScript} or @code{Encapsulated PostScript} in full vector graphics. The result is a small, maybe even editable, @code{PostScript} file that you can print on a printer or include into other documents. The translation can be done in two ways. One way is to simply give the Form Designer the command line option @code{-ps} to have it output @code{PostScript} directly. or you can run @code{fd2ps} stand alone using the command @example fd2ps fdfile @end example @noindent where @code{fdfile} is the Form Designer output with or without the @code{.fd} extension. The output is written into a file named @file{fdfile.ps}. @code{fd2ps} accepts the following command line options when run as a stand-alone program @ @table @code @item -h This option prints a brief help message. @item -p This option requests Portrait output. By default, the orientation is switched to landscape automatically if the output would not fit on the page. This option overrides the default. @item -l This option requests landscape orientation. @item -gray This option requests all colors be converted to gray levels. By default, @code{fd2ps} outputs colors as specified in the @code{.fd} file. @item -bw @i{width} This option specifies the object border width. By default, the border width specified in the @code{.fd} file is used. @item -dpi @i{res} This option specifies the screen resolution on which the user interface was designed. You can use this flag to enlarge or shrink the designed size by giving a DPI value smaller or larger than the actual screen resolution. The default DPI is 85. If the @code{.fd} file is specified in device independent unit (point, mm etc), this flag has no effect. Also this flag does not change text size. @item -G @i{gamma} This option specifies a value (gamma) that will be used to adjust the builtin colors. The larger the value the brighter the colors. The default gamma is 1. @item -rgb @i{file} The option specifies the path to the colorname database @file{rgb.txt}. (It is used in parsing the colornames in XPM file). The default is @file{/usr/lib/X11/rgb.txt}. The environment variable @code{RGBFile} can be used to change this default. @item -pw @i{width} This option changes the paper width used to center the GUI on a printed page. By default the width is that of US Letter (i.e.@: 8.5 inches) unless the environment variable @code{PAPER} is defined. @item -ph @i{height} This option changes the paper height used to center the output on the printed page. The default height is that of US Letter (i.e.@: 11 inches) unless the environment variable @code{PAPER} is defined. @item -paper @i{format} This option specifies one of the standard paper names (thus setting the paper width and height simultaneously). The current understood paper formats are @table @asis @item Letter 8.5 x 11 inch. @item Legal 8.5 x 14 inch @item A4 210 x 295mm @item B4 257 x 364mm @item B5 18 x 20 cm @item B 11 x 17 inch @item Note 4 x 5inch @end table The @code{fd2ps} program understands the environment variable @code{PAPER}, which should be one of the above paper names. @end table xforms-1.0.93sp1/doc/part3.texi0000644000175000017500000000051311317660350014720 0ustar jensjens@node Part III @unnumbered @emph{Part III - Object Classes} @menu * Part III Introduction:: * Part III Static Objects:: * Part III Button-like Objects:: * Part III Valuator Objects:: * Part III Input Objects:: * Part III Container Objects:: * Part III Other Objects:: * Part III Popups:: * Part III Deprecated Objects:: @end menu xforms-1.0.93sp1/doc/part1_defining_forms.texi0000644000175000017500000016520111375517122017777 0ustar jensjens@node Part I Defining Forms @chapter Defining Forms In this chapter we will describe the basics of defining forms. Not all possible classes of objects are described here, only the most common ones. Also, for most classes only a subset of the available types are described. See Part III for a complete overview of all object classes currently available. Normally you will almost never have to write the code to define forms yourself because the package includes a Form Designer that does this for you (see Part II). Still it is useful to read through this chapter because it explains what some of the different object classes are and how to work with them. @ifnottex @menu * Starting and Ending a Form Definition:: * Boxes:: * Texts:: * Buttons:: * Sliders:: * ValSliders:: * Input Fields:: * Grouping Objects:: * Hiding and Showing:: * Deactivating and Triggering Objects:: * Changing Attributes:: * Adding and Deleting:: * Freeing Objects:: @end menu @end ifnottex @node Starting and Ending a Form Definition @section Starting and Ending a Form Definition A form consists of a collection of objects. A form definition is started with the routine @findex fl_bgn_form() @example FL_FORM *fl_bgn_form(int type, FL_Coord w, FL_Coord h); @end example @noindent @code{w} and @code{h} indicate the width and height of the form (in pixels by default). Positions in the form will be indicated by integers between 0 and @code{w-1} or @code{h-1}. The actual size of the form when displayed on the screen can still be varied. @code{type} indicates the type of the background drawn in the form. The background of each form is a box. See the next section for the different types available. The routine returns a pointer to the form just defined. This pointer must be used, for example, when drawing the form or doing interaction with it. The form definition ends with @findex fl_end_form() @example void fl_end_form(void); @end example @noindent Between these two calls objects are added to the form. The following sections describe some of the more common classes of objects that can be added to a form. Many different forms can be defined and displayed when required. Normally you probably will first define all your forms before starting the actual work but it's no problem to define new forms also later on. @node Boxes @section Boxes The first type of objects are boxes. Boxes are simply used to give the forms and objects a nicer appearance. They can be used to visually group other objects together. The background of each form is a box. To add a box to a form you use the routine @findex fl_add_box() @example FL_OBJECT *fl_add_box(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent where @code{type} indicates the shape of the box. The Forms Library at the moment supports the following types of boxes: @table @code @tindex FL_NO_BOX @item FL_NO_BOX No box at all (it's transparent), just a label @tindex FL_UP_BOX @item FL_UP_BOX A box that comes out of the screen @tindex FL_DOWN_BOX @item FL_DOWN_BOX A box that goes down into the screen @tindex FL_BORDER_BOX @item FL_BORDER_BOX A flat box with a border @tindex FL_SHADOW_BOX @item FL_SHADOW_BOX A flat box with a shadow @tindex FL_FRAME_BOX @item FL_FRAME_BOX A flat box with an engraved frame @tindex FL_ROUNDED_BOX @item FL_ROUNDED_BOX A rounded box @tindex FL_EMBOSSED_BOX @item FL_EMBOSSED_BOX A flat box with an embossed frame @tindex FL_FLAT_BOX @item FL_FLAT_BOX A flat box without a border (normally invisible unless given a different color than the surroundings) @tindex FL_RFLAT_BOX @item FL_RFLAT_BOX A rounded box without a border (normally invisible unless given a different color than the surroundings) @tindex FL_RSHADOW_BOX @item FL_RSHADOW_BOX A rounded box with a shadow @tindex FL_OVAL_BOX @item FL_OVAL_BOX A box shaped like an ellipse @tindex FL_ROUNDED3D_UPBOX @item FL_ROUNDED3D_UPBOX A rounded box coming out of the screen @tindex FL_ROUNDED3D_DOWNBOX @item FL_ROUNDED3D_DOWNBOX A rounded box going into the screen @tindex FL_OVAL3D_UPBOX @item FL_OVAL3D_UPBOX An oval box coming out of the screen @tindex FL_OVAL3D_DOWNBOX @item FL_OVAL3D_DOWNBOX An oval box going into the screen @end table @ifhtml @center @image{images/boxtypes} @end ifhtml @ifnothtml @center @image{images/boxtypes,15cm} @end ifnothtml @code{x} and @code{y} indicate the upper left corner of the box in the form. @code{w} and @code{h} are the width and height of the box. @code{label} is a text that is placed in the center of the box. If you don't want a label in the box, use an empty string or a @code{NULL} pointer. The label can be either one line or multiple lines. To obtain multi-line labels, insert newline characters (@code{\n}) in the label string. It is also possible to underline the label or one of the characters in the label. This is accomplished by embedding @code{ H} (@code{\010}) after the letter that needs to be underlined. If the very first character of the label is @code{H}, the entire label is underlined. The routine @code{@ref{fl_add_box()}} returns a pointer to the box object. (All routines that add objects return a pointer to the object.) This pointer can be used for later references to the object. It is possible to change the appearance of a box in a form. First of all, it is possible to change the color of the box and secondly, it is possible to change color, size and position of the label inside the box. Details on changing attributes of objects can be found in @ref{Changing Attributes}. Just a simple example has to suffice here. Assume we want to create a red box, coming out of the screen with the large words "I am a Box" in green in the center: @example FL_OBJECT *thebox; thebox = fl_add_box(FL_UP_BOX, 20, 20, 100, 100, "I am a Box"); fl_set_object_color(thebox, FL_RED, 0 ); /* make box red */ fl_set_object_lcol(thebox, FL_GREEN ); /* make label green */ fl_set_object_lsize(thebox, FL_LARGE_SIZE); /* make label large */ @end example @noindent Of course, this has to be placed inside a form definition. @node Texts @section Texts A second type of object is text. Text can be placed at any place on the form in any color you like. Placing a text object is done with the routine @findex fl_add_text() @example FL_OBJECT *fl_add_text(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent where @code{type} indicates the shape of the text. The Forms Library at the moment supports only one type of text: @code{FL_NORMAL_TEXT}. The text can be placed inside a box using the routine @code{@ref{fl_set_object_boxtype()}} to be described in @ref{Changing Attributes}. Again, the text can be multi-lined or underlined by embedding respectively the newline (@code{\n}) or @code{H} (@code{\010}) in the label. The style, size and color of the text can be controlled and changed in many ways. @xref{Label Attributes and Fonts}. Note that there is almost no difference between a box with a label and a text. The only difference lies in the position where the text is placed. Text is normally placed inside the box at the left side. This helps you put different lines of text below each other. Labels inside boxes are by default centered in the box. You can change the position of the text inside the box using the routines in @ref{Label Attributes and Fonts}. Note that, when not using any box around the text there is no need to specify a width and height of the box; they can both be 0. @node Buttons @section Buttons A very important class of objects are buttons. Buttons are placed on the form such that the user can push them with the mouse. Different types of buttons exist: buttons that return to their normal position when the user releases the mouse, buttons that stay pushed until the user pushes them again and radio buttons that make other buttons be released. Adding a button to a form can be done using the following routine @findex fl_add_button() @example FL_OBJECT *fl_add_button(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent @code{label} is the text placed inside (or next to) the button. @code{type} indicates the type of the button. The Forms Library at the moment supports a number of types of buttons. The most important ones are: @tindex FL_NORMAL_BUTTON @tindex FL_PUSH_BUTTON @tindex FL_TOUCH_BUTTON @tindex FL_RADIO_BUTTON @example FL_NORMAL_BUTTON FL_PUSH_BUTTON FL_TOUCH_BUTTON FL_RADIO_BUTTON @end example @noindent They all look the same on the screen but their functions are quite different. Each of these buttons get pushed down when the user presses the mouse on top of them. What actually happens when the user does so depends on the type of button. A normal button returns to its normal position when the user releases the mouse button. A push button remains pushed and is only released when the user pushes it again. A touch button is like a normal button except that as long as the user keeps the mouse pressed it is returned to the application program. (@xref{Part I Doing Interaction, , Doing Interaction}, on the details of interaction.) A radio button is a push button with additional extra property: Whenever the user pushes a radio button, all other pushed radio buttons in the form (or at least in the group, see below) they belong to are released. In this way the user can make a choice among some mutually exclusive possibilities. Whenever the user pushes a button and then releases the mouse, the interaction routine @code{@ref{fl_do_forms()}} is interrupted and returns a pointer to the button that was pushed and released. If a callback routine is present for the object being pushed, this routine will be invoked. In either case, the application program knows that the button was pushed and can take action accordingly. In the first case, control will have to be returned to @code{@ref{fl_do_forms()}} again after the appropriate action is performed; and in the latter, @code{@ref{fl_do_forms()}} would never return. @xref{Part I Doing Interaction, , Doing Interaction}, for details on the interaction with forms. Different types of buttons are used in all the example programs provided. The application program can also set a button to be pushed or not itself without a user action. (This is of course only useful for push buttons and radio buttons. Setting a radio button does not mean that the currently set radio button is reset. The application program has to do this.) To set or reset a button use the routine @findex fl_set_button() @example void fl_set_button(FL_OBJECT *obj, int pushed); @end example @noindent @code{pushed} indicates whether the button should be pushed (1) or released (0). To figure out whether a button is pushed or not use @findex fl_get_button() @example int fl_get_button(FL_OBJECT *obj); @end example @noindent See the program @file{pushbutton.c} for an example of the use of push buttons and setting and getting button information. The color and label of buttons can again be changed using the routines in @ref{Changing Attributes}. There are other classes of buttons available that behave the same way as buttons but only look different. @table @asis @item Light buttons have a small "light" (colored area) in the button. Pushing the button switches the light on, and releasing the button switches it off. To add a light button use @code{@ref{fl_add_lightbutton()}} with the same parameters as for normal buttons. The other routines are exactly the same as for normal buttons. The color of the light can be controlled with the routine @code{@ref{fl_set_object_color()}}. @xref{Changing Attributes}. @item Round buttons are buttons that are round. Use @code{@ref{fl_add_roundbutton()}} to add a round button to a form. @item Round3d buttons are buttons that are round and 3D-ish looking. Round and light buttons are nice as radio and push buttons. @item Check buttons are buttons that have a small checkbox the user can push. To add a check button, use @code{@ref{fl_add_checkbutton()}}. More stylish for a group of radio buttons. @item Bitmap buttons are buttons that have a bitmap on top of the box. Use routine @code{@ref{fl_add_bitmapbutton()}} to add a bitmap button to a form. @item Pixmap buttons are buttons that have a pixmap on top of the box. Use routine @code{@ref{fl_add_pixmapbutton()}} to add a pixmap button to a form. @end table Playing with different boxtypes, colors, etc., you can make many different types of buttons. See @file{buttonall.c} for some examples. Fig. 16.1 shows all buttons in their default states. @node Sliders @section Sliders Sliders are useful in letting the user indicate a value between some fixed bounds. A slider is added to a form using the routine @findex fl_add_slider() @example FL_OBJECT *fl_add_slider(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example The two most important types of sliders are @code{FL_VERT_SLIDERM} and @code{FL_HOR_SLIDER}. The former displays a slider that can be moved vertically and the latter gives a slider that moves horizontally. In both cases the label is placed below the slider. Default value of the slider is 0.5 and can vary between 0.0 and 1.0. These values can be changed using the routines: @findex fl_set_slider_value() @findex fl_set_slider_bounds() @example void fl_set_slider_value(FL_OBJECT *obj, double val); void fl_set_slider_bounds(FL_OBJECT *obj, double min, double max); @end example @noindent Whenever the value of the slider is changed by the user, it results in the slider being returned to the application program or the callback routine invoked. The program can read the slider value using the call @findex fl_get_slider_value() @example double fl_get_slider_value(FL_OBJECT *obj); @end example @noindent and take action accordingly. See the example program @file{demo05.c} for the use of these routines. @ifhtml @center @image{images/slider} @end ifhtml @ifnothtml @center @image{images/slider,8cm} @end ifnothtml @node ValSliders @section ValSliders A valslider is almost identical with a normal slider. The only difference is the way the slider is drawn. For valsliders, in addition to the slider itself, its current value is also shown. To add a valslider, use @findex fl_add_valslider() @example FL_OBJECT *fl_add_valslider(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example For all other interaction with a valslider the same function as for normal sliders can be used. @node Input Fields @section Input Fields It is often required to obtain textual input from the user, e.g. a file name, some fields in a database, etc. To this end input fields exist in the Forms Library. An input field is a field that can be edited by the user using the keyboard. To add an input field to a form use @findex fl_add_input() @example FL_OBJECT *fl_add_input(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label); @end example @noindent The main type of input field available is @code{FL_NORMAL_INPUT}. The input field normally looks like an @code{FL_DOWN_BOX}. This can be changed using the routine @code{@ref{fl_set_object_boxtype()}} to be described in @ref{Changing Attributes}. Whenever the user presses the mouse inside an input field a cursor will appear in it (and it will change color). Further input will appear inside this field. Full emacs(1) style editing is supported. When the user presses @code{} or @code{} the input field is returned to the application program and further input is directed to the next input field. (The @code{} key only works if there are no default buttons in the form. See the overview of object classes. The @code{} key always works.) @ifhtml @center @image{images/input} @end ifhtml @ifnothtml @center @image{images/input,8cm} @end ifnothtml The user can use the mouse to select parts of the input field which will be removed when the user types the erase character or replaced by any new input the user types in. Also the location of the cursor can be moved in the input field using the mouse. The input field is fully integrated with the X Selection mechanism. Use the left button to cut from and the middle button to paste into an input field. The application program can direct the focus to a particular object using the call @findex fl_set_focus_object() @example void fl_set_focus_object(FL_FORM *form, FL_OBJECT *obj); @end example @noindent It puts the input focus in the form form onto object @code{obj}. To obtain the focus object, the following routine is available @findex fl_get_focus_object() @example FL_OBJECT *fl_get_focus_object(FL_FORM *form); @end example Note that the label is not the default text in the input field. The label is (by default) placed in front of the input field. To set the contents of the input field use the routine @findex fl_set_input() @example void fl_set_input(FL_OBJECT *obj, const char *str); @end example To change the color of the input text or the cursor use @findex fl_set_input_color() @example void fl_set_input_color(FL_OBJECT *obj, int tcol, int ccol); @end example @noindent Here @code{tcol} indicates the color of the text and @code{ccol} is the color of the cursor. To obtain the string in the field (when the user has changed it) use: @findex fl_get_input() @example [const] char *fl_get_input(FL_OBJECT *obj); @end example @noindent Notice the bracket around the qualifier const. This indicates although the function is not declared to return a pointer to const string, it should be used as one. This is done mainly for compilation on machines whose string library header is buggy. Modifying the string returned by this function can produce unpredictable results. See the program @file{demo06.c} for an example of the use of input fields. @node Grouping Objects @section Grouping Objects Objects inside a form definition can be grouped together. To this end we place them in between the routines @findex fl_bgn_group() @example FL_OBJECT *fl_bgn_group(void); @end example @noindent and @findex fl_end_group() @example void fl_end_group(void); @end example @noindent The first function returns a pointer to a pseudo-object that represents the start of the group (its class is @code{FL_BEGIN_GROUP}). It can be used in a number of functions to work on the whole group at once. Also the second creates a pseudo-object (of class @code{FL_END_GROUP}), marking the groups end, but since this object can't be used its address isn't returned. Groups can't be nested. Groups are useful for two reasons. First of all it is possible to hide groups of objects. (@xref{Hiding and Showing}, below.) This is often very handy. We can, for example, display part of a form only when the user asks for it (see demo program @file{group.c}. Some attributes are naturally multi-objects, e.g., to glue several objects together using the gravity attribute. Instead of setting the gravity for each object, you can place all related objects inside a group and set the resize/gravity attribute of the group. The second reason is for using radio buttons. As indicated in section 3.4 pushing a radio button makes the currently pushed radio button released. In fact, this happens only with radio buttons in the particular group. So to make two pairs (or more) of radio buttons, simply put each pair in a different group so that they won't interfere with each other. See, e.g., the example program @file{buttonall.c}. It is a good idea to always put radio buttons in a group, even if you have only one set of them. It is possible to add objects to an existing group @findex fl_addto_group() @example FL_OBJECT *fl_addto_group(FL_OBJECT *group); @end example @noindent where @code{group} is the object returned by @code{@ref{fl_bgn_group()}}. After this call, you can start adding objects to the group (e.g., @code{@ref{fl_add_button()}} etc.). The newly added objects are appended at the end of the group. When through with adding, use @code{@ref{fl_end_group()}} as before. @node Hiding and Showing @section Hiding and Showing It is possible to temporarily hide certain objects or groups of objects. To this end, use the routine @findex fl_hide_object() @example void fl_hide_object(FL_OBJECT *obj); @end example @noindent @code{obj} is the object to hide or the group of objects to hide. Hidden objects don't play any role anymore. All routines on the form act as if the object does not exist. To make the object or group of objects visible again use @findex fl_show_object() @example void fl_show_object(FL_OBJECT *obj); @end example @noindent Hiding and showing (groups of) objects are useful to change the appearance of a form depending on particular information provided by the user. You can also make overlapping groups in the form and take care that only one of them is visible. If you want to know if an object is shown you can use @findex fl_object_is_visible() @example int fl_object_is_visible(FL_OBJECT *obj); @end example @noindent Please note for an object to be visible also the form it belongs to must be shown, which isn't factored into the return value. @node Deactivating and Triggering Objects @section Deactivating and Triggering Objects Sometimes you might want a particular object to be temporarily inactive, e.g., you want to make it impossible for the user to press a particular button or to type input in a particular field. For this you can use the routine @findex fl_deactivate_object() @example void fl_deactivate_object(FL_OBJECT *obj); @end example @noindent @code{obj} is the object to be deactivated. When @code{obj} is a group the whole group is deactivated. To reactivate the group or button use the routine @findex fl_activate_object() @example void fl_activate_object(FL_OBJECT *obj); @end example To find out if an object is in active state use the function @findex fl_object_is_active() @example int fl_object_is_active(FL_OBJECT *obj); @end example Normally you also want to give the user a visual indication that the object is not active. This can, for example, be done by changing the label color to grey (see below). This is not done automatically, so unless you set e.g.@: a different color the objects appearance won't change on deactivation (or re-activation). It is possible to simulate the action of an object being triggered from within the program by using the following routine @findex fl_trigger_object() @example void fl_trigger_object(FL_OBJECT *obj); @end example @noindent Calling this routine on an object @code{obj} results in the object returned to the application program or its callback being called if it exists. Note however, there is no visual feedback, i.e.@: @code{fl_trigger_object(button)} will not make the button object named @code{button} appear to be pushed. @node Changing Attributes @section Changing Attributes There are a number of general routines that can be used to alter the appearance of any object. @ifnottex @menu * Color:: * Bounding Boxes:: * Label Attributes and Fonts:: * Tool Tips:: * Redrawing:: * Changing Many Attributes:: * Symbols:: @end menu @end ifnottex @node Color @subsection Color To change the color of a particular object use the routine @findex fl_set_object_color() @example void fl_set_object_color(FL_OBJECT *obj, FL_COLOR col1, FL_COLOR col2); @end example @noindent @code{col1} and @code{col2} are indices into a colormap. Which colors are actually changed depends on the type of the object. For box and text only @code{col1} is important. It indicates the color of the box or of the box in which the text is placed. For buttons, @code{col1} is the color of the button when released and @code{col2} is the color of the button when pushed. (Note that when changing the color of a button the nice property that the color of a button changes when the mouse moves over it disappears.) For light buttons the two colors indicate the color of the light when off and when on. For bitmap buttons, @code{col1} is the color of the box and @code{col2} is the color of the bitmap. For sliders @code{col1} is the color of the background of the slider and @code{col2} is the color of the slider itself. Finally, for input objects @code{col1} is the color of the input field when it is not selected and @code{col2} is the color when it has input focus, i.e.@: the user can enter text. For all types of objects, the default colors can be found in the file @file{forms.h}. For example, for input fields the default colors are @code{FL_INPUT_COL1} and @code{FL_INPUT_COL2}. Form Designer comes in very handy in familiarizing you with various attributes since you can change all attributes of an object and immediately see the difference by "test"ing the object. To find out the colors of an object use @findex fl_get_object_color() @example void fl_get_object_color(FL_OBJECT *obj, FL_COLOR *col1, FL_COLOR *col2); @end example The following pre-defined color symbols can be used in all color change requests. If the workstation does not support this many colors, substitution by the closest color will happen. @multitable @columnfractions 0.3 0.3 0.3 @headitem Name @tab RGB triple @tindex FL_BLACK @item @code{FL_BLACK} @tab @code{( 0, 0, 0)} @ifhtml @tab @image{images/FL_BLACK} @end ifhtml @ifnothtml @tab @image{images/FL_BLACK,2cm,5mm} @end ifnothtml @tindex FL_WHITE @item @code{FL_WHITE} @tab @code{(255, 255, 255)}, @ifhtml @tab @image{images/FL_WHITE} @end ifhtml @ifnothtml @tab @image{images/FL_WHITE,2cm,5mm} @end ifnothtml @tindex FL_COL1 @item @code{FL_COL1} @tab @code{(173, 173, 173)} @ifhtml @tab @image{images/FL_COL1} @end ifhtml @ifnothtml @tab @image{images/FL_COL1,2cm,5mm} @end ifnothtml @tindex FL_BOTTOM_BCOL @item @code{FL_BOTTOM_BCOL} @tab @code{( 89, 89, 89)} @ifhtml @tab @image{images/FL_BOTTOM_BCOL} @end ifhtml @ifnothtml @tab @image{images/FL_BOTTOM_BCOL,2cm,5mm} @end ifnothtml @tindex FL_RIGHT_BCOL @item @code{FL_RIGHT_BCOL} @tab @code{( 41, 41, 41)} @ifhtml @tab @image{images/FL_RIGHT_BCOL} @end ifhtml @ifnothtml @tab @image{images/FL_RIGHT_BCOL,2cm,5mm} @end ifnothtml @tindex FL_MCOL @item @code{FL_MCOL} @tab @code{(191, 191, 191)} @ifhtml @tab @image{images/FL_MCOL} @end ifhtml @ifnothtml @tab @image{images/FL_MCOL,2cm,5mm} @end ifnothtml @tindex FL_LEFT_BCOL @item @code{FL_LEFT_BCOL} @tab @code{(222, 222, 222)} @ifhtml @tab @image{images/FL_LEFT_BCOL} @end ifhtml @ifnothtml @tab @image{images/FL_LEFT_BCOL,2cm,5mm} @end ifnothtml @tindex FL_LIGHTER_COL1 @item @code{FL_LIGHTER_COL1} @tab @code{(204, 204, 204)} @ifhtml @tab @image{images/FL_LIGHTER_COL1} @end ifhtml @ifnothtml @tab @image{images/FL_LIGHTER_COL1,2cm,5mm} @end ifnothtml @tindex FL_DARKER_COL1 @item @code{FL_DARKER_COL1} @tab @code{(161, 161, 161)} @ifhtml @tab @image{images/FL_DARKER_COL1} @end ifhtml @ifnothtml @tab @image{images/FL_DARKER_COL1,2cm,5mm} @end ifnothtml @tindex FL_SLATEBLUE @item @code{FL_SLATEBLUE} @tab @code{(113, 113, 198)} @ifhtml @tab @image{images/FL_SLATEBLUE} @end ifhtml @ifnothtml @tab @image{images/FL_SLATEBLUE,2cm,5mm} @end ifnothtml @tindex FL_INDIANRED @item @code{FL_INDIANRED} @tab @code{(198, 113, 113)} @ifhtml @tab @image{images/FL_INDIANARED} @end ifhtml @ifnothtml @tab @image{images/FL_INDIANARED,2cm,5mm} @end ifnothtml @tindex FL_RED @item @code{FL_RED} @tab @code{(255, 0, 0)} @ifhtml @tab @image{images/FL_RED} @end ifhtml @ifnothtml @tab @image{images/FL_RED,2cm,5mm} @end ifnothtml @tindex FL_BLUE @item @code{FL_BLUE} @tab @code{( 0, 0, 255)} @ifhtml @tab @image{images/FL_BLUE} @end ifhtml @ifnothtml @tab @image{images/FL_BLUE,2cm,5mm} @end ifnothtml @tindex FL_GREEN @item @code{FL_GREEN} @tab @code{( 0, 255, 0)} @ifhtml @tab @image{images/FL_GREEN} @end ifhtml @ifnothtml @tab @image{images/FL_GREEN,2cm,5mm} @end ifnothtml @tindex FL_YELLOW @item @code{FL_YELLOW} @tab @code{(255, 255, 0)} @ifhtml @tab @image{images/FL_YELLOW} @end ifhtml @ifnothtml @tab @image{images/FL_YELLOW,2cm,5mm} @end ifnothtml @tindex FL_MAGENTA @item @code{FL_MAGENTA} @tab @code{(255, 0, 255)} @ifhtml @tab @image{images/FL_MAGENTA} @end ifhtml @ifnothtml @tab @image{images/FL_MAGENTA,2cm,5mm} @end ifnothtml @tindex FL_CYAN @item @code{FL_CYAN} @tab @code{( 0, 255, 255)} @ifhtml @tab @image{images/FL_CYAN} @end ifhtml @ifnothtml @tab @image{images/FL_CYAN,2cm,5mm} @end ifnothtml @tindex FL_TOMATO @item @code{FL_TOMATO} @tab @code{ 255, 99, 71} @ifhtml @tab @image{images/FL_TOMATO} @end ifhtml @ifnothtml @tab @image{images/FL_TOMATO,2cm,5mm} @end ifnothtml @tindex FL_INACTIVE @item @code{FL_INACTIVE} @tab @code{(110, 110, 110)} @ifhtml @tab @image{images/FL_INACTIVE} @end ifhtml @ifnothtml @tab @image{images/FL_INACTIVE,2cm,5mm} @end ifnothtml @tindex FL_TOP_BCOL @item @code{FL_TOP_BCOL} @tab @code{(204, 204, 204)} @ifhtml @tab @image{images/FL_TOP_BCOL} @end ifhtml @ifnothtml @tab @image{images/FL_TOP_BCOL,2cm,5mm} @end ifnothtml @tindex FL_PALEGREEN @item @code{FL_PALEGREEN} @tab @code{(113, 198, 113)} @ifhtml @tab @image{images/FL_PALEGREEN} @end ifhtml @ifnothtml @tab @image{images/FL_PALEGREEN,2cm,5mm} @end ifnothtml @tindex FL_DARKGOLD @item @code{FL_DARKGOLD} @tab @code{(205, 149, 10)} @ifhtml @tab @image{images/FL_DARKGOLD} @end ifhtml @ifnothtml @tab @image{images/FL_DARKGOLD,2cm,5mm} @end ifnothtml @tindex FL_ORCHID @item @code{FL_ORCHID} @tab @code{(205, 105, 201)} @ifhtml @tab @image{images/FL_ORCHID} @end ifhtml @ifnothtml @tab @image{images/FL_ORCHID,2cm,5mm} @end ifnothtml @tindex FL_DARKCYAN @item @code{FL_DARKCYAN} @tab @code{(40, 170, 175)} @ifhtml @tab @image{images/FL_DARKCYAN} @end ifhtml @ifnothtml @tab @image{images/FL_DARKCYAN,2cm,5mm} @end ifnothtml @tindex FL_DARKTOMATO @item @code{FL_DARKTOMATO} @tab @code{(139, 54, 38)} @ifhtml @tab @image{images/FL_DARKTOMATO} @end ifhtml @ifnothtml @tab @image{images/FL_DARKTOMATO,2cm,5mm} @end ifnothtml @tindex FL_WHEAT @item @code{FL_WHEAT} @tab @code{(255, 231, 155)} @ifhtml @tab @image{images/FL_WHEAT} @end ifhtml @ifnothtml @tab @image{images/FL_WHEAT,2cm,5mm} @end ifnothtml @tindex FL_DARKORANGE @item @code{FL_DARKORANGE} @tab @code{(255, 128, 0)} @ifhtml @tab @image{images/FL_DARKORANGE} @end ifhtml @ifnothtml @tab @image{images/FL_DARKORANGE,2cm,5mm} @end ifnothtml @tindex FL_DEEPPINK @item @code{FL_DEEPPINK} @tab @code{(255, 0, 128)} @ifhtml @tab @image{images/FL_DARKPINK} @end ifhtml @ifnothtml @tab @image{images/FL_DARKPINK,2cm,5mm} @end ifnothtml @tindex FL_CHARTREUSE @item @code{FL_CHARTREUSE} @tab @code{(128, 255, 0)} @ifhtml @tab @image{images/FL_CHARTEUSE} @end ifhtml @ifnothtml @tab @image{images/FL_CHARTEUSE,2cm,5mm} @end ifnothtml @tindex FL_DARKVIOLET @item @code{FL_DARKVIOLET} @tab @code{(128, 0, 255)} @ifhtml @tab @image{images/FL_DARKVIOLET} @end ifhtml @ifnothtml @tab @image{images/FL_DARKVIOLET,2cm,5mm} @end ifnothtml @tindex FL_SPRINGGREEN @item @code{FL_SPRINGGREEN} @tab @code{( 0, 255, 128)} @ifhtml @tab @image{images/FL_SPRINGGREEN} @end ifhtml @ifnothtml @tab @image{images/FL_SPRINGGREEN,2cm,5mm} @end ifnothtml @tindex FL_DODGERBLUE @item @code{FL_DODGERBLUE} @tab @code{( 0, 128, 255)} @ifhtml @tab @image{images/FL_DODGERBLUE} @end ifhtml @ifnothtml @tab @image{images/FL_DODGERBLUE,2cm,5mm} @end ifnothtml @tindex FL_FREE_COL1 @item @code{FL_FREE_COL1} @tab @code{( ?, ?, ?)} @end multitable Of all the colors listed in the table above @code{FL_FREE_COL1} has the largest numerical value, and all color with indices smaller than that are used (or can potentially be used) by the Forms Library although, if you wish, they can also be changed using the following routine prior to @code{@ref{fl_initialize()}}: @findex fl_set_icm_color() @example void fl_set_icm_color(FL_COLOR index, int r, int g, int b); @end example Note that although the color of an object is indicated by a single index, it is not necessarily true that the Forms Library is operating in PseudoColor. Forms Library is capable of operating in all visuals and as a matter of fact the Forms Library will always select TrueColor or DirectColor if the hardware is capable of it. The actual color is handled by an internal colormap of @anchor{FL_MAX_COLORS} @tindex FL_MAX_COLORS @code{FL_MAX_COLORS} entries (default is 1024). To change or query the values of this internal colormap use the call @findex fl_set_icm_color() @findex fl_get_icm_color() @example void fl_set_icm_color(FL_COLOR index, int r, int g, int b); void fl_get_icm_color(FL_COLOR index, int *r, int *g, int *b); @end example Call @code{@ref{fl_set_icm_color()}} before @code{@ref{fl_initialize()}} to change XForms's default colormap. Note that these two routines do not communicate with the X server, they only populate/return information about the internal colormap, which is made known to the X server by the initialization routine @code{@ref{fl_initialize()}}. To change the colormap and make a color index active so that it can be used in various drawing routines after @code{@ref{fl_initialize()}} initialization, use the following function @example unsigned long fl_mapcolor(FL_COLOR i, int red, int green, int blue); @end example @noindent This function frees the previous allocated pixel corresponding to color index @code{i} and re-allocates a pixel with the RGB value specified. The pixel value is returned by the function. It is recommended that you use an index larger than @code{FL_FREE_COL1} for your remap request to avoid accidentally freeing the colors you have not explicitly allocated. Indices larger than 224 are reserved and should not be used. Sometimes it may be more convenient to associate an index with a colorname, e.g., "red" etc., which may have been obtained via resources. To this end, the following routine exists @example long fl_mapcolorname(FL_COLOR i, const char *name); @end example @noindent where @code{name} is the color name@footnote{Standard color names are listed in a file named @file{rgb.txt} and usually resides in @file{/usr/lib/X11/}}. The function returns -1 if the colorname name is not resolved. You can obtain the RGB values of an index by using the following routine @example unsigned long fl_getmcolor(FL_COLOR i, int *red, int *green, int *blue); @end example @noindent The function returns the pixel value as known by the Xserver. If the requested index, @code{i}, is never mapped or is freed, the RGB values as well as the pixel value are random. Since this function communicates with the Xserver to obtain the pixel information, it has a two-way traffic overhead. If you're only interested in the internal colormap of XForms, @code{@ref{fl_get_icm_color()}} is more efficient. Note that the current version only uses the lower byte of the primary color. Thus all primary colors in the above functions should be specified in the range of 0-255 inclusive. To free any colors that you no longer need, the following routine should be used @example void fl_free_colors(FL_COLOR colors[], int ncolors); @end example Prior to XForms version 0.76, there is a color "leakage" in the implementation of the internal colormap that prevents the old index from being freed in the call @code{@ref{fl_mapcolor()}}, resulting in accelerated colormap overflow and some other undesirable behavior. Since there may still be some applications based on older versions of the Forms Library, a routine is provided to force the library to be compatible with the (buggy) behavior: @example void fl_set_color_leak(int flag); @end example Due to the use of an internal colormap and the simplified user interface, changing the colormap value for the index may not result in a change of the color for the object. An actual redraw of the object (see below) whose color is changed may be required to have the change take effect. Therefore, a typical sequence of changing the color of a visible object is as follows: @example fl_mapcolor(newcol, red, green, blue); /* obj uses newcol */ fl_redraw_object(obj); @end example @node Bounding Boxes @subsection Bounding Boxes Each object has a bounding box. This bounding box can have different shapes. For boxes it is determined by the type. For text it is normally not visible. For input fields it normally is a @code{FL_DOWN_BOX}, etc. The shape of the box can be changed using the routine @example void fl_set_object_boxtype(FL_OBJECT *obj, int boxtype); @end example @noindent @code{boxtype} should be one of the following: @code{FL_UP_BOX}, @code{FL_DOWN_BOX}, @code{FL_FLAT_BOX}, @code{FL_BORDER_BOX}, @code{FL_SHADOW_BOX}, @code{FL_ROUNDED_BOX}, @code{FL_RFLAT_BOX}, @code{FL_RSHADOW_BOX} and @code{FL_NO_BOX}, with the same meaning as the type for boxes. Some care has to be taken when changing boxtypes. In particular, for objects like sliders, input fields, etc. never use the boxtype @code{FL_NO_BOX}. Don't change the boxtype of objects that are visible on the screen. It might have undesirable effects. If you must do so, redraw the entire form after changing the boxtype of an object (see below). See the program @file{boxtype.c} for the effect of the boxtype on the different classes of objects. It is possible to alter the appearance of an object by changing the border width attribute @example void fl_set_object_bw(FL_OBJECT *obj, int bw); @end example @noindent To find out about the current setting for the border width of an object call @findex fl_get_object_bw() @example int fl_get_object_bw(FL_OBJECT *obj); @end example Border width controls the "height" of an object, e.g., a button having a border width of 3 pixels appears more pronounced than one having a border width of 2. The Forms Library's default is @code{FL_BOUND_WIDTH} (1) pixels (before version 1.0.91 the default was 3). Note that the border width can be negative. Negative border width does not make a down box, rather, it makes the object having an upbox appear less pronounced and "softer". See program @file{borderwidth.c} for the effect of border width on different objects. All applications developed using XForms accept a command line option @samp{-bw}, followed by an integer number, the user can use to select the preferred border width. It is recommended that you document this flag in your application documentation. If you prefer a certain border width, use @code{@ref{fl_set_defaults()}} or @code{@ref{fl_set_border_width()}} before @code{@ref{fl_initialize()}} to set the border width instead of hard-coding it on a per form or per object basis so the user has the option to change it at run time via the @samp{-bw} flag. @ifhtml @center @image{images/borderwidth} @end ifhtml @ifnothtml @center @image{images/borderwidth,14cm} @end ifnothtml There also exists a call that changes the object border width for the entire application @example void fl_set_border_width(int border_width); @end example @node Label Attributes and Fonts @subsection Label Attributes and Fonts There are also a number of routines to change the appearance of the label. The first one is @example void fl_set_object_lcol(FL_OBJECT *obj, FL_COLOR lcol); @end example @noindent It sets the color of the label. The default is black (@code{FL_BLACK}). The font size of the label can be changed using the routine @example void fl_set_object_lsize(FL_OBJECT *obj, int lsize); @end example @noindent where @code{lsize} gives the size in points. Depending on the server and fonts installed, arbitrary sizes may or may not be possible. Fig 3.5 shows the font sizes that are standard with MIT/XConsortium distribution. So use of these values is encouraged. In any case, if a requested size can not be honored, substitution will be made. The default size for XForms is 10pt. @multitable @columnfractions 0.3 0.2 0.5 @anchor{FL_TINY_SIZE} @tindex FL_TINY_SIZE @item @code{FL_TINY_SIZE} @tab 8pt @anchor{FL_SMALL_SIZE} @tindex FL_SMALL_SIZE @item @code{FL_SMALL_SIZE} @tab 10pt @anchor{FL_NORMAL_SIZE} @tindex FL_NORMAL_SIZE @item @code{FL_NORMAL_SIZE} @tab 12pt @anchor{FL_MEDIUM_SIZE} @tindex FL_MEDIUM_SIZE @item @code{FL_MEDIUM_SIZE} @tab 14pt @anchor{FL_LARGE_SIZE} @tindex FL_LARGE_SIZE @item @code{FL_LARGE_SIZE} @tab 18pt @anchor{FL_HUGE_SIZE} @tindex FL_HUGE_SIZE @item @code{FL_HUGE_SIZE} @tab 24pt @end multitable @ifhtml @center @image{images/fontsize} @end ifhtml @ifnothtml @center @image{images/fontsize,6cm} @end ifnothtml Labels can be drawn in many different font styles. The style of the label can be controlled with the routine @example void fl_set_object_lstyle(FL_OBJECT *obj, int lstyle); @end example @noindent The default font for the Forms Library is Helvetica at 10pt. Additional styles are available: @multitable @columnfractions 0.5 0.5 @anchor{FL_NORMAL_STYLE} @tindex FL_NORMAL_STYLE @item @code{FL_NORMAL_STYLE} @tab Normal text @anchor{FL_BOLD_STYLE} @tindex FL_BOLD_STYLE @item @code{FL_BOLD_STYLE} @tab Boldface text @anchor{FL_ITALIC_STYLE} @tindex FL_ITALIC_STYLE @item @code{FL_ITALIC_STYLE} @tab Guess what @anchor{FL_BOLDITALIC_STYLE} @tindex FL_BOLDITALIC_STYLE @item @code{FL_BOLDITALIC_STYLE} @tab BoldItalic @anchor{FL_FIXED_STYLE} @tindex FL_FIXED_STYLE @item @code{FL_FIXED_STYLE} @tab Fixed width (good for tables) @anchor{FL_FIXEDBOLD_STYLE} @tindex FL_FIXEDBOLD_STYLE @item @code{FL_FIXEDBOLD_STYLE} @tab @anchor{FL_FIXEDITALIC_STYLE} @tindex FL_FIXEDITALIC_STYLE @item @code{FL_FIXEDITALIC_STYLE} @tab @anchor{FL_FIXEDBOLDITALIC_STYLE} @tindex FL_FIXEDBOLDITALIC_STYLE @item @code{FL_FIXEDBOLDITALIC_STYLE} @tab @anchor{FL_TIMES_STYLE} @tindex FL_TIMES_STYLE @item @code{FL_TIMES_STYLE} @tab Times-Roman like font @anchor{FL_TIMESBOLD_STYLE FL} @tindex FL_TIMESBOLD_STYLE FL @item @code{FL_TIMESBOLD_STYLE FL} @tab @anchor{FL_TIMESITALIC_STYLE} @tindex FL_TIMESITALIC_STYLE @item @code{FL_TIMESITALIC_STYLE} @tab @anchor{FL_TIMESBOLDITALIC_STYLE} @tindex FL_TIMESBOLDITALIC_STYLE @item @code{FL_TIMESBOLDITALIC_STYLE} @tab @anchor{FL_SHADOW_STYLE} @tindex FL_SHADOW_STYLE @item @code{FL_SHADOW_STYLE} @tab Text casting a shadow @anchor{FL_ENGRAVED_STYLE} @tindex FL_ENGRAVED_STYLE @item @code{FL_ENGRAVED_STYLE} @tab Text engraved into the form @anchor{FL_EMBOSSED_STYLE} @tindex FL_EMBOSSED_STYLE @item @code{FL_EMBOSSED_STYLE} @tab Text standing out @end multitable The last three styles are special in that they are modifiers, i.e., they do not cause font changes themselves, they only modify the appearance of the font already active. E.g., to get a bold engraved text, set @code{lstyle} to @code{FL_BOLD_STYLE|FL_ENGRAVED_STYLE}. Other styles correspond to the first 12 fonts. The package, however, can handle up to 48 different fonts. The first 16 (numbers 0-15) have been pre-defined. The following table gives their names: @example 0 helvetica-medium-r 1 helvetica-bold-r 2 helvetica-medium-o 3 helvetica-bold-o 4 courier-medium-r 5 courier-bold-r 6 courier-medium-o 7 courier-bold-o 8 times-medium-r 9 times-bold-r 10 times-medium-o 11 times-bold-o 12 charter-medium-r 13 charter-bold-r 14 charter-medium-i 15 Symbol @end example The other 32 fonts (numbers 16-47) can be filled in by the application program. Actually, the application program can also change the first 16 fonts if required (e.g., to force a particular resolution). To change a font for the the entire application, use the following routine: @example int fl_set_font_name(int index, const char *name); @end example where @code{index} is the number of the font (between 0 and 47) and @code{name} should be a valid font name (with the exception of the size field). If you are defining a completely different font family starting at index @code{k}, it's a good idea to define @code{k + FL_BOLD_STYLE} to be the corresponding bold font in the family , and @code{k + FL_ITALIC_STYLE} the corresponding italic font in the family (so object like browser can obtain correct style when switching font styles): @example #define Pretty 30 #define PrettyBold (Pretty + FL_BOLD_STYLE) #define PrettyItalic (Pretty + FL_ITALIC_STYLE) fl_set_font_name(Pretty, fontname); fl_set_font_name(PrettyBold, boldfontname); fl_set_font_name(PrettyItalic, italicfontname); ... fl_set_object_lstyle(obj, PrettyBold); @end example The function returns a negative value if the requested font is invalid or otherwise can't be loaded. Note however, if this routine is called before @code{@ref{fl_initialize()}}, it will return 0, but may fail later if the font name is not valid. To change the default font (helvetica-medium), a program should change font @code{FL_NORMAL_STYLE}. If a font name in XLFD is given, a question mark (@code{?}) in the point size position informs the Forms Library that variable size will be requested later. It is preferable that the complete XLFD name (i.e., with 14 dashes and possibly wildcards) be given because a complete name has the advantage that the font may be re-scalable if scalable fonts are available. This means that although both @example "-*-helvetica-medium-r-*-*-*-?-*-*-*-*-*-*" "-*-helvetica-medium-r-*-*-*-?-*-*" @end example @noindent are valid font names, the first form may be re-scalable while the the second is not. To obtain the actual built-in font names, use the following function @example int fl_enumerate_fonts(void (*cb)(const char *f), int shortform); @end example where @code{cb} is a callback function that gets called once for every built-in font name. The font name is passed to the callback function as the string pointer parameter while @code{shortform} selects if a short form of the name should be used. XForms only specifies the absolutely needed parts of the font names, and assumes the font path is set so that the server always chooses the most optimal fonts for the system. If this is not true, you can use @code{@ref{fl_set_font_name()}} to select the exact font you want. In general, this is not recommended if your application is to be run/displayed on different servers. See @file{fonts.c} for a demonstration of all the built-in font styles available. You can change the alignment of the label with respect to the bounding box of the object. For this you use the routine @example void fl_set_object_lalign(FL_OBJECT *obj, int align); @end example The following possibilities exist: @multitable @columnfractions 0.3 0.7 @anchor{FL_ALIGN_LEFT} @tindex FL_ALIGN_LEFT @item @code{FL_ALIGN_LEFT} @tab To the left of the box. @anchor{FL_ALIGN_RIGHT} @tindex FL_ALIGN_RIGHT @item @code{FL_ALIGN_RIGHT} @tab To the right of the box. @anchor{FL_ALIGN_TOP} @tindex FL_ALIGN_TOP @item @code{FL_ALIGN_TOP} @tab To the top of the box. @anchor{FL_ALIGN_BOTTOM} @tindex FL_ALIGN_BOTTOM @item @code{FL_ALIGN_BOTTOM} @tab To the bottom of the box. @anchor{FL_ALIGN_CENTER} @tindex FL_ALIGN_CENTER @item @code{FL_ALIGN_CENTER} @tab In the middle of the box. @anchor{FL_ALIGN_RIGHT_BOTTOM} @tindex FL_ALIGN_RIGHT_BOTTOM @item @code{FL_ALIGN_RIGHT_BOTTOM} @tab To the right and bottom of the box. @anchor{FL_ALIGN_LEFT_BOTTOM} @tindex FL_ALIGN_LEFT_BOTTOM @item @code{FL_ALIGN_LEFT_BOTTOM} @tab To the left and bottom of the box. @anchor{FL_ALIGN_RIGHT_TOP} @tindex FL_ALIGN_RIGHT_TOP @item @code{FL_ALIGN_RIGHT_TOP} @tab To the right and top of the box. @anchor{FL_ALIGN_LEFT_TOP} @tindex FL_ALIGN_LEFT_TOP @item @code{FL_ALIGN_LEFT_TOP} @tab To the left and top of the box. @end multitable Normally, all the alignment requests place the text outside the box, except for @anchor{FL_ALIGN_INSIDE} @tindex FL_ALIGN_INSIDE @code{FL_ALIGN_CENTER}. This can be changed by using a special mask, @code{FL_ALIGN_INSIDE}, to request alignments that place the text inside the box. This works for most of the objects in the library but not for all. For sliders, inputs and some others, placing the label inside the box simply does not make sense. In these cases, inside request is ignored. See the demo program @file{lalign.c} for an example use of @code{FL_ALIGN_INSIDE}. Finally, the routine @findex fl_set_object_label() @example void fl_set_object_label(FL_OBJECT *obj, const char *label); @end example changes the label of a given object. An internal copy of the parameter @code{label} is made. As mentioned earlier, newline (@code{\n}) can be embedded in the label to generate multiple lines. By embedding @code{H} (@code{\010}) in the label, the entire label or one of the characters in the label can be underlined. The function @findex fl_get_object_label() @example const char * fl_get_object_label(FL_OBJECT *obj); @end example @noindent returns the label string. @node Tool Tips @subsection Tool Tips As will be seen later, an object can be decorated by icons instead of labels. For this kind of object, it is helpful to show a text string that explains the function the object controls under appropriate conditions. Forms Library elected to show the message after the mouse enters the object for about 600 milli-seconds. The text is removed when the mouse leaves the object or when the mouse is pressed. To set the text, use the following routine @findex fl_set_object_helper() @example void fl_set_object_helper(FL_OBJECT *obj, const char *helpmsg); @end example where @code{helpmsg} is a text string (with possible embedded newlines in it) that will be shown when the mouse enters the object, after about a 600 milli-second delay. A internal copy of the string is made. The boxtype, color and font for the message display can be customized further using the following routines @example void fl_set_tooltip_boxtype(int boxtype); void fl_set_tooltip_color(FL_COLOR textcolor, FL_COLOR background); void fl_set_tooltip_font(int style, int size); void fl_set_tooltip_lalign(int align); @end example @noindent where @code{boxtype} is the backface of the form that displays the text. The default is @code{FL_BORDER_BOX}. @code{textcolor} and @code{background} specify the colors of the text string and the backface. The defaults for these are @code{FL_BLACK} and @code{FL_YELLOW} respectively. The @code{style} and @code{size} parameters are the font style and size of the text. @code{align} is the alignment of the text string with respective to the box. The default is @code{FL_ALIGN_LEFT | FL_ALIGN_INSIDE} . @node Redrawing @subsection Redrawing Objects A word of caution is required. It is possible to change the attributes of an object at any time. But when the form is already displayed on the screen some care has to be taken. Whenever attributes change the system redraws the object. This is fine when drawing the object erases the old one but this is not always the case. For example, when placing labels outside the box (not using @code{FL_ALIGN_CENTER}) they are not correctly erased. It is always possible to force the system to redraw an object using @example void fl_redraw_object(FL_OBJECT *obj); @end example When the object is a group it redraws the complete group. To redraw an entire form, use @example void fl_redraw_form(FL_FORM *form); @end example Use of these routines is normally not necessary and should be kept to an absolute minimum. @node Changing Many Attributes @subsection Changing Many Attributes Whenever you change an attribute of an object in a visible form the object is redrawn immediately to make the change visible. This can be undesirable when you change a number of attributes of the same object. You only want the changed object to be drawn after the last change. Drawing it after each change will give a flickering effect on the screen. This gets even worse when you e.g. want to hide a few objects. After each object you hide the entire form is redrawn. In addition to the flickering, it is also time consuming. Thus it is more efficient to tell the library to temporarily not redraw the form while changes are being made. This can be done by "freezing" the form. While a form is being frozen it is not redrawn, all changes made are instead buffered internally. Only when you unfreeze the form, all changes made in the meantime are drawn at once. For freezing and unfreezing two calls exist: @example void fl_freeze_form(FL_FORM *form); @end example @noindent and @example void fl_unfreeze_form(FL_FORM *form); @end example @noindent It is a good practice to place multiple changes to the contents of a form always between calls to these two procedures. Further, it is better to complete modifying the attributes of one object before starting work on the next. @node Symbols @subsection Symbols Rather than textual labels, it is possible to place symbols like arrows etc. on objects. This is done in the following way: When the label starts with the character @code{@@} no label is drawn but a particular symbol is drawn instead@footnote{If you want a literal @code{@@} character as the first character, escape it with another @code{@@} character.}. The rest of the label string indicates the symbol. A number of pre-defined symbols are available: @multitable @columnfractions 0.2 0.8 @item @code{->} @tab Normal arrow pointing to the right. @item @code{<-} @tab Normal arrow pointing to the left. @item @code{>} @tab Triangular arrow pointing to the right. @item @code{<} @tab Triangular arrow pointing to the left. @item @code{>>} @tab Double triangle pointing to the right. @item @code{<<} @tab Double triangle pointing to the left. @item @code{<->} @tab Arrow pointing left and right. @item @code{->|} @tab A normal arrow with a bar at the end. @item @code{>|} @tab A triangular arrow with a bar at the end. @item @code{-->} @tab A thin arrow pointing to the right. @item @code{=} @tab Three embossed lines. @item @code{arrow} @tab Same as @code{-->}. @item @code{returnarrow} @tab @code{} key symbol. @item @code{square} @tab A square. @item @code{circle} @tab A circle. @item @code{line} @tab A horizontal line. @item @code{plus} @tab A plus sign (can be rotated to get a cross). @item @code{UpLine} @tab An embossed line. @item @code{DnLine} @tab An engraved line. @item @code{UpArrow} @tab An embossed arrow. @item @code{DnArrow} @tab An engraved arrow. @end multitable @noindent See Fig. 3.6 for how some of them look. See also @file{symbols.c}. It is possible to put the symbols in different orientations. When the symbol name is preceded by a digit 1-9 (not 5) it is rotated like on the numerical keypad, i.e., 6 indicates no rotation, 9 a rotation of 45 degrees counter-clockwise, 8 a rotation of 90 degrees, etc. Hence the order is 6, 9, 8, 7, 4, 1, 2, 3. (Just think of the keypad as consisting of arrow keys.) So to get an arrow that is pointing to the left top use a label @code{@@7->}. To put the symbol in other orientations, put a 0 after the @code{@@}, followed by three digits that indicate the angle (counter-clockwise). E.g. to draw an arrow at an angle of 30 degrees use label @code{@@0030->}. The symbol will be scaled to fit in the bounding box. When the bounding box is not square, scaling in the x- and y-directions will be different. If keeping the aspect ratio is desired, put a sharp (@code{#}) immediately after the @. E.g., @code{@@#9->}. Two additional prefixes, @code{+} and @code{-}, followed by a single digit, can be used to make small symbol size adjustment. These prefixes must be either immediately after @code{@@} or follow @code{#}. The + indicates increase the symbol size and - indicates decrease the symbol size. The digit following the prefixes indicates the increment (decrement) in pixels. For example, to draw a circle that is 3 pixels smaller in radius than the default size, use @code{@@-3square}. @ifhtml @center @image{images/symbols} @end ifhtml @ifnothtml @center @image{images/symbols} @end ifnothtml In addition to using symbols as object labels, symbols can also be drawn directly using @findex fl_draw_symbol() @anchor{fl_draw_symbol()} @example int fl_draw_symbol(const char *symbolname, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_Color col); @end example @noindent (the function returns @code{1} on success and @code{0} on failure when the symbol name isn't valid) or indirectly via @code{@ref{fl_drw_text()}}. The application program can also add symbols to the system which it can then use to display symbols on objects that are not provided by the Forms Library. To add a symbol, use the call @findex fl_add_symbol() @anchor{fl_add_symbol()} @example int fl_add_symbol(const char *name, void (*drawit)(),int sc); @end example @noindent @code{name} is the name under which the symbol should be known (at most 15 characters), without the leading @code{@@}. @code{drawit()} is the drawing routine that draws the symbol. @code{sc} is reserved and currently has no meaning. Simply setting it to zero would do. The routine @code{drawit()} should have the form @example void drawit(FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col); @end example @noindent @code{col} is the color in which to draw the symbol. This is the label color that can be provided and changed by the application program. The routine should draw the symbol centered inside the box by @code{x}, @code{y}, @code{w}, @code{h} and rotated from its natural position by @code{angle} degrees. The draw function can call all types of drawing routines, including @code{@ref{fl_draw_symbol()}}. If the new symbol name is the same as one of the built-ins, the new definition overrides the built-in. Note the the new symbol does not have to be vector graphics, you can use pixmap or whatever in the drawing function. The symbol handling routines really should be viewed as a means of associating an arbitrary piece of text (the label) with arbitrary graphics, application of which can be quite pleasant given the right tasks. @node Adding and Deleting @section Adding and Deleting Objects In some situations you might want to add an object to an existing form. This can be done using the call @example FL_FORM *fl_addto_form(FL_FORM *form); @end example @noindent After this call you can continue adding objects to the form with the usual functions for adding objects like @code{@ref{fl_add_button()}} etc. To stop adding objects to the form again use @code{@ref{fl_end_form()}}. It is possible to add objects to forms that are being displayed, but this is not always a good idea because not everything behaves well (e.g.@: strange things might happen when a group is started but not yet finished). To delete an object from a form simply use @example void fl_delete_object(FL_OBJECT *obj); @end example It deletes the object from the form it currently belongs to and also from a group it may belong to. The argument can also be the pseudo-object starting a group (i.e.@: the return value of @code{@ref{fl_bgn_group()}}) in which case the whole group of objects will be removed from the form. The object remains available (except if it's an object that marks the start or end of a group) and can be added again to the same or another form later using @findex fl_add_object() @anchor{fl_add_object()} @example void fl_add_object(FL_FORM *form, FL_OBJECT *obj); @end example @noindent Normally, this function is used in object classes to add a newly created object to a form. It may not be used for objects representing the start or end of a group. @node Freeing Objects @section Freeing Objects If the application program does not need an object anymore, it can free the memory used by the object using the call @example void fl_free_object(FL_OBJECT *obj); @end example @noindent After this the object can no longer be used. If you hadn't deleted the object from the form it did belong to before this will happen automatically. To free the memory used by an entire form use the call @example void fl_free_form(FL_FORM *form); @end example @noindent This will delete and free all the objects on the form and the form itself. A freed form may not be referenced anymore. xforms-1.0.93sp1/COPYING.LIB0000644000175000017500000006347411171560225013704 0ustar jensjens GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! xforms-1.0.93sp1/fd2ps/0000755000175000017500000000000011377311602013245 5ustar jensjensxforms-1.0.93sp1/fd2ps/pstext.c0000644000175000017500000002312611304527130014737 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file pstext.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd2ps.h" #include char *ul_magic_char = "\010"; /*************************************** ***************************************/ void ps_text_init( void ) { ps_output( "/point {SX SY add 2 div div} BD\n" ); ps_output( "/SetFont {findfont exch scalefont setfont} BD\n" ); ps_output( "/Lshow {show} BD\n" ); ps_output( "/Cshow {dup stringwidth pop -2 div 0 rmoveto show} BD\n" ); ps_output( "/Rshow {dup stringwidth pop neg 0 rmoveto show} BD\n" ); ps_output( "/CP {currentpoint} bind def /SW {stringwidth} BD\n" ); } /* * Text stuff. Default fonts follows the XFORM built-in */ static const char *fnts[ FL_MAXFONTS ] = { "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique", "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", /* xforms users charter */ "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", "Symbol" }; static int cur_style = -1, cur_size = -1; /*************************************** ***************************************/ void ps_invalidate_font_cache( void ) { cur_style = cur_size = -1; } /*************************************** ***************************************/ void ps_set_font( int style, int size ) { if ( style >= FL_SHADOW_STYLE ) style %= FL_SHADOW_STYLE; if ( style == cur_style && cur_size == size ) return; ps_output( "%d point /%s SetFont\n", size, fnts[ style ] ); ps_output( "/H %d point def\n", size ); cur_style = style; cur_size = size; } #define has_desc(s) (strchr(s,'g')||strchr(s,'j')||\ strchr(s,'q')||strchr(s,'y')||strchr(s,'p')) #define is_desc(c) (c=='g'||(c=='j')||(c=='q')||(c=='y')||(c=='p')) /*************************************** ***************************************/ static void do_underline( const char * s, int n ) { ps_output( "/len (%s) SW pop def\n", s ); if ( n == -1 ) { ps_output( "/ty CP exch pop %d sub def ", 1 + has_desc( s ) * 2 ); ps_output( "/tx CP pop len sub def " ); ps_output( "tx ty M len tx add ty LT S\n" ); } else { char *t = fl_strdup( s ); *( t + n ) = '\0'; ps_output( "/ul (%c) SW pop def\n", *( s + n ) ); ps_output( "/ty CP exch pop %d sub def ", 1 + is_desc(s[ n ] ) * 2 ); ps_output( "/tx CP pop len sub (%s) SW pop add def\n", t ); ps_output( "tx ty M ul tx add ty LT S\n" ); free( t ); } } /*************************************** ***************************************/ #define Quote( c ) ( c == '(' || c == ')' || c == '%' ) static char * ps_quote( char *str ) { static char buf[ 1024 ]; char *s, *q = buf; for ( s = str; *s; s++ ) { if ( Quote( *s ) ) *q++ = '\\'; *q++ = *s; } *q = '\0'; return buf; } /*************************************** * This routine is always called by other routines. Once we get here, * the text would always remain within the box specified by * {x,y,w,h}. ***************************************/ static void ps_drw_text( int align, float x, float y, float w, float h, long c, int style, int size, const char * sstr ) { int ulpos = -1, lnumb; int i; char *lines[ 512 ]; char *str; char newlabel[ 255 ], *p; float bw = 2; int halign, valign; ps_color( c ); ps_set_font( style, size ); str = fl_strdup( sstr ); lines[ 0 ] = str; /* Split (multi-line)string into lines */ for ( i = 0, lnumb = 1; str[ i ] != '\0'; i++ ) if ( str[ i ] == '\n' ) { str[ i ] = '\0'; lines[ lnumb ] = str + i + 1; lnumb++; } fl_get_hv_align( align, &halign, &valign ); /* Figure out where the starting point is */ switch ( halign ) { case FL_ALIGN_CENTER: ps_output( "/x %.1f def ", x + 0.5 * w ); break; case FL_ALIGN_LEFT: ps_output( "/x %.1f def ", bw + x ); break; case FL_ALIGN_RIGHT: ps_output( "/x %.1f def ", x + w - 1 - bw ); break; } switch ( valign ) { case FL_ALIGN_TOP: ps_output( "/y %.1f H sub def\n", y + h - bw ); break; case FL_ALIGN_BOTTOM: ps_output( "/y %.1f %.1f H mul add def\n", y + bw, lnumb - 0.9 ); break; case FL_ALIGN_CENTER: ps_output( "/y %.1f %.1f H mul add def\n", y + 0.5 * h, 0.5 * lnumb - 0.9 ); break; } for ( i = 0; i < lnumb; i++ ) { /* Check if have underline request */ if ( ( p = strchr( lines[ i ], *ul_magic_char ) ) ) { char *q; ulpos = p - lines[ i ]; q = newlabel; p = lines[ i ]; for ( ; *p; p++ ) if ( *p != *ul_magic_char ) *q++ = *p; *q = 0; lines[ i ] = newlabel; } ps_output( "x y M " ); switch ( halign ) { case FL_ALIGN_CENTER: ps_output( "(%s) Cshow\n", ps_quote( lines[ i ] ) ); break; case FL_ALIGN_LEFT: ps_output( "(%s) Lshow\n", ps_quote( lines[ i ] ) ); break; case FL_ALIGN_RIGHT: ps_output( "(%s) Rshow\n", ps_quote( lines[ i ] ) ); break; } if ( ulpos >= 0 ) do_underline( lines[ i ], ulpos - 1 ); ulpos = -1; if ( i != lnumb - 1 ) ps_output( "/y y H sub def\n" ); } free( str ); } /*************************************** ***************************************/ #define D( x, y, c ) ps_drw_text( align, x, y, w, h, c, style, size, str ) void ps_draw_text( int align, float x, float y, float w, float h, long col, int style, int size, const char * str) { int special = FL_INVALID_STYLE; if ( ! str || ! *str ) return; if ( *str == '@' ) { ps_draw_symbol( str, x, y, w, h, col ); return; } if ( special_style( style ) ) { special = ( style / FL_SHADOW_STYLE ) * FL_SHADOW_STYLE; style %= FL_SHADOW_STYLE; } if ( special == FL_SHADOW_STYLE ) D( x + 2, y - 2, FL_BOTTOM_BCOL ); else if ( special == FL_ENGRAVED_STYLE ) { D( x - 1, y, FL_RIGHT_BCOL ); D( x, y + 1, FL_RIGHT_BCOL ); D( x - 1, y + 1, FL_RIGHT_BCOL ); D( x + 1, y, FL_LEFT_BCOL ); D( x, y - 1, FL_LEFT_BCOL ); D( x + 1, y - 1, FL_LEFT_BCOL ); } else if ( special == FL_EMBOSSED_STYLE ) { D( x - 1, y, FL_TOP_BCOL ); D( x, y + 1, FL_TOP_BCOL ); D( x - 1, y + 1, FL_TOP_BCOL ); D( x + 1, y, FL_RIGHT_BCOL ); D( x, y - 1, FL_RIGHT_BCOL ); D( x + 1, y - 1, FL_RIGHT_BCOL ); } ps_drw_text( align, x, y, w, h, col, style, size, str ); } /*************************************** ***************************************/ void ps_draw_text_beside( int align, float x, float y, float w, float h, long col, int style, int size, const char * str ) { int newa, newx, newy; if ( ! str || ! *str ) return; align &= ~FL_ALIGN_INSIDE; #if 1 fl_get_outside_align( align, x, y, w, h, &newa, &newx, &newy ); ps_draw_text( newa, newx, newy, w, h, col, style, size, str ); #else if ( align == FL_ALIGN_LEFT ) ps_draw_text( FL_ALIGN_RIGHT, x - h, y, h, h, col, style, size, str ); else if ( align == FL_ALIGN_RIGHT ) ps_draw_text( FL_ALIGN_LEFT, x + w, y, h, h, col, style, size, str ); else if ( align == FL_ALIGN_TOP ) ps_draw_text( FL_ALIGN_BOTTOM, x, y + h, w, h, col, style, size, str ); else if ( align == FL_ALIGN_BOTTOM ) ps_draw_text( FL_ALIGN_TOP, x, y - h, w, h, col, style, size, str ); else ps_draw_text( FL_ALIGN_CENTER, x, y, w, h, col, style, size, str ); #endif } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/load.c0000644000175000017500000005467511247055071014352 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file load.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Read a form defination file and call PS output routines */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd2ps.h" #include #include #define MAGIC3 12322 #define MAGIC4 13000 #define MAGIC5 14000 extern char *de_space( char *s ); /*************************************** ***************************************/ static FL_FORM * make_form( int type FL_UNUSED_ARG, int w, int h ) { FL_FORM *form; form = calloc( 1, sizeof *form ); form->w = w; form->h = h; form->first = form->last = NULL; form->label = NULL; return form; } #define sl_focus( t ) ( t == FL_HOR_BROWSER_SLIDER \ || t == FL_VERT_BROWSER_SLIDER \ || t == FL_HOR_BROWSER_SLIDER2 \ || t == FL_VERT_BROWSER_SLIDER2 \ || t == FL_HOR_THIN_SLIDER \ || t == FL_VERT_THIN_SLIDER ) /*************************************** ***************************************/ FL_OBJECT * flps_make_object( int objclass, int type, int x, int y, int w, int h, const char * label, void * p FL_UNUSED_ARG ) { FL_OBJECT *ob = calloc( 1, sizeof *ob ); ALLSPEC *sp; ob->objclass = objclass; ob->type = type; ob->boxtype = FL_UP_BOX; ob->x = x; ob->y = y; ob->w = w; ob->h = h; ob->label = fl_strdup( label ? label : "" ); /* Default. Must agree with FL default */ ob->align = FL_ALIGN_CENTER; ob->col1 = FL_COL1; ob->col2 = FL_MCOL; ob->lcol = FL_BLACK; ob->lsize = FL_DEFAULT_FONT; ob->lstyle = FL_NORMAL_STYLE; ob->shortcut = calloc( 1, sizeof *ob->shortcut ); ob->shortcut[ 0 ] = 0; ob->next = ob->prev = NULL; ob->form = NULL; ob->bw = ( psinfo.bw && FL_abs( psinfo.bw ) <= 6 ) ? psinfo.bw : FL_BOUND_WIDTH; sp = ob->spec = calloc( 1, sizeof *ob->spec ); sp->content = calloc( MAX_CONTENT + 1, sizeof *sp->content ); sp->mode = calloc( MAX_CONTENT + 1, sizeof *sp->mode ); sp->fontstyle = FL_NORMAL_STYLE; sp->fontsize = FL_DEFAULT_FONT; /* set object specific defaults */ if ( ob->objclass == FL_SLIDER || ob->objclass == FL_VALSLIDER || ob->objclass == FL_THUMBWHEEL ) { sp->val = 0.5; sp->prec = 2; sp->max = 1.0; sp->min = 0.0; sp->slsize = FL_SLIDER_WIDTH; if ( sl_focus( ob->type ) ) sp->slsize *= 1.5; } else if ( ob->objclass == FL_SCROLLBAR ) { ob->col1 = ob->col2 = FL_COL1; sp->val = 0.5; sp->prec = 2; sp->max = 1.0; sp->min = 0.0; sp->slsize = FL_SLIDER_WIDTH; if ( ob->type == FL_HOR_THIN_SCROLLBAR || ob->type == FL_VERT_THIN_SCROLLBAR || ob->type == FL_HOR_SCROLLBAR || ob->type == FL_VERT_SCROLLBAR ) sp->slsize *= 1.6; } else if ( ob->objclass == FL_POSITIONER ) { sp->xmin = sp->ymin = 0.0; sp->xmax = sp->ymax = 1.0; sp->xval = sp->yval = 0.5; } else if ( ob->objclass == FL_COUNTER ) { sp->val = 0.0; sp->prec = 1; sp->min = -1000000.0; sp->max = 1000000.0; } else if ( ob->objclass == FL_DIAL ) { sp->min = 0.0; sp->max = 1.0; sp->val = 0.5; sp->thetai = 0.0; sp->thetaf = 360; sp->origin = 270; sp->direction = FL_DIAL_CW; } else if ( ob->objclass == FL_PIXMAP || ob->objclass == FL_PIXMAPBUTTON ) { sp->align = FL_ALIGN_CENTER; sp->dx = sp->dy = 3; sp->show_focus = 1; psinfo.epsf_import = 1; } else if ( ob->objclass == FL_CHOICE ) { sp->align = FL_ALIGN_CENTER; sp->fontsize = FL_DEFAULT_FONT; } else if ( ob->objclass == FL_BROWSER ) { sp->fontsize = FL_DEFAULT_FONT; sp->h_pref = FL_AUTO; sp->v_pref = FL_AUTO; } return ob; } /*************************************** ***************************************/ static int read_key_val(FILE * fp, char * key, char * val ) { char buf[ 1024 ], *p; if ( ! fgets( buf, 1024, fp ) || ferror( fp ) ) return EOF; buf[ 1023 ] = 0; val[ 0 ] = key[ 0 ] = '\0'; /* Nuke the new line */ if ( ( p = strchr( buf, '\n' ) ) ) *p = '\0'; if ( ! ( p = strchr( buf, ':' ) ) ) { strcpy( key, "?" ); return EOF; } *p = '\0'; strcpy( key, buf ); if ( * ( p + 1 ) ) strcpy( val, p + 2 ); return 0; } /*************************************** * Adds an object to the form. ***************************************/ static void flps_add_object( FL_FORM * form, FL_OBJECT * obj ) { /* Checking for correct behaviour. */ if ( obj == NULL ) { fprintf( stderr, "fl_add_object:Trying to add NULL object.\n" ); return; } if ( form == NULL ) { fprintf( stderr, "fl_add_object:Trying to add object to NULL form\n" ); return; } obj->prev = obj->next = NULL; if ( psinfo.inverted ) obj->y = form->h - obj->h - obj->y; if ( form->first == NULL ) form->first = form->last = obj; else { obj->prev = form->last; form->last->next = obj; form->last = obj; } obj->form = form; } #define NL '\n' /*************************************** * Sets the label, turning \n in NL ***************************************/ static void set_label( FL_OBJECT * obj, const char * str ) { int i = 0, j = 0; static char tmpstr[ 1024 ]; do { if ( str[ i ] == '\\' && str[ i + 1 ] == 'n' ) { tmpstr[ j++ ] = NL; i++; } else if ( str[ i ] == '\\' && strncmp( str + i + 1, "010", 3 ) == 0 ) { if ( ! obj->shortcut || ! *obj->shortcut ) tmpstr[ j++ ] = *ul_magic_char; i += 3; } else tmpstr[ j++ ] = str[ i ]; } while ( str[ i++ ] != 0); tmpstr[ j ] = '\0'; obj->label = fl_strdup( tmpstr ); } extern int class_val( char * ); extern int boxtype_val( char * ); extern int align_val( const char * ); extern int style_val( const char * ); extern int lsize_val( const char * ); extern int pupmode_val( const char * ); extern int scbpref_val( const char * ); /*********************************************************************** * Routines to load object specific initialization code **********************************************************************/ #define ISSLIDER( cls ) ( cls == FL_SLIDER || cls == FL_VALSLIDER ) /*************************************** * Lump together all spec info into one routine. We really * should include fd_spec here so we don't write the code * twice ***************************************/ static void load_objclass_spec_info( FILE * fp, FL_OBJECT * ob ) { char key[ 128 ], val[ 128 ]; SPEC *sp = ob->spec; int c; while ( ungetc( ( c = getc( fp ) ), fp ) != '-' && c != '=' ) { read_key_val( fp, key, val ); if ( strlen( de_space( key ) ) < 2 ) /* empty */ ; else if ( strcmp( key, "bounds" ) == 0 ) sscanf( val, "%f %f", &sp->min, &sp->max ); else if ( strcmp( key, "xbounds" ) == 0 ) sscanf( val, "%f %f", &sp->xmin, &sp->xmax ); else if (strcmp( key, "ybounds" ) == 0 ) sscanf( val, "%f %f", &sp->ymin, &sp->ymax ); else if ( strcmp( key, "precision" ) == 0 ) sscanf( val, "%d", &sp->prec ); else if ( strcmp( key, "initial_val" ) == 0 ) sscanf( val, "%f", &sp->val ); else if ( strcmp( key, "value" ) == 0 ) { if ( ISBUTTON( ob->objclass ) || ISCHOICE( ob->objclass ) ) sp->int_val = atoi( val ); else sp->val = atof( val ); } else if ( strcmp( key, "xvalue" ) == 0 ) sscanf( val, "%f", &sp->xval ); else if ( strcmp( key, "yvalue" ) == 0 ) sscanf( val, "%f", &sp->yval ); else if ( strcmp( key, "xstep" ) == 0 ) sscanf( val, "%f", &sp->xstep ); else if ( strcmp( key, "ystep" ) == 0 ) sscanf( val, "%f", &sp->ystep ); else if ( strcmp(key, "sstep" ) == 0 ) sscanf( val, "%f", &sp->sstep ); else if ( strcmp( key, "lstep" ) == 0 ) sscanf( val, "%f", &sp->lstep ); else if ( strcmp( key, "file" ) == 0 ) sp->file = fl_strdup( val ); else if ( strcmp( key, "focus" ) == 0 ) sp->show_focus = atoi( val ); else if ( strcmp( key, "align" ) == 0 ) sp->align = align_val( val ); else if ( strcmp( key, "slsize" ) == 0 ) sscanf( val, "%f", &sp->slsize ); else if ( strcmp( key, "angles" ) == 0 ) sscanf( val, "%f %f", &sp->thetai, &sp->thetaf ); else if ( strcmp( key, "content" ) == 0 ) sp->content[ ++sp->lines ] = fl_strdup( val ); else if ( strcmp( key, "mode" ) == 0 ) sp->mode[ sp->lines ] = pupmode_val( val ); else if ( strcmp( key, "h_pref" ) == 0 ) sp->h_pref = scbpref_val( val ); else if ( strcmp( key, "v_pref" ) == 0 ) sp->v_pref = scbpref_val( val ); else if ( strcmp(key, "dir" ) == 0 ) { if ( strcmp( val, "FL_DIAL_CCW" ) == 0 ) sp->direction = FL_DIAL_CCW; else sp->direction = FL_DIAL_CW; } /* known but don't care */ else if ( ! strcmp( key, "return" ) || ! strcmp( key, "data" ) || ! strcmp( key, "ytics" ) || ! strcmp( key, "xtics" ) || ! strcmp( key, "xscale" ) || ! strcmp( key, "yscale" ) || ! strcmp( key, "struct" ) || ! strcmp( key, "global" ) || ! strcmp( key, "shortcut" ) || ! strcmp( key, "increment" ) || ! strcmp( key, "handler" ) || ! strcmp( key, "fullpath" ) || ! strcmp( key, "mbuttons" ) ) /* empty */; else fprintf( stderr, "%s: Unknown spec (%s = %s) -- Ignored\n", find_class_name(ob->objclass), key, val ); } } /*************************************** ***************************************/ static FL_OBJECT * load_object( FL_FORM * form, FILE * fl ) { FL_OBJECT *obj; int objclass, type; float x, y, w, h; char name[ 64 ], cbname[ 64 ]; char cn1[ 64 ], cn2[ 64 ]; char objcls[ 64 ]; char key[ 64 ], val[ 10000 ]; /* Must demand the vital info */ if ( ! fgets( val, sizeof val, fl ) || *val != '-' || fscanf( fl, "class: %s\n", objcls ) != 1 || fscanf( fl, "type: %s\n", val ) != 1 || fscanf( fl, "box: %f %f %f %f\n", &x, &y, &w, &h ) != 4 ) { /* This is an error and should be handled JTT*/ } objclass = find_class_val( objcls ); type = find_type_val( objclass, val ); obj = flps_make_object( objclass, type, x, y, w, h, 0, 0 ); flps_add_object( form, obj ); /* Now parse the attributes */ while ( read_key_val( fl, key, val ) != EOF ) { if ( ! strcmp( key, "boxtype" ) ) obj->boxtype = boxtype_val( val ); else if ( ! strcmp(key, "colors" ) ) { cn1[ 0 ] = cn2[ 0 ] = '\0'; if ( sscanf( val, "%s %s", cn1, cn2 ) != 2 ) { /* This is an error and should be handled JTT*/ } obj->col1 = fl_get_namedcolor(cn1); obj->col2 = fl_get_namedcolor(cn2); } else if ( ! strcmp( key, "alignment" ) ) obj->align = align_val(val); else if ( ! strcmp( key, "style" ) || ! strcmp( key, "lstyle" ) ) obj->lstyle = style_val( val ); else if ( ! strcmp( key, "size" ) || ! strcmp( key, "lsize" ) ) obj->lsize = lsize_val(val); else if ( ! strcmp( key, "lcol" ) ) obj->lcol = fl_get_namedcolor( val ); else if ( ! strcmp( key, "label" ) ) set_label( obj, val ); else if ( ! strcmp( key, "shortcut" ) ) flps_set_object_shortcut( obj, val, 1 ); else if ( ! strcmp( key, "callback" ) ) strcpy( cbname, val ); else if ( ! strcmp( key, "name" ) ) strcpy( name, val ); else if ( ! strcmp( key, "argument" ) ) /* empty */ ; else if ( ! strcmp( key, "resize" ) ) /* empty */ ; else if ( ! strcmp( key, "return" ) ) /* empty */ ; else if ( ! strcmp( key, "gravity" ) ) /* empty */ ; else break; } load_objclass_spec_info( fl, obj ); return obj; } /*************************************** ***************************************/ static FL_FORM * read_form( FILE * fl ) { double w, h; int onumb; FL_FORM *cur_form = 0; char fname[ 1024 ]; if ( ! fgets( fname, sizeof fname, fl ) || *fname != '=' || fscanf( fl, "Name: %s\n", fname ) != 1 ) { /* This is an error and should be handled JTT*/ } if ( fscanf( fl, "Width: %lf\n", &w ) != 1 || fscanf( fl, "Height: %lf\n", &h ) != 1 ) { /* This is an error and should be handled JTT*/ } cur_form = make_form( FL_NO_BOX, w, h ); cur_form->label = fl_strdup( fname ); if ( fscanf( fl, "Number of Objects: %d\n", &onumb ) != 1 ) { /* This is an error and should be handled JTT*/ } /* Here should be checked if as many objects could be loaded as expected JTT */ while ( --onumb >= 0 ) load_object( cur_form, fl ); return cur_form; } /*************************************** ***************************************/ int load_form_definition( const char * filename ) { FILE *fp = fopen( filename, "r" ); int fd_magic, nf; FL_FORM *form; char buf[ 256 ], ubuf[ 32 ]; if ( ! fp ) { perror( filename ); return -1; }; if ( fscanf( fp, "Magic: %d\n\n", &fd_magic ) != 1 || ( fd_magic != MAGIC3 && fd_magic != MAGIC4 && fd_magic != MAGIC5 ) ) { fclose( fp ); fprintf( stderr, "Unknown file %s (magic %d)\n", filename, fd_magic ); return -1; } psinfo.inverted = ( fd_magic == MAGIC4 ); if ( ! fgets( buf, sizeof buf, fp ) || strcmp( buf, "Internal Form Definition File\n" ) || ! fgets( buf, sizeof buf, fp ) || strcmp( buf, " (do not change)\n" ) || fgetc( fp ) != '\n' || fscanf( fp, "Number of forms: %d\n", &nf ) != 1 ) { fclose( fp ); fprintf( stderr, "Failure to read file %s\n", filename ); return -1; } psinfo.pages = nf; if ( nf > 1 && psinfo.eps ) fprintf( stderr, "Requesting EPS output with more than one form.\n" ); if ( psinfo.verbose ) fprintf( stderr, "%d forms will be converted\n", nf ); /* read until we hit a seperator line */ while ( fgets( buf, sizeof buf, fp ) && *buf != '\n' ) { if ( strncmp( buf, "Unit", 4 ) == 0 ) { float xs, ys; if ( sscanf( buf, "Unit of measure: %s", ubuf ) != 1 ) { fclose( fp ); fprintf( stderr, "Failure to read file %s\n", filename ); return -1; } psinfo.unit = unit_val( ubuf ); get_scale_unit( psinfo.unit, &xs, &ys ); } else if ( strncmp( buf, "Border", 6 ) == 0 ) { if ( sscanf( buf, "Border Width: %s", ubuf ) != 1 ) { fclose( fp ); fprintf( stderr, "Failure to read file %s\n", filename ); return -1; } psinfo.bw = atoi( ubuf ); } else if ( strncmp( buf, "Snap", 4 ) == 0 ) /* empty */ ; else fprintf( stderr, "Unknown token: %s", buf ); } if ( psinfo.user_bw ) psinfo.bw = psinfo.user_bw; while ( --nf >= 0 ) { form = read_form( fp ); ps_show_form( form ); } fclose( fp ); return 0; } /* attributes query routines */ #define VN( v ) { v, #v } typedef struct { int val; char * name; } VN_pair; static VN_pair vn_btype[ ] = { VN(FL_NO_BOX), VN(FL_UP_BOX), VN(FL_DOWN_BOX), VN(FL_FLAT_BOX), VN(FL_BORDER_BOX), VN(FL_SHADOW_BOX), VN(FL_FRAME_BOX), VN(FL_ROUNDED_BOX), VN(FL_RFLAT_BOX), VN(FL_RSHADOW_BOX), VN(FL_OVAL_BOX), VN(FL_EMBOSSED_BOX), VN(FL_ROUNDED3D_UPBOX), VN(FL_ROUNDED3D_DOWNBOX), VN(FL_OVAL3D_UPBOX), VN(FL_OVAL3D_DOWNBOX), VN(FL_TOPTAB_UPBOX), VN(FL_SELECTED_TOPTAB_UPBOX), VN(FL_BOTTOMTAB_UPBOX), VN(FL_SELECTED_BOTTOMTAB_UPBOX), VN(-1) }; /*************************************** ***************************************/ int boxtype_val( char *cc ) { VN_pair *vn = vn_btype; for ( ; vn->val >= 0; vn++ ) if ( strcmp( cc, vn->name ) == 0 ) return vn->val; fprintf( stderr, "unknown boxtype %s\n", cc ); return atoi( cc ); } static VN_pair vn_align[ ] = { VN( FL_ALIGN_CENTER ), VN( FL_ALIGN_TOP ), VN( FL_ALIGN_BOTTOM ), VN( FL_ALIGN_LEFT ), VN( FL_ALIGN_RIGHT ), VN( FL_ALIGN_LEFT_TOP ), VN( FL_ALIGN_RIGHT_TOP ), VN( FL_ALIGN_LEFT_BOTTOM ), VN( FL_ALIGN_RIGHT_BOTTOM ), VN( FL_ALIGN_TOP_LEFT ), /* need them for backward compatibility */ VN( FL_ALIGN_TOP_RIGHT ), VN( FL_ALIGN_BOTTOM_LEFT ), VN( FL_ALIGN_BOTTOM_RIGHT ), VN( -1 ) }; static VN_pair vn_lsize[ ] = { VN( FL_DEFAULT_FONT ), VN( FL_DEFAULT_SIZE ), VN( FL_TINY_FONT ), VN( FL_TINY_SIZE ), VN( FL_SMALL_FONT ), VN( FL_SMALL_SIZE ), VN( FL_NORMAL_FONT ), VN( FL_NORMAL_SIZE ), VN( FL_MEDIUM_FONT ), VN( FL_MEDIUM_SIZE ), VN( FL_LARGE_FONT ), VN( FL_LARGE_SIZE ), VN( FL_HUGE_FONT ), VN( FL_HUGE_SIZE ), { FL_SMALL_FONT, "FL_NORMAL_FONT1" }, { FL_NORMAL_FONT, "FL_NORMAL_FONT2" }, VN( -1 ) }; static VN_pair vn_lstyle[ ] = { VN(FL_NORMAL_STYLE), VN(FL_BOLD_STYLE), VN(FL_ITALIC_STYLE), VN(FL_BOLDITALIC_STYLE), VN(FL_FIXED_STYLE), VN(FL_FIXEDBOLD_STYLE), VN(FL_FIXEDITALIC_STYLE), VN(FL_FIXEDBOLDITALIC_STYLE), VN(FL_TIMES_STYLE), VN(FL_TIMESBOLD_STYLE), VN(FL_TIMESITALIC_STYLE), VN(FL_TIMESBOLDITALIC_STYLE), VN(FL_SHADOW_STYLE), VN(FL_ENGRAVED_STYLE), VN(FL_EMBOSSED_STYLE), VN(-1) }; static VN_pair vn_pupmode[ ] = { VN(FL_PUP_NONE), VN(FL_PUP_GRAY), VN(FL_PUP_BOX), VN(FL_PUP_CHECK), VN(FL_PUP_RADIO), VN(-1) }; static VN_pair vn_scbpref[] = { VN(FL_OFF), VN(FL_ON), VN(FL_AUTO), VN(-1) }; /*************************************** ***************************************/ static int pure_style_val( const char *cc ) { VN_pair *vn = vn_lstyle; for ( ; vn->val >= 0; vn++ ) if ( strcmp( cc, vn->name ) == 0 ) return vn->val; return atoi( cc ); } /*************************************** ***************************************/ int style_val( const char *cc ) { char lstyle[ 40 ], spstyle[ 40 ], *p; strcpy( lstyle, cc ); spstyle[ 0 ] = '\0'; if ( ( p = strchr( lstyle, '+' ) ) ) memmove( spstyle, p + 1, strlen( p ) ); return pure_style_val( lstyle ) + pure_style_val( spstyle ); } /*************************************** ***************************************/ int lsize_val(const char *cc) { VN_pair *vn = vn_lsize; for ( ; vn->val >= 0; vn++ ) if ( strcmp( cc, vn->name ) == 0 ) return vn->val; return atoi( cc ); } /*************************************** ***************************************/ int pupmode_val( const char *cc ) { VN_pair *vn = vn_pupmode; for (; vn->val >= 0; vn++) if ( strcmp( cc, vn->name ) == 0 ) return vn->val; return atoi( cc ); } /*************************************** ***************************************/ int scbpref_val( const char *cc ) { VN_pair *vn = vn_scbpref; for ( ; vn->val >= 0; vn++) if ( strcmp( cc, vn->name ) == 0 ) return vn->val; return atoi( cc ); } /*************************************** ***************************************/ int align_val( const char *cc ) { VN_pair *vn = vn_align; char s[ 128 ], *p; strcpy( s, cc ); if ( ( p = strchr( s, '|' ) ) ) *p = '\0'; for ( ; vn->val >= 0; vn++) if ( strcmp( s, vn->name ) == 0 ) return p ? ( vn->val | FL_ALIGN_INSIDE ) : vn->val; if ( ! isdigit( ( int ) cc[ 0 ] ) ) fprintf( stderr, "Unknown alignment %s\n", cc ); return atoi( cc ); } /*************************************** * Remove leading space ***************************************/ char * de_space( char *s ) { char *p; /* not all isspace considers '\t' a white space */ for ( p = s; p && ( isspace( ( int ) *p ) || *p == '\t' ); p++ ) /* empty */ ; return ( p == s ) ? s : strcpy( s, p ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/fd2ps.man0000644000175000017500000000673211274135571014775 0ustar jensjens.\" .\" $Id: fd2ps.man,v 1.3 2009/11/03 23:23:37 jtt Exp $ .\" .\" Man page for Forms Designer .\" Use the following command to generate viewable man page .\" tbl fdesign.1 | {nt}roff -man .\" .\" ul | more -fsk to view .\" .\" .TH FD2PS 1L "October 2009" "Version 0.36" "Forms Library" .SH NAME fd2ps \- Translates fdesign output to PostScript .\" .\" setup .de Cr .ie n (c) .el \(co .. .SH SYNOPSIS .if n fd2ps .if t \{ .B fd2ps \} [-options] input.[fd] [output] .SH DESCRIPTION The program .I fd2ps translates the .I fd file produced by the interface builder program .I fdesign of the .B "Forms Library" into PostScript (ps), or optionally Encapsulated PostScript (eps) for printing or inclusion into other documents. The input file can be given with or without the .fd extension. If output file name is not specified, used is a filename derived from the input file name by replacing the .fd extension with ps or eps. If output filename is specified as \-, stdout is used. .SH OPTIONS .I fd2ps accepts the following command line options .TP 6 .B \-help Prints a brief summary of all command line options. .TP .B \-version Prints the current version of .I fd2ps and exits. .TP .B \-p The option requests portrait orientation. By default, the orientation is switched to landscape if portrait will not fit the page. This option overrides the default. .TP .B \-l This options requests landscape output. .TP .BI \-bw " n" Specifies the border width of the interface. By default this information is obtained from the .fd file. .TP .B \-eps This option requests Encapsulated PostScript instead of the plain PostScript output. .TP .B \-gray This options requests all colors be converted to gray levels. By default, .I fd2ps outputs colors as specified in the .fd file. .TP .B \-G f specifies a gamma factor that will be used to adjust the builtin colors in a non-linear fashion. It can be thought as a way to brighten or dim the builtin colors: larger the gamma, brighter the color. The default gamma is 1.0. .TP .BI \-dpi " f" This option specifies the screen resolution on which the user interface is designed. By giving a smaller or larger dpi number than that of the screen, the output is in effect being enlarged or shrunk. This flag does not affect text size. The default DPI is 85. If the .fd file is specified in device independent unit, this flag does not have effect. .TP .BI \-rgb " file" This option specifies the path to the X color database (rgb.txt) for use in parsing XPM colornames. The default is /usr/lib/X11/rgb.txt. Environment variable .B RGBFile can be used to change the default. .TP .BI \-paper " name" This option specifies the paper name, such as A4, Letter etc. The output PostScript will always center on the page. Use name .I all to get a list of the known paper names and sizes. The default is US Letter unless environment variable .B PAPER is set to one of the known paper names. .TP .BI \-pw " f" Specifies the paper width, in inches. .TP .BI \-ph " f" Specifies the paper height, in inches. .TP .B \-verbose This option specifies verbose output, i.e., comments in the output PostScript file. Most useful for debugging the .I fd2ps program. .SH BUGS Not all objects are currently supported. .SH SEE ALSO fdesign(1L), xforms(5) .SH AUTHOR Copyright .Cr 1997-98 by T.C. Zhao (tc_zhao@yahoo.com) .br Since 2002: GNU Lesser General Public License .br Maintainers: Jean-Marc Lasgouttes, Angus Leeming and Jens Thoms Toerring .SH HOME PAGE http://xforms-toolkit.org .br http://world.std.com/~xforms xforms-1.0.93sp1/fd2ps/psobj.c0000644000175000017500000016535311253670715014551 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file psobj.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Draw FL object in ps */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd2ps.h" #include "flinternal.h" /* for UPBOX8 etc */ #include #include extern int fl_convert_shortcut(const char *str, long sc[]); extern int fl_get_underline_pos(const char *label, const char *sc); #ifndef M_PI #define M_PI 3.14159265 #endif static void ps_draw_object(FL_OBJECT * ob); /* stuff that only need to be output once */ static void emit_prolog(void) { static int emitted; if (!emitted) { ps_verbatim("%%!PS-Adobe-3.0%s\n", psinfo.eps ? " EPSF-2.0" : ""); ps_verbatim("%%%%Creator: %s\n", get_version()); ps_verbatim("%%%%CreateDate: %s\n", ascii_date()); ps_verbatim("%%%%For: %s\n", whoami()); ps_verbatim("%%%%Pages: %d\n", psinfo.pages); ps_verbatim("%%%%Orientation: %s\n", psinfo.landscape == 1 ? "Landscape" : "Portrait"); emitted = 1; } } /* emit some basic macros */ static void emit_basic_defs( float xscale, float yscale ) { static int emitted; if (emitted) return; emitted = 1; ps_output("/BD {bind def} def\n"); ps_output("/M {moveto} bind def /LT {lineto} BD\n"); ps_output("/L {M LT} bind def /C {closepath} BD\n"); ps_output("/LW {setlinewidth} BD\n"); ps_output("/S {stroke} BD /F {fill} BD\n"); ps_output("/G {setgray} bind def /RGB {setrgbcolor} BD\n"); /* x y x y N */ ps_output("/P {3 1 roll M 2 exch 1 exch {pop LT} for C} BD\n"); ps_output("/lines {3 1 roll M 2 exch 1 exch {pop LT} for S} BD\n"); ps_output("/SX %.2g def /SY %.2g def\n", xscale, yscale); #if 0 if (psinfo.epsf_import && !psinfo.xpmtops_direct) emit_epsf_import_command(); #endif ps_text_init(); } /* Since some of the internal coordinates defaults, such * as border width and line width, are expressed in pixels, * it is more convenient to work in pixles coordinates. * For point, mm units, we convert everything to a pseudo pixel * unit. * * psinfo.scale turns object coordinates into pseudo pixel unit * and xscale yscale turns pseudo pixel into point * */ void get_scale_unit( int unit, float * xscale, float * yscale ) { if ( unit == FL_COORD_PIXEL ) { *xscale = 72.0 / psinfo.xdpi; *yscale = 72.0 / psinfo.ydpi; psinfo.xscale = psinfo.yscale = 1.0; } else if ( unit == FL_COORD_centiPOINT ) { *xscale = *yscale = 0.8; /* pixel size in point */ psinfo.xscale = psinfo.yscale = 0.01 / *xscale; } else if ( unit == FL_COORD_POINT ) { *xscale = *yscale = 0.8; /* pixel size in point */ psinfo.xscale = psinfo.yscale = 1 / *xscale; } else if ( unit == FL_COORD_centiMM ) { *xscale = *yscale = 0.8; /* pixel size in point */ psinfo.xscale = psinfo.yscale = 0.01 * 72 / 25.4 / *xscale; } else fprintf( stderr, "Unknown coordinate unit\n" ); } #define P2CM( n ) ( n / 72.0 * 2.45 ) static void auto_orientation( float pw, float ph, float obw, float obh ) { int plm, pbm, llm, lbm; plm = ( pw - obw ) / 2; pbm = ( ph - obh ) / 2; llm = ( pw - obh ) / 2; lbm = ( ph - obw ) / 2; /* Switch to landscape only if portrait won't fit */ flps->landscape = FL_abs( lbm - llm ) < FL_abs( pbm - plm ) && ( pbm < 0 || plm < 0 ); } static void ps_bgn_form( int w, int h, const char * label ) { float pw = psinfo.paper_w * 72, ph = psinfo.paper_h * 72; float fw, fh; float xscale, yscale; float bxi, byi, bxf, byf; /* bounding box */ float margin = 0.4 * 72; /* about 1cm */ if ( ! label ) label = "annonymous"; get_scale_unit( psinfo.unit, &xscale, &yscale ); /* Figure out bounding box. Note bounding box is always expressed in points */ fw = w * psinfo.xscale * xscale; fh = h * psinfo.yscale * yscale; if ( psinfo.landscape == -1 ) auto_orientation( pw - 2.0 * margin, ph - 2.0 * margin, fw, fh ); emit_prolog( ); if ( psinfo.landscape ) { bxi = ( pw - fh ) * 0.5; byi = ( ph - fw ) * 0.5; bxf = bxi + fh + 0.5; byf = byi + fw + 0.5; } else { bxi = ( pw - fw ) * 0.5; byi = ( ph - fh ) * 0.5; bxf = bxi + fw + 0.5; byf = byi + fh + 0.5; } if ( bxi < -15.0 ) fprintf( stderr, "Warning: %s %.2f cm too wide\n", label, -P2CM( bxi ) ); if ( bxi < -15.0 ) fprintf( stderr, "Warning: %s %.2f cm too long\n", label, -P2CM( byi ) ); if ( psinfo.page == 1 ) { ps_verbatim( "%%%%BoundingBox: %d %d %d %d\n", ( int ) bxi, ( int ) byi, ( int ) bxf, ( int ) byf ); ps_verbatim( "%%%%EndComments\n" ); ps_verbatim( "%% paper name/size: %s (%gx%gin) ", psinfo.paper_name ? psinfo.paper_name : "unknown", psinfo.paper_w, psinfo.paper_h ); ps_verbatim( " BW=%d DPI=%.1f \n", psinfo.bw, psinfo.xdpi ); } emit_basic_defs( xscale, yscale ); ps_verbatim( "\n%%%%Page: %s %d\n", ( label && *label ) ? label : "anonymous", psinfo.page ); ps_verbatim( "%%%%PageBoundingBox: %d %d %d %d\n", ( int ) bxi, ( int ) byi, ( int ) bxf, ( int ) byf ); ps_verbatim( "\ngsave %%{\n" ); ps_output( "%.1f %.1f translate ", bxi, byi ); if ( psinfo.landscape ) ps_output( "%d 0 translate 90 rotate\n", ( int ) fh ); /* Thinner lines look better */ ps_output( "%.2f %.2f LW\n", 0.6, 0.6 ); ps_output( "SX SY scale " ); } /* Since ob->{x,y,w,h} are int special care needs to be taken * to avoid numerical inaccuracies */ static void scale_object( FL_OBJECT * ob ) { int xi, yi, xf, yf; float delta = 0.4; if ( psinfo.xscale == 1.0 && psinfo.yscale == 1.0 ) return; xi = ob->x * psinfo.xscale + delta; xf = ( ob->x + ob->w ) * psinfo.xscale + delta; ob->w = xf - xi; ob->x = xi; yi = ob->y * psinfo.yscale + delta; yf = ( ob->y + ob->h ) * psinfo.yscale + delta; ob->h = yf - yi; ob->y = yi; } static void ps_end_form( void ) { ps_verbatim( "grestore %% }\n%s", psinfo.eps ? "" : "showpage\n\n" ); ps_invalidate_color_cache( ); ps_invalidate_font_cache( ); } #include #define ALT_CHAR '#' #define CNTL_CHAR '^' #define FKEY_CHAR '&' int fl_convert_shortcut(const char * str, long * sc ) { int i, j, offset, key; /* str might be obj->shortcut */ i = j = offset = 0; while ( str[ i ] != '\0' ) { if ( str[ i ] == ALT_CHAR ) offset = FL_ALT_MASK; else if ( str[ i ] == CNTL_CHAR ) { i++; if ( str[ i ] >= 'A' && str[ i ] <= 'Z' ) sc[ j++ ] = str[ i ] - 'A' + 1 + offset; else if ( str[ i ] >= 'a' && str[ i ] <= 'z' ) sc[ j++ ] = str[ i ] - 'a' + 1 + offset; else if ( str[ i ] == '[' ) sc[ j++ ] = 27 + offset; else sc[ j++ ] = str[ i ] + offset; offset = 0; } else if ( str[ i ] == FKEY_CHAR ) /* special characters */ { i++; if ( str[ i ] == FKEY_CHAR ) sc[ j++ ] = FKEY_CHAR + offset; else if ( str[ i ] == 'A' ) sc[ j++ ] = offset + XK_Up; else if ( str[ i ] == 'B' ) sc[ j++ ] = offset + XK_Down; else if ( str[ i ] == 'C' ) sc[ j++ ] = offset + XK_Right; else if ( str[ i ] == 'D' ) sc[ j++ ] = offset + XK_Left; else if ( isdigit( ( unsigned char ) str[ i ] ) && ( key = atoi( str + i ) ) < 35 ) { i += key >= 10; sc[ j++ ] = offset + XK_F1 + key - 1; } offset = 0; } else { sc[ j++ ] = str[ i ] + offset; offset = 0; } i++; } sc[ j ] = 0; return j; } static void ps_draw_object_label( FL_OBJECT * ob ) { int align = ob->align % FL_ALIGN_INSIDE; ( align != ob->align ? ps_draw_text : ps_draw_text_beside ) ( align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); } static void ps_draw_object_label_beside( FL_OBJECT * ob ) { ps_draw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); } int fl_get_underline_pos( const char * label, const char * sc ) { int c; const char *p; /* Find the first non-special char in shortcut str */ for ( c = 0, p = sc; ! c && *p; p++ ) { if ( isalnum( ( unsigned char ) *p ) ) { if ( p == sc ) c = *p; else if ( *( p - 1 ) != FKEY_CHAR && ! isdigit( ( unsigned char ) *( p - 1 ) ) ) c = *p; } } if ( ! c ) return -1; /* Find where the matches occur */ if ( c == sc[ 0 ] ) p = strchr( label, c ); else if ( ! ( p = strchr( label, c ) ) ) p = strchr( label, islower( c ) ? toupper( c ) : tolower( c ) ); if ( ! p ) return -1; return ( p - label ) + 1; } void flps_set_object_shortcut( FL_OBJECT * obj, const char * sstr, int showit ) { long sc[ 16 ]; int scsize, n; if ( obj == NULL ) { fprintf( stderr, "fl_set_object_shortcut:Object is NULL\n" ); return; } if ( ! sstr || ! *sstr ) return; n = fl_convert_shortcut( sstr, sc ); scsize = ( n + 1 ) * sizeof *obj->shortcut; obj->shortcut = realloc( obj->shortcut, scsize ); memcpy( obj->shortcut, sc, scsize ); if ( ! showit || ! obj->label || ! *obj->label || *obj->label == '@' ) return; if ( ( n = fl_get_underline_pos( obj->label, sstr ) ) > 0 && ! strchr( obj->label, *ul_magic_char ) ) { char *q = obj->label; obj->label = malloc( strlen( q ) + 2 ); strncpy( obj->label, q, n ); obj->label[ n ] = *ul_magic_char; strcpy( obj->label + n + 1, q + n ); free( q ); } } #define ISUPBOX FL_IS_UPBOX #define DOWNBOX FL_TO_DOWNBOX static void flps_draw_button( FL_OBJECT * ob ) { FL_COLOR col = ( ( SPEC * ) ob->spec )->int_val ? ob->col2 : ob->col1; FL_Coord dh, dw, ww, absbw = FL_abs( ob->bw ); float off2 = 0.0; if ( ob->type == FL_HIDDEN_BUTTON ) return; if ( ISUPBOX( ob->boxtype ) && ( ( SPEC * ) ob->spec )->int_val != 0 ) ps_draw_box( DOWNBOX( ob->boxtype ), ob->x, ob->y, ob->w, ob->h, col, ob->bw ); else ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, col, ob->bw ); dh = 0.6 * ob->h; dw = FL_min( 0.6 * ob->w, dh ); ww = 0.75 * ob->h; if ( ww < dw + FL_abs( ob->bw ) + 1 + ( ob->bw > 0 ) ) ww = dw + FL_abs( ob->bw ) + 1 + ( ob->bw > 0 ); if ( ob->type == FL_RETURN_BUTTON ) { ps_draw_text( 0, ob->x + ob->w - ww, ob->y + 0.2 * ob->h, dw, dh, ob->lcol, 0, 0, "@returnarrow" ); off2 = dw - 2; } dh = FL_min( 8, dh ); if ( ob->type == FL_MENU_BUTTON && ob->boxtype == FL_UP_BOX ) { dh = FL_max( 6 + ( ob->bw > 0 ), ob->h * 0.1 ); dw = FL_max( 0.11 * ob->w, 13 ); ps_draw_box( FL_UP_BOX, ob->x + ob->w - dw - absbw - 2, ob->y + ( ob->h - dh ) / 2, dw, dh, ob->col1, -2 ); off2 = dw - 1; } ob->w -= off2; ps_draw_object_label( ob ); ob->w += off2; } static void flps_draw_labelbutton( FL_OBJECT * ob ) { FL_COLOR save_col = ob->lcol; FL_Coord dh, dw, ww, absbw = FL_abs(ob->bw); ob->lcol = ( ( SPEC * ) ob->spec )->int_val ? ob->col2 : ob->lcol; dh = 0.6 * ob->h; dw = FL_min( 0.6 * ob->w, dh ); ww = 0.75 * ob->h; if ( ww < dw + absbw + 1 + ( ob->bw > 0 ) ) ww = dw + absbw + 1 + ( ob->bw > 0 ); if ( ob->type == FL_RETURN_BUTTON ) ps_draw_text( 0, ob->x + ob->w - ww, ob->y + 0.2 * ob->h, dw, dh, ob->lcol, 0, 0, "@returnarrow" ); ps_draw_object_label( ob ); ob->lcol = save_col; } #define NEAR 600.0f #define GRID 0.18 static void flps_draw_thumbwheel( FL_OBJECT * ob ) { float absbw = FL_abs( ob->bw ), h2 = ob->h * 0.5, w2 = ob->w * 0.5; float x0 = ob->x + ob->w / 2, yo = ob->y + ob->h / 2; float x, y, w, h, dx, dy; double junk; float theta; float arc = M_PI * 0.49, delta = GRID; float offset = 0.0; FL_COLOR c1, c2; ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); x = ob->x + absbw; y = ob->y + absbw; w = ob->w - 2 * absbw; h = ob->h - 2 * absbw; if ( ob->type == FL_VERT_THUMBWHEEL ) { float extra = h2 * ( NEAR / ( NEAR - h2 ) - 0.96 ); /* (fake) depth-cue */ ps_rectf( x, y + 1, w, h - 1, FL_DARKER_COL1 ); ps_rectf( x, yo - ob->h / 4.0, w, ob->h / 2.0, FL_COL1 ); ps_rectf( x, yo - ob->h / 10.0, w, ob->h / 5.0, FL_LIGHTER_COL1 ); for ( theta = arc + modf( offset / delta, &junk ); theta > - arc; theta -= delta ) { dy = ( h2 + extra ) * sin( theta ); dx = ob->h - ( h2 + extra ) * cos( theta ); y = yo + FL_nint( dy * NEAR / ( NEAR + dx ) ); if ( y > ob->y + 3 && y < ob->y + ob->h - 3 ) { int d = 1; if ( y < yo + h2 / 4 && y > yo - h2 / 4 ) { c1 = FL_LEFT_BCOL; c2 = FL_RIGHT_BCOL; } else if ( y < ob->y + h2 / 5 || y > yo + h2 - h2 / 5 ) { c1 = FL_LIGHTER_COL1; c2 = FL_BOTTOM_BCOL; d = 0; } else { c1 = FL_MCOL; c2 = FL_BOTTOM_BCOL; } ps_line( x + 1, y - 1, x + w - 2, y - 1, c2 ); ps_line( x + 1, y + d, x + w - 2, y + d, c1 ); } } /* bottom */ y = ob->y + absbw; ps_rectf( x - 1, ob->y + ob->h - 6, w, 3, FL_RIGHT_BCOL ); /* top */ ps_rectf( x - 1, y, w, 3, FL_RIGHT_BCOL ); /* left */ ps_line( x - 1, y, x - 1, y + h - 1, FL_BLACK ); /* right */ ps_rectf( x + w - 1, y, 2, h, FL_RIGHT_BCOL ); /* highlight */ ps_line( x + 1, yo - h2 + 10, x + 1, yo + h2 - 10, FL_LEFT_BCOL ); } else { float extra = w2 * ( NEAR / ( NEAR - w2 ) - 0.96 ); ps_rectf( x, y, w, h, FL_DARKER_COL1 ); ps_rectf( x0 - w / 4, y, w / 2, h, FL_COL1 ); dx = ob->w / 10; ps_rectf( x0 - dx, y, 2 * dx, h, FL_LIGHTER_COL1 ); for ( theta = arc + modf(offset / delta, &junk ); theta > - arc; theta -= delta) { dx = ( w2 + extra ) * sin( theta ); dy = ob->w - ( w2 + extra ) * cos( theta ); x = x0 + FL_nint( dx * NEAR / ( NEAR + dy ) ); if ( x > ob->x + absbw + 1 && x < x0 + w2 - absbw - 2 ) { int d = 1; if ( x < x0 + w2 / 4 && x > x0 - w2 / 4 ) { c1 = FL_LEFT_BCOL; c2 = FL_RIGHT_BCOL; } else if ( x < ob->x + ( w2 / 4 ) || x > x0 + w2 - ( w2 / 4 ) ) { c1 = FL_LIGHTER_COL1; c2 = FL_BOTTOM_BCOL; } else { c1 = FL_MCOL; c2 = FL_BOTTOM_BCOL; } ps_line( x - 1, y + 2, x - 1, yo + h2 - 2 * absbw, c1 ); ps_line( x + d, y + 2, x + d, yo + h2 - 2 * absbw, c2 ); } x = ob->x + absbw; w = ob->w - 2 * absbw; /* top shadow */ ps_line( x, y - 1, x + w - 2, y - 1, FL_BLACK ); ps_line( x, y, x + w - 4, y, FL_BLACK ); /* bottom shadow */ ps_line( x + 5, y + h - 2, x + w - 4, y + h - 2, FL_BLACK ); ps_line( x, y + h - 1, x + w - 2, y + h - 1, FL_BLACK ); ps_line( x, y + h, x + w - 2, y + h, FL_BLACK ); /* left & right */ ps_rectf( x, y - 1, 3, h + 1, FL_RIGHT_BCOL ); ps_rectf( x + w - 4, y - 1, 3, h + 1, FL_RIGHT_BCOL ); /* hight light */ ps_line( x + 4, y + h - 2, x + w - 4, y + h - 2, FL_DARKER_COL1 ); ps_line( x0 - w2 + 11, y + h - 2, x0 + w2 - 11, y + h - 2, FL_TOP_BCOL ); } } ps_draw_object_label( ob ); } static void flps_draw_lightbutton( FL_OBJECT * ob ) { SPEC *sp = ob->spec; float ww, hh, xx, yy, libox; float absbw = FL_abs( ob->bw ), bw2; long lightcol = sp->int_val > 0 ? ob->col2 : ob->col1; ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); if ( ob->boxtype == FL_NO_BOX || ob->boxtype == FL_FLAT_BOX ) absbw = FL_BOUND_WIDTH; if ( absbw < 3 ) absbw = 3; /* Calculate and draw the light */ hh = ob->h - 3 * absbw - 1; if ( hh < FL_LIGHTBUTTON_MINSIZE ) hh = FL_LIGHTBUTTON_MINSIZE; ww = hh / 2; if ( ww < FL_LIGHTBUTTON_MINSIZE ) ww = FL_LIGHTBUTTON_MINSIZE; if ( ww > ob->w / 6 ) ww = ob->w / 6; xx = ob->x + 1.5 * absbw + 1.0; yy = ob->y + ob->h / 2 - hh / 2; absbw = FL_abs( ob->bw ); /* Adjustment for non-rectangular boxes */ if ( ob->boxtype == FL_ROUNDED3D_UPBOX || ob->boxtype == FL_ROUNDED3D_DOWNBOX ) { hh -= 2; yy += 1; xx += 3 + ob->w * 0.01; ww -= 1; } else if ( ob->boxtype == FL_RSHADOW_BOX ) { hh -= 1; xx += 1; } switch ( ob->boxtype ) { case FL_UP_BOX: case FL_ROUNDED3D_UPBOX: libox = FL_DOWN_BOX; break; case FL_DOWN_BOX: case FL_ROUNDED3D_DOWNBOX: libox = FL_DOWN_BOX; break; case FL_FRAME_BOX: case FL_EMBOSSED_BOX: case FL_ROUNDED_BOX: libox = ob->boxtype; break; case FL_RFLAT_BOX: case FL_RSHADOW_BOX: libox = FL_ROUNDED_BOX; break; default: libox = FL_BORDER_BOX; break; } bw2 = absbw > 2 ? absbw - 1 : absbw; ps_draw_box( libox, xx, yy, ww, hh, lightcol, bw2 ); /* Draw the label */ if ( ( ob->align & ~FL_ALIGN_INSIDE ) == FL_ALIGN_CENTER ) ps_draw_text( FL_ALIGN_LEFT, xx + ww, ob->y, 0, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else ps_draw_object_label( ob ); ww = 0.75 * ob->h; if ( ww < absbw + 1 ) ww = absbw + 1; if ( ob->type == FL_RETURN_BUTTON ) ps_draw_text( 0, ob->x + ob->w - ww, ob->y + 0.2 * ob->h, 0.6 * ob->h, 0.6 * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } static void flps_draw_roundbutton( FL_OBJECT * ob ) { float xx, yy, rr; float bw = FL_abs( ob->bw ); ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, FL_ROUNDBUTTON_TOPCOL, ob->bw ); rr = 0.3 * FL_min( ob->w, ob->h ); rr = rr + 0.5; xx = ob->x + 1.5 * ( bw < 2 ? 2 : bw ) + rr + 1; yy = ob->y + ob->h / 2; ps_circ( 1, xx, yy, rr, ob->col1 ); ps_circ( 0, xx, yy, rr, FL_BLACK ); ps_circ( 1, xx, yy, rr, ob->col2 ); ps_circ( 0, xx, yy, rr, FL_BLACK ); if ( ob->align == FL_ALIGN_CENTER ) ps_draw_text( FL_ALIGN_LEFT, xx + rr + 1, ob->y, 0, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else ps_draw_object_label_beside( ob ); if ( ob->type == FL_RETURN_BUTTON ) ps_draw_text( 0, ob->x + ob->w - 0.8 * ob->h, ob->y + 0.2 * ob->h, 0.6 * ob->h, 0.6 * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } static void flps_draw_scrollbutton( FL_OBJECT * ob ) { char *label = ob->label; int x = ob->x, y = ob->y, w = ob->w, h = ob->h; int absbw = FL_abs( ob->bw ); int extra = absbw; int btype = FL_NO_BOX; SPEC *sp = ob->spec; ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); if ( *label == '#' ) { w = h = FL_min( ob->w, ob->h ); x += ( ob->w - w ) / 2; y += (ob->h - h) / 2; label++; } if ( ob->boxtype != FL_NO_BOX && ob->boxtype != FL_FLAT_BOX ) { extra += 1 + 0.051 * FL_min( w, h ); absbw = 1; } if ( *label == '8' ) btype = sp->int_val ? FLI_TRIANGLE_DOWNBOX8 : FLI_TRIANGLE_UPBOX8; else if ( *label == '2' ) btype = sp->int_val ? FLI_TRIANGLE_DOWNBOX2 : FLI_TRIANGLE_UPBOX2; else if ( *label == '6' ) btype = sp->int_val ? FLI_TRIANGLE_DOWNBOX6 : FLI_TRIANGLE_UPBOX6; else if ( *label == '4' ) btype = sp->int_val ? FLI_TRIANGLE_DOWNBOX4 : FLI_TRIANGLE_UPBOX4; ps_draw_tbox( btype, x + extra, y + extra, w - 2 * extra, h - 2 * extra, ob->col2, absbw ); } static void flps_draw_round3dbutton( FL_OBJECT * ob ) { float xx, yy, rr, cr; float bw = FL_abs( psinfo.bw ); ALLSPEC *sp = ob->spec; ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, FL_ROUND3DBUTTON_TOPCOL, ob->bw ); rr = 0.3 * FL_min( ob->h, ob->w ); xx = ob->x + 1.5 * ( bw < 2 ? 2 : bw ) + rr + 1; yy = ob->y + 0.5 * ob->h; if ( rr < bw * 0.5 ) rr = bw / 2 + 1; ps_set_linewidth( bw, bw ); cr = bw / 2; ps_arc( 0, xx, yy, rr - cr, 450, 2250, FL_BOTTOM_BCOL ); ps_arc( 0, xx, yy, rr - cr, 0, 450, FL_TOP_BCOL ); ps_arc( 0, xx, yy, rr - cr, 2250, 3600, FL_TOP_BCOL ); ps_reset_linewidth( ); if ( sp->int_val ) { if ( ( cr = 0.8 * rr - 1.0 - bw * 0.5 ) < 1 ) cr = 1; ps_circ( 1, xx, yy, cr, ob->col2 ); } else ps_circ( 1, xx, yy, rr - bw, ob->col1 ); if ( ob->align == FL_ALIGN_CENTER ) ps_draw_text( FL_ALIGN_LEFT, xx + rr + 1, ob->y, 0, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else ps_draw_object_label_beside( ob ); if ( ob->type == FL_RETURN_BUTTON ) ps_draw_text( 0, ob->x + ob->w - 0.8 * ob->h, ob->y + 0.2 * ob->h, 0.6 * ob->h, 0.6 * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } static void flps_draw_checkbutton( FL_OBJECT * ob ) { float xx, yy, ww, hh, bw = FL_abs( ob->bw ); SPEC *sp = ob->spec; ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); ww = hh = 0.6 * FL_min( ob->w, ob->h ); xx = ob->x + 1.5 * ( bw < 2 ? 2 : bw) + 1.5; yy = ob->y + ( ob->h - hh ) / 2; if ( sp->int_val != 0.0 ) ps_draw_checkbox( FL_DOWN_BOX, xx, yy, ww, hh, ob->col2, bw ); else ps_draw_checkbox( FL_UP_BOX, xx, yy, ww, hh, ob->col1, bw ); if ( ob->align == FL_ALIGN_CENTER ) ps_draw_text( FL_ALIGN_LEFT, xx + ww + 1, ob->y, 0, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else ps_draw_object_label_beside( ob ); if ( ob->type == FL_RETURN_BUTTON ) ps_draw_text( 0, ob->x + ob->w - 0.8 * ob->h, ob->y + 0.2 * ob->h, 0.6 * ob->h, 0.6 * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } static void flps_draw_pixmap( FL_OBJECT * ob ) { SPEC *sp = ob->spec; if ( FL_IS_UPBOX( ob->boxtype ) && sp->int_val != 0 ) ps_draw_box( FL_TO_DOWNBOX(ob->boxtype), ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); else ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); if ( sp->file ) { if ( ob->objclass == FL_BITMAP || ob->objclass == FL_BITMAPBUTTON ) draw_bitmap( sp->file, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->col1 ); else draw_xpm( ob ); } ps_draw_object_label( ob ); } /* * Dial support */ static float xori, yori; #define ROTx( x, y, a ) \ ( xori + ( ( x ) - xori ) * cos( a ) + ( ( y ) - yori ) * sin( a ) ) #define ROTy( x, y, a ) \ ( yori + ( ( x ) - xori ) * sin( a ) + ( ( y ) - yori ) * cos( a ) ) static void rotate_it( Point * xp, float x, float y, float a ) { xp->x = ROTx( x, y, a ); xp->y = ROTy( x, y, a ); } static void flps_draw_dial( FL_OBJECT * ob ) { float x, y, w, h, radius; float dangle; SPEC *sp = ob->spec; Point xp[ 6 ]; int boxtype, iradius; /* Get mapping */ sp->ax = ( sp->max - sp->min ) / ( sp->thetaf - sp->thetai ); sp->bx = sp->max - sp->ax * sp->thetaf; dangle = ( sp->val - sp->bx ) / sp->ax; if ( sp->direction == FL_DIAL_CW ) dangle = sp->origin - dangle; else dangle += sp->origin; if ( ( dangle = fmod( dangle, 360.0 ) ) < 0.0 ) dangle += 360.0; w = ob->w - 3; h = ob->h - 3; x = xori = ob->x + ob->w / 2; y = yori = ob->y + ob->h / 2; if ( FL_IS_UPBOX( ob->boxtype ) ) boxtype = FL_OVAL3D_UPBOX; else if ( FL_IS_DOWNBOX( ob->boxtype ) ) boxtype = FL_OVAL3D_DOWNBOX; else if ( ob->boxtype == FL_FRAME_BOX ) boxtype = FL_OVAL3D_FRAMEBOX; else if ( ob->boxtype == FL_EMBOSSED_BOX ) boxtype = FL_OVAL3D_EMBOSSEDBOX; else boxtype = FL_OVAL_BOX; /* The dial itself */ radius = 0.5 * FL_min(w, h); iradius = radius - 1; ps_draw_box( boxtype, x - radius, y - radius, 2 * radius, 2 * radius, ob->col1, ob->bw ); dangle *= M_PI / 180.0; /* The "hand" */ if ( ob->type == FL_NORMAL_DIAL ) { float r = FL_nint( 0.1 * radius ); #if 0 float xc = x + iradius - r - 2, yc = y; rotate_it( xp, xc, yc, dangle ); if ( r < 1 ) r = 1; ps_circ( 1, xp[ 0 ].x, xp[ 0 ].y, r, ob->col2 ); ps_circ( 0, xp[ 0 ].x, xp[ 0 ].y, r, FL_BLACK ); #else r = 0.5 * iradius; r = FL_min( 15, r ); rotate_it( xp, x + iradius - 1, y - 1.5, dangle ); rotate_it( xp + 1, x + iradius - 1 - r, y - 1.5, dangle ); rotate_it( xp + 2, x + iradius - 1 - r, y + 1.5, dangle ); rotate_it( xp + 3, x + iradius - 1, y + 1.5, dangle ); ps_poly( 1, xp, 4, ob->col2 ); #endif } else if ( ob->type == FL_LINE_DIAL ) { float dx = 0.1 + 0.08 * iradius, dy = 0.1 + 0.08 * iradius; rotate_it( xp, x, y, dangle ); rotate_it( xp + 1, x + dx, y - dy, dangle ); rotate_it( xp + 2, x + iradius - 1.5, y, dangle ); rotate_it( xp + 3, x + dx, y + dy, dangle ); ps_poly( 1, xp, 4, ob->col2 ); ps_poly( 0, xp, 4, FL_BLACK ); } else if ( ob->type == FL_FILL_DIAL ) { float ti, delta; delta = ( sp->val - sp->bx ) / sp->ax; delta = FL_abs( sp->thetai - delta ); iradius -= boxtype != FL_OVAL_BOX; if ( sp->direction == FL_DIAL_CCW ) ti = sp->thetai + sp->origin; else ti = sp->origin - sp->thetai; if ( ( ti = fmod( ti, 360.0 ) ) < 0.0 ) ti += 360.0; /* Have to break the drawing into two parts if cross 0 */ if ( sp->direction == FL_DIAL_CCW ) { if ( delta > 360 - ti ) { ps_pieslice( 1, xori - iradius, yori - iradius, 2 * iradius, 2 * iradius, ti * 10, 3600, ob->col2 ); ps_pieslice( 1, xori - iradius, yori - iradius, 2 * iradius, 2 * iradius, 0, ( delta - 360 + ti ) * 10, ob->col2 ); } else ps_pieslice( 1, xori - iradius, yori - iradius, 2 * iradius, 2 * iradius, ti * 10, ( ti + delta ) * 10, ob->col2 ); } else { if ( delta > ti ) { ps_pieslice( 1, xori - iradius, yori - iradius, 2 * iradius, 2 * iradius, 0, ti * 10, ob->col2 ); ps_pieslice( 1, xori - iradius, yori - iradius, 2 * iradius, 2 * iradius, 3600 - ( delta - ti ) * 10, 3600, ob->col2 ); } else ps_pieslice( 1, xori - iradius, yori - iradius, 2 * iradius, 2 * iradius, ( ti - delta ) * 10, ti * 10, ob->col2); } rotate_it( xp, xori + iradius - 1, yori, dangle ); rotate_it( xp + 1, xori + iradius - 1, yori, ti * M_PI / 180.0 ); ps_line( xori, yori, xp[ 0 ].x, xp[ 0 ].y, FL_BLACK ); ps_line( xori, yori, xp[ 1 ].x, xp[ 1 ].y, FL_BLACK ); if ( boxtype == FL_OVAL_BOX ) ps_circ( 0, x, y, iradius, FL_BLACK ); } else fprintf( stderr, "Unknown/unsupported dial type %d\n", ob->type ); ps_draw_object_label_beside( ob ); } static void flps_draw_text( FL_OBJECT * ob ) { ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); ps_draw_object_label( ob ); } static void flps_draw_box( FL_OBJECT * ob ) { ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, psinfo.bw ); ps_draw_object_label_beside( ob ); } static void flps_draw_choice( FL_OBJECT * ob ) { float off1 = 0, off2 = 0; SPEC *sp = ob->spec; ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); if ( ob->type == FL_NORMAL_CHOICE2 ) { int absbw = FL_abs( ob->bw ); int dh = FL_max( 6 + ( ob->bw > 1 ), ob->h * 0.1 ); int dw = FL_max( 0.11 * ob->w, 13 ); int dbh = FL_max( absbw - 1.2, 1 ); int align = sp->align & ~FL_ALIGN_INSIDE; ps_draw_box( FL_UP_BOX, ob->x + ob->w - dw - absbw - 2, ob->y + ( ob->h - dh ) / 2, dw, dh, ob->col1, -dbh ); off1 = align == FL_ALIGN_CENTER ? ( dw / 2 ) : ( align == FL_ALIGN_LEFT ? - FL_abs( ob->bw ) : 0 ); off2 = align == FL_ALIGN_RIGHT ? dw + 1 : 0; } ps_draw_object_label_beside( ob ); /* Draw the choice string */ if ( sp->int_val > 0 && sp->lines >= sp->int_val ) { char *str = sp->content[ sp->int_val ]; ps_draw_text( sp->align, ob->x - off1, ob->y, ob->w - off2, ob->h, ob->col2, sp->fontstyle, sp->fontsize, str + ( str && ( *str == '\010' ) ) ); } } static void flps_draw_counter( FL_OBJECT * ob ) { int i, btype[ 5 ]; float xx[ 5 ] = { 0.0, 0.0, 0.0, 0.0, 0.0 }, ww[ 5 ] = { 0.0, 0.0, 0.0, 0.0, 0.0 }; char str[ 30 ]; SPEC *sp = ob->spec; for ( i = 0; i < 5; i++ ) btype[ i ] = ob->boxtype; if ( btype[ 4 ] == FL_UP_BOX ) btype[ 4 ] = FL_DOWN_BOX; /* Compute sizes */ if ( ob->type == FL_NORMAL_COUNTER ) { /* button is numbered 01 4 23 */ ww[ 0 ] = ww[ 1 ] = ww[ 2 ] = ww[ 3 ] = FL_min( 0.16 * ob->w, ob->h ); ww[ 4 ] = ob->w - 4 * ww[ 0 ]; /* must calculate this way */ xx[ 0 ] = ob->x; xx[ 1 ] = xx[ 0 ] + ww[ 0 ]; xx[ 4 ] = xx[ 1 ] + ww[ 1 ]; xx[ 2 ] = xx[ 4 ] + ww[ 4 ]; xx[ 3 ] = xx[ 2 ] + ww[ 2 ]; } else { /* 1 4 2 */ ww[ 1 ] = ww[ 2 ] = FL_min( 0.20 * ob->w, ob->h ); ww[ 4 ] = ob->w - 2 * ww[ 1 ]; xx[ 1 ] = ob->x; xx[ 4 ] = ob->x + ww[ 1 ]; xx[ 2 ] = xx[ 4 ] + ww[ 4 ]; } /* Create value string */ sprintf( str, "%.*f", sp->prec, sp->val ); /* Draw the thing */ if ( ob->type == FL_NORMAL_COUNTER ) { ps_draw_box( btype[ 0 ], xx[ 0 ], ob->y, ww[ 0 ], ob->h, ob->col1, ob->bw ); ps_draw_text( FL_ALIGN_CENTER, xx[ 0 ], ob->y, ww[ 0 ], ob->h, ob->col2, 0.0, 0, "@<<" ); } ps_draw_box( btype[ 1 ], xx[ 1 ], ob->y, ww[ 1 ], ob->h, ob->col1, ob->bw ); ps_draw_text( FL_ALIGN_CENTER, xx[ 1 ], ob->y, ww[ 1 ], ob->h, ob->col2, 0.0, 0, "@<" ); ps_draw_box( btype[ 4 ], xx[ 4 ], ob->y, ww[ 4 ], ob->h, ob->col1, ob->bw ); ps_draw_text( FL_ALIGN_CENTER, xx[ 4 ], ob->y, ww[ 4 ], ob->h, ob->lcol, ob->lstyle, ob->lsize, str ); ps_draw_box( btype[ 2 ], xx[ 2 ], ob->y, ww[ 2 ], ob->h, ob->col1, ob->bw ); ps_draw_text( FL_ALIGN_CENTER, xx[ 2 ], ob->y, ww[ 2 ], ob->h, ob->col2, 0.0, 0, "@>" ); if ( ob->type == FL_NORMAL_COUNTER ) { ps_draw_box( btype[ 3 ], xx[ 3 ], ob->y, ww[ 3 ], ob->h, ob->col1, ob->bw ); ps_draw_text( FL_ALIGN_CENTER, xx[ 3 ], ob->y, ww[ 3 ], ob->h, ob->col2, 0.0, 0, "@>>" ); } ps_draw_object_label_beside( ob ); } /* Performs linear interpolation */ static float flinear( float val, float smin, float smax, float gmin, float gmax ) { if ( smin == smax ) return gmax; else return gmin + ( gmax - gmin ) * ( val - smin ) / ( smax - smin ); } #define is_horiz( t ) ( t == FL_HOR_SLIDER \ || t == FL_HOR_FILL_SLIDER \ || t == FL_HOR_NICE_SLIDER \ || t == FL_HOR_BROWSER_SLIDER \ || t == FL_HOR_BROWSER_SLIDER2 \ || t == FL_HOR_THIN_SLIDER \ || t == FL_HOR_BASIC_SLIDER ) #define is_vert( t ) ( t == FL_VERT_SLIDER \ || t == FL_VERT_FILL_SLIDER \ || t == FL_VERT_NICE_SLIDER \ || t == FL_VERT_BROWSER_SLIDER \ || t == FL_VERT_BROWSER_SLIDER2 \ || t == FL_VERT_THIN_SLIDER \ || t == FL_VERT_BASIC_SLIDER ) /* Minimum knob size */ #define MINKNOB_SB 18 /* for scrollbars on browser */ #define MINKNOB_SL 6 /* for regular sliders */ /* Sliders that must have certain minimum value for the knob */ #define SLIDER_MIN( t ) ( t == FL_HOR_BROWSER_SLIDER \ || t == FL_HOR_BROWSER_SLIDER2 \ || t == FL_VERT_BROWSER_SLIDER \ || t == FL_VERT_BROWSER_SLIDER2 ) static void ps_drw_slider_shape( int boxtype, float x, float y, float w, float h, long col1, long col2, int sltype, float size, float val, const char * str, int inv, float bw ) { float slx, sly, slw, slh; int slbox = boxtype, slbw = bw; float absbw = FL_abs( bw ), absbw2, bw2; if ( sltype == FL_VERT_FILL_SLIDER ) { slh = ( inv ? ( 1 - val ) : val ) * ( h - 2 * absbw ); sly = inv ? y + h - absbw - slh : y + absbw; slw = w - 2 * absbw; slx = x + absbw; } else if ( sltype == FL_HOR_FILL_SLIDER ) { slw = val * ( w - 2 * absbw ); slx = x + absbw; slh = h - 2 * absbw; sly = y + absbw; } else if ( is_vert( sltype ) ) { slh = size * ( h - 2 * absbw ); if ( SLIDER_MIN( sltype ) && slh < MINKNOB_SB ) slh = MINKNOB_SB; else if ( slh < 2 * absbw + MINKNOB_SL ) slh = 2 * absbw + MINKNOB_SL; if ( sltype == FL_VERT_BROWSER_SLIDER2 ) { slh = size * h; sly = flinear( val, 1.0, 0.0, y, y + h - slh ); slx = x + 1; slw = w - 2; } else if ( sltype == FL_VERT_THIN_SLIDER || sltype == FL_VERT_BASIC_SLIDER ) { slh = size * h; sly = flinear( val, 0.0, 1.0, y, y + h - slh ); slx = x + absbw - 0.5; slw = w - 2 * absbw + 0.5; } else { if ( inv ) sly = flinear( val, 1.0, 0.0, y + absbw, y + h - absbw - slh ); else sly = flinear( val, 0.0, 1.0, y + absbw, y + h - absbw - slh ); slw = w - 2 * absbw; slx = x + absbw; } } else if ( is_horiz( sltype ) ) { slw = size * ( w - 2 * absbw ); if ( SLIDER_MIN( sltype ) && slw < MINKNOB_SB ) slw = MINKNOB_SB; else if ( slw < 2 * absbw + MINKNOB_SL ) slw = 2 * absbw + MINKNOB_SL; if ( sltype == FL_HOR_BROWSER_SLIDER2 ) { slw = size * w; slx = flinear( val, 0.0, 1.0, x, x + w - slw ); slh = h - 2; sly = y + 1; } else if ( sltype == FL_HOR_THIN_SLIDER || sltype == FL_HOR_BASIC_SLIDER ) { slw = size * w; slx = flinear( val, 0.0, 1.0, x, x + w - slw ); sly = y + absbw + 0.5; slh = h - 2 * absbw + 0.5; } else { slx = flinear( val, 0.0, 1.0, x + absbw, x + w - absbw - slw ); slh = h - 2 * absbw; sly = y + absbw; } } else { fprintf( stderr, "Unknown slider type %d\n", sltype ); return; } /* Start drawing */ slbox = boxtype; slbw = bw; if ( sltype == FL_VERT_BROWSER_SLIDER2 || sltype == FL_HOR_BROWSER_SLIDER2 ) slbw = bw > 0 ? 1 : -1; if ( sltype != FL_HOR_THIN_SLIDER && sltype != FL_VERT_THIN_SLIDER && sltype != FL_HOR_BASIC_SLIDER && sltype != FL_VERT_BASIC_SLIDER ) ps_draw_box( slbox, x, y, w, h, col1, slbw ); if ( sltype == FL_VERT_NICE_SLIDER ) { int xoff = absbw - 0.01; ps_draw_box( FL_FLAT_BOX, x + w / 2.0 - 2.0, y + absbw, 4.0, h - 2.0 * absbw, FL_BLACK, 0 ); ps_draw_box( FL_UP_BOX, slx, sly, slw, slh, col1, bw ); ps_draw_box( FL_DOWN_BOX, slx + xoff, sly + slh / 2.0 - 2.2, slw - 2 * xoff, 5.5, col2, 1.1 ); } else if ( sltype == FL_HOR_NICE_SLIDER ) { int yoff = absbw - 0.4; ps_draw_box( FL_FLAT_BOX, x + absbw, y + h / 2 - 2, w - 2 * absbw, 4.0, FL_BLACK, 0.0 ); ps_draw_box( FL_UP_BOX, slx, sly, slw, slh, col1, bw ); ps_draw_box( FL_DOWN_BOX, slx + slw / 2.0 - 2, sly + yoff, 5, slh - 2 * yoff, col2, 1.1 ); } else { switch ( boxtype ) { case FL_UP_BOX: slbox = FL_UP_BOX; break; case FL_DOWN_BOX: slbox = FL_UP_BOX; break; case FL_FRAME_BOX: case FL_EMBOSSED_BOX: case FL_ROUNDED_BOX: slbox = boxtype; break; case FL_RFLAT_BOX: slbox = FL_ROUNDED_BOX; break; case FL_RSHADOW_BOX: slbox = FL_ROUNDED_BOX; break; default: slbox = FL_FRAME_BOX; break; } absbw2 = absbw >= 2 ? absbw - 1 : absbw - ( bw < 0 ); if ( absbw2 == 0 ) absbw = 1; bw2 = bw > 0 ? absbw2 : - absbw2; ps_draw_box( slbox, slx, sly, slw, slh, col2, bw2 ); if ( sltype == FL_VERT_BROWSER_SLIDER || sltype == FL_VERT_BROWSER_SLIDER2 || sltype == FL_VERT_THIN_SLIDER ) { int extra = bw2 < 0; ps_draw_text( FL_ALIGN_CENTER, slx - extra, sly, slw + 2 * extra, slh, 0, FL_TINY_FONT, FL_NORMAL_STYLE, "@RippleLines" ); } else if ( sltype == FL_HOR_BROWSER_SLIDER || sltype == FL_HOR_BROWSER_SLIDER2 || sltype == FL_HOR_THIN_SLIDER ) ps_draw_text( FL_ALIGN_CENTER, slx - 1, sly - 1, slw, slh + 2, 0, FL_TINY_FONT, FL_NORMAL_STYLE, "@2RippleLines" ); } /* Draw the label */ ps_draw_text( FL_ALIGN_CENTER, slx, sly, slw, slh, 0, FL_NORMAL_STYLE, FL_SMALL_FONT, str ); } #define VAL_BOXW FL_max( 35, 0.18 * ob->w ) #define VAL_BOXH 25 static void flps_draw_slider( FL_OBJECT * ob ) { SPEC *sp = ob->spec; char valstr[ 32 ]; float bx = ob->x, by = ob->y, bw = ob->w, bh = ob->h; /* value box */ float sx = ob->x, sy = ob->y, sw = ob->w, sh = ob->h; /* slider */ float val; int inv; /* Draw the value box */ if ( ob->objclass == FL_VALSLIDER ) { if ( is_vert( ob->type ) ) { bh = VAL_BOXH; by = ob->y + ob->h - 1 - bh; sh -= bh;; } else { bw = VAL_BOXW; sx += bw; sw -= bw; } sprintf( valstr, "%.*f", sp->prec, sp->val ); ps_draw_box( ob->boxtype, bx, by, bw, bh, ob->col1, ob->bw ); ps_draw_text_beside( FL_ALIGN_CENTER, bx, by, bw, bh, ob->lcol, ob->lstyle, ob->lsize, valstr ); } if ( sp->min == sp->max ) val = 0.5; else val = ( sp->val - sp->min ) / ( sp->max - sp->min ); inv = sp->min < sp->max; /* Draw the slider */ if ( ob->align == FL_ALIGN_CENTER ) ps_drw_slider_shape( ob->boxtype, sx, sy, sw, sh, ob->col1, ob->col2, ob->type, sp->slsize, val, ob->label, inv, ob->bw ); else { ps_drw_slider_shape( ob->boxtype, sx, sy, sw, sh, ob->col1, ob->col2, ob->type, sp->slsize, val, "", inv, ob->bw ); ps_draw_object_label_beside( ob ); } } /* * SCROLL BAR */ #define is_hor_scrollbar( t ) ( t == FL_HOR_SCROLLBAR \ || t == FL_HOR_THIN_SCROLLBAR \ || t == FL_HOR_NICE_SCROLLBAR \ || t == FL_HOR_BASIC_SCROLLBAR) static void get_geom( FL_OBJECT * parent, FL_OBJECT * up, FL_OBJECT * slider, FL_OBJECT * down ) { int x = parent->x, y = parent->y, w = parent->w, h = parent->h; int absbw = FL_abs( parent->bw ); if ( is_hor_scrollbar( parent->type ) ) { down->x = x; up->x = x + w - h; up->y = down->y = y; down->w = down->h = up->w = up->h = h; slider->x = x + h; slider->y = y; slider->w = w - 2 * h; slider->h = h; } else { up->x = down->x = x; up->y = y + h - w; down->y = y; up->w = up->h = down->w = down->h = w; slider->x = x; slider->y = y + w; slider->w = w; slider->h = h - 2 * w; } up->col1 = down->col1 = slider->col1 = parent->col1; up->col2 = down->col2 = slider->col2 = parent->col2; up->bw = down->bw = slider->bw = parent->bw; if ( absbw > 2 ) absbw--; if ( parent->bw > 0 ) up->bw = down->bw = absbw; else up->bw = down->bw = -absbw; slider->boxtype = parent->boxtype; if ( parent->type == FL_HOR_THIN_SCROLLBAR || parent->type == FL_VERT_THIN_SCROLLBAR || parent->type == FL_HOR_BASIC_SCROLLBAR || parent->type == FL_VERT_BASIC_SCROLLBAR ) { up->boxtype = down->boxtype = FL_NO_BOX; if ( parent->type == FL_VERT_THIN_SCROLLBAR || parent->type == FL_VERT_BASIC_SCROLLBAR ) { slider->y += absbw - 1; slider->h += 2 * (absbw - 1); } else { slider->x -= absbw - 1; slider->w += 2 * ( absbw - 1 ); } } else up->boxtype = down->boxtype = parent->boxtype; } static void flps_draw_scrollbar( FL_OBJECT * ob ) { FL_OBJECT *sld, *up, *down; int sltype; if ( ob->type == FL_HOR_THIN_SCROLLBAR || ob->type == FL_VERT_THIN_SCROLLBAR || ob->type == FL_HOR_BASIC_SCROLLBAR || ob->type == FL_VERT_BASIC_SCROLLBAR ) ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); switch ( ob->type ) { case FL_HOR_SCROLLBAR: sltype = FL_HOR_BROWSER_SLIDER2; break; case FL_VERT_SCROLLBAR: sltype = FL_VERT_BROWSER_SLIDER2; break; case FL_HOR_THIN_SCROLLBAR: sltype = FL_HOR_THIN_SLIDER; break; case FL_VERT_THIN_SCROLLBAR: sltype = FL_VERT_THIN_SLIDER; break; case FL_HOR_BASIC_SCROLLBAR: sltype = FL_HOR_BASIC_SLIDER; break; case FL_VERT_BASIC_SCROLLBAR: sltype = FL_VERT_BASIC_SLIDER; break; case FL_HOR_NICE_SCROLLBAR: sltype = FL_HOR_NICE_SLIDER; break; case FL_VERT_NICE_SCROLLBAR: sltype = FL_VERT_NICE_SLIDER; break; default: fprintf( stderr, "Unknown scrollbar type: %d\n", ob->type ); sltype = FL_HOR_BROWSER_SLIDER2; break; } if ( is_hor_scrollbar( ob->type ) ) { up = flps_make_object( FL_SCROLLBUTTON, FL_TOUCH_BUTTON, 1, 1, 1, 1, "6", 0 ); down = flps_make_object( FL_SCROLLBUTTON, FL_TOUCH_BUTTON, 1, 1, 1, 1, "4", 0 ); sld = flps_make_object( FL_SLIDER, sltype, 1, 1, 1, 1, "", 0 ); } else { up = flps_make_object( FL_SCROLLBUTTON, FL_TOUCH_BUTTON, 1, 1, 1, 1, "8", 0 ); down = flps_make_object( FL_SCROLLBUTTON, FL_TOUCH_BUTTON, 1, 1, 1, 1, "2", 0 ); sld = flps_make_object( FL_SLIDER, sltype, 1, 1, 1, 1, "", 0 ); } get_geom( ob, up, sld, down ); sld->spec = ob->spec; ps_draw_object( up ); ps_draw_object( sld ); ps_draw_object( down ); ps_draw_object_label_beside( ob ); } static void flps_draw_frame( FL_OBJECT * ob ) { ps_draw_frame( ob->type, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); ps_draw_object_label( ob ); } /* In addition to computing the string length, it enlarges the * bounding box and leaves a copy of the string on the stack */ static void ps_len( const char * s, int style, int size) { ps_set_font( style, size ); /* this sets flfont height */ ps_output( "(%s) dup stringwidth pop /w exch 6 add def\n", s ); ps_output( "/h {H 2 add} bind def\n" ); } static void ps_boxf( long col ) { ps_color( col ); ps_output( "x y " ); /* (x,y) */ ps_output( "x y h 1 sub add\n" ); /* (x, y+h - 1) */ ps_output( "x w 1 sub add y h 1 sub add " ); /* (x+w-1, y+h-1) */ ps_output( "x w 1 sub add y 4 P F\n" ); /* (x+w-1,y) */ } static void flps_draw_lframe( FL_OBJECT * ob ) { int align, margin, dy = 0; int est; ps_draw_frame( ob->type, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); if ( ob->type == FL_UP_FRAME || ob->type == FL_DOWN_FRAME ) dy = ( FL_abs( ob->bw ) + 1 ) / 2; align = ob->align & ~FL_ALIGN_INSIDE; margin = 11 + ob->w * 0.02; if ( ob->type == FL_ROUNDED_FRAME ) margin += 7; est = strlen( ob->label ) * ob->lsize; /* Turn into pixels */ est *= psinfo.xdpi / 75.0; if ( ob->w - est < 2 * margin ) margin /= 2; if ( ob->w - est < 2 * margin ) margin /= 2; ps_len( ob->label, ob->lstyle, ob->lsize ); if ( align == FL_ALIGN_LEFT_BOTTOM ) { ps_output( "/x {%d %d add} bind def\n", ob->x, margin ); ps_output( "/y {%d h -2 div add %d sub} bind def\n", ob->y, dy ); } else if ( align == FL_ALIGN_BOTTOM ) { ps_output( "/x {%d %d w sub 2 div add} bind def\n", ob->x, ob->w ); ps_output( "/y {%d h -2 div add %d sub} bind def\n", ob->y, dy ); } else if ( align == FL_ALIGN_RIGHT_BOTTOM ) { ps_output( "/x {%d %d add w sub %d sub} bind def\n", ob->x, ob->w, margin ); ps_output( "/y {%d h -2 div add %d sub} bind def\n", ob->y, dy ); } else if ( align == FL_ALIGN_TOP ) { ps_output( "/x {%d %d w sub 2 div add} bind def\n", ob->x, ob->w ); ps_output( "/y {%d %d add h -2 div add %d add} bind def\n", ob->y, ob->h, dy ); } else if ( align == FL_ALIGN_RIGHT_TOP || align == FL_ALIGN_RIGHT ) { ps_output( "/x {%d %d add w sub %d sub} bind def\n", ob->x, ob->w, margin ); ps_output( "/y {%d %d add h -2 div add %d add} bind def\n", ob->y, ob->h, dy ); } else { ps_output( "/x {%d %d add} bind def\n", ob->x, margin ); ps_output( "/y {%d %d add h -2 div add %d add} bind def\n", ob->y, ob->h, dy ); } ps_boxf( ob->col2 ); ps_color( ob->lcol ); ps_output( "x w 2 div add y h 2 div add -0.3 h mul add M Cshow\n" ); } static void flps_draw_positioner( FL_OBJECT * ob ) { ALLSPEC *sp = ob->spec; float absbw = FL_abs( ob->bw ); float xo = ob->x + absbw + 1, yo = ob->y + absbw + 1; float w1 = ob->w - 2 * ( absbw + 1 ), h1 = ob->h - 2 * ( absbw + 1 ); float xx, yy; if ( ob->type != FL_OVERLAY_POSITIONER ) ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); ps_draw_object_label( ob ); xx = flinear( sp->xval, sp->xmin, sp->xmax, xo, xo + w1 - 1.0 ); yy = flinear( sp->yval, sp->ymin, sp->ymax, yo, yo + h1 - 1.0 ); ps_line( xo, yy, xo + w1 - 1, yy, ob->col2 ); ps_line( xx, yo, xx, yo + h1 - 1, ob->col2 ); } #define IS_FLATBOX( b ) ( b == FL_FRAME_BOX \ || b == FL_EMBOSSED_BOX \ || b == FL_BORDER_BOX \ || b == FL_ROUNDED_BOX ) static int calc_sbw( FL_OBJECT * ob ) { int delta = FL_abs( ob->bw ) + 3 * ( ob->bw > 0 ); int flat = IS_FLATBOX( ob->boxtype ) ? 2 : 0; if ( ob->w > 250 && ob->h > 250 ) return 15 + delta - flat; else if ( ob->w < 150 || ob->h < 150 ) return 13 + delta - flat; else return 14 + delta - flat; } static void browser_partition( FL_OBJECT * ob, int sbw, int * tx, int * ty, int * tw, int * th ) { SPEC *sp = ob->spec; int dx = 0, dy = 0; *tx = ob->x; *ty = ob->y; *tw = ob->w; *th = ob->h; if ( sp->v_pref == FL_ON ) { dx = sbw; *tw -= dx; } if ( sp->h_pref == FL_ON ) { dy = sbw; *ty += dy; *th -= dy; } if ( sp->v_pref == FL_ON ) { FL_OBJECT *vscb = flps_make_object( FL_SCROLLBAR, FL_VERT_THIN_SCROLLBAR, ob->x + ob->w - sbw, ob->y + dy, sbw, ob->h - dy, 0, 0 ); /* Copy some attributes from parent */ vscb->bw = ob->bw; vscb->boxtype = ob->boxtype; ( ( SPEC * ) vscb->spec )->slsize = 0.5; ( ( SPEC * ) vscb->spec )->val = 1; flps_draw_scrollbar( vscb ); } if ( sp->h_pref == FL_ON ) { FL_OBJECT *hscb = flps_make_object( FL_SCROLLBAR, FL_HOR_THIN_SCROLLBAR, ob->x, ob->y, ob->w - dx, sbw, 0, 0 ); /* Copy some attributes from parent */ hscb->bw = ob->bw; hscb->boxtype = ob->boxtype; ( ( SPEC * ) hscb->spec )->slsize = 0.5; ( ( SPEC * ) hscb->spec )->val = 0; flps_draw_scrollbar( hscb ); } } static void flps_draw_browser( FL_OBJECT * ob ) { SPEC *sp = ob->spec; int absbw = FL_abs( ob->bw ); int sbw; int tx, ty, tw, th; int m = absbw / 2 + 1; sbw = calc_sbw( ob ); /* scroll bar width */ browser_partition( ob, sbw, &tx, &ty, &tw, &th ); ps_draw_box( ob->boxtype, tx, ty, tw, th, ob->col1, ob->bw ); ps_draw_object_label_beside( ob ); /* Start clipping */ ps_set_clipping( tx + absbw, ty + absbw, tw - 2 * absbw - 1, th - 2 * absbw ); if ( sp->content[ 1 ] ) { char *str; int i, cur_size; str = malloc( 1 ); *str = '\0'; cur_size = 1; for ( i = 1; i <= sp->lines; i++ ) { cur_size += strlen( sp->content[ i ] ) + 2; str = realloc( str, cur_size ); strcat( str, sp->content[ i ] ); strcat( str, "\n" ); } ps_draw_text( FL_ALIGN_LEFT_TOP | FL_ALIGN_INSIDE, tx + m, ty, tw, th, ob->lcol, sp->fontstyle, sp->fontsize, str ); } ps_unset_clipping( ); } static void flps_draw_input( FL_OBJECT * ob ) { long col = ob->focus ? ob->col2 : ob->col1; ob->align &= ~FL_ALIGN_INSIDE; ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, col, ob->bw ); ps_draw_object_label_beside( ob ); } static void flps_draw_free( FL_OBJECT * ob ) { ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); } /*************** timer ********************/ static char * default_filter( FL_OBJECT * ob FL_UNUSED_ARG, double totalsec ) { static char buf[ 32 ]; int hr, minutes; float sec; if ( totalsec >= 3600.0 ) { hr = totalsec / 3600.0 + 0.001; minutes = totalsec / 60.0 + 0.001; minutes -= hr * 60; sec = totalsec - 60 * ( minutes + 60 * hr ); sprintf( buf, "%2d:%0d:%2.1f", hr, minutes, sec ); } else if ( totalsec >= 60.0 ) { minutes = totalsec / 60.0 + 0.001; sec = totalsec - minutes * 60; sprintf( buf, "%2d:%2.1f", minutes, sec ); } else sprintf(buf, "%2.1f", totalsec); return buf; } static void flps_draw_timer( FL_OBJECT * ob ) { char *str; SPEC *sp = ob->spec; if ( ob->type == FL_HIDDEN_TIMER ) return; ps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); if ( ob->type == FL_VALUE_TIMER ) { str = default_filter( ob, sp->val == 0.0 ? 100.0 : sp->val ); ps_draw_text( FL_ALIGN_CENTER, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, str ); ob->align &= ~FL_ALIGN_INSIDE; if ( ob->align == FL_ALIGN_CENTER ) ob->align = FL_ALIGN_LEFT; } ps_draw_object_label( ob ); } /****************** TABLES ****************************/ typedef void ( * DRAW )( FL_OBJECT * ); typedef struct { int objclass; DRAW drawit; } FLPS_draw; static FLPS_draw flps_draw[ ] = { { FL_BUTTON, flps_draw_button }, { FL_LIGHTBUTTON, flps_draw_lightbutton }, { FL_ROUNDBUTTON, flps_draw_roundbutton }, { FL_LABELBUTTON, flps_draw_labelbutton }, { FL_ROUND3DBUTTON, flps_draw_round3dbutton }, { FL_SCROLLBUTTON, flps_draw_scrollbutton }, { FL_CHECKBUTTON, flps_draw_checkbutton }, { FL_PIXMAPBUTTON, flps_draw_pixmap }, { FL_BITMAPBUTTON, flps_draw_pixmap }, { FL_PIXMAP, flps_draw_pixmap }, { FL_BITMAP, flps_draw_pixmap }, { FL_SLIDER, flps_draw_slider }, { FL_VALSLIDER, flps_draw_slider }, { FL_SCROLLBAR, flps_draw_scrollbar }, { FL_THUMBWHEEL, flps_draw_thumbwheel }, { FL_BOX, flps_draw_box }, { FL_TEXT, flps_draw_text }, { FL_COUNTER, flps_draw_counter }, { FL_DIAL, flps_draw_dial }, { FL_CHOICE, flps_draw_choice }, { FL_MENU, flps_draw_text }, { FL_BROWSER, flps_draw_browser }, { FL_POSITIONER, flps_draw_positioner }, { FL_FRAME, flps_draw_frame }, { FL_LABELFRAME, flps_draw_lframe }, { FL_INPUT, flps_draw_input }, { FL_FREE, flps_draw_free }, { FL_TIMER, flps_draw_timer } }; #define NOBJ ( sizeof flps_draw / sizeof *flps_draw ) static void ps_draw_object( FL_OBJECT * ob ) { FLPS_draw *d = flps_draw, *ds; for ( ds = d + NOBJ; d < ds; d++ ) { if ( d->objclass == ob->objclass ) { if ( psinfo.verbose ) ps_verbatim( "%%%s {\n", find_class_name( ob->objclass ) ); d->drawit( ob ); if ( psinfo.verbose ) ps_verbatim( "%%%s }\n", find_class_name( ob->objclass ) ); return; } } if ( ob->objclass != FL_BEGIN_GROUP && ob->objclass != FL_END_GROUP ) fprintf( stderr, "Unknown/unsupported object: %s (%d)\n", find_class_name( ob->objclass ), ob->objclass ); } void ps_show_form( FL_FORM * form ) { FL_OBJECT *ob; ps_bgn_form( form->w, form->h, form->label ); for ( ob = form->first; ob; ob = ob->next ) { scale_object( ob ); ps_draw_object( ob ); } ps_end_form( ); psinfo.page++; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/xpmtops.c0000644000175000017500000001616411304523023015123 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file xpmtops.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Turn an xpm file into PostScript. * Two methods are provided: one is to read the xpm file * and convert directly. The other one is to use pbm+ package. * The direct method suffers from the fact that it only handles * xpm3 (not a big problem as xpm1 is very rare these days). * The pbm+ has the drawback that it does not handle the * grayscale colormap in the xpm file. * * The default is to use the direct translation. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd2ps.h" #include #include #include #include /* unlink */ #include /*************************************** * Get the dimension of the xpm file for alignment ***************************************/ static int get_xpm_size( const char * file, int * w, int *h ) { FILE *fp = fopen( file, "r" ); int c, j; *w = *h = -1; if ( ! fp ) { fprintf( stderr, "Can't open xpm file %s\n", file ); return -1; } while ( ( c = getc( fp ) ) != '"' && c != EOF ) /* empty */ ; if ( c == EOF ) { fprintf( stderr, "error reading xpm file\n" ); fclose( fp ); return -1; } if ( fscanf( fp, "%d %d %d %d", w, h, &j, &j ) != 4 ) { fprintf( stderr, "Failed to get the size of the xpm\n" ); fclose( fp ); *w = *h = 25; return -1; } fclose( fp ); return 0; } /*************************************** ***************************************/ void draw_xpm( FL_OBJECT * ob ) { SPEC *sp = ob->spec; int xx, yy, w, h; if ( get_xpm_size( sp->file, &w, &h ) >= 0 ) { fl_get_align_xy( sp->align, ob->x, ob->y, ob->w, ob->h, w, h, FL_abs( ob->bw ) + sp->dx, FL_abs( ob->bw ) + sp->dy, &xx, &yy ); #if 0 if ( ! flps->xpmtops_direct ) xpmtops_via_ppm( sp->file, xx, yy, ob->col1 ); else #endif xpmtops_direct( sp->file, xx, yy, ob->col1 ); } } #if 0 /*************************************** * Convert using pbmplus+ package ***************************************/ static char *bgn_eps = "/BeginEPSF { /inc_state save def /dict_count countdictstack def\n" "/op_count count 1 sub def userdict begin /showpage {} def\n" "0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin \n" "10 setmiterlimit [] 0 setdash newpath\n" "/languagelevel where {pop languagelevel 1 ne\n" "{false setstrokeadjust false setoverprint } if } if} BD\n"; static char *end_eps = "/EndEPSF { count op_count sub {pop} repeat\n" "countdictstack dict_count sub{end} repeat inc_state restore } BD\n"; void emit_epsf_import_command( void ) { static int emitted; if ( ! emitted ) { ps_output( bgn_eps ); ps_output( end_eps ); emitted = 1; } } /*************************************** ***************************************/ static int get_bounding_box( const char * file, int * x, int * y, int * w, int * h ) { FILE *fp; char buf[ 1024 ]; if ( ! ( fp = fopen( file, "r" ) ) ) return -1; while ( fgets(buf, sizeof buf, fp ) ) { if ( strstr( buf, "BoundingBox:" ) ) { sscanf( buf, "%*s %d %d %d %d\n", x, y, w, h ); fclose( fp ); return 0; } } fclose( fp ); return -1; } /*************************************** ***************************************/ static char *logfile = "xpmtops.log"; static void convert_to_ps( const char * file, long trans ) { FILE *fpr, *fpw; char *prefix = "/tmp/xpmtops.eps"; char tempfile[ 128 ]; char *cmd, buf[ 1024 ], tmpbuf[ 1024 ], *p, rgbstr[ 32 ]; int r, g, b, xo, yo, w, h; if ( ! file || ! *file ) { fprintf( stderr, "null xpm filename\n" ); return; } sprintf( tempfile, "%s.%s", prefix, whoami( ) ); if ( ! ( fpr = fopen( file, "r" ) ) ) { fprintf( stderr, "Can't open %s\n", file ); return; } if ( psinfo.colorps ) cmd = "(xpmtoppm | pnmdepth 255 | pnmtops >%s) >%s 2>&1"; else cmd = "(xpmtoppm | pnmdepth 255 | ppmtopgm | pnmtops >%s) >%s 2>%1"; signal( SIGPIPE, SIG_IGN ); sprintf( buf, cmd, tempfile, logfile ); if ( ! ( fpw = popen(buf, "w" ) ) ) { fprintf( stderr, "failed to convert xpm to PS. See %s file details\n", logfile ); return; } /* fix None attributes on the fly */ fl_query_imap( trans, &r, &g, &b ); sprintf( rgbstr, "#%2x%2x%2x", r, g, b ); while ( fgets( buf, sizeof buf - 1, fpr ) ) { while ( ( p = strstr( buf, "None" ) ) ) { *p = '\0'; strcat( strcpy( tmpbuf, buf ), rgbstr ); strcat( tmpbuf, p + 4 ); strcpy( buf, tmpbuf ); } fputs( buf, fpw ); } pclose( fpw ); /* find the bounding box of the EPS */ if ( get_bounding_box( tempfile, &xo, &yo, &w, &h ) < 0 ) { fprintf( stderr, "Failed to convert xpm to EPS. " ); fprintf( stderr, "See %s for details\n", logfile ); fprintf( stderr, "Rest of the files converted\n" ); return; } ps_output( "-%d -%d translate\n", xo, yo ); fpr = fopen( tempfile, "r" ); while ( fgets( buf, sizeof buf - 1, fpr ) ) ps_output( buf ); fclose( fpr ); unlink( tempfile ); unlink( logfile ); } /*************************************** ***************************************/ static int xpmtops_via_ppm( const char * file, int xx, int yy, long tran ) { emit_epsf_import_command( ); ps_verbatim( "\n%% pixmap goes here\n" ); ps_output( "BeginEPSF %d %d translate 1 1 scale\n", xx, yy ); ps_verbatim( "\n%%%%BeginDocument: %s\n", ps_literal( file ) ); convert_to_ps( file, tran ); ps_verbatim( "\n%%%%EndDocument\n" ); ps_verbatim( "EndEPSF\n" ); return 0; } /* End of convert using pbmplus package } */ #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/fd2ps.h0000644000175000017500000002056611247055071014446 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd2ps.h */ #ifndef FD2PS_H #define FD2PS_H #include "include/forms.h" /* configuration infomation */ typedef struct { FILE * fp; float xdpi, /* screen resolution */ ydpi; int colorps; /* false if grayscale */ int eps; /* true for EPS */ float paper_w, /* default paper size */ paper_h; const char * paper_name; int bw; /* current border width */ int user_bw; /* bw specified on cmdline */ int verbose; int inverted; /* take care of coord switch */ int landscape; /* print version */ int unit; /* unit of measure */ int pages; /* how many pages */ int page; /* current page */ int epsf_import; /* true if importing EPS */ float xscale, yscale; float gamma; /* color adjustment */ int pack, len, lastc, literal; char * rgbfile; int xpmtops_direct; /* internal stuff */ const char * poly_name; /* PS poly name */ } PSInfo; typedef struct { float x, y; } Point; #define MAX_CONTENT 64 /* max browser initialization lines */ #define rgb2gray( r, g, b ) \ ( 0.299 * ( r ) + 0.587 * ( g ) + 0.114 * ( b ) + 0.4 ) /* since we never take interactions with PS device, we can use a * common SPEC to hold all attributes of all types of objects * that have effect on the drawings. */ typedef struct { float ax, /* mapping factor */ bx, ay, by; float xval, yval; float xmin, ymin; float xmax, ymax; float xstep, /* positioner */ ystep; float lstep, /* counter */ sstep; float slsize; /* sliders */ float val; /* */ float max, min; int prec; int int_val; float thetai, thetaf; float origin; int direction; /* pixmap/bitmap stuff */ char * file; int dx, /* alignment margin */ dy; int align; int show_focus; /* slider spec */ int right; float xsl, ysl, wsl, hsl, sbw; int has_sb; int lines, screenlines; char ** content; /* for input & browser */ short * mode; int fontstyle, fontsize; int v_pref, h_pref; } ALLSPEC; #define SPEC ALLSPEC extern PSInfo psinfo, *flps; extern void ps_color(long); /* basic drawing of simple geomtric figures */ extern void ps_draw_init( void ); extern void ps_rectangle( int, float, float, float, float, long ); extern void ps_roundrectangle( int, float, float, float, float, long ); extern void ps_lines( Point *, int, long ); extern void ps_line( float, float, float, float, long ); extern void ps_poly( int, Point *, int, long ); extern int ps_draw_symbol( const char *, float, float, float, float, long ); extern void ps_oval( int, float, float, float, float, long ); extern void ps_pieslice( int fill, float x, float y, float w, float h, int t1, int t2, long col ); extern void ps_circ( int, float, float, float, long ); extern void ps_arc( int fill, float x, float y, float r, int t1, int t2, long col ); extern void ps_set_clipping( int, int, int, int ); extern void ps_unset_clipping( void ); #define ps_rectf( x, y, w, h, c ) ps_rectangle( 1, x, y, w, h, c ) #define ps_rect( x, y, w, h, c ) ps_rectangle( 0, x, y, w, h, c ) extern void ps_draw_box( int, float, float, float, float, long, float ); extern void ps_draw_tbox( int, float, float, float, float, long, float ); extern void ps_draw_frame( int, float, float, float, float, long, int ); extern void ps_draw_checkbox( int, float, float, float, float, long, int ); /* basic text drawing routines */ extern void ps_draw_text( int, float, float, float, float, long, int, int, const char * ); extern void ps_draw_text_beside( int, float, float, float, float, long, int, int, const char * ); extern void ps_text_init( void ); /* FL Object drawing routine */ extern void ps_show_form( FL_FORM * ); extern int load_form_definiation( const char * ); extern char *ul_magic_char; extern char *fl_strdup( const char * ); extern int find_type_val( int, const char * ); extern void ps_invalidate_color_cache( void ); extern void ps_set_linewidth( float, float ); extern void ps_get_linewidth( float *, float * ); extern void ps_reset_linewidth( void ); #define ps_start_lw ps_set_linewidth #define ps_end_lw ps_reset_linewidth extern void set_object_modifier( void ( * )( FL_OBJECT * ) ); extern int fl_get_namedcolor( const char *s ); extern void flps_set_object_shortcut( FL_OBJECT *, const char *, int ); extern void print_version( int ); extern const char *get_version( void ); extern int unit_val(const char *); extern const char *unit_name( int ); extern void ps_log( const char *s ); extern void apply_gamma( float ); extern const char *ascii_date( void ); extern const char *whoami( void ); extern const char *find_class_name( int ); extern int find_class_val( const char * ); extern void ps_set_font( int, int ); extern int load_form_definition( const char * ); extern void fl_get_outside_align( int align, int x, int y, int w, int h, int *new_align, int *newx, int *newy ); extern void fl_get_hv_align( int, int *, int * ); extern void draw_bitmap( const char *, float, float, float, float, long, long ); extern int get_gray255( long ); extern void get_scale_unit( int, float *, float * ); extern void draw_xpm( FL_OBJECT * ); extern void fl_query_imap( long col, int *r, int *g, int *b ); extern void get_paper_size( const char *, float *, float * ); extern void list_papers( const char * ); extern void ps_invalidate_font_cache( void ); extern void emit_epsf_import_command( void ); extern FL_OBJECT *flps_make_object( int, int, int, int, int, int, const char *, void * ); #define PS_SPECIAL( c ) ( c == '(' || c == ')' \ || c == '[' || c == ']' \ || c == ' ' || c == '<' \ || c == '>' || c == '%' \ || c == '#' || c == '/' ) extern void ps_output( const char *, ... ); extern void ps_verbatim( const char *, ... ); #define ISBUTTON( cls ) \ ( cls == FL_BUTTON || cls == FL_LIGHTBUTTON \ || cls == FL_CHECKBUTTON || cls == FL_ROUNDBUTTON \ || cls == FL_ROUND3DBUTTON || cls == FL_PIXMAPBUTTON \ || cls == FL_BITMAPBUTTON || cls == FL_SCROLLBUTTON \ || cls == FL_LABELBUTTON ) #define ISCHOICE( cls ) \ ( cls == FL_CHOICE || cls == FL_MENU || cls == FL_BROWSER ) extern int xpmtops_direct( const char *, int, int, long ); typedef struct { int red, green, blue, alpha; char key[ 4 ]; char name[ 32 ]; } fd2psCMAP; extern int image2colorps( short *, int, int, fd2psCMAP *, int, const char * ); extern int image2grayps( short *, int, int, fd2psCMAP *, int, const char * ); extern char *ps_literal( const char * ); #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/align.c0000644000175000017500000001432711247055071014513 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file align.c * * This file is part of XForms package * Copyright (c) 1996-2000 T.C. Zhao and Mark Overmars * All rights reserved. * * Handles align requests */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd2ps.h" /*************************************** ***************************************/ void fl_get_hv_align( int align, int * halign, int * valign ) { align &= ~FL_ALIGN_INSIDE; switch ( align ) { case FL_ALIGN_LEFT : *halign = FL_ALIGN_LEFT; *valign = FL_ALIGN_CENTER; break; case FL_ALIGN_RIGHT : *halign = FL_ALIGN_RIGHT; *valign = FL_ALIGN_CENTER; break; case FL_ALIGN_CENTER : *halign = FL_ALIGN_CENTER; *valign = FL_ALIGN_CENTER; break; case FL_ALIGN_TOP : *halign = FL_ALIGN_CENTER; *valign = FL_ALIGN_TOP; break; case FL_ALIGN_BOTTOM : *halign = FL_ALIGN_CENTER; *valign = FL_ALIGN_BOTTOM; break; case FL_ALIGN_LEFT_BOTTOM : *halign = FL_ALIGN_LEFT; *valign = FL_ALIGN_BOTTOM; break; case FL_ALIGN_RIGHT_BOTTOM : *halign = FL_ALIGN_RIGHT; *valign = FL_ALIGN_BOTTOM; break; case FL_ALIGN_LEFT_TOP : *halign = FL_ALIGN_LEFT; *valign = FL_ALIGN_TOP; break; case FL_ALIGN_RIGHT_TOP : *halign = FL_ALIGN_RIGHT; *valign = FL_ALIGN_TOP; break; default : fprintf( stderr, "GetAlign - Bad request: %d\n", align ); *halign = FL_ALIGN_CENTER; *valign = FL_ALIGN_CENTER; break; } } /*************************************** ***************************************/ void fl_get_outside_align( int align, int x, int y, int w, int h, int * new_align, int * newx, int * newy ) { *newx = x; *newy = y; *new_align = FL_ALIGN_CENTER; align &= ~FL_ALIGN_INSIDE; if ( align == FL_ALIGN_LEFT ) { *new_align = FL_ALIGN_RIGHT; *newx = x - w; } else if ( align == FL_ALIGN_RIGHT ) { *new_align = FL_ALIGN_LEFT; *newx = x + w; } else if ( align == FL_ALIGN_TOP ) { *new_align = FL_ALIGN_BOTTOM; *newy = y + h; } else if ( align == FL_ALIGN_BOTTOM ) { *new_align = FL_ALIGN_TOP; *newy = y - h; } else if ( align == FL_ALIGN_LEFT_TOP ) { *new_align = FL_ALIGN_LEFT_BOTTOM; *newy = y + h; } else if ( align == FL_ALIGN_RIGHT_TOP ) { *new_align = FL_ALIGN_RIGHT_BOTTOM; *newy = y + h; } else if ( align == FL_ALIGN_LEFT_BOTTOM ) { *new_align = FL_ALIGN_LEFT_TOP; *newy = y - h; } else if ( align == FL_ALIGN_RIGHT_BOTTOM ) { *new_align = FL_ALIGN_RIGHT_TOP; *newy = y - h; } } /*************************************** ***************************************/ static void get_align_inside( int align, int x, int y, int w, int h, int xsize, int ysize, int xoff, int yoff, int * xx, int * yy ) { int hor, vert; fl_get_hv_align( align, &hor, &vert ); x += xoff; y += yoff; w -= 2 * xoff; h -= 2 * yoff; switch ( hor ) { case FL_ALIGN_LEFT : *xx = x; break; case FL_ALIGN_RIGHT : *xx = x + w - xsize; break; case FL_ALIGN_CENTER : default: *xx = x + ( w - xsize ) / 2; break; } switch ( vert ) { case FL_ALIGN_TOP : *yy = y + h - ysize; break; case FL_ALIGN_BOTTOM : *yy = y; break; case FL_ALIGN_CENTER : default: *yy = y + ( h - ysize ) / 2; break; } } /*************************************** ***************************************/ static void get_align_outside( int align, int x, int y, int w, int h, int xsize, int ysize, int xoff, int yoff, int * xx, int * yy ) { int newx, newy, new_align; fl_get_outside_align( align, x, y, w, h, &new_align, &newx, &newy ); get_align_inside( new_align, newx, newy, w, h, xsize, ysize, xoff, yoff, xx, yy ); } /*************************************** ***************************************/ void fl_get_align_xy( int align, int x, int y, int w, int h, int xsize, int ysize, int xoff, int yoff, int * xx, int * yy ) { ( ( align & FL_ALIGN_INSIDE ) ? get_align_inside : get_align_outside ) ( align, x, y, w, h, xsize, ysize, xoff, yoff, xx, yy ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/global.h0000644000175000017500000000147611247055071014667 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifndef FD2PS_GLOBAL #define FD2PS_GLOBAL PSInfo psinfo, *flps; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/Makefile.am0000644000175000017500000000131011304535210015265 0ustar jensjensinclude $(top_srcdir)/config/common.am CLEANFILES = fd2ps.1 EXTRA_DIST = Change Readme fd2ps.man SUBDIRS = test man_MANS = fd2ps.1 fd2ps.1: cp -p $(srcdir)/fd2ps.man fd2ps.1 # forms.h is a generated file INCLUDES = -I../lib -I$(top_srcdir)/lib $(X_CFLAGS) bin_PROGRAMS = fd2ps fd2ps_LDADD = ../lib/libforms.la $(X_LIBS) $(X_PRE_LIBS) -lX11 $(LIBS) $(X_EXTRA_LIBS) fd2ps_SOURCES = \ align.c \ fd2ps.c \ fd2ps.h \ flsupport.c \ global.h \ image2ps.c \ load.c \ papers.c \ pscol.c \ psdraw.c \ psobj.c \ pstext.c \ readxpm.c \ sys.c \ version.c \ xbmtops.c \ xpmtops.c xforms-1.0.93sp1/fd2ps/sys.c0000644000175000017500000000424711304523161014231 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sys.c */ #ifdef HAVE_CONFIG_H #include #endif #include "fd2ps.h" #include #include #include /*************************************** ***************************************/ const char * ascii_date( void ) { time_t t = time( 0 ); static char buf[ 64 ]; strcpy( buf, asctime( localtime( &t ) ) ); buf[ strlen( buf ) - 1 ] = '\0'; return buf; } #include #include #include #include /*************************************** ***************************************/ const char * whoami( void ) { #ifndef __VMS struct passwd *passwd = getpwuid( getuid( ) ); const char *name = passwd ? passwd->pw_name : "Unknown"; endpwent( ); #else const char *name = getenv( "USER" ); #endif return name ? name : "unknown"; } /*************************************** ***************************************/ char * fl_strdup( const char * s ) { char *p = malloc( 1 + strlen( s ) ); return p ? strcpy( p, s ) : p; } /*************************************** ***************************************/ #ifndef HAVE_STRCASECMP int strcasecmp( const char * s1, const char * s2 ) { int c1, c2; while ( *s1 && *s2 ) { c1 = tolower( *s1 ); c2 = tolower( *s2 ); if ( c1 != c2 ) return c1 - c2; s1++; s2++; } return *s1 - *s2; } #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/Change0000644000175000017500000000066611171560225014364 0ustar jensjensv0.36 o. more alternative is attempted in locating the rgb.txt file V0.35 o. fixed a warning o. added timer object o. added thumbwheel o. added labelbutton V0.34 o. added handler keyboard o. added overlay_positioner handler o. added global keyword o. handles 2byte primary color for xpm files. --snap-- o. direct xpm to ps transation added. Added -rgb flag o. recognizes Struct keyword. V0.32 o. added FL_[HOR|VERT]_BASIC_SCROLBAR/slider xforms-1.0.93sp1/fd2ps/version.c0000644000175000017500000000534711312013426015077 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file version.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * version information */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "fd2ps.h" static char *version[ ] = { "fd2ps", "$State: Exp $ $Revision: 1.8 $ of $Date: 2009/12/15 23:09:10 $", "Copyright (c) 1997-2000 by T.C. Zhao", 0 }; /*************************************** ***************************************/ static const char * rm_rcs_kw( const char * s, int strip_time ) { static char buf[ 6 ][ 255 ]; static int nbuf; char *q = buf[ ( nbuf = ( nbuf + 1 ) % 5 ) ]; int left = 0, lastc = -1; while ( *s && q - buf[ nbuf] < ( int ) sizeof( buf[ nbuf ] ) - 2 ) { switch ( *s ) { case '$': if ( ( left = ! left ) ) while ( *s && *s != ':' ) s++; break; default: /* Copy the char and remove extra space */ if ( ! ( lastc == ' ' && *s == ' ' ) ) *q++ = lastc = *s; break; } s++; } *q = '\0'; /* All xforms' RCS time has the format xx:xx:xx */ if ( strip_time ) { if ( ( q = strchr( buf[ nbuf ], ':' ) ) ) *( q - 2 ) = '\0'; } return buf[ nbuf ]; } /*************************************** ***************************************/ void print_version( int die ) { char **q = version; for ( ; *q; q++ ) fprintf( stderr, q == version ? "%s" : "%s\n", rm_rcs_kw( *q, 0 ) ); if ( die ) exit( 0 ); } /*************************************** ***************************************/ const char * get_version( void ) { static char buf[ 1024 ]; char **q = version; for ( buf[ 0 ] = '\0'; *q; q++ ) strcat( buf, rm_rcs_kw( *q, 1 )); return buf; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/readxpm.c0000644000175000017500000003237511304526011015053 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file readxpm.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * read an XPM file. Only handles XPM3 files. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "fd2ps.h" /*#define DEBUG */ enum { CMAP, GMAP, MMAP, G4MAP, SMAP }; #define NMAPS 5 static char *keys[ ] = { "c", "g", "m", "g4", "s" }; static int lookup_rgb( const char *, int *, int *, int * ); /*************************************** ***************************************/ #ifdef DEBUG static void dump_map( char * name, fd2psCMAP * m, int ncol ) { int i; for ( i = 0; i < ncol; i++ ) fprintf( stderr, "%s: %s %s (%d %d %d)\n", name, m[ i ].key, m[ i ].name, m[ i ].red, m[ i ].green, m[ i ].blue); } #endif /*************************************** ***************************************/ static short * read_xpm( const char * file, int * w, int * h, int * ncol, fd2psCMAP ** maps, int * set ) { char buf[ 2048 ], val[ 64 ], *head, key[ 16 ], ckey[ 8 ]; int char_per_pixel, signature = 0; int x, y, icol, c, n, i, match; fd2psCMAP *map = 0; int r = 0, g = 0, b = 0; short *pixels, *p; FILE *fp; if ( ! ( fp = fopen( file, "r" ) ) ) { fprintf( stderr, "unable to open xpm file %s\n", file ); return 0; } while ( ! signature && fgets( buf, sizeof buf, fp ) ) { if ( strstr( buf, "XPM" ) && strstr( buf, "/*" ) ) signature = 1; } if ( ! signature ) { fprintf( stderr, "%s does not seem to be an XPM3 file\n", file ); return 0; } while ( ( c = getc( fp ) ) != EOF && c != '"' ) /* empty */ ; if ( fscanf( fp, "%d %d %d %d", w, h, ncol, &char_per_pixel ) != 4 ) { fprintf( stderr, "can't determine xpm size\n" ); return 0; } while ( getc(fp) != '\n' ) /* empty */ ; /* We only handle 1, 2, or 3 char_per_pixel due to colormap limit */ if ( char_per_pixel > 3 || char_per_pixel <= 0 ) { fprintf( stderr, "can't handle char_per_pixel: %d\n", char_per_pixel ); return 0; } #ifdef DEBUG fprintf( stderr, "xpm: w=%d h=%d ncol=%d cpp=%d\n", *w, *h, *ncol, char_per_pixel ); #endif memset( set, 0, sizeof *set * NMAPS ); for ( i = 0; i < NMAPS; i++ ) maps[ i ] = malloc( *ncol * sizeof **maps ); /* Read the colormap. We handle color, grayscale mono only */ for ( icol = 0; icol < *ncol; icol++ ) { /* Skip comments if any */ while ( fgets( buf, sizeof buf, fp ) && strncmp( buf, "/*", 2 ) == 0 ) /* empty */ ; if ( ( head = strchr( buf, '"' ) ) == 0 ) { fprintf( stderr, "bad color line:%s", buf ); return 0; } else head++; strncpy( key, head, char_per_pixel ); key[ char_per_pixel ] = '\0'; head += char_per_pixel + 1; loop: sscanf( head, " %s %s %n", ckey, val, &n ); if ( val[ strlen( val ) - 1 ] == '"') val[ strlen( val ) - 1 ] = '\0'; if ( val[ strlen( val ) - 1 ] == ',' ) val[ strlen( val ) - 2 ] = '\0'; head += n; /* Find the color code. We do not handle s currently */ for ( match = i = 0; i < NMAPS; i++ ) if ( strcmp( ckey, keys[ i ] ) == 0 ) { match = 1; map = maps[ i ]; set[ i ] = 1; } if ( map != maps[ SMAP ] ) lookup_rgb( val, &r, &g, &b ); if ( ! match ) { fprintf( stderr, "colormode %s not handled\n", ckey ); map = 0; } if ( map ) { strcpy( map[ icol ].key, key ); strcpy( map[ icol ].name, val ); map[ icol ].red = r; map[ icol ].green = g; map[ icol ].blue = b; } if ( *head != '\n' && *head != '\0' && *head != ',' && *head != '"' ) goto loop; } #ifdef DEBUG if ( set[ CMAP ] ) dump_map( "CMAP", maps[ CMAP ], *ncol ); if ( set[ GMAP ] ) dump_map( "GMAP", maps[ GMAP ], *ncol ); if ( set[ G4MAP ] ) dump_map( "G4MAP", maps[ G4MAP ], *ncol ); if ( set[ MMAP ] ) dump_map( "MMAP", maps[ MMAP ], *ncol ); #endif /* Read the pixels */ map = maps[ CMAP ]; p = pixels = malloc( *w * *h * sizeof *pixels ); for ( y = 0; y < *h; y++ ) { while ( fgets( buf, sizeof buf, fp ) && strncmp( buf, "/*", 2 ) == 0 ) /* e,pty */ ; head = strchr( buf, '"' ); for ( x = 0; x < *w; x++ ) { for ( i = 0; i < char_per_pixel; i++ ) key[ i ] = *++head; key[ char_per_pixel ] = '\0'; /* Search colormap for pixel value */ for ( match = icol = 0; ! match && icol < *ncol; icol++ ) { if ( strcmp(map[ icol ].key, key ) == 0 ) { match = 1; *p++ = icol; } } if ( ! match ) { fprintf( stderr, "pixel %s unknown\n", key ); *p++ = 0; } } } return pixels; } /*************************************** * read the standard RGB file and get rid of the spaces in color names * return 1 for success. ***************************************/ static int read_entry( FILE * fp, int * r, int * g, int * b, char * name ) { int n; char buf[ 512 ], *p; if ( ! fgets( buf, sizeof buf, fp ) ) return 0; while ( buf[ 0 ] == '!' ) if ( fgets( buf, sizeof buf, fp ) ) return 0; if ( sscanf( buf, " %d %d %d %n", r, g, b, &n ) != 3 ) return 0; p = buf + n; /* Remove all spaces */ while ( *p ) { if ( *p != ' ' && *p != '\n' ) *name++ = *p; p++; } *name = '\0'; return ! feof( fp ) && ! ferror( fp ); } /*************************************** ***************************************/ #define MAXDBSIZE 1024 static int lookup_rgb( const char * name, int * red, int * green, int * blue ) { static fd2psCMAP *predef, *end; fd2psCMAP *db; int match; FILE *fp; char lname[ 64 ]; static char hexv[ 128 ]; if ( ! predef ) { long ccol, lcol = -1; int r, g, b; for ( r = 0; r < 10; r++ ) hexv[ r + '0' ] = r; for ( r = 10; r <= 15; r++ ) { hexv[ r - 10 + 'a' ] = r; hexv[ r - 10 + 'A' ] = r; } db = predef = malloc( MAXDBSIZE * sizeof *predef ); if ( ! ( fp = fopen( flps->rgbfile, "r" ) ) ) { fprintf( stderr, "can't find RGB database %s\n", flps->rgbfile ); fprintf( stderr, "Alternative files will be tried\n" ); } /* Try some alternative before giving up */ if ( ! fp ) fp = fopen( "/usr/local/lib/X11/rgb.txt", "r" ); if ( ! fp ) fp = fopen( "/etc/X11/rgb.txt", "r" ); #if defined sun || defined __sun__ if ( ! fp ) fp = fopen( "/usr/openwin/lib/rgb.txt", "r" ); #endif #if defined __EMX__ if ( ! fp ) fp = fopen( "/XFree86/lib/X11/rgb.txt", "r" ); #endif #if defined __VMS if ( ! fp ) fp = fopen( "SYS$MANAGER:DECW$RGB.DAT", "r" ); #endif if ( ! fp ) { fprintf( stderr, "no suitable rgb.txt files found\n" ); return -1; } end = predef + MAXDBSIZE; while ( db < end && read_entry( fp, &r, &g, &b, db->name ) ) { db->red = r; db->green = g; db->blue = b; ccol = ( r << 16 ) + ( g << 8 ) + b; if ( ccol != lcol || strcasecmp( lname, db->name ) ) { strcpy( lname, db->name ); lcol = ccol; db++; } } fclose( fp ); } /* Search for special cases: numerical and None */ if ( strcasecmp( name, "None" ) == 0 ) *red = *green = *blue = -1; else if ( *name == '#' ) { if ( ( match = strlen( name ) ) == 7 ) /* #rrggbb */ { *red = ( hexv[ ( int ) name[ 1 ] ] << 4 ) + hexv[ ( int ) name[ 2 ] ]; *green = ( hexv[ ( int ) name[ 3 ] ] << 4 ) + hexv[ ( int ) name[ 4 ] ]; *blue = ( hexv[ ( int ) name[ 5 ] ] << 4 ) + hexv[ ( int ) name[ 6 ] ]; } else if ( match == 13 ) /* #rrrrggggbbbb */ { *red = ( hexv[ ( int ) name[ 1 ] ] << 12 ) + ( hexv[ ( int ) name[ 2 ] ] << 8 ) + ( hexv[ ( int ) name[ 3 ] ] << 4 ) + hexv[ ( int ) name[ 4 ] ]; *green = ( hexv[ ( int ) name[ 5 ] ] << 12 ) + ( hexv [( int ) name[ 6 ] ] << 8 ) + ( hexv[ ( int ) name[ 7 ] ] << 4 ) + hexv[ ( int ) name[ 8 ] ]; *blue = ( hexv[ ( int ) name[ 9 ] ] << 12 ) + ( hexv[ ( int ) name[ 10 ] ] << 8 ) + ( hexv[ ( int ) name[ 11 ] ] << 4 ) + hexv[ ( int ) name[ 12 ] ]; *red = ( *red * 255L ) / 65535L; *green = ( *green * 255L ) / 65535L; *blue = ( *blue * 255L ) / 65535L; } else if ( match == 4 ) { *red = ( hexv[ ( int ) name[ 1 ] ] * 255 ) / 15; *green = ( hexv[ ( int ) name[ 2 ] ] * 255 ) / 15; *blue = ( hexv[ ( int ) name[ 3 ] ] * 255 ) / 15; } else fprintf( stderr, "can't handle color %s\n", name ); } else { /* Search the pre-defined colorname database */ for ( match = 0, db = predef; ! match && db < predef + MAXDBSIZE; db++ ) { if ( strcasecmp(name, db->name ) == 0 ) { match = 1; *red = db->red; *green = db->green; *blue = db->blue; } } if ( ! match ) fprintf( stderr, "colorname %s not found\n", name ); } return 0; } /*************************************** ***************************************/ int xpmtops_direct( const char * file, int xo, int yo, long tran ) { short *pixels; fd2psCMAP *maps[ NMAPS ], *map; int set[ NMAPS ]; int ncols, w, h, i, r, g, b; if ( ! ( pixels = read_xpm( file, &w, &h, &ncols, maps, set ) ) ) return -1; #ifdef DEBUG { int x, y; short *p; fprintf( stderr, "xmapfile: w=%d h=%d ncol=%d\n", w, h, ncols ); for ( p = pixels, y = 0; y < h; y++ ) { for ( x = 0; x < w; x++ ) fprintf( stderr, "%1d", *p++ ); fprintf(stderr, "\n" ); } } #endif /* Make sure we get a usable colormap */ if ( set[ CMAP ] + set[ GMAP ] + set[ G4MAP ] + set[ MMAP ] == 0 ) { fprintf( stderr, "no usable colormap found\n" ); return -1; } if ( set[ CMAP ] ) map = maps[ CMAP ]; else if ( set[ GMAP ]) map = maps[ GMAP ]; else if ( set[ G4MAP ] ) map = maps[ G4MAP ]; else map = maps[ MMAP ]; /* If gray scale, graymap has priority */ if ( ! flps->colorps && set[ GMAP ] ) map = maps[ GMAP ]; /* Fix transparency */ fl_query_imap( tran, &r, &g, &b ); for ( i = 0; i < ncols; i++ ) { if ( map[ i ].red < 0 ) { map[ i ].red = r; map[ i ].green = g; map[ i ].blue = b; } } /* Start outputting */ ps_verbatim( "\n%% Start of pixmap file %s {\n", file ); ps_output( "gsave\n" ); ps_output( "%d %d translate\n", xo, yo ); ( flps->colorps ? image2colorps : image2grayps )( pixels, w, h, map, ncols, 0 ); ps_verbatim( "\ngrestore %%}\n" ); return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/Readme0000644000175000017500000000013311171560225014361 0ustar jensjens fd2ps is a program that translates the fdesign output (.fd files) into a postscript file. xforms-1.0.93sp1/fd2ps/.cvsignore0000644000175000017500000000005711171560225015246 0ustar jensjensfd2ps fd2ps.1 Makefile Makefile.in .deps .libs xforms-1.0.93sp1/fd2ps/test/0000755000175000017500000000000011377311602014224 5ustar jensjensxforms-1.0.93sp1/fd2ps/test/crab.xpm0000644000175000017500000000377211171560225015671 0ustar jensjens/* XPM */ static char * crab[] = { /* crab pixmap * width height ncolors chars_per_pixel */ "28 28 6 2 ", ". c None m None s None ", "x c orange m black s s_orange ", "* c #ff72c2 m black s s_#ff72c2 ", "+ c SteelBlue m white s s_SteelBlue ", "G c black m black s s_black ", "a c LightGrey m white s s_LightGrey ", /* pixels */ ". . . . . . * * * * . . . . . . . . . * * * * . . . . . ", ". . . . + * x x * . . . . . . . . . . + * x x * . . . . ", ". . . + * x x * . . . . . . . . . . . . + * x x * . . . ", ". . + * x * . . . * . . . . . . . . . * . . + * x * . . ", ". . + * x * . . + * . . . . . . . . + * . . + * x * . . ", ". . + * x * . + * * . . . . . . . . + * * . + * x * . . ", ". . + * x * + * * . . . . . . . . . . + * * + * x * . . ", ". . + * x * * * . . . . . . . . . . . . + * * x x * . . ", ". . . + * x * . . + * . . . . . . + * . . + * x * . . . ", ". . . + * x . . + * . + * * . * * . + * . . + x * . . . ", ". . . . + x . . + * . + * * . * * . + * . . + x . . . . ", ". . . . + x . . . + * + * * * * * + * . . . + x . . . . ", ". . . . + * x . . + * * * * * * * * * . . + x * . . . . ", ". . . . . + * x * * * * x x x x x * * * * x * . . . . . ", ". . . . + + + * * x x x x x x x x x x x x * . . . . . . ", ". . + + * x x x x x x x x x x x x x x x x x x * x . . . ", ". + * x x a + * * x x x x x x x x x x x * * a G * x * . ", "+ * x . . . + * * x x x x x x x x x x x * * G . . . x * ", ". . . . . . + * * x x x x x x x x x x x * * . . . . . . ", ". . . . . + * * x x x x x x x x x x x x x * * . . . . . ", ". . . + * x x x * x x x x x x x x x x x * x x x * . . . ", ". . + * x a a + * * x x x x x x x x x * * a a a x * . . ", ". + * x G G G + * * x x x x x x x x x * * a G G G x * . ", ". + * G . . . + * x * x x x x x x x * x * a G . . . * . ", ". . . . . . + * x a * * * x x x * * * a x * G . . . . . ", ". . . . . + * x a G a a * * * * * a a G a x * G . . . . ", ". . . . . + x a G . G G a a a a a G G . G G x a G . . . ", ". . . . . + x a G . . . G G G G G . . . . . x a G . . . " } ; xforms-1.0.93sp1/fd2ps/test/buttons.fd0000644000175000017500000000633411171560225016242 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: fff Width: 340 Height: 170 Number of Objects: 9 -------------------- class: FL_BOX type: ROUNDED3D_UPBOX box: 0 0 340 170 boxtype: FL_ROUNDED3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 40 20 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 40 60 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_INACTIVE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: LightButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 210 10 100 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: RoundButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_BITMAPBUTTON type: NORMAL_BUTTON box: 130 104 45 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: bitmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: picture.xbm fullpath: 1 -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 40 104 45 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: pixmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: xconq.xpm fullpath: 1 -------------------- class: FL_CHECKBUTTON type: NORMAL_BUTTON box: 210 40 110 30 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Checkbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 210 70 90 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Round3dButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 210 115 100 30 boxtype: FL_ROUNDED3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fd2ps/test/picture.xbm0000644000175000017500000000156411171560225016414 0ustar jensjens#define picture_width 32 #define picture_height 32 static char picture_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x18, 0x64, 0x6f, 0xf6, 0x26, 0x0a, 0x00, 0x00, 0x50, 0xf2, 0xff, 0xff, 0x4f, 0x14, 0x04, 0x00, 0x28, 0x14, 0x0e, 0x00, 0x28, 0x10, 0x32, 0x00, 0x08, 0x94, 0x03, 0x00, 0x08, 0xf4, 0x04, 0x00, 0x08, 0xb0, 0x08, 0x00, 0x08, 0x34, 0x01, 0x00, 0x28, 0x34, 0x01, 0x00, 0x28, 0x12, 0x00, 0x40, 0x48, 0x12, 0x20, 0xa6, 0x48, 0x14, 0x50, 0x11, 0x29, 0x14, 0x50, 0x48, 0x2a, 0x10, 0x27, 0xac, 0x0e, 0xd4, 0x71, 0xe8, 0x0a, 0x74, 0x20, 0xa8, 0x0a, 0x14, 0x20, 0x00, 0x08, 0x10, 0x50, 0x00, 0x08, 0x14, 0x00, 0x00, 0x28, 0x14, 0x00, 0x00, 0x28, 0xf2, 0xff, 0xff, 0x4f, 0x0a, 0x00, 0x00, 0x50, 0x64, 0x6f, 0xf6, 0x26, 0x18, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xforms-1.0.93sp1/fd2ps/test/allcmm.fd0000644000175000017500000002045711171560225016013 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: cmm =============== FORM =============== Name: form0 Width: 20969 Height: 13867 Number of Objects: 25 -------------------- class: FL_BOX type: UP_BOX box: 0 0 20969 13867 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 676 676 2030 1015 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 3044 676 1691 1015 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: frame shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 5073 676 3382 1353 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: lframe shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 8794 676 2029 1015 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Text shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BITMAP type: NORMAL_BITMAP box: 1015 2706 1691 1014 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: bitmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAP type: NORMAL_PIXMAP box: 9132 10485 1691 1352 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: pixmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHART type: BAR_CHART box: 3720 3044 4059 2029 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: chart shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CLOCK type: ANALOG_CLOCK box: 8117 2367 2368 2030 boxtype: FL_UP_BOX colors: FL_INACTIVE FL_BOTTOM_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: clock shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 676 4735 2030 1015 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 676 6088 2368 1014 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RButton shortcut: R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 676 7441 2368 1014 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: R3DButton shortcut: 3 resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 676 8794 2368 1014 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CButton shortcut: C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SLIDER type: HOR_SLIDER box: 11837 676 6088 1015 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.20 slsize: 0.12 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 11837 2029 6088 1015 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.60 -------------------- class: FL_DIAL type: FILL_DIAL box: 11161 3720 3044 2706 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Dial shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.7 -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 16572 3382 3383 3044 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: xvalue: 0.2 yvalue: 0.2 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 5750 5750 4058 1014 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.2 -------------------- class: FL_COUNTER type: SIMPLE_COUNTER box: 5750 7102 4058 1015 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.4 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 5073 8794 6088 1014 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 11499 9132 3044 1014 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 13867 6764 2705 1015 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 15220 8117 4396 3382 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TIMER type: VALUE_TIMER box: 12514 11837 2706 1015 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Timer shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_XYPLOT type: NORMAL_XYPLOT box: 2367 9808 5412 3721 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fd2ps/test/all.fd0000644000175000017500000002145311171560225015313 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: form0 Width: 701 Height: 471 Number of Objects: 27 -------------------- class: FL_BOX type: UP_BOX box: 0 0 701 471 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 20 20 60 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 90 20 50 30 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: frame shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 150 20 100 40 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: lframe shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 260 20 60 30 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Text shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BITMAP type: NORMAL_BITMAP box: 30 80 50 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: bitmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAP type: NORMAL_PIXMAP box: 270 310 50 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: pixmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHART type: BAR_CHART box: 110 90 120 60 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: chart shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CLOCK type: ANALOG_CLOCK box: 240 70 70 60 boxtype: FL_UP_BOX colors: FL_INACTIVE FL_BOTTOM_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: clock shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 140 60 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 20 180 70 30 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RButton shortcut: R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 20 220 70 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: R3DButton shortcut: 3 resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 20 260 70 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CButton shortcut: C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SLIDER type: HOR_SLIDER box: 350 20 180 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.20 slsize: 0.12 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 350 60 180 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.60 -------------------- class: FL_DIAL type: FILL_DIAL box: 330 110 90 80 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Dial shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.7 -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 490 100 100 90 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: xvalue: 0.2 yvalue: 0.2 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 170 170 120 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.2 -------------------- class: FL_COUNTER type: SIMPLE_COUNTER box: 170 210 120 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.4 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 150 260 180 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 340 270 90 30 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 410 200 80 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 450 240 130 100 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TIMER type: VALUE_TIMER box: 370 350 80 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Timer shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_XYPLOT type: NORMAL_XYPLOT box: 80 300 170 130 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SCROLLBAR type: HOR_SCROLLBAR box: 500 410 170 15 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SCROLLBAR type: VERT_THIN_SCROLLBAR box: 620 50 17 180 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1.00 ============================== create_the_forms xforms-1.0.93sp1/fd2ps/test/parameter.xpm0000644000175000017500000000527211171560225016737 0ustar jensjens/* XPM */ /* @(#)26 1.1 src/gos/apps/pm/icons/parameter.pm, pwrgui, gos41J, 9512A_all 3/21/95 00:54:58 * * COMPONENT_NAME: PWRGUI * * FUNCTIONS: none * * ORIGINS: 27 * * * (C) COPYRIGHT International Business Machines Corp. 1995 * All Rights Reserved * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ static char * Parameter[] = { /* width height ncolors cpp [x_hot y_hot] */ "40 40 12 1 0 0", /* colors */ " s none m none c none", ". s iconColor1 m black c black", "X s iconGray1 m white c #e1e1e1e1e1e1", "o s iconGray2 m white c #c8c8c8c8c8c8", "O s iconColor5 m black c blue", "+ s iconColor7 m white c cyan", "@ s iconGray5 m black c #7d7d7d7d7d7d", "# s iconGray6 m black c #646464646464", "$ s iconColor2 m white c white", "% s iconGray3 m white c #afafafafafaf", "& s iconGray4 m white c #969696969696", "* s iconGray7 m black c #4b4b4b4b4b4b", /* pixels */ " ", " ...... ................... ", " ..XXXXXX.. .ooooooooooooooooooo. ", " .XXXXXXXXXX. .ooooooooooooooooooo. ", " .XXXXXXXXXX. .oo...............oo. ", " ...XXXXXX... .oo.O+O+O+O+O+O+O.oo. ", " .Xo......@#. .oo.+$+O+O+O+O+O+.oo. ", " .Xoo%%&&&@#. .oo.O+O+O+O+O+O+O.oo. ", " .Xoo%%&&&@#. .oo.+O+O+O+O+O+O+.oo. ", " .Xoo%%&&&@#. .oo.O+O+O+O+O+O+O.oo. ", " .Xoo%%&&&@#. .oo.+O+O+O+O+O+O+.oo. ", " .Xoo%%&&&@#. .oo.O+O+O+O+O+O+O.oo. ", " .Xoo%%&&&@#. .oo.+O+O+O+O+O+O+.oo. ", " .Xoo%%&&&@#. .oo.O+O+O+O+O+O+O.oo. ", " .Xoo%%&&&@#. .oo.+O+O+O+O+O+O+.oo. ", " .Xoo%%&&&@#. .oo...............oo. ", " ..o%%&&&.. .ooooooooooooooooooo. ", " ...... .ooooooooooooooooooo. ", " ................... ", " .&&&&&&&. ", " .&&&&&&&. ", " ..................... ", " .ooooooooooooooooooooo. ", " .o*$o*$o*$oo*$o*$o*$oo. ", " . .o**o**o**oo**o**o**$o. ", " ..*. .o*$o*$o*$o*$$o*$o*$o*oo. ", " ..****..o**o**o**o***o**o**o**o. ", " ...***&&**.ooooooooooooooooooooooo. ", " ..****&&*****........................ ", " ..**&&****&&&*. ", " # .*****&&*****. ", " # #.**&&****&&**. ", " # # .*****&&*****. ", " # #.**&&*******. ", " # .********..# ", " # #.*****..# # ", " # .**..# # # ", " # #..# # # ", " # # # ", " # # "}; xforms-1.0.93sp1/fd2ps/test/allpoint.fd0000644000175000017500000002054611171560225016367 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_centiPOINT =============== FORM =============== Name: form0 Width: 59441 Height: 39307 Number of Objects: 25 -------------------- class: FL_BOX type: UP_BOX box: 0 0 59441 39307 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 1917 1917 5753 2877 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 8628 1917 4794 2877 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: frame shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 14381 1917 9587 3835 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: lframe shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 24927 1917 5752 2877 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Text shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BITMAP type: NORMAL_BITMAP box: 2876 7670 4794 2876 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: bitmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAP type: NORMAL_PIXMAP box: 25885 29720 4794 3835 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: pixmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHART type: BAR_CHART box: 10546 8628 11504 5753 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: chart shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CLOCK type: ANALOG_CLOCK box: 23009 6711 6711 5752 boxtype: FL_UP_BOX colors: FL_INACTIVE FL_BOTTOM_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: clock shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 1917 13422 5753 2876 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 1917 17257 6711 2876 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RButton shortcut: R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 1917 21092 6711 2876 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: R3DButton shortcut: 3 resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 1917 24927 6711 2876 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CButton shortcut: C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SLIDER type: HOR_SLIDER box: 33555 1917 17257 2877 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.20 slsize: 0.12 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 33555 5752 17257 2876 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.60 -------------------- class: FL_DIAL type: FILL_DIAL box: 31638 10546 8628 7670 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Dial shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.7 -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 46977 9587 9587 8629 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: xvalue: 0.2 yvalue: 0.2 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 16298 16298 11505 2876 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.2 -------------------- class: FL_COUNTER type: SIMPLE_COUNTER box: 16298 20133 11505 2876 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.4 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 14381 24927 17257 2876 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 32596 25885 8629 2877 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 39307 19174 7670 2876 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 43142 23009 12464 9587 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TIMER type: VALUE_TIMER box: 35473 33555 7669 2876 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Timer shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_XYPLOT type: NORMAL_XYPLOT box: 6711 27803 15339 10546 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fd2ps/test/Makefile.am0000644000175000017500000000035511171560225016262 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = \ allcmm.fd \ all.fd \ allpoint.fd \ bm1.xbm \ buttons.fd \ crab.xpm \ dial.fd \ fd_logo.xpm \ folder_gui.fd \ junk.fd \ parameter.xpm \ picture.xbm \ sym.fd \ xconq.xpm xforms-1.0.93sp1/fd2ps/test/xconq.xpm0000644000175000017500000000254011171560225016102 0ustar jensjens/* XPM */ static char * xconq [] = { "32 32 5 1", " s None c None g4 None", ". m black c black g4 black", "X m white c SkyBlue g4 grey80", "o m white c LightGray g4 grey50", "O m white c OliveDrab g4 grey40", " ", " . ", " ..X.. ", " ..XXXXX.. ", " ..XXXXXXXXX.. ", " ..XXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXX.XXXXXXX.. ", " .XXXXXXXXXXXXXXXXXXX.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXX..........XXXXXX. ", " .XXXXXXXXXX...oooooooo.XXXXXX. ", " .X..........ooooooooo..XXXXXX. ", " .XXXXXXXXXX.................X. ", " .XXXXXXX...............oooo.X. ", " .XXXXXX..oooooooooooooooooo.X. ", " .XXXXXX....................XX. ", " .XXXXXXX..o.o.o.o.o.o.oo..XXX. ", " .XXXXXXXX................XXXX. ", " .............................. ", " .OOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", " ..OO.O.O.O.O.O.O.O.O.O.O.O.OO. ", " ..O.O.O.O.O.O.O.O.O.O.O.O.. ", " ..OO.O.O.O.O.O.O.O.OO.. ", " ..O.O.O.O.O.O.O.O.. ", " ..OO.O.O.O.OO.. ", " ..O.O.O.O.. ", " ..OOO.. ", " ... "}; xforms-1.0.93sp1/fd2ps/test/fd_logo.xpm0000644000175000017500000000455711171560225016375 0ustar jensjens/* XPM */ static char *fd_logo_pixels[] = { /* fd logo * width height ncolors chars_per_pixel */ "64 32 4 1 ", "b c None m None", "` c #ff6144 m White", "a c #cecece m None", "c c #282828 m None", /* pixels */ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbaaaaaaaabbaaaaabbaaaaaaabbaaaabbbaaaabbbbbbbbbbbbbbb", "bbbbbbbbbbbba```````caa````cba``````cba```cbaa```cbbbbbbbbbbbbbb", "bbbbbbbbbbbbbc``cc``ca``cc``cbc``cc``cbc```ca```ccbbbbbbbbbbbbbb", "bbbbbbbbbbbbba``cac`c``ccbc``ca``ca``cba```ca```cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbba``c`ccc``cbba``ca``ca``cba```c`c``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbba````cba``cbba``ca`````ccba`c```c``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbba``c`cba``cbba``ca``c``cbba`c```c``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbba``cccba``cbaa``ca``cc``cba`cc`cc``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbaa``cbbbbc``ca``cca``cac``ca`ca`ca``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbba````cbbbbc````cca````c```````ccc````cbbbbbbbbbbbbbb", "bbbbbbbbbbbbbcccccbbbbbcccccbbcccccccccccccbbcccccbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "aaaaaabbaaaaaaaabaaaaaaaaaaabbaaaaaabaaaabaaaaaaaaaaaaaaaaaaabbb", "``````cba```````ca`````c````caa```c`ca```ca```c```````c``````cbb", "c``cc``cbc``cc``c``cc``cc``cca``cc``cbc```cc`ccc``cc``cc``cc``cb", "a``cbc``ca``cac`c``cbc`ca``ca``ccbc`cba```ca`cba``cac`ca``ca``cb", "a``cba``ca``c`ccc```cacca``ca``cbbbccba`c``c`cba``c`ccca``ca``cb", "a``cba``ca````cbbc````cba``ca``caaaaaba`c``c`cba````cbba`````ccb", "a``cba``ca``c`caaacc```ca``ca``ca````ca`cc```cba``c`caba``c``cbb", "a``caa``ca``ccc`c`cbc``ca``ca``cbc``cca`ca```cba``ccc`ca``cc``cb", "a``ca``cca``ca``c``ca``ca``cbc``ca``caa`cbc``caa``ca``ca``cac``c", "``````cca```````c`````cc````cbc````cca```cbc`ca```````c````c````", "cccccccbbccccccccccccccbcccccbbcccccbbccccbbccbccccccccccccccccc", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" }; xforms-1.0.93sp1/fd2ps/test/.cvsignore0000644000175000017500000000002511171560225016220 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/fd2ps/test/folder_gui.fd0000644000175000017500000003535111171560225016664 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 6 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: buttonform Width: 430 Height: 210 Number of Objects: 10 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 430 210 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 30 151 80 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 40 91 100 30 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RoundButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 135 151 110 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Round3DButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 170 111 110 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CheckButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 30 31 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LightButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 320 36 80 80 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: PixmapButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: porsche.xpm fullpath: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 185 26 100 30 boxtype: FL_ROUNDED3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 290 146 100 30 boxtype: FL_EMBOSSED_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 175 71 60 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_SLATEBLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: staticform Width: 431 Height: 211 Number of Objects: 8 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 431 211 boxtype: FL_FLAT_BOX colors: FL_INDIANRED FL_INDIANRED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_INDIANRED label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 40 40 60 45 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: A Box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 130 30 120 55 boxtype: FL_NO_BOX colors: FL_BLACK FL_INDIANRED alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LabelFrame shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHART type: PIE_CHART box: 270 20 130 105 boxtype: FL_BORDER_BOX colors: FL_INDIANRED FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: chart callback: argument: -------------------- class: FL_CLOCK type: ANALOG_CLOCK box: 30 100 85 85 boxtype: FL_UP_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BITMAP type: NORMAL_BITMAP box: 150 140 30 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAP type: NORMAL_PIXMAP box: 210 120 60 60 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 310 150 70 25 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Text shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: mainform Width: 461 Height: 291 Number of Objects: 8 -------------------- class: FL_BOX type: UP_BOX box: 0 0 461 291 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 381 250 64 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: done callback: done_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 15 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Hide shortcut: #H resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hide callback: hide_show_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 79 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Show shortcut: #S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: show callback: hide_show_cb argument: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 155 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: ReShow shortcut: #R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: reshow callback: reshow_cb argument: 0 -------------------- class: FL_TABFOLDER type: TOP_TABFOLDER box: 15 11 435 230 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: folder callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 232 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Set shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: set callback: set_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 296 249 69 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Deactivate shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: deactivate callback: deactivate_cb argument: 0 =============== FORM =============== Name: valuatorform Width: 431 Height: 211 Number of Objects: 10 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 431 211 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 280 50 82 72 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: xvalue: 0.679012 yvalue: 0.71831 -------------------- class: FL_VALSLIDER type: HOR_NICE_SLIDER box: 55 10 240 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.87 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 130 110 110 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: -1.0 -------------------- class: FL_SLIDER type: VERT_NICE_SLIDER box: 10 30 20 160 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.49 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 70 170 150 21 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.10 -------------------- class: FL_SLIDER type: HOR_FILL_SLIDER box: 69 57 159 22 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_SLATEBLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.25 -------------------- class: FL_DIAL type: NORMAL_DIAL box: 60 90 60 58 boxtype: FL_UP_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SCROLLBAR type: VERT_THIN_SCROLLBAR box: 394 14 18 180 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.20 -------------------- class: FL_SCROLLBAR type: HOR_SCROLLBAR box: 238 158 140 16 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.25 =============== FORM =============== Name: choiceform Width: 431 Height: 211 Number of Objects: 5 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 431 211 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 45 36 45 21 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_LEFT_BCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pulldown callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 24 93 111 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: choice callback: argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 257 14 154 179 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browser callback: argument: -------------------- class: FL_MENU type: PUSH_MENU box: 152 51 75 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pushmenu callback: argument: =============== FORM =============== Name: inputform Width: 430 Height: 210 Number of Objects: 3 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 430 210 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: MULTILINE_INPUT box: 70 20 280 90 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: MultiLine\nInput shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 80 132 250 34 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fd2ps/test/sym.fd0000644000175000017500000004370311171560225015355 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: form0 Width: 411 Height: 261 Number of Objects: 57 -------------------- class: FL_BOX type: UP_BOX box: 0 0 411 261 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 15 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 10 50 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 75 15 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 65 50 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 130 15 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @UpArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 110 50 70 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @UpArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 185 15 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @>> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 180 50 40 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @>> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 240 15 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @DnArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 225 50 60 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @DnArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 295 15 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @+ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: RFLAT_BOX box: 295 50 45 20 boxtype: FL_RFLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @+ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 350 15 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @>| shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 340 50 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @>| shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 75 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @circle shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 10 110 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @circle shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 75 75 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @|> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 65 110 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @|> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 130 75 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @square shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 120 110 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @square shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 185 75 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @= shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 175 110 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @= shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 240 75 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @UpLine shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 230 110 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @Upline shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 295 75 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @->| shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 285 110 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @->| shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 350 75 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @--> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 340 110 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @--> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 135 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @9-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 10 170 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @9-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 75 135 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @2UpArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 55 170 65 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @2UpArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 130 135 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @8|> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 125 170 45 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @8|> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 185 135 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @9+ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 175 170 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @9+ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 240 135 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @8DnArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 220 170 70 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @8DnArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 295 135 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @2>| shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 290 170 45 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @8>| shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 350 135 35 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @<-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 340 170 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @<-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 195 35 35 boxtype: FL_OVAL3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @2|> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 10 230 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @2|> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 75 195 35 35 boxtype: FL_OVAL3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @-51+ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 65 230 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @1+ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 130 195 35 35 boxtype: FL_OVAL3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @UpArrow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 120 230 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @+ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 185 195 35 35 boxtype: FL_OVAL3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @>> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 175 230 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @>> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 240 195 35 35 boxtype: FL_OVAL3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @<< shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 230 230 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @<< shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 295 195 35 35 boxtype: FL_OVAL3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 285 230 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 350 195 35 35 boxtype: FL_OVAL3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BOTTOM_BCOL label: @< shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: FLAT_BOX box: 340 230 55 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: @< shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fd2ps/test/bm1.xbm0000644000175000017500000000044011171560225015410 0ustar jensjens #define bm1_width 16 #define bm1_height 16 static unsigned char bm1_bits[] = { 0x00, 0x00, 0x00, 0x57, 0x7c, 0x72, 0xc4, 0x52, 0xc4, 0x00, 0x44, 0x01, 0x44, 0x1f, 0xfc, 0x22, 0x40, 0x42, 0x40, 0x44, 0x40, 0x43, 0xc0, 0x40, 0x70, 0x40, 0x8c, 0x20, 0x00, 0x1f, 0x00, 0x00 }; xforms-1.0.93sp1/fd2ps/test/dial.fd0000644000175000017500000000357011171560225015454 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -2 =============== FORM =============== Name: form0 Width: 320 Height: 155 Number of Objects: 5 -------------------- class: FL_BOX type: UP_BOX box: 0 0 320 155 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 10 15 300 120 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_TIMESBOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Dials shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_DIAL type: LINE_DIAL box: 20 37 80 75 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BOTTOM_BCOL alignment: FL_ALIGN_BOTTOM style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LineDial shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.75 -------------------- class: FL_DIAL type: FILL_DIAL box: 120 37 80 75 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BOTTOM_BCOL alignment: FL_ALIGN_BOTTOM style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: FillDial shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.65 -------------------- class: FL_DIAL type: NORMAL_DIAL box: 220 37 80 75 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BOTTOM_BCOL alignment: FL_ALIGN_BOTTOM style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: NormalDial shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.2 ============================== create_the_forms xforms-1.0.93sp1/fd2ps/test/Makefile.in0000644000175000017500000002426211377311602016277 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = fd2ps/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = \ allcmm.fd \ all.fd \ allpoint.fd \ bm1.xbm \ buttons.fd \ crab.xpm \ dial.fd \ fd_logo.xpm \ folder_gui.fd \ junk.fd \ parameter.xpm \ picture.xbm \ sym.fd \ xconq.xpm all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fd2ps/test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fd2ps/test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/fd2ps/test/junk.fd0000644000175000017500000000236411171560225015512 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: form0 Width: 320 Height: 250 Number of Objects: 3 -------------------- class: FL_BOX type: UP_BOX box: 0 0 320 250 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 40 30 120 70 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: fd_logo.xpm fullpath: 1 -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 170 130 100 90 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: parameter.xpm fullpath: 1 ============================== create_the_forms xforms-1.0.93sp1/fd2ps/flsupport.c0000644000175000017500000003146211247055071015456 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file flsupport.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Support routines to convert string/numeric values of * object classes and types */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include #include "fd2ps.h" #define MAXTYPES 17 typedef struct { int val; const char * name; } VN_Pair; #define VN_pair VN_Pair /*************************************** ***************************************/ static int get_vn_val( VN_pair * vn, const char * name ) { for ( ; vn->val >= 0; vn++ ) if ( strcmp(name, vn->name) == 0 ) return vn->val; return atoi( name ); } /*************************************** ***************************************/ static const char * get_vn_name( VN_pair * vn, int val ) { static char buf[ 128 ]; for ( ; vn->val >= 0; vn++ ) if ( vn->val == val ) return vn->name; sprintf( buf, "%d", val ); return buf; } typedef struct { VN_Pair classobj; VN_Pair objtype[ MAXTYPES ]; } AllObj; #define VNP( a ) { a, #a } #define VN( a ) { a, #a } static AllObj allobj[ ] = { /* begin button class */ { VNP( FL_BUTTON ), { VNP( FL_NORMAL_BUTTON ), VNP( FL_PUSH_BUTTON ), VNP( FL_RADIO_BUTTON ), VNP( FL_HIDDEN_BUTTON ), VNP( FL_TOUCH_BUTTON ), VNP( FL_INOUT_BUTTON ), VNP( FL_RETURN_BUTTON ), VNP(FL_HIDDEN_RET_BUTTON ), VNP( FL_MENU_BUTTON ), VNP( -1 ) } }, { VNP( FL_LIGHTBUTTON ), { VNP( FL_NORMAL_BUTTON ), VNP( FL_PUSH_BUTTON ), VNP( FL_RADIO_BUTTON ), VNP( FL_HIDDEN_BUTTON ), VNP( FL_TOUCH_BUTTON ), VNP( FL_INOUT_BUTTON ), VNP( FL_RETURN_BUTTON ), VNP( FL_HIDDEN_RET_BUTTON ), VNP( -1 ) } }, { VNP( FL_ROUNDBUTTON ), { VNP( FL_NORMAL_BUTTON ), VNP( FL_PUSH_BUTTON ), VNP( FL_RADIO_BUTTON ), VNP( FL_HIDDEN_BUTTON ), VNP( FL_TOUCH_BUTTON ), VNP( FL_INOUT_BUTTON ), VNP( FL_RETURN_BUTTON ), VNP( FL_HIDDEN_RET_BUTTON ), VNP( -1 ) } }, { VNP( FL_ROUND3DBUTTON ), { VNP( FL_NORMAL_BUTTON ), VNP( FL_PUSH_BUTTON ), VNP( FL_RADIO_BUTTON ), VNP( FL_HIDDEN_BUTTON ), VNP( FL_TOUCH_BUTTON ), VNP( FL_INOUT_BUTTON ), VNP( FL_RETURN_BUTTON ), VNP( FL_HIDDEN_RET_BUTTON ), VNP( -1) } }, { VNP(FL_SCROLLBUTTON), { VNP(FL_NORMAL_BUTTON), VNP(FL_PUSH_BUTTON), VNP(FL_RADIO_BUTTON), VNP(FL_HIDDEN_BUTTON), VNP(FL_TOUCH_BUTTON), VNP(FL_INOUT_BUTTON), VNP(FL_RETURN_BUTTON), VNP(FL_HIDDEN_RET_BUTTON), VNP(-1) } }, { VNP(FL_BITMAPBUTTON), { VNP(FL_NORMAL_BUTTON), VNP(FL_PUSH_BUTTON), VNP(FL_RADIO_BUTTON), VNP(FL_HIDDEN_BUTTON), VNP(FL_TOUCH_BUTTON), VNP(FL_INOUT_BUTTON), VNP(FL_RETURN_BUTTON), VNP(FL_HIDDEN_RET_BUTTON), VNP(-1) } }, { VNP(FL_PIXMAPBUTTON), { VNP(FL_NORMAL_BUTTON), VNP(FL_PUSH_BUTTON), VNP(FL_RADIO_BUTTON), VNP(FL_HIDDEN_BUTTON), VNP(FL_TOUCH_BUTTON), VNP(FL_INOUT_BUTTON), VNP(FL_RETURN_BUTTON), VNP(FL_HIDDEN_RET_BUTTON), VNP(-1) } }, { VNP(FL_CHECKBUTTON), { VNP(FL_NORMAL_BUTTON), VNP(FL_PUSH_BUTTON), VNP(FL_RADIO_BUTTON), VNP(FL_HIDDEN_BUTTON), VNP(FL_TOUCH_BUTTON), VNP(FL_INOUT_BUTTON), VNP(FL_RETURN_BUTTON), VNP(FL_HIDDEN_RET_BUTTON), VNP(-1) } }, { VNP(FL_LABELBUTTON), { VNP(FL_NORMAL_BUTTON), VNP(FL_PUSH_BUTTON), VNP(FL_RADIO_BUTTON), VNP(FL_HIDDEN_BUTTON), VNP(FL_TOUCH_BUTTON), VNP(FL_INOUT_BUTTON), VNP(FL_RETURN_BUTTON), VNP(FL_HIDDEN_RET_BUTTON), VNP(-1) } }, /* end of buttons of all kinds } */ { VNP(FL_BITMAP), { VNP(FL_NORMAL_BITMAP), VNP(-1) } }, { VNP(FL_PIXMAP), { VNP(FL_NORMAL_PIXMAP), VNP(-1) } }, { VNP(FL_MENU), { VNP(FL_PULLDOWN_MENU), VNP(FL_TOUCH_MENU), VNP(FL_PUSH_MENU), VNP(-1) } }, { VNP(FL_BOX), { VNP(FL_NO_BOX), VNP(FL_UP_BOX), VNP(FL_DOWN_BOX), VNP(FL_FLAT_BOX), VNP(FL_BORDER_BOX), VNP(FL_SHADOW_BOX), VNP(FL_FRAME_BOX), VNP(FL_RFLAT_BOX), VNP(FL_EMBOSSED_BOX), VNP(FL_ROUNDED_BOX), VNP(FL_RSHADOW_BOX), VNP(FL_OVAL_BOX), VNP(FL_ROUNDED3D_UPBOX), VNP(FL_ROUNDED3D_DOWNBOX), VNP(FL_OVAL3D_UPBOX), VNP(FL_OVAL3D_DOWNBOX), VNP(-1) } }, { VNP(FL_TEXT), { VNP(FL_NORMAL_TEXT), VNP(-1), } }, { VNP(FL_CHART), { VNP(FL_BAR_CHART), VNP(FL_HORBAR_CHART), VNP(FL_LINE_CHART), VNP(FL_FILLED_CHART), VNP(FL_PIE_CHART), VNP(FL_SPECIALPIE_CHART), VNP(-1) } }, { VNP(FL_CHOICE), { VNP(FL_NORMAL_CHOICE), VNP(FL_NORMAL_CHOICE2), VNP(FL_DROPLIST_CHOICE), VNP(-1), } }, { VNP(FL_COUNTER), { VNP(FL_NORMAL_COUNTER), VNP(FL_SIMPLE_COUNTER), VNP(-1) } }, { VNP(FL_SLIDER), { VNP(FL_VERT_SLIDER), VNP(FL_HOR_SLIDER), VNP(FL_VERT_FILL_SLIDER), VNP(FL_HOR_FILL_SLIDER), VNP(FL_VERT_NICE_SLIDER), VNP(FL_HOR_NICE_SLIDER), VNP(FL_HOR_BROWSER_SLIDER), VNP(FL_VERT_BROWSER_SLIDER), VNP(FL_HOR_THIN_SLIDER), VNP(FL_VERT_THIN_SLIDER), VNP(FL_HOR_BROWSER_SLIDER2), VNP(FL_VERT_BROWSER_SLIDER2), VNP(-1) } }, { VNP(FL_VALSLIDER), { VNP(FL_VERT_SLIDER), VNP(FL_HOR_SLIDER), VNP(FL_VERT_FILL_SLIDER), VNP(FL_HOR_FILL_SLIDER), VNP(FL_VERT_NICE_SLIDER), VNP(FL_HOR_NICE_SLIDER), VNP(FL_HOR_BROWSER_SLIDER), VNP(FL_VERT_BROWSER_SLIDER), VNP(-1) } }, { VNP(FL_SCROLLBAR), { VNP(FL_VERT_SCROLLBAR), VNP(FL_HOR_SCROLLBAR), VNP(FL_VERT_THIN_SCROLLBAR), VNP(FL_HOR_THIN_SCROLLBAR), VNP(FL_VERT_NICE_SCROLLBAR), VNP(FL_HOR_NICE_SCROLLBAR), VNP(FL_VERT_BASIC_SCROLLBAR), VNP(FL_HOR_BASIC_SCROLLBAR), VNP(-1) } }, { VNP(FL_THUMBWHEEL), { VNP(FL_VERT_THUMBWHEEL), VNP(FL_HOR_THUMBWHEEL), VNP(-1) } }, { VNP(FL_INPUT), { VNP(FL_NORMAL_INPUT), VNP(FL_FLOAT_INPUT), VNP(FL_INT_INPUT), VNP(FL_HIDDEN_INPUT), VNP(FL_MULTILINE_INPUT), VNP(FL_SECRET_INPUT), VNP(-1), } }, { VNP(FL_BROWSER), { VNP(FL_NORMAL_BROWSER), VNP(FL_SELECT_BROWSER), VNP(FL_HOLD_BROWSER), VNP(FL_MULTI_BROWSER), VNP(-1), } }, { VNP(FL_TIMER), { VNP(FL_NORMAL_TIMER), VNP(FL_VALUE_TIMER), VNP(FL_HIDDEN_TIMER), VNP(-1) } }, { VNP(FL_DIAL), { VNP(FL_NORMAL_DIAL), VNP(FL_LINE_DIAL), VNP(FL_FILL_DIAL), VNP(-1) } }, { VNP(FL_POSITIONER), { VNP(FL_NORMAL_POSITIONER), VNP(FL_OVERLAY_POSITIONER), VNP(-1) } }, { VNP(FL_XYPLOT), { VNP(FL_NORMAL_XYPLOT), VNP(FL_SQUARE_XYPLOT), VNP(FL_CIRCLE_XYPLOT), VNP(FL_FILL_XYPLOT), VNP(FL_POINTS_XYPLOT), VNP(FL_DASHED_XYPLOT), VNP(FL_ACTIVE_XYPLOT), VNP(-1) } }, { VNP(FL_FRAME), { VNP(FL_UP_FRAME), VNP(FL_DOWN_FRAME), VNP(FL_ENGRAVED_FRAME), VNP(FL_EMBOSSED_FRAME), VNP(FL_BORDER_FRAME), VNP(-1) } }, { VNP(FL_LABELFRAME), { VNP(FL_UP_FRAME), VNP(FL_DOWN_FRAME), VNP(FL_ENGRAVED_FRAME), VNP(FL_EMBOSSED_FRAME), VNP(FL_BORDER_FRAME), VNP(-1) } }, { VNP(FL_CLOCK), { VNP(FL_ANALOG_CLOCK), VNP(FL_DIGITAL_CLOCK), VNP(-1) } }, { VNP(FL_FREE), { VNP(FL_NORMAL_FREE), VNP(FL_INACTIVE_FREE), VNP(FL_INPUT_FREE), VNP(FL_CONTINUOUS_FREE), VNP(FL_ALL_FREE), VNP(-1) } }, { VNP(FL_TIMER), { VNP(FL_NORMAL_TIMER), VNP(FL_VALUE_TIMER), VNP(FL_HIDDEN_TIMER), VNP(-1) } }, /* special: groups */ { VNP(FL_BEGIN_GROUP), { VNP(0), VNP(-1) } }, { VNP(10000), { VNP(0), VNP(-1) } }, { VNP(FL_END_GROUP), { VNP(0), VNP(-1) } }, { VNP(20000), { VNP(0), VNP(-1) } }, /* sentinel */ { VNP(-1), { VNP(-1) } } }; /*************************************** ***************************************/ static AllObj * find_valp( int val ) { AllObj *ob = allobj; for ( ; ob->classobj.val >= 0; ob++ ) if ( ob->classobj.val == val ) return ob; return NULL; } /*************************************** ***************************************/ static AllObj * find_namep( const char * name ) { AllObj *ob = allobj; for ( ; ob->classobj.val >= 0; ob++ ) if ( strcmp( name, ob->classobj.name ) == 0 || strcmp( name, ob->classobj.name + 3 ) == 0 ) return ob; fprintf( stderr, "%s definition not found\n", name ); return NULL; } /*************************************** ***************************************/ int find_class_val( const char * name ) { AllObj *ob = find_namep (name ); return ob ? ob->classobj.val : atoi( name ); } /*************************************** ***************************************/ const char * find_class_name( int val ) { AllObj *ob = find_valp( val ); return ob ? ob->classobj.name : "??"; } /*************************************** ***************************************/ int find_type_val( int objclass, const char * name ) { AllObj *ob = find_valp( objclass ); VN_Pair *vnp; if ( ! ob ) return 0; for ( vnp = ob->objtype; vnp->val >= 0; vnp++ ) if ( strcmp( name, vnp->name ) == 0 || strcmp( name, vnp->name + 3 ) == 0 ) return vnp->val; if ( ! isdigit( ( int ) *name ) ) fprintf( stderr, "class %s type %s not found\n", ob->classobj.name, name ); return atoi( name ); } static VN_Pair vn_unit[ ] = { VN(FL_COORD_PIXEL), {FL_COORD_PIXEL, "pixel"}, VN(FL_COORD_MM), {FL_COORD_MM, "mm"}, VN(FL_COORD_POINT), {FL_COORD_POINT, "point"}, VN(FL_COORD_centiPOINT), {FL_COORD_centiPOINT, "cp"}, {FL_COORD_centiMM, "cmm"}, {FL_COORD_centiPOINT, "cpoint"}, VN(-1) }; /*************************************** ***************************************/ int unit_val( const char * name ) { return get_vn_val( vn_unit, name ); } /*************************************** ***************************************/ const char * unit_name( int u ) { return get_vn_name( vn_unit, u ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/fd2ps.c0000644000175000017500000001674111247055071014441 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd2ps.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Read in a form defination file (.fd) and write an EPS output * for inclusion in a document */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" #include "fd2ps.h" #include "global.h" static int parse_command_line( int argc, char * argv[ ] ); static void usage( const char *, int ); static void fd2ps_init( void ); static char *helpmsg[ ] = { "-h this help", "-dpi f specifies the pixel/length conversion", "-gray requests grayscale output", "-l requests landscape output", "-p requests portrait output", "-bw n sets object border width", "-eps requests Encapsulated PostScript", "-G f specifies gamma", "-verbose specifies verbose output", "-version prints version info and exits", "-paper s specifies paper name (A4 etc). Use all for a list", "-pw f specifies paper width (in inches)", "-ph f specifies paper height (in inches)", 0 }; /*************************************** ***************************************/ static void usage( const char * cmd, int die ) { char **q = helpmsg; fprintf( stderr, "Usage: %s [options] infile.[fd] [outfile]\n", cmd ); fprintf( stderr, " where options are\n" ); for ( ; *q; q++ ) fprintf( stderr, " %s\n", *q ); fprintf( stderr, " -rgb file specifies the path to rgb.txt. " "Default is %s\n", psinfo.rgbfile ); if ( die ) exit( 1 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { int n; char outname[ 512 ], inname[ 512 ], *p; FILE *fp; fd2ps_init( ); n = parse_command_line( argc, argv ); strcpy( inname, argv[ n ] ); if ( ! strstr( inname, ".fd" ) ) strcat( inname, ".fd" ); if ( n < argc - 1 ) strcpy( outname, argv[ ++n ] ); else { strcpy( outname, inname ); if ( ( p = strrchr( outname, '.' ) ) ) *p = '\0'; strcat( outname, psinfo.eps ? ".eps" : ".ps" ); } /* before opening the output file, check the existence of input */ if ( ! ( fp = fopen( inname, "r" ) ) ) { perror( inname ); exit( 1 ); } fclose( fp ); if ( strcmp( outname, "-" ) == 0 ) flps->fp = stdout; else if ( ! ( flps->fp = fopen( outname, "w" ) ) ) { fprintf( stderr, "Can't open %s for output\n", outname ); exit( 1 ); } load_form_definition( inname ); return 0; } /*************************************** * Overall default configuration ***************************************/ static void fd2ps_init( void ) { char *env; psinfo.xdpi = psinfo.ydpi = 85; psinfo.paper_name = "Letter"; get_paper_size( psinfo.paper_name, &psinfo.paper_w, &psinfo.paper_h ); psinfo.bw = 2; /* Should be 1 but then output looks shitty JTT */ psinfo.verbose = 0; psinfo.colorps = 1; psinfo.eps = 0; psinfo.gamma = 1.0; psinfo.page = 1; psinfo.xscale = psinfo.yscale = 1.0; psinfo.pack = 1; psinfo.landscape = -1; /* auto */ psinfo.fp = stdout; psinfo.rgbfile = "/usr/lib/X11/rgb.txt"; psinfo.xpmtops_direct = 1; flps = &psinfo; /* check if enviornment variable paper is defined */ if ( ( env = getenv( "PAPER" ) ) ) { get_paper_size( env, &psinfo.paper_w, &psinfo.paper_h ); psinfo.paper_name = env; } if ( ( env = getenv( "RGBFile" ) ) ) psinfo.rgbfile = env; } /*************************************** ***************************************/ static int parse_command_line( int argc, char * argv[ ] ) { int i; float ftmp; for ( i = 1; i < argc && *argv[ i ] == '-'; i++ ) { if ( strcmp( argv[ i ], "-bw" ) == 0 && i + 1 < argc ) psinfo.user_bw = atoi( argv[ ++i ] ); else if ( strcmp( argv[ i ], "-dpi" ) == 0 && i + 1 < argc ) { ftmp = atof( argv[ ++i ] ); psinfo.xdpi = psinfo.ydpi = ftmp; } else if ( strncmp( argv[ i ], "-verb", 5 ) == 0 ) psinfo.verbose = 1; else if ( strcmp(argv[ i ], "-eps" ) == 0 ) psinfo.eps = 1; else if ( strncmp( argv[ i ], "-vers", 5 ) == 0 ) print_version( 1 ); else if (strncmp( argv[ i ], "-h", 2 ) == 0 ) usage( argv[ 0 ], 1 ); else if ( strcmp( argv[ i ], "-pw" ) == 0 && i + 1 < argc ) { psinfo.paper_w = atof( argv[ ++i ] ); psinfo.paper_name = 0; } else if ( strcmp(argv[ i ], "-ph" ) == 0 && i + 1 < argc ) { psinfo.paper_h = atof( argv[ ++i ] ); psinfo.paper_name = 0; } else if ( strcmp( argv[ i ], "-G" ) == 0 && i + 1 < argc ) psinfo.gamma = atof( argv[ ++i ] ); else if (strcmp( argv[ i ], "-l" ) == 0 ) psinfo.landscape = 1; else if ( strcmp( argv[ i ], "-p" ) == 0 ) psinfo.landscape = 0; else if ( strcmp( argv[ i ], "-color" ) == 0 ) psinfo.colorps = 1; else if ( strcmp( argv[ i ], "-pack" ) == 0 ) psinfo.pack = !psinfo.pack; else if ( strcmp( argv[ i ], "-gray" ) == 0 || strcmp( argv[ i ], "-grey" ) == 0 ) psinfo.colorps = 0; else if ( strcmp( argv[ i ], "-rgb" ) == 0 && i + 1 < argc ) psinfo.rgbfile = fl_strdup( argv[ ++i ] ); else if ( strcmp( argv[ i ], "-paper" ) == 0 && i + 1 < argc ) { if ( strcmp( argv[ ++i ], "all" ) == 0 ) { fprintf( stderr, " The following paper names are known\n" ); list_papers( "\t" ); exit( 0 ); } get_paper_size( argv[ i ], &psinfo.paper_w, &psinfo.paper_h ); psinfo.paper_name = argv[ i ]; } else { usage( argv[ 0 ], 0 ); fprintf( stderr, "Unknown Option %s\n", argv[ i ] ); exit( 1 ); } } if ( i == argc ) usage( argv[ 0 ], 1 ); /* limited validation */ if ( psinfo.paper_h <= 1 || psinfo.paper_w <= 1 ) { fprintf( stderr, "%s: incorrect paper size (%.1fX%.1f)\n", argv[ 0 ], psinfo.paper_w, psinfo.paper_h ); exit( 0 ); } if ( psinfo.xdpi < 50 || psinfo.xdpi > 300 ) { fprintf( stderr, "%s: unusual DPI value %.1f\n", argv[ 0 ], psinfo.xdpi ); } if ( psinfo.gamma != 1.0 ) apply_gamma( psinfo.gamma ); return i; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/pscol.c0000644000175000017500000001265411320176556014546 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file pscol.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Take care of color */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include "fd2ps.h" #define VN( a ) a, #a #define NV( a ) #a, a /* slightly different from XForms' built-in due to the difference * between printer and screen */ #define PREVIEW static FLI_IMAP fl_imap[ ] = { { NV( FL_BLACK), 0, 0, 0, 0, 0}, { NV( FL_WHITE), 255, 255, 255, 0, 0}, { NV( FL_COL1), 161, 161, 161, 0, 0}, /* default color, gray63 */ { NV( FL_MCOL), 191, 191, 191, 0, 0}, /* used as magic, gray75 */ { NV( FL_RIGHT_BCOL), 41, 41, 41, 0, 0}, /* right gray16 */ { NV( FL_BOTTOM_BCOL), 89, 89, 89, 0, 0}, /* bottom gray35 */ { NV( FL_LEFT_BCOL), 222, 222, 222, 0, 0}, /* left color gray87 */ { NV( FL_SLATEBLUE), 113, 113, 198, 0, 0}, { NV( FL_INDIANRED), 198, 113, 113, 0, 0}, { NV( FL_RED), 255, 0, 0, 0, 0}, { NV( FL_BLUE), 0, 0, 255, 0, 0}, { NV( FL_GREEN), 0, 255, 0, 0, 0}, { NV( FL_YELLOW), 255, 255, 0, 0, 0}, { NV( FL_MAGENTA), 255, 0, 255, 0, 0}, { NV( FL_CYAN), 0, 255, 255, 0, 0}, { NV( FL_TOMATO), 255, 99, 71, 0, 0}, { NV( FL_INACTIVE), 110, 110, 110, 0, 0}, /* gray43 */ { NV( FL_TOP_BCOL), 204, 204, 204, 0, 0}, /* top gray80 */ { NV( FL_PALEGREEN), 113, 198, 113, 0, 0}, { NV( FL_DARKGOLD), 205, 149, 10, 0, 0}, { NV( FL_ORCHID), 205, 105, 201, 0, 0}, { NV( FL_DARKCYAN), 40, 170, 175, 0, 0}, { NV( FL_DARKTOMATO), 139, 54, 38, 0, 0}, { NV( FL_WHEAT), 255, 231, 155, 0, 0}, { NV( FL_DARKORANGE), 255, 128, 0, 0, 0}, { NV( FL_DEEPPINK), 255, 0, 128, 0, 0}, { NV( FL_CHARTREUSE), 128, 255, 0, 0, 0}, { NV( FL_DARKVIOLET), 128, 0, 255, 0, 0}, { NV( FL_SPRINGGREEN), 0, 255, 128, 0, 0}, { NV( FL_DODGERBLUE), 0, 128, 255, 0, 0}, { NV( FL_DOGERBLUE), 0, 128, 255, 0, 0}, { NV( FL_LIGHTER_COL1), 173, 173, 173, 0, 0}, { NV( FL_DARKER_COL1), 153, 153, 153, 0, 0} }; #define builtin sizeof(fl_imap)/sizeof(fl_imap[0]) /*************************************** * do gamma adjustment ***************************************/ void apply_gamma( float gamma ) { FLI_IMAP *fm = fl_imap, *fs; float lastgamma = 1.0; if ( FL_abs( gamma ) < 1.0e-3 ) { fprintf( stderr, "fd2ps: Bad Gamma value %.2f\n", gamma ); return; } for ( fs = fm + builtin; fm < fs; fm++ ) { if ( psinfo.verbose ) fprintf( stderr, "fm->r=%d\n", fm->r ); fm->r = 0.4 + 255.0 * pow( fm->r / 255.0, lastgamma / gamma ); fm->g = 0.4 + 255.0 * pow( fm->g / 255.0, lastgamma / gamma ); fm->b = 0.4 + 255.0 * pow( fm->b / 255.0, lastgamma / gamma ); if ( psinfo.verbose ) fprintf( stderr, "fm->r=%d\n", fm->r ); } lastgamma = gamma; } /*************************************** ***************************************/ void fl_query_imap( long col, int * r, int * g, int * b ) { FLI_IMAP *flmap = fl_imap, *flmape = flmap + builtin; for ( ; flmap < flmape; flmap++ ) if ( col == ( long ) flmap->index ) { *r = flmap->r; *g = flmap->g; *b = flmap->b; return; } } #define C2NC( c ) ( 1.0 / 255.0 * c ) static long cur_color = -1; /*************************************** ***************************************/ void ps_invalidate_color_cache( void ) { cur_color = -1; } /*************************************** ***************************************/ void ps_color( long color ) { int r = 0, g = 0, b = 0; if ( color == cur_color ) return; fl_query_imap( color, &r, &g, &b ); if ( psinfo.colorps && ( r != g || r != b ) ) ps_output( "%.3g %.3g %.3g RGB ", C2NC( r), C2NC( g ), C2NC( b ) ); else ps_output( "%.3g G ", C2NC( rgb2gray( r, g, b ) ) ); cur_color = color; } /*************************************** ***************************************/ int get_gray255( long color ) { int r = 0, g = 0, b = 0; fl_query_imap( color, &r, &g, &b ); return rgb2gray( r, g, b ) + 0.1; } /*************************************** ***************************************/ int fl_get_namedcolor( const char * s ) { FLI_IMAP *flmap = fl_imap, *flmape = flmap + builtin; for ( ; s && flmap < flmape; flmap++ ) if ( strcmp(s, flmap->name) == 0 ) return flmap->index; /* a wild shot */ return atoi( s ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/image2ps.c0000644000175000017500000001161411247055071015124 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file image2ps.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Turn a colormapped image into PostScript */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "fd2ps.h" static const char *hexdigits = "0123456789abcdef"; #define LINELENGTH 37 /*************************************** ***************************************/ int image2colorps( short * pixels, int w, int h, fd2psCMAP * map, int ncol FL_UNUSED_ARG, const char * cmt) { int x, y, k, r, g, b; int *rb, *gb, *bb; char pscmd[ 128 ]; short *p; strcpy( pscmd, ps_literal( ( cmt && *cmt ) ? cmt : "startColorImage" ) ); ps_output( "/redstring %d string def\n", w ); ps_output( "/grnstring %d string def\n", w ); ps_output( "/blustring %d string def\n", w ); ps_output( "/%s\n", pscmd ); ps_output( "{%d %d 8 [ %d 0 0 -%d 0 %d]\n", w, h, w, h, h ); ps_output( " {currentfile redstring readhexstring pop}\n" ); ps_output( " {currentfile grnstring readhexstring pop}\n" ); ps_output( " {currentfile blustring readhexstring pop}\n" ); ps_output( " true 3 colorimage\n } bind def\n"); /* Start */ ps_output( "%d %d scale\n", w, h ); ps_verbatim( "%s\n", pscmd ); rb = malloc( w * sizeof *rb ); gb = malloc( w * sizeof *gb ); bb = malloc( w * sizeof *bb ); for ( p = pixels, k = y = 0; y < h; y++ ) { for ( x = 0; x < w; x++, p++ ) { rb[ x ] = map[ *p ].red; gb[ x ] = map[ *p ].green; bb[ x ] = map[ *p ].blue; } for ( x = 0; x < w; x++ ) { r = rb[ x ]; ps_output( "%c%c", hexdigits[ ( r >> 4 ) & 15 ], hexdigits[ r & 15 ] ); if ( ++k % LINELENGTH == 0 ) ps_output( "\n" ); } for ( x = 0; x < w; x++ ) { g = gb[ x ]; ps_output( "%c%c", hexdigits[ ( g >> 4 ) & 15 ], hexdigits[ g & 15 ] ); if ( ++k % LINELENGTH == 0 ) ps_output( "\n" ); } for ( x = 0; x < w; x++ ) { b = bb[ x ]; ps_output( "%c%c", hexdigits[ ( b >> 4 ) & 15 ], hexdigits[ b & 15 ] ); if ( ++k % LINELENGTH == 0 ) ps_output( "\n" ); } } free( rb ); free( gb ); free( bb ); return 0; } /*************************************** ***************************************/ int image2grayps( short * pixels, int w, int h, fd2psCMAP * map, int ncol, const char * cmt) { int x, y, k, r; char pscmd[ 128 ]; short *p; strcpy( pscmd, ps_literal( ( cmt && *cmt ) ? cmt : "startGrayImage" ) ); ps_output( "/graystring %d string def\n", w ); ps_output( "/%s\n", pscmd ); ps_output( "{%d %d 8 [ %d 0 0 -%d 0 %d]\n", w, h, w, h, h ); ps_output( " {currentfile graystring readhexstring pop}\n" ); ps_output( " image \n} bind def\n" ); ps_output( "%d %d scale\n", w, h ); ps_verbatim( "%s\n", pscmd ); /* convert colormap to grayscale */ for ( x = 0; x < ncol; x++ ) map[ x ].red = rgb2gray( map[ x ].red, map[ x ].green, map[ x ].blue ); for ( p = pixels, k = y = 0; y < h; y++ ) { for ( x = 0; x < w; x++, p++ ) { r = map[ *p ].red; ps_output( "%c%c", hexdigits[ ( r >> 4 ) & 15 ], hexdigits[ r & 15 ] ); if ( ++k % LINELENGTH == 0 ) ps_output( "\n" ); } } return 0; } /*************************************** ***************************************/ char * ps_literal( const char * s ) { static char buf[ 1024 ]; char *p = buf; for ( *p = '\0'; s && *s; s++ ) *p++ = ( PS_SPECIAL( *s ) ) ? '$' : *s; *p = '\0'; return buf; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/papers.c0000644000175000017500000000452711247055071014714 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file papers.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "fd2ps.h" #ifdef __EMX__ #define strcasecmp stricmp #endif struct paper { const char * name; const char * size; float w, /* in inches */ h; }; static struct paper papers[ ] = { { "Letter", "8.5x11in", 8.5, 11.0 }, { "Legal", "8.5x14in", 8.5, 14.0 }, { "A4", "210x295mm", 7.27, 11.61 }, /* European 210x295mm */ { "B4", "257x364mm", 10.1, 14.33 }, /* Janpanese 275x364mm */ { "B5", "18x20cm", 7.283, 10.630 }, { "B", "11x17in", 11.0, 17.0 }, /* US tabloid */ { "Note", "4x5in", 4.0, 5.0 }, /* sentinel */ { NULL, NULL, 0.0, 0.0 } }; /*************************************** ***************************************/ void get_paper_size( const char * name, float * w, float * h ) { struct paper *p = papers; for ( ; p->name; p++ ) if ( strcasecmp( name, p->name ) == 0 ) { *w = p->w; *h = p->h; return; } fprintf( stderr, "Unknown paper name %s - ignored\n", name ); } /*************************************** ***************************************/ void list_papers( const char * prefix ) { struct paper *p = papers; for ( ; p->name; p++ ) fprintf( stderr, "%s%s\t(%s)\n", prefix, p->name, p->size ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/Makefile.in0000644000175000017500000006545511377311602015331 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am bin_PROGRAMS = fd2ps$(EXEEXT) subdir = fd2ps ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_fd2ps_OBJECTS = align.$(OBJEXT) fd2ps.$(OBJEXT) flsupport.$(OBJEXT) \ image2ps.$(OBJEXT) load.$(OBJEXT) papers.$(OBJEXT) \ pscol.$(OBJEXT) psdraw.$(OBJEXT) psobj.$(OBJEXT) \ pstext.$(OBJEXT) readxpm.$(OBJEXT) sys.$(OBJEXT) \ version.$(OBJEXT) xbmtops.$(OBJEXT) xpmtops.$(OBJEXT) fd2ps_OBJECTS = $(am_fd2ps_OBJECTS) am__DEPENDENCIES_1 = fd2ps_DEPENDENCIES = ../lib/libforms.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(fd2ps_SOURCES) DIST_SOURCES = $(fd2ps_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D CLEANFILES = fd2ps.1 EXTRA_DIST = Change Readme fd2ps.man SUBDIRS = test man_MANS = fd2ps.1 # forms.h is a generated file INCLUDES = -I../lib -I$(top_srcdir)/lib $(X_CFLAGS) fd2ps_LDADD = ../lib/libforms.la $(X_LIBS) $(X_PRE_LIBS) -lX11 $(LIBS) $(X_EXTRA_LIBS) fd2ps_SOURCES = \ align.c \ fd2ps.c \ fd2ps.h \ flsupport.c \ global.h \ image2ps.c \ load.c \ papers.c \ pscol.c \ psdraw.c \ psobj.c \ pstext.c \ readxpm.c \ sys.c \ version.c \ xbmtops.c \ xpmtops.c all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fd2ps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fd2ps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list fd2ps$(EXEEXT): $(fd2ps_OBJECTS) $(fd2ps_DEPENDENCIES) @rm -f fd2ps$(EXEEXT) $(LINK) $(fd2ps_OBJECTS) $(fd2ps_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/align.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd2ps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flsupport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image2ps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/papers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pscol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psdraw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psobj.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pstext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readxpm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xbmtops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpmtops.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(MANS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 fd2ps.1: cp -p $(srcdir)/fd2ps.man fd2ps.1 # 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: xforms-1.0.93sp1/fd2ps/xbmtops.c0000644000175000017500000001021211247055071015102 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file xbmtops.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Turn an xbm file into PostScript */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd2ps.h" #include #include static int gethexint(FILE * fp) { char buf[20], *p; int c; while ((c = getc(fp)) == ',' || isspace(c)) /* empty */ ; if (c == EOF) return -1; for (p = buf; c != EOF && c != ',' && !isspace(c); c = getc(fp)) *p++ = c; *p = '\0'; return strtol(buf, 0, 16); } #define MAXH 500 static int bit_w, bit_h; static char *bit_buf[MAXH]; static int read_xbm(const char *f) { char buf[256]; int nosize, c, i, j, ct, err; FILE *fp; char *bits; if (!(fp = fopen(f, "r"))) { fprintf(stderr, "Can't open %s\n", f); return -1; } bit_w = bit_h = 0; for (nosize = 1; nosize && fgets(buf, sizeof(buf) - 1, fp);) { if (sscanf(buf, "#define %*s %d", &c) == 1) { if (strstr(buf, "_width")) bit_w = c; else if (strstr(buf, "_height")) bit_h = c; nosize = bit_w < 1 || bit_h < 1; } } if (bit_h > MAXH) { fprintf(stderr, "bitmap too large. truncated\n"); bit_h = MAXH; } for (i = 0; i < bit_h; i++) { if (bit_buf[i]) free(bit_buf[i]); bit_buf[i] = calloc(bit_w, sizeof(*bit_buf[i])); } /* skip until getting a brace */ for (; (c = getc(fp)) != EOF && c != '{';) /* } VI */ /* empty */ ; if (feof(fp) || ferror(fp)) { fprintf(stderr, "error reading %s\n", f); bit_w = 0; return -1; } /* read the data */ for (j = err = c = 0; j < bit_h && !err; j++) { bits = bit_buf[bit_h - 1 - j]; for (i = ct = 0; i < bit_w && !err; i++, ct = (ct + 1) & 7) { if (ct == 0) err = (c = gethexint(fp)) < 0; *bits++ = (c & 1); c = c >> 1; } } if (err) fprintf(stderr, "Junk in bitmap hex stream\n"); return (j > bit_h / 2) ? 0 : -1; } void draw_bitmap(const char *f, float x, float y, float w, float h, long fcol, long bcol) { int i, j, r, g, b; char *bits; float xx, yy; fd2psCMAP cmap[2]; short *pixels, *pix; read_xbm(f); if (bit_w < 1) return; xx = x + (w - bit_w) / 2; yy = y + (h - bit_h) / 2; /* in xforms, bitmap is really an image with two colors, not * neccessarily black and white */ fl_query_imap(bcol, &r, &g, &b); cmap[0].red = r; cmap[0].green = g; cmap[0].blue = b; fl_query_imap(fcol, &r, &g, &b); cmap[1].red = r; cmap[1].green = g; cmap[1].blue = b; pix = pixels = malloc(sizeof(*pixels) * bit_w * bit_h); for (j = 0; j < bit_h; j++) { bits = bit_buf[bit_h - 1 - j]; for (i = 0; i < bit_w; i++, bits++, pix++) *pix = (*bits != 0); } ps_verbatim("\n%% Start of XBM file %s %%{\n", f); ps_output("gsave "); ps_output("%.1f %.1f translate\n", xx, yy); if (flps->colorps) image2colorps(pixels, bit_w, bit_h, cmap, 2, 0); else image2grayps(pixels, bit_w, bit_h, cmap, 2, 0); ps_verbatim("\ngrestore%%}\n"); free(pixels); return; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fd2ps/psdraw.c0000644000175000017500000012240711247055071014720 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file psdraw.c * * This file is part of XForms package * Copyright (c) 1997-2000 by T.C. Zhao * All rights reserved. * * Some primitive drawing routines is PS * * (x,y) (w,h) passed to all drawing functions are relative * to PS coordinate system and the unit is point. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd2ps.h" #include "flinternal.h" #include static float cur_lwx = 1, cur_lwy = 1; /*************************************** ***************************************/ void ps_log( const char *s ) { fprintf( flps->fp, "%%%s", s ); } #include /*************************************** ***************************************/ void ps_output( const char * fmt, ... ) { va_list args; char buf[ 2048 ], *q; int lastc = flps->lastc; va_start( args, fmt ); vsprintf( buf, fmt, args ); va_end( args ); if ( ! flps->pack ) fprintf( flps->fp, "%s", buf ); else { for ( q = buf; *q; q++ ) { if ( *q == '\n' ) *q = ' '; if ( *q == '(') /* ) ( */ flps->literal = 1; else if ( *q == '(' ) flps->literal = 0; if ( lastc == ' ' && *q == ' ' && ! flps->literal ) continue; if ( *q == ' ' && flps->len == 0 ) continue; if ( *q == ' ' && flps->len >= 69 ) { putc( '\n', flps->fp ); flps->len = 0; } else { lastc = *q; flps->len++; putc( *q, flps->fp ); } } flps->lastc = lastc; } } /*************************************** ***************************************/ void ps_set_clipping( int x, int y, int w, int h ) { ps_output( "gsave newpath %d %d %d %d rectclip\n", x, y, w, h ); } /*************************************** ***************************************/ void ps_unset_clipping( void ) { ps_output( "grestore\n" ); ps_invalidate_color_cache( ); } /*************************************** ***************************************/ void ps_verbatim( const char * fmt, ... ) { va_list args; va_start( args, fmt ); vfprintf( flps->fp, fmt, args ); va_end( args ); } /*************************************** ***************************************/ void ps_set_linewidth( float lwx, float lwy ) { ps_output( "gsave %.2g %.2g LW\n", cur_lwx = lwx, cur_lwy = lwy ); } /*************************************** ***************************************/ void ps_get_linewidth( float * lwx, float * lwy ) { *lwx = cur_lwx; *lwy = cur_lwy; } /*************************************** ***************************************/ void ps_reset_linewidth( void ) { ps_output( "grestore\n" ); ps_invalidate_color_cache( ); } /* define FAST_POLY to get faster PS polygon at the expense of * larger PS output */ /* #define FAST_POLY */ /******************************************************************** * Basic drawing routines * * Always need to code for different devices * *****************************************************************{**/ /*************************************** * Draw a line in abs coordinate system ***************************************/ void ps_line( float x1, float y1, float x2, float y2, long col ) { ps_color( col ); ps_output( "%.1f %.1f %.1f %.1f L S\n", x2, y2, x1, y1 ); } /*************************************** ***************************************/ void ps_lines( Point * xp, int n, long col ) { Point *xps = xp + n; int cnt = 1; ps_color( col ); for ( ; xp < xps; xp++, cnt++ ) { ps_output( "%.1f %.1f ", ( double ) xp->x, ( double ) xp->y ); if ( cnt % 6 == 0 ) ps_output( "\n" ); } ps_output( "%d linesa\n", n ); } /*************************************** ***************************************/ void ps_poly( int fill, Point * xp, int n, long col ) { Point *xps = xp + n; int cnt = 1; ps_color( col ); for ( ; xp < xps; xp++, cnt++ ) { ps_output( "%.1f %.1f ", ( double ) xp->x, ( double ) xp->y ); if ( cnt % 6 == 0 ) ps_output( "\n" ); } ps_output( "%d P %c\n", n, "SF"[ fill ? 1 : 0 ] ); } /*************************************** ***************************************/ void ps_rectangle( int fill, float x, float y, float w, float h, long col ) { ps_color( col ); ps_output( "%.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f 4 P", x, y, x, y + h - 1, x + w - 1, y + h - 1, x + w - 1, y ); ps_output( " %c\n", "SF"[ fill ? 1 : 0 ] ); } /*************************************** * rectangle with rounded corners ***************************************/ #define RS 16 /* * 0.0, 0.034074, 0.1339746, 0.292893, 0.5, 0.741181, 1.0 */ static float offset[ ] = { 0.0, 0.07612, 0.29289, 0.61732, 1.0 }; #define RN ( sizeof offset / sizeof *offset ) /*************************************** ***************************************/ static int compute_rounded_corners( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, Point * point) { Point *xp; size_t i, n; float rsx, rsy, xf, yf; rsx = rsy = 0.42 * FL_min( w, h ); if ( rsx > RS ) rsx = rsy = RS; for ( xp = point, n = i = 0; i < RN; i++, n++, xp++ ) { xf = x + offset[ RN - i - 1 ] * rsx; yf = y + offset[ i ] * rsy; xp->x = FL_nint( xf ); xp->y = FL_nint( yf ); } for ( i = 0; i < RN; i++, n++, xp++ ) { xf = x + offset[ i ] * rsx; yf = y + h - 1.0 - offset[ RN - i - 1 ] * rsy; xp->x = FL_nint( xf ); xp->y = FL_nint( yf ); } for ( i = 0; i < RN; i++, n++, xp++ ) { xf = x + w - 1.0 - offset[ RN - i - 1 ] * rsx; yf = y + h - 1.0 - offset[ i ] * rsy; xp->x = FL_nint( xf ); xp->y = FL_nint( yf ); } for ( i = 0; i < RN; i++, n++, xp++ ) { xf = x + w - 1.0 - offset[ i ] * rsx; yf = y + offset[ RN - i - 1 ] * rsy; xp->x = FL_nint( xf ); xp->y = FL_nint( yf ); } return n; } #define AddVertex( p, xp, yp ) do{ p->x = xp; p->y = yp; p++; } while( 0 ) /*************************************** ***************************************/ void ps_roundrectangle( int fill, float x, float y, float w, float h, long col ) { Point point[ 5 * RN ]; int n; n = compute_rounded_corners( x, y, w, h, point ); ps_poly( fill, point, n, col ); } #define ps_rbox ps_roundrectangle /*************************************** ***************************************/ void ps_oval( int fill, float x, float y, float w, float h, long col ) { ps_pieslice( fill, x, y, w, h, 0.0, 3600.0, col ); } /*************************************** ***************************************/ void ps_circ( int fill, float x, float y, float r, long col ) { ps_color( col ); ps_output( "newpath %.1f %.1f %.1f 0 360 arc %c\n", x, y, r, "SF"[ fill ? 1 : 0 ] ); } /*************************************** * draw an circular arc, optionally filled. Angle t1 and t2 are in one-tenth of * a degree ***************************************/ void ps_arc( int fill, float x, float y, float r, int t1, int t2, long col ) { ps_color( col ); ps_output( "newpath %.1f %.1f %.1f %.1f %.1f arc %c\n", x, y, r, t1 * 0.1, t2 * 0.1, "SF"[ fill ? 1 : 0 ] ); } /*************************************** * only fill does a pie slice ***************************************/ void ps_pieslice( int fill, float x, float y, float w, float h, int t1, int t2, long col ) { float sx = 1.0, sy = ( float ) h / w; ps_color( col ); ps_output( "gsave newpath %.1f %.1f translate %.1f %.1f scale\n", x + 0.5 * w, y + 0.5 * h, sx, sy ); if ( ! fill ) ps_output( "0 0 %.1f %.1f %.1f arc S grestore\n", w * 0.5, t1 * 0.1, t2 * 0.1 ); else ps_output( "0 0 M 0 0 %.1f %.1f %.1f arc C F grestore\n", w * 0.5, t1 * 0.1, t2 * 0.1 ); ps_invalidate_color_cache( ); } /************ End of basic drawing routines ********}******/ /***************************************************************** * Some high level drawing routines *************************************************************{***/ /*************************************** ***************************************/ static void ps_roundedbox( int style, float x, float y, float w, float h, long col, int bw ) { Point point[ 5 * RN + 2 ]; int n, lw = FL_abs( bw ), lw2 = lw / 2; n = compute_rounded_corners( x + lw2, y + lw2, w - lw, h - lw, point ); ps_poly( 1, point, n, col ); ps_set_linewidth( lw, lw ); if ( style == FL_ROUNDED3D_UPBOX ) { ps_lines( point, 2 * RN, FL_TOP_BCOL ); ps_lines( point + 2 * RN - 3, RN + 1, FL_TOP_BCOL ); ps_lines( point + 3 * RN - 4, RN + 2, FL_BOTTOM_BCOL ); point[ n ] = point[ 0 ]; ps_lines( point + n - 3, 4, FL_BOTTOM_BCOL ); } else { ps_lines( point, 2 * RN, FL_BOTTOM_BCOL ); ps_lines( point + 2 * RN - 3, RN + 1, FL_BOTTOM_BCOL ); ps_lines( point + 3 * RN - 4, RN + 2, FL_LEFT_BCOL ); point[ n ] = point[ 0 ]; ps_lines( point + n - 3, 4, FL_TOP_BCOL ); } ps_reset_linewidth( ); } /*************************************** ***************************************/ static void ps_ovalbox( int style, float x, float y, float w, float h, long col, int bw ) { int lw = FL_abs( bw ), cr = lw / 2; int extra = 1 + ( lw > 3 ); int xx, yy, ww, hh; x += cr; y += cr; w -= 2 * cr; h -= 2 * cr; xx = x + extra; yy = y + extra; ww = w - 2 * extra; hh = h - 2 * extra; ps_pieslice( 1, x, y, w, h, 0, 3600, col ); /* this should be replaced by a loop. Faking it with line thickness looks bad when w != h */ if ( style == FL_OVAL3D_UPBOX ) { ps_set_linewidth( bw, bw ); ps_pieslice( 0, x, y, w, h, 450, 2250, FL_TOP_BCOL ); ps_pieslice( 0, x, y, w, h, 0, 450, FL_BOTTOM_BCOL ); ps_pieslice( 0, x, y, w, h, 2250, 3600, FL_BOTTOM_BCOL ); } else if ( style == FL_OVAL3D_FRAMEBOX ) { ps_set_linewidth( 0.9, 0.9 ); ps_pieslice( 0, x, y, w, h, 450, 2250, FL_BOTTOM_BCOL ); ps_pieslice( 0, xx, yy, ww, hh, 450, 2250, FL_LEFT_BCOL ); ps_pieslice( 0, xx, yy, ww, hh, 0, 450, FL_BOTTOM_BCOL ); ps_pieslice( 0, x, y, w, h, 0, 450, FL_LEFT_BCOL ); ps_pieslice( 0, xx, yy, ww, hh, 2250, 3600, FL_BOTTOM_BCOL ); ps_pieslice( 0, x, y, w, h, 2250, 3600, FL_LEFT_BCOL ); } else if ( style == FL_OVAL3D_EMBOSSEDBOX ) { ps_set_linewidth( 0.9, 0.9 ); ps_pieslice( 0, x, y, w, h, 450, 2250, FL_LEFT_BCOL ); ps_pieslice( 0, xx, yy, ww, hh, 450, 2250, FL_BOTTOM_BCOL ); ps_pieslice( 0, xx, yy, ww, hh, 0, 450, FL_LEFT_BCOL ); ps_pieslice( 0, x, y, w, h, 0, 450, FL_BOTTOM_BCOL ); ps_pieslice( 0, xx, yy, ww, hh, 2250, 3600, FL_LEFT_BCOL ); ps_pieslice( 0, x, y, w, h, 2250, 3600, FL_BOTTOM_BCOL ); } else { ps_set_linewidth( bw, bw ); ps_pieslice( 0, x, y, w, h, 450, 2250, FL_BOTTOM_BCOL ); ps_pieslice( 0, x, y, w, h, 0, 450, FL_TOP_BCOL ); ps_pieslice( 0, x, y, w, h, 2250, 3600, FL_TOP_BCOL ); } ps_reset_linewidth( ); } #define vv2(x1, y1, x2, y2) AddVertex(xp,x1,y1); AddVertex(xp, x2,y2); #define vv3(x1, y1, x2, y2, x3, y3) vv2(x1,y1,x2,y2); AddVertex(xp,x3,y3) #define Corner 4 /*************************************** ***************************************/ static void ps_foldertab_box( int style, float x, float y, float w, float h, long col, float bw ) { float ctr, right, top; Point vert[10], *xp; int border, i; float absbw = FL_abs( bw ); float C = Corner; if ( ! ( border = bw > 0 ) ) bw = bw; ctr = absbw / 2; x += ctr; y += ctr; w -= 2 * absbw; h -= 2 * absbw; right = x + w - 1; top = y + h - 1; xp = vert; switch ( style ) { case FL_TOPTAB_UPBOX : vv3( x, y, x, top - C, x + C, top ); vv2( x + C, top, right - C, top ); vv3( right - C, top, right, top - C, right, y ); ps_poly( 1, vert, 8, col ); ps_set_linewidth( absbw, absbw ); ps_lines( vert, 3, FL_LEFT_BCOL ); ps_lines( vert + 3, 2, FL_TOP_BCOL ); ps_lines( vert + 5, 3, FL_BOTTOM_BCOL ); ps_reset_linewidth( ); if ( border ) for ( i = 0; i < 8; i++ ) { if ( vert[ i ].x > x + w / 2 ) vert[ i ].x += ctr; else vert[ i ].x -= ctr + 1; if ( vert[ i ].y > y + h / 2 ) vert[ i ].y += ctr; } break; case FL_SELECTED_TOPTAB_UPBOX : vv3( x, y - absbw, x, top - C, x + C, top ); vv2( x + C, top, right - C, top ); vv3( right - C, top, right, top - C, right, y - absbw ); ps_poly( 1, vert, 8, col ); ps_set_linewidth( absbw, absbw ); ps_lines( vert, 3, FL_LEFT_BCOL ); ps_lines( vert + 3, 2, FL_TOP_BCOL ); ps_lines( vert + 5, 3, FL_BOTTOM_BCOL ); ps_reset_linewidth( ); break; default: break; } } #define ShrinkBox(x,y,w,h,d) do {x+=d; y+=d; w-=2*d; h-=2*d;} while(0) /*************************************** ***************************************/ void ps_draw_tbox( int style, float x, float y, float w, float h, long col, float bw ) { Point point[ 8 ], *fp; float absbw = FL_abs( bw ); float halfbw = absbw / 2; float xc = x + w / 2, yc = y + h / 2; if ( psinfo.verbose ) ps_verbatim( "%%TBOX %d: %.1f %.1f %.1f %.1f\n", style, x, y, w, h ); fp = point; switch ( style ) { case FLI_TRIANGLE_UPBOX8 : AddVertex(fp, xc, y + h - absbw); AddVertex(fp, x + w - bw, y + absbw); AddVertex(fp, x + bw, y + bw); ps_poly(1, point, 3, col); ps_set_linewidth(absbw, absbw); ShrinkBox(x, y, w, h, halfbw); ps_line(x, y, xc, y + h - 1, FL_LEFT_BCOL); ps_line(xc, y + h - 1, x + w - 1, y, FL_RIGHT_BCOL); ps_line(x + w - 1, y, x, y, FL_BOTTOM_BCOL); ps_reset_linewidth(); break; case FLI_TRIANGLE_UPBOX2 : AddVertex(fp, xc, y + absbw); AddVertex(fp, xc, y + h - absbw); AddVertex(fp, x + w - absbw, y + h - absbw); ps_poly(1, point, 3, col); ps_set_linewidth(absbw, absbw); ShrinkBox(x, y, w, h, halfbw); ps_line(xc, y, x, y + h - 1, FL_LEFT_BCOL); ps_line(x, y + h - 1, x + w - 1, y + h - 1, FL_TOP_BCOL); ps_line(x + w - 1, y + h - 1, xc, y, FL_RIGHT_BCOL); ps_reset_linewidth(); break; case FLI_TRIANGLE_UPBOX6: AddVertex(fp, x + bw, y + h - bw); AddVertex(fp, x + w - bw, yc); AddVertex(fp, x + bw, y + bw); ps_poly(1, point, 3, col); ps_set_linewidth(absbw, absbw); ShrinkBox(x, y, w, h, halfbw); ps_line(x, y + h - 1, x + w - 1, yc, FL_RIGHT_BCOL); ps_line(x + w - 1, yc, x, y, FL_BOTTOM_BCOL); ps_line(x, y, x, y + h - 1, FL_LEFT_BCOL); ps_reset_linewidth(); break; case FLI_TRIANGLE_UPBOX4: AddVertex(fp, x + bw, yc); AddVertex(fp, x + w - bw, y + h - bw); AddVertex(fp, x + w - bw, y); ps_poly(1, point, 3, col); ps_set_linewidth(absbw, absbw); ShrinkBox(x, y, w, h, halfbw); ps_line(x, yc, x + w - 1, y + h - 1, FL_TOP_BCOL); ps_line(x + w - 1, y + h - 1, x + w - 1, y, FL_RIGHT_BCOL); ps_line(x + w - 1, y, x, yc, FL_BOTTOM_BCOL); ps_reset_linewidth(); break; } } /*************************************** ***************************************/ void ps_draw_box( int style, float x, float y, float w, float h, long col, float bw_in ) { int border, B; Point xpoint[ 8 ], *xp; int bw = bw_in; if ( ! ( border = bw > 0 ) ) bw = -bw; B = border; xp = xpoint; if ( psinfo.verbose ) ps_verbatim( "%%BOX %d: %.1f %.1f %.1f %.1f\n", style, x, y, w, h ); switch (style) { case FL_NO_BOX: break; case FL_UP_BOX: ps_rectf(x + bw, y + bw, w - 2 * bw, h - 2 * bw, col); ps_rectf(x + B, y, w - 2 * B, bw + 1, FL_BOTTOM_BCOL); ps_rectf(x + B, y + h - 1 - bw, w - 2 * B, bw + 1, FL_TOP_BCOL); /* left */ AddVertex(xp, x + B, y + B); AddVertex(xp, x + B, y + h - 1 - B); AddVertex(xp, x + bw + B, y + h - 1 - bw - B); AddVertex(xp, x + bw + B, y + bw + B); ps_poly(1, xpoint, 4, FL_LEFT_BCOL); xp = xpoint; AddVertex(xp, x + w - 1, y); AddVertex(xp, x + w - 1, y + h - 1); AddVertex(xp, x + w - 1 - bw, y + h - 1 - bw); AddVertex(xp, x + w - 1 - bw, y + bw); ps_poly(1, xpoint, 4, FL_RIGHT_BCOL); if (border) ps_rect(x, y, w, h, FL_BLACK); break; case FL_DOWN_BOX: ps_rectf(x, y, w, h, col); ps_rectf(x, y + h - bw, w, bw, FL_BOTTOM_BCOL); ps_rectf(x, y, w, bw, FL_TOP_BCOL); AddVertex(xp, x, y); AddVertex(xp, x, y + h - 1); AddVertex(xp, x + bw - 1, y + h - bw); AddVertex(xp, x + bw - 1, y + bw - 1); ps_poly(1, xpoint, 4, FL_RIGHT_BCOL); /* right */ xp = xpoint; AddVertex(xp, x + w - 1, y); AddVertex(xp, x + w - 1, y + h - 1); #if 0 AddVertex(xp, x + w - 1 - bw, y + h - bw); AddVertex(xp, x + w - 1 - bw, y + bw - 1); #else AddVertex(xp, x + w - bw, y + h - bw); AddVertex(xp, x + w - bw, y + bw - 1); #endif ps_poly(1, xpoint, 4, FL_LEFT_BCOL); break; case FL_FRAME_BOX: ps_rectf(x, y, w, h, col); ps_start_lw(1.1, 1.1); ps_rect(x + 1.4, y, w - 1.4, h - 1.4, FL_TOP_BCOL); ps_end_lw(); ps_rect(x, y + 1.4, w - 1.4, h - 1.4, FL_BOTTOM_BCOL); break; case FL_EMBOSSED_BOX: ps_rectf(x, y, w, h, col); ps_start_lw(1.1, 1.1); ps_rect(x + 1.4, y, w - 1.4, h - 1.4, FL_BOTTOM_BCOL); ps_end_lw(); ps_rect(x, y + 1.4, w - 1.4, h - 1.4, FL_TOP_BCOL); break; case FL_FLAT_BOX: ps_rectf(x, y, w, h, col); break; case FL_SHADOW_BOX: if (w > 100 && h > 100) bw++; ps_rectf(x + bw, y + bw, w - bw, -bw, FL_BOTTOM_BCOL); ps_rectf(x + w - 1, y, -bw, h - bw - 1, FL_BOTTOM_BCOL); ps_rectf(x, y + bw, w - bw, h - bw, col); ps_rect(x, y + bw, w - bw, h - bw, FL_BLACK); break; case FL_BORDER_BOX: ps_rectf(x, y, w, h, col); ps_rect(x, y, w, h, FL_BLACK); break; case FL_RFLAT_BOX: ps_rbox(1, x, y, w, h, col); break; case FL_ROUNDED_BOX: ps_rbox(1, x, y, w, h, col); ps_rbox(0, x, y, w, h, FL_BLACK); break; case FL_ROUNDED3D_UPBOX: case FL_ROUNDED3D_DOWNBOX: ps_roundedbox(style, x, y, w, h, col, bw); break; case FL_RSHADOW_BOX: ps_rbox(1, x + bw, y - 1, w - bw + 1, h - bw, FL_BOTTOM_BCOL); ps_rbox(1, x, y + bw - 1, w - bw + 1, h - bw + 1, col); ps_rbox(0, x, y + bw - 1, w - bw + 1, h - bw + 1, FL_BLACK); break; case FL_OVAL_BOX: ps_oval(1, x, y, w, h, col); ps_oval(0, x, y, w, h, FL_BLACK); break; case FL_OVAL3D_UPBOX: case FL_OVAL3D_DOWNBOX: case FL_OVAL3D_FRAMEBOX: case FL_OVAL3D_EMBOSSEDBOX: ps_ovalbox(style, x, y, w, h, col, bw); break; case FL_TOPTAB_UPBOX: case FL_SELECTED_TOPTAB_UPBOX: case FL_BOTTOMTAB_UPBOX: case FL_SELECTED_BOTTOMTAB_UPBOX: ps_foldertab_box(style, x, y, w, h, col, bw_in); break; default: fprintf(stderr, "Unknown Boxtype %d\n", style); break; } } /*************************************** * Frame is drawn OUTSIDE of the bounding box ***************************************/ void ps_draw_frame( int style, float x, float y, float w, float h, long col FL_UNUSED_ARG, int bw ) { int border; float B; Point xpoint[ 10 ], *xp; if (!(border = bw > 0)) bw = -bw; B = border; xp = xpoint; if (psinfo.verbose) ps_verbatim("%%frame (%.2f %.2f %.2f %.2f)\n", x, y, w, h); switch (style) { case FL_UP_FRAME: ps_rectf(x - bw - B, y + h - 1, w + 2 * bw, bw + 1 + B, FL_TOP_BCOL); ps_rectf(x - bw - B, y - bw - B, w + 2 * bw, bw + 1 + B, FL_BOTTOM_BCOL); /* left */ xp = xpoint; AddVertex(xp, x - bw - B, y - bw - B); AddVertex(xp, x, y); AddVertex(xp, x, y + h - 1); AddVertex(xp, x - bw - B, y + h + bw + B - 1); ps_poly(1, xpoint, 4, FL_LEFT_BCOL); /* right */ xp = xpoint; AddVertex(xp, x + w - 1 + bw + B, y - bw - B); AddVertex(xp, x + w - 1 + bw + B, y + h + bw + B - 1); AddVertex(xp, x + w - 1, y + h - 1); AddVertex(xp, x + w - 1, y); ps_poly(1, xpoint, 4, FL_RIGHT_BCOL); break; case FL_DOWN_FRAME: ps_rectf(x - bw - B, y + h - 1, w + 2 * bw, bw + 1 + B, FL_BOTTOM_BCOL); ps_rectf(x - bw - B, y - bw - B, w + 2 * bw, bw + 1 + B, FL_TOP_BCOL); /* left */ xp = xpoint; AddVertex(xp, x - bw - B, y - bw - B); AddVertex(xp, x, y); AddVertex(xp, x, y + h - 1); AddVertex(xp, x - bw - B, y + h + bw + B - 1); ps_poly(1, xpoint, 4, FL_RIGHT_BCOL); /* right */ xp = xpoint; AddVertex(xp, x + w - 1 + bw + B, y - bw - B); AddVertex(xp, x + w - 1 + bw + B, y + h + bw + B - 1); AddVertex(xp, x + w - 1, y + h - 1); AddVertex(xp, x + w - 1, y); ps_poly(1, xpoint, 4, FL_LEFT_BCOL); break; case FL_ENGRAVED_FRAME: B = (bw > 2 ? (bw - 2) : 1); B *= 0.5; ps_draw_frame(FL_DOWN_FRAME, x, y, w, h, 0, 1); ps_draw_frame(FL_UP_FRAME, x + B, y + B, w - 2 * B, h - 2 * B, 0, -1); break; } } /*************************************** ***************************************/ void ps_draw_checkbox( int type, float x, float y, float w, float h, long col, int bw ) { Point xpoint[6], *xp; Point allp[10]; /* generate all points */ xp = allp; AddVertex(xp, x + w / 2, y); AddVertex(xp, x, y + h / 2); AddVertex(xp, x + w / 2, y + h); AddVertex(xp, x + w, y + h / 2); AddVertex(xp, x + w / 2, y + bw); AddVertex(xp, x + bw, y + h / 2); AddVertex(xp, x + w / 2, y + h - bw); AddVertex(xp, x + w - bw, y + h / 2); /* draw overall box */ xp = allp + 4; ps_poly(1, xp, 4, col); xp = xpoint; switch (type) { case FL_DOWN_BOX: AddVertex(xp, allp[0].x, allp[0].y); AddVertex(xp, allp[1].x, allp[1].y); AddVertex(xp, allp[5].x, allp[5].y); AddVertex(xp, allp[4].x, allp[4].y); ps_poly(1, xp = xpoint, 4, FL_LEFT_BCOL); AddVertex(xp, allp[0].x, allp[0].y); AddVertex(xp, allp[4].x, allp[4].y); AddVertex(xp, allp[7].x, allp[7].y); AddVertex(xp, allp[3].x, allp[3].y); ps_poly(1, xp = xpoint, 4, FL_TOP_BCOL); /* right bottom */ AddVertex(xp, allp[6].x, allp[6].y); AddVertex(xp, allp[2].x, allp[2].y); AddVertex(xp, allp[3].x, allp[3].y); AddVertex(xp, allp[7].x, allp[7].y); ps_poly(1, xp = xpoint, 4, FL_RIGHT_BCOL); AddVertex(xp, allp[1].x, allp[1].y); AddVertex(xp, allp[2].x, allp[2].y); AddVertex(xp, allp[6].x, allp[6].y); AddVertex(xp, allp[5].x, allp[5].y); ps_poly(1, xp = xpoint, 4, FL_BOTTOM_BCOL); break; case FL_UP_BOX: AddVertex(xp, allp[0].x, allp[0].y); AddVertex(xp, allp[1].x, allp[1].y); AddVertex(xp, allp[5].x, allp[5].y); AddVertex(xp, allp[4].x, allp[4].y); ps_poly(1, xp = xpoint, 4, FL_BOTTOM_BCOL); AddVertex(xp, allp[0].x, allp[0].y); AddVertex(xp, allp[4].x, allp[4].y); AddVertex(xp, allp[7].x, allp[7].y); AddVertex(xp, allp[3].x, allp[3].y); ps_poly(1, xp = xpoint, 4, FL_RIGHT_BCOL); /* right bottom */ AddVertex(xp, allp[6].x, allp[6].y); AddVertex(xp, allp[2].x, allp[2].y); AddVertex(xp, allp[3].x, allp[3].y); AddVertex(xp, allp[7].x, allp[7].y); ps_poly(1, xp = xpoint, 4, FL_LEFT_BCOL); AddVertex(xp, allp[1].x, allp[1].y); AddVertex(xp, allp[2].x, allp[2].y); AddVertex(xp, allp[6].x, allp[6].y); AddVertex(xp, allp[5].x, allp[5].y); ps_poly(1, xp = xpoint, 4, FL_TOP_BCOL); break; } if (psinfo.verbose) ps_verbatim("%%BOX }\n"); } /******* End of high-level drawing routines **********}******/ /************** Handle built-in symbols. ****************{*/ typedef void ( *PSdrawit ) ( float, float, float, float, int, long ); typedef struct { const char * name; const char * psname; const char * draw; int otherdef; PSdrawit fdrawit; int abs_coordinate; /* fdrawit uses abs coordinate system */ int defined; /* if def code emitted */ } PS_draw; /*************************************** ***************************************/ static void draw_dnline( float x FL_UNUSED_ARG, float y FL_UNUSED_ARG, float w, float h, int angle FL_UNUSED_ARG, long col FL_UNUSED_ARG ) { float t = 0.20; float len; ps_output("%.3f %.3f LW ", 3.5 / (w + h), 3.5 / (w + h)); if ((w + h) > 200) len = 0.99; else if ((w + h) > 150) len = 0.98; else len = 0.93; ps_color(FL_RIGHT_BCOL); ps_output("-%.3f %.2f M %.3f %.2f LT S\n", len, t, len, t); ps_color(FL_LEFT_BCOL); ps_output("-%.3f -%.2f M %.3f -%.2f LT S\n", len, t, len, t); } /*************************************** ***************************************/ static void draw_upline( float x FL_UNUSED_ARG, float y FL_UNUSED_ARG, float w, float h, int angle FL_UNUSED_ARG, long col FL_UNUSED_ARG ) { float t = 0.033; ps_color(FL_LEFT_BCOL); ps_output("%.3f %.3f LW ", 3.7 / (w + h), 3.7 / (w + h)); ps_output("-0.9 %.3f M 0.9 %.3f LT S\n", t, t); ps_color(FL_RIGHT_BCOL); ps_output("0.9 -%.3f M 0.9 %.3f LT S ", t, t); ps_output("-0.9 -%.3f M 0.9 -%.3f LT S\n", t, t); } /*************************************** * due to pixel precision problems, we have to draw uparrow, downarrow * and ripple line in absolute unit with the origin * at the center of the figure. ***************************************/ static void draw_uparrow( float x, float y, float w, float h, int angle, long col FL_UNUSED_ARG ) { float yc = y + h * 0.5; float xc = x + w * 0.5; float dx, dy; int d = 3 + (w + h) * 0.06; x += d; y += d; w -= 2 * d; h -= 2 * d; dx = w / 2; dy = h / 2; if (angle == 90) { ps_line(xc, yc + dy, xc - dx, yc - dy, FL_LEFT_BCOL); ps_line(xc - dx, yc - dy, xc + dx, yc - dy, FL_BOTTOM_BCOL); ps_line(xc + dx, yc - dy, xc, yc + dy, FL_RIGHT_BCOL); } else if (angle == 180) { ps_line(xc - dx, yc, xc + dx, yc + dy, FL_TOP_BCOL); ps_line(xc + dx, yc + dy, xc + dx, yc - dy, FL_RIGHT_BCOL); ps_line(xc + dx, yc - dy, xc - dx, yc, FL_BOTTOM_BCOL); } else if (angle == 270) { ps_line(xc - dx, yc + dy, xc, yc - dy, FL_BOTTOM_BCOL); ps_line(xc, yc - dy, xc + dx, yc + dy, FL_RIGHT_BCOL); ps_line(xc + dx, yc + dy, xc - dx, yc + dy, FL_TOP_BCOL); } else { ps_line(x, yc - dy, x + w, yc, FL_BOTTOM_BCOL); ps_line(x, yc + dy, x + w, yc, FL_RIGHT_BCOL); ps_line(x, yc - dy, x, yc + dy, FL_LEFT_BCOL); } } /*************************************** ***************************************/ static void draw_dnarrow( float x, float y, float w, float h, int angle, long col FL_UNUSED_ARG ) { float yc = y + h * 0.5; float xc = x + w * 0.5; float dx, dy; int d = 3 + (w + h) * 0.06; x += d; y += d; w -= 2 * d; h -= 2 * d; dx = w / 2; dy = h / 2; if (angle == 90) { ps_line(xc, yc + dy, xc - dx, yc - dy, FL_RIGHT_BCOL); ps_line(xc - dx, yc - dy, xc + dx, yc - dy, FL_TOP_BCOL); ps_line(xc + dx, yc - dy, xc, yc + dy, FL_TOP_BCOL); } else if (angle == 180) { ps_line(xc - dx, yc, xc + dx, yc + dy, FL_RIGHT_BCOL); ps_line(xc + dx, yc + dy, xc + dx, yc - dy, FL_LEFT_BCOL); ps_line(xc + dx, yc - dy, xc - dx, yc, FL_TOP_BCOL); } else if (angle == 270) { ps_line(xc - dx, yc + dy, xc, yc - dy, FL_RIGHT_BCOL); ps_line(xc, yc - dy, xc + dx, yc + dy, FL_LEFT_BCOL); ps_line(xc + dx, yc + dy, xc - dx, yc + dy, FL_BOTTOM_BCOL); } else { ps_line(xc - dx, yc - dy, xc - dx, yc + dy, FL_RIGHT_BCOL); ps_line(xc - dx, yc - dy, xc + dx, yc, FL_TOP_BCOL); ps_line(xc - dx, yc + dy, xc + dx, yc, FL_BOTTOM_BCOL); } } /*************************************** * need single pixel precision, draw in abs. coordiante system ***************************************/ static void draw_ripple_lines( float x, float y, float w, float h, int angle, long col FL_UNUSED_ARG ) { float ym = y + h / 2, ys; float xm = x + w / 2, xs; int i, mw = FL_BOUND_WIDTH; if (h < 9 || w < 9) { fprintf(stderr, "RippledLine: Area too small\n"); return; } xs = xm + 5; ys = ym + 5; if (angle == 90 || angle == 270) for (i = 0; i < 3; i++) { ps_line(xs, y + mw, xs, y + h - mw - 1, FL_RIGHT_BCOL); xs -= 1; ps_line(xs, y + mw, xs, y + h - mw - 1, FL_LEFT_BCOL); xs -= 3; } else for (i = 0; i < 3; i++) { ps_line(x + mw, ys, x + w - mw - 1, ys, FL_LEFT_BCOL); ys -= 1; ps_line(x + mw, ys, x + w - mw - 1, ys, FL_RIGHT_BCOL); ys -= 3; } } /*************************************** ***************************************/ static void draw_bararrowhead( float x, float y, float w, float h, int angle, long col ) { float xc = x + 0.5 * w, yc = y + 0.5 * h; int d = 3 + 0.06 * (w + h); float dx, dy, mar, dbar, xl; Point point[ 5 ], *p; x += d; y += d; w -= 2 * d; h -= 2 * d; dx = w / 2; dy = h / 2; dbar = dx * 0.4; mar = 0.2 * dx; ps_output( "gsave %.1f %.1f translate %d rotate\n", xc, yc, angle ); xl = -dx + 1.1 * mar; p = point; AddVertex( p, xl, -dy); AddVertex( p, xl + dbar, -dy ); AddVertex( p, xl + dbar, dy ); AddVertex( p, xl, dy ); ps_poly( 1, point, 4, col ); ps_poly( 0, point, 4, FL_RIGHT_BCOL ); p = point; AddVertex( p, -mar, -dy ); AddVertex( p, -mar + dx, 0 ); AddVertex( p, -mar, dy) ; ps_poly( 1, point, 3, col ); ps_poly( 0, point, 3, FL_RIGHT_BCOL ); ps_output( "grestore\n" ); } /* all PS drawings have a size of 2 pixels and centered at origin */ static PS_draw psdraw[] = { {"returnarrow", "returnarrow", "-0.8 0.0 -0.1 0.7 -0.1 0.05 0.6 0.05 0.6 0.7 0.7 0.7 0.7 -0.05\n" "-0.1 -0.05 -0.1 -0.7 9 P", 0, 0, 0, 0 }, {"->", "rarrow", "-0.8 -0.4 -0.8 0.4 0 0.4 0 0.8 0.8 0 0 -0.8 0 -0.4 7 P", 0, 0, 0, 0 }, {"<-", "180 rotate", 0, -1, 0, 0, 0}, {">", "rarrowh", "-0.2 0.7 M 0.5 0.0 LT -0.2 -0.7 LT C", 0, 0, 0, 0}, {"<", "180 rotate", 0, -1, 0, 0, 0}, {"<->", "darrow", "-0.25 0.4 0.25 0.4 0.25 0.8 0.85 0 0.25 -0.8 0.25 -0.4 -0.25 -0.4\n" "-0.25 -0.8 -0.85 0 -0.25 0.8 10 P", 0, 0, 0, 0 }, {"plus", "plus", "-0.9 -0.13 -0.9 0.13 -0.13 0.13 -0.13 0.9 0.13 0.9 0.13 0.13 0.9 0.13\n" "0.9 -0.13 0.13 -0.13 0.13 -0.9 -0.13 -0.9 -0.13 -0.13 12 P", 0, 0, 0, 0 }, {">>", "darrowh", "0.15 0.7 0.85 0 0.15 -0.7 0.15 -0.001 -0.55 -0.7 -0.55 0.7 0.15 0.001\n" "7 P", 0, 0, 0, 0 }, {"<<", "180 rotate", 0, -1, 0, 0, 0}, {"arrow", "thinarrow", "-0.9 0.02 M 0.65 0.02 LT 0.65 0.15 LT 0.9 0 LT 0.65 -0.15 LT\n" "0.65 -0.02 LT -0.9 -0.02 LT C", 0, 0, 0, 0 }, {"circle", "circle", "0 0 0.77 0 360 arc", 0, 0, 0, 0}, {"square", "square", "-0.77 -0.77 M -0.77 0.77 LT 0.77 0.77 LT 0.77 -0.77 LT C", 0, 0, 0, 0 }, {"line", "line", "-0.97 0.01 M 0.97 0.01 LT 0.97 -0.01 LT -0.08 -0.01 LT C", 0, 0, 0, 0 }, {"->|", "arrowbar", "-0.75 0.35 -0.1 0.35 -0.1 0.75 0.6 0.001 0.6 0.75 0.75 0.75\n" " 0.75 -0.75 0.6 -0.75 0.6 -0.001 -0.1 -0.75 -0.1 -0.35 -0.75 -0.35 12 P\n", 0, 0, 0, 0 }, {"|<-", "180 rotate", 0, -1, 0, 0, 0}, {">|", "arrowheadbar", /* bar 0.25 */ "-0.60 0.7 0.22 0.001 0.22 0.7 0.47 0.7 0.47 -0.7 0.22 -0.7\n" " 0.22 -0.001 -0.60 -0.7 8 P", 0, 0, 0, 0 }, {"|<", "180 rotate", 0, -1, 0, 0, 0}, {"|>", "bararrowhead", 0, -1, draw_bararrowhead, 1, 0}, {"DnLine", "dnline", 0, -1, draw_dnline, 0, 0}, {"dnline", "dnline", 0, -1, draw_dnline, 0, 0}, {"UpLine", "upline", 0, -1, draw_upline, 0, 0}, {"upline", "upline", 0, -1, draw_upline, 0, 0}, {"UpArrow", "uparrow", 0, -1, draw_uparrow, 1, 0}, {"DnArrow", "dnarrow", 0, -1, draw_dnarrow, 1, 0}, {"=", "RippleLines", 0, -1, draw_ripple_lines, 1, 0}, /* aliases */ {"RippleLines", "RippleLines", 0, -1, draw_ripple_lines, 1, 0}, {"+", "plus", "-0.9 -0.13 -0.9 0.13 -0.13 0.13 -0.13 0.9 0.13 0.9 0.13 0.13 0.9 0.13\n" "0.9 -0.13 0.13 -0.13 0.13 -0.9 -0.13 -0.9 -0.13 -0.13 12 P", 0, 0, 0, 0 }, {"-->", "thinarrow", "-0.9 0.02 M 0.65 0.02 LT 0.65 0.15 LT 0.9 0 LT 0.65 -0.15 LT\n" "0.65 -0.02 LT -0.9 -0.02 LT C", 0, 0, 0, 0 } }; /*************************************** ***************************************/ static void define_symbol( PS_draw * p ) { if ( ! p->defined && ! p->fdrawit ) { if ( p->otherdef ) define_symbol( p + p->otherdef ); else ps_output( "/%s {%s} bind def\n", p->psname, p->draw ); p->defined = 1; } } /*************************************** ***************************************/ static PS_draw * find( const char *s ) { PS_draw *p = psdraw, *ps = psdraw + sizeof psdraw / sizeof *psdraw; for ( ; p < ps; p++ ) if ( strcmp( s, p->name ) == 0 ) { define_symbol( p ); return p; } return 0; } #define swapit( t, a, b ) do { t t_; t_ = a; a = b; b = t_; } while( 0 ) /*************************************** ***************************************/ int ps_draw_symbol( const char * label, float x, float y, float w, float h, long col ) { int pos, shift, equalscale = 0; short defr[] = { 0, 225, 270, 315, 180, 0, 0, 135, 90, 45 }; PS_draw *s; int rotated = 0; int sw = w, sh = h; int delta = 0; if ( ! label || *label != '@' ) return 0; if ( psinfo.verbose ) ps_verbatim( "%%Symbol %s: %.1f %.1f %.1f %.1f\n", label + 1, x, y, w, h ); x += 1.2; y += 1.2; w -= 2.4; h -= 2.4; /* check special operators */ pos = 1; while ( ( label[ pos ] == '-' && isdigit( label[ pos + 1 ] ) ) || ( label[ pos ] == '+' && isdigit( label[ pos + 1 ] ) ) || label[ pos ] == '#' ) { switch ( label[ pos ] ) { case '+': delta = '0' - label[ ++pos ]; break; case '-': delta = label[ ++pos ] - '0'; break; case '#': equalscale = 1; break; } pos++; } shift = pos; if ( label[ pos ] >= '1' && label[ pos ] <= '9' ) { rotated = defr[ label[ pos ] - '0' ]; shift = pos + 1; } else if ( label[ pos ] == '0' ) { rotated = 100 * ( label[ pos + 1 ] - '0' ) + 10 * ( label[ pos + 2 ] - '0' ) + 1 * ( label[ pos + 3 ] - '0' ); shift = pos + 4; } /* short hand with @4 etc */ if ( ! ( s = ( label[ shift ] ? find( label + shift ) : psdraw ) ) ) { fprintf( stderr, "Bad label %s\n", label + shift ); if ( psinfo.verbose ) ps_verbatim( "%% unknown symbol %s. Not drawn\n", label ); return 0; } if ( equalscale ) sw = sh = FL_min( w, h ); if ( delta ) { if ( s->abs_coordinate ) { x += delta; y += delta; } sw -= 2 * delta; sh -= 2 * delta; } if ( ! s->abs_coordinate ) ps_output( "gsave\n%.1f %.1f translate %.1f %.1f scale %d rotate " "%.3f %.3f LW\n", x + 0.5 * w, y + 0.5 * h, 0.45 * sw, 0.45 * sh, rotated, 3.2 / ( sw + sh ), 3.2 / ( sh + sw ) ); if ( s->fdrawit ) { s->fdrawit( x, y, w, h, rotated, col ); if (!s->abs_coordinate) ps_output( "grestore\n" ); ps_invalidate_color_cache( ); return 1; } if ( s->otherdef ) { ps_output( "%s ", s->psname ); s = s + s->otherdef; } ps_color( col ); ps_output( "%s F ", s->psname ); ps_color( FL_BLACK ); ps_output( "%s S\n", s->psname ); ps_output( "grestore\n" ); ps_invalidate_color_cache( ); return 1; } /********************** end of symbols *************************}*/ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/.gitignore0000644000175000017500000000543411204067355014227 0ustar jensjensMakefile Makefile.in acinclude.m4 aclocal.m4 autom4te.cache/ config.log config.status config/Makefile config/Makefile.in config/install-sh config/missing configure *~ *.o *.lo *.la *.bak *.aux *.cp *.fn *.fns *.ky *.log *.pg *.toc *.tp *.tps *.vr .cvsignore CVS Makefile.in demos/.deps/ demos/.libs/ demos/Makefile demos/arrowbutton demos/borderwidth demos/boxtype demos/browserall demos/browserop demos/buttonall demos/butttypes demos/canvas demos/canvas2 demos/chartall demos/chartstrip demos/choice demos/colbrowser demos/colsel demos/colsel1 demos/counter demos/cursor demos/demo demos/demo05 demos/demo06 demos/demo27 demos/demo33 demos/demotest demos/demotest2 demos/demotest3 demos/dirlist demos/fbrowse demos/fbrowse1 demos/fd/Makefile demos/fd/buttons_gui.c demos/fd/buttons_gui.h demos/fd/butttypes_gui.c demos/fd/butttypes_gui.h demos/fd/fbtest_gui.c demos/fd/fbtest_gui.h demos/fd/folder_gui.c demos/fd/folder_gui.h demos/fd/formbrowser_gui.c demos/fd/formbrowser_gui.h demos/fd/ibrowser_gui.c demos/fd/ibrowser_gui.h demos/fd/inputall_gui.c demos/fd/inputall_gui.h demos/fd/is_gui.c demos/fd/is_gui.h demos/fd/pmbrowse_gui.c demos/fd/pmbrowse_gui.h demos/fd/scrollbar_gui.c demos/fd/scrollbar_gui.h demos/fd/twheel_gui.c demos/fd/twheel_gui.h demos/fdial demos/flclock demos/folder demos/fonts demos/formbrowser demos/free1 demos/freedraw demos/freedraw_leak demos/gl demos/glwin demos/goodies demos/grav demos/group demos/ibrowser demos/iconify demos/iconvert demos/inputall demos/invslider demos/itest demos/lalign demos/ldial demos/ll demos/longlabel demos/menu demos/minput demos/minput2 demos/multilabel demos/ndial demos/new_popup demos/newbutton demos/nmenu demos/objinactive demos/objpos demos/objreturn demos/pmbrowse demos/popup demos/positioner demos/positionerXOR demos/preemptive demos/pup demos/pushbutton demos/pushme demos/rescale demos/scrollbar demos/secretinput demos/select demos/sld_alt demos/sld_radio demos/sldinactive demos/sldsize demos/sliderall demos/strsize demos/symbols demos/thumbwheel demos/timeoutprec demos/timer demos/timerprec demos/touchbutton demos/wwwl demos/xyplotactive demos/xyplotall demos/xyplotover demos/yesno demos/yesno_cb doc/xforms.info* doc/xforms.html/ doc/xforms.pdf fd2ps/.deps/ fd2ps/.libs/ fd2ps/Makefile fd2ps/fd2ps fd2ps/fd2ps.1 fd2ps/test/Makefile fdesign/.deps/ fdesign/.libs/ fdesign/Makefile fdesign/fd/Makefile fdesign/fd4test/Makefile fdesign/fdesign fdesign/fdesign.1 fdesign/notes/Makefile fdesign/spec/Makefile fdesign/xpm/Makefile gl/.deps/ gl/.libs/ gl/Makefile image/.deps/ image/.libs/ image/Makefile lib/.deps/ lib/.libs/ lib/Makefile lib/bitmaps/Makefile lib/config.h lib/config.h.in lib/fd/Makefile lib/include/AAA.h lib/include/Makefile lib/include/forms.h lib/include/stamp-forms lib/private/Makefile lib/stamp-h1 lib/xforms.5 libtool makelog xforms.spec xforms-1.0.93sp1/aclocal.m40000644000175000017500000010704611377311600014075 0ustar jensjens# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, [m4_warning([this file was generated for autoconf 2.64. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # 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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) xforms-1.0.93sp1/configure0000755000175000017500000264532611377311603014161 0ustar jensjens#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.64 for xforms 1.0.93sp1. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software # Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: xforms-development@nongnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xforms' PACKAGE_TARNAME='xforms' PACKAGE_VERSION='1.0.93sp1' PACKAGE_STRING='xforms 1.0.93sp1' PACKAGE_BUGREPORT='xforms-development@nongnu.org' PACKAGE_URL='' ac_unique_file="lib/forms.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS JPEG_LIB XPM_LIB X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF BUILD_GL_FALSE BUILD_GL_TRUE LIBTOOL ac_ct_F77 FFLAGS F77 CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX OBJDUMP AS DLLTOOL NMEDIT DSYMUTIL AR ECHO LN_S SED EGREP GREP RANLIB CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC BUILD_DOCS_FALSE BUILD_DOCS_TRUE BUILD_DEMOS_FALSE BUILD_DEMOS_TRUE USE_BWC_BS_HACK_FALSE USE_BWC_BS_HACK_TRUE SO_VERSION MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build FL_FIXLEVEL FL_REVISION FL_VERSION VERSION PACKAGE target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_bwc_bs_hack enable_demos enable_docs enable_dependency_tracking enable_warnings enable_debug enable_optimization enable_shared enable_static enable_fast_install with_gnu_ld enable_libtool_lock with_pic with_tags with_extra_lib with_extra_inc with_extra_prefix enable_gl with_x ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures xforms 1.0.93sp1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/xforms] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR 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 case $ac_init_help in short | recursive ) echo "Configuration of xforms 1.0.93sp1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-bwc-bs-hack Enable backward compatiblity hack for browser, scrollbar and tabfolder objects --enable-demos Build demo programs --enable-docs Build documentation --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-warnings tell the compiler to display more warnings --enable-debug enable debug information --enable-optimization=value enable compiler optimisation default=-O --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-gl Do not build GL support library 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-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-extra-lib specify extra library directory --with-extra-inc specify extra include directory --with-extra-prefix specify extra lib+include directory --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF xforms configure 1.0.93sp1 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## -------------------------------------------- ## ## Report this to xforms-development@nongnu.org ## ## -------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_cxx_try_link # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_f77_try_compile # ac_fn_f77_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_f77_try_link # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by xforms $as_me 1.0.93sp1, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION eval `echo $PACKAGE_VERSION | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/FL_VERSION=\1; FL_REVISION=\2; FL_FIXLEVEL=\3/'` echo "configuring xforms version $VERSION" xforms_devel_version=no case $VERSION in *.[5-9][0-9]) xforms_devel_version=yes $as_echo "#define DEVEL_VERSION 1" >>confdefs.h echo "WARNING: This is a development version. Expect bugs." ;; esac # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # 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}- ac_config_headers="$ac_config_headers lib/config.h" am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ### This defines the version number of the installed .so files ### using libtool's versioning system. SO_VERSION="2:0:0" # fix the value of the prefixes. test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ### Set the execute permissions of the various scripts correctly for file in config/install-sh config/mkinstalldirs ; do chmod 755 ${srcdir}/${file} done # Check whether --enable-bwc_bs_hack was given. if test "${enable_bwc_bs_hack+set}" = set; then : enableval=$enable_bwc_bs_hack; fi if test x$enable_bwc_bs_hack = xyes; then USE_BWC_BS_HACK_TRUE= USE_BWC_BS_HACK_FALSE='#' else USE_BWC_BS_HACK_TRUE='#' USE_BWC_BS_HACK_FALSE= fi # Check whether --enable-demos was given. if test "${enable_demos+set}" = set; then : enableval=$enable_demos; fi if test x$enable_demos = xyes; then BUILD_DEMOS_TRUE= BUILD_DEMOS_FALSE='#' else BUILD_DEMOS_TRUE='#' BUILD_DEMOS_FALSE= fi # Check whether --enable-docs was given. if test "${enable_docs+set}" = set; then : enableval=$enable_docs; fi if test x$enable_docs = xyes; then BUILD_DOCS_TRUE= BUILD_DOCS_FALSE='#' else BUILD_DOCS_TRUE='#' BUILD_DOCS_FALSE= fi ### Check for programs DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ### We might want to get or shut warnings. # Check whether --enable-warnings was given. if test "${enable_warnings+set}" = set; then : enableval=$enable_warnings; else if test $xforms_devel_version = yes && test $ac_cv_c_compiler_gnu = yes ; then enable_warnings=yes; else enable_warnings=no; fi; fi if test x$enable_warnings = xyes ; then xforms_flags="$xforms_flags warnings" $as_echo "#define WITH_WARNINGS 1" >>confdefs.h fi ### We might want to disable debug # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; else if test $xforms_devel_version = yes && test $ac_cv_c_compiler_gnu = yes ; then enable_debug=yes; else enable_debug=no; fi; fi ### set up optimization # Check whether --enable-optimization was given. if test "${enable_optimization+set}" = set; then : enableval=$enable_optimization; else enable_optimization=yes; fi case $enable_optimization in yes) xforms_opt=-O;; no) xforms_opt=;; *) xforms_opt=${enable_optimization};; esac # set the debug flags correctly. if test x$GCC = xyes; then if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS else CFLAGS="$xforms_opt" if test x$enable_debug = xyes ; then CFLAGS="-g $CFLAGS" fi fi if test x$enable_warnings = xyes ; then CFLAGS="$CFLAGS -W -Wall" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi ### check for special systems { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then : break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h ### Check for some Cygwin-specific details. case $host_os in cygwin* | mingw* | pw32* ) if test "$GCC" = yes; then # Ensure MSVC-compatible struct packing convention. # Depends on GCC version. gcc2 uses -fnative-struct while # gcc3 uses -mms-bitfields. # msnative_struct='' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get MSVC-compatible struct packing" >&5 $as_echo_n "checking how to get MSVC-compatible struct packing... " >&6; } case `$CC --version | sed -e 's,\..*,.,' -e q` in 2.) if $CC -v --help 2>/dev/null | grep fnative-struct > /dev/null; then msnative_struct='-fnative-struct' fi ;; *) if $CC -v --help 2>/dev/null | grep ms-bitfields > /dev/null; then msnative_struct='-mms-bitfields' fi ;; esac if test x"$msnative_struct" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no way" >&5 $as_echo "no way" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: produced libraries might be incompatible with MSVC libs" >&5 $as_echo "$as_me: WARNING: produced libraries might be incompatible with MSVC libs" >&2;} else CXXFLAGS="$CXXFLAGS $msnative_struct" { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${msnative_struct}" >&5 $as_echo "${msnative_struct}" >&6; } fi fi # Export all symbols to Win32 DLL using MinGW 2.0 ld. WIN32_LD_EXPORT_ALL_SYMBOLS='' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld accepts --export-all-symbols" >&5 $as_echo_n "checking whether ld accepts --export-all-symbols... " >&6; } if $LD --help 2>&1 | egrep 'export-all-symbols' > /dev/null; then WIN32_LD_EXPORT_ALL_SYMBOLS='-Wl,--export-all-symbols' { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$WIN32_LD_EXPORT_ALL_SYMBOLS" != x; then LDFLAGS="$LDFLAGS $WIN32_LD_EXPORT_ALL_SYMBOLS" fi ;; esac # Work around a problem in automake 1.4: when invoking install-strip, # INSTALL_PROGRAM is changed to 'install -s', and since # INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0 # which returns an error condition when stripping fails. INSTALL_SCRIPT='${INSTALL}' ### Setup libtool # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${lt_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 $as_echo "$SED" >&6; } # Check whether --with-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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5 $as_echo_n "checking for BSD-compatible nm... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 5644 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; *-*-cygwin* | *-*-mingw* | *-*-pw32*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac need_locks="$enable_libtool_lock" for ac_header in dlfcn.h do : ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$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 if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # 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_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then : $as_echo_n "(cached) " >&6 else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes else ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=yes # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8076: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8080: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8366: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8370: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8470: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8474: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 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't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; 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=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5 $as_echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then : withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) as_fn_error "invalid tag name: $tagname" "$LINENO" 5 ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5 fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" 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].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12940: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12944: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13044: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13048: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 $as_echo "$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14627: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14631: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14731: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14735: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=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't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; 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_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 $as_echo "$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5 $as_echo "$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 $as_echo "$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16896: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16900: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_GCJ" >&5 $as_echo "$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17186: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17190: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17290: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:17294: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=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't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; 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_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_GCJ" >&5 $as_echo "$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_GCJ" >&5 $as_echo "$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_GCJ" >&5 $as_echo "$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5 ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5 fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion ### Add extra directories to check for libraries. # Check whether --with-extra-lib was given. if test "${with_extra_lib+set}" = set; then : withval=$with_extra_lib; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra library directory" >&5 $as_echo_n "checking for extra library directory... " >&6; } if test -z "$with_extra_lib"; then if test "${xforms_cv_extra_lib+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_lib=NONE fi else test "x$with_extra_lib" = xyes && with_extra_lib= xforms_cv_extra_lib="$with_extra_lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_lib" >&5 $as_echo "$xforms_cv_extra_lib" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_lib"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 xforms_ldflags="${xforms_ldflags} -L$dir" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then xforms_ldflags="${xforms_ldflags} -Wl,-R$dir" else xforms_ldflags="${xforms_ldflags} -R$dir" fi fi fi done IFS=$ac_save_ifs test ! x"$xforms_ldflags" = x && LDFLAGS="$xforms_ldflags $LDFLAGS" ### Add extra directories to check for include files. # Check whether --with-extra-inc was given. if test "${with_extra_inc+set}" = set; then : withval=$with_extra_inc; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra include directory" >&5 $as_echo_n "checking for extra include directory... " >&6; } if test -z "$with_extra_inc"; then if test "${xforms_cv_extra_inc+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_inc=NONE fi else test "x$with_extra_inc" = xyes && with_extra_inc= xforms_cv_extra_inc="$with_extra_inc" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_inc" >&5 $as_echo "$xforms_cv_extra_inc" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_inc"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 xforms_cppflags="${xforms_cppflags} -I$dir " fi done IFS=$ac_save_ifs test ! x"$xforms_cppflags" = x && CPPFLAGS="$xforms_cppflags $CPPFLAGS" ### Add both includes and libraries # Check whether --with-extra-prefix was given. if test "${with_extra_prefix+set}" = set; then : withval=$with_extra_prefix; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra lib+include directory" >&5 $as_echo_n "checking for extra lib+include directory... " >&6; } if test -z "$with_extra_prefix"; then if test "${xforms_cv_extra_prefix+set}" = set; then : $as_echo_n "(cached) " >&6 else xforms_cv_extra_prefix=NONE fi else test "x$with_extra_prefix" = xyes && with_extra_prefix=${prefix} xforms_cv_extra_prefix="$with_extra_prefix" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_extra_prefix" >&5 $as_echo "$xforms_cv_extra_prefix" >&6; } IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for dir in `eval "echo $xforms_cv_extra_prefix"`; do if test ! "$dir" = NONE; then test ! -d "$dir" && as_fn_error "\"$dir\" is not a directory" "$LINENO" 5 CPPFLAGS="${CPPFLAGS} -I$dir/include " LDFLAGS="${LDFLAGS} -L$dir/lib" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then LDFLAGS="${LDFLAGS} -Wl,-R$dir/lib" else LDFLAGS="${LDFLAGS} -R$dir/lib" fi fi fi done IFS=$ac_save_ifs # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if test "${ac_cv_lib_m_sin+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fopen in -lc" >&5 $as_echo_n "checking for fopen in -lc... " >&6; } if test "${ac_cv_lib_c_fopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fopen (); int main () { return fopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_fopen=yes else ac_cv_lib_c_fopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_fopen" >&5 $as_echo "$ac_cv_lib_c_fopen" >&6; } if test "x$ac_cv_lib_c_fopen" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi # Checks for header files. for ac_header in sys/select.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" if test "x$ac_cv_header_sys_select_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SELECT_H 1 _ACEOF fi done # Check whether we want to build the gl code # Check whether --enable-gl was given. if test "${enable_gl+set}" = set; then : enableval=$enable_gl; fi if test x$enable_gl != xno ; then ac_fn_c_check_header_mongrel "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "$ac_includes_default" if test "x$ac_cv_header_GL_glx_h" = x""yes; then : else enable_gl=no fi fi if test x$enable_gl != xno; then BUILD_GL_TRUE= BUILD_GL_FALSE='#' else BUILD_GL_TRUE='#' BUILD_GL_FALSE= fi # Check for X, XPM and JPEG { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = x""yes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = x""yes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = x""yes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = x""yes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = x""yes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi ### Check for Xpm library SAVE_LIBS="$LIBS" LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreateBufferFromImage in -lXpm" >&5 $as_echo_n "checking for XpmCreateBufferFromImage in -lXpm... " >&6; } if test "${ac_cv_lib_Xpm_XpmCreateBufferFromImage+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XpmCreateBufferFromImage (); int main () { return XpmCreateBufferFromImage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xpm_XpmCreateBufferFromImage=yes else ac_cv_lib_Xpm_XpmCreateBufferFromImage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreateBufferFromImage" >&5 $as_echo "$ac_cv_lib_Xpm_XpmCreateBufferFromImage" >&6; } if test "x$ac_cv_lib_Xpm_XpmCreateBufferFromImage" = x""yes; then : XPM_LIB="-lXpm" else xforms_error_txt="$xforms_error_txt ** Cannot find libXpm. Please check that the Xpm library is correctly installed on your system. " xforms_error=yes fi LIBS="$SAVE_LIBS" ### Check for Xpm headers SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" xforms_cv_xpm_h_location="" ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : ac_cv_header_xpm_h=yes xforms_cv_xpm_h_location="" else ac_fn_c_check_header_mongrel "$LINENO" "xpm.h" "ac_cv_header_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_xpm_h" = x""yes; then : else xforms_error_txt="$xforms_error_txt ** Cannot find xpm.h. Please check that the Xpm library is correctly installed on your system. " xforms_error=yes fi fi cat >>confdefs.h <<_ACEOF #define XPM_H_LOCATION $xforms_cv_xpm_h_location _ACEOF CPPFLAGS="$SAVE_CPPFLAGS" ### Test for the header version if test $ac_cv_header_xpm_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking xpm header version" >&5 $as_echo_n "checking xpm header version... " >&6; } if test "${xforms_cv_xpmversion+set}" = set; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <&5 | \ grep '^"%%%"' 2>/dev/null | \ sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'` case "$xforms_cv_xpmr" in [0-9]) xformsxpmr_alpha=`echo $xforms_cv_xpmr |tr 123456789 abcdefghi` xformsxpmv_alpha=" (aka 3.$xforms_cv_xpmv$xformsxpmr_alpha)";; *) ;; esac xforms_cv_xpmversion="$xforms_cv_xpmv.$xforms_cv_xpmr$xformsxpmv_alpha" rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xforms_cv_xpmversion" >&5 $as_echo "$xforms_cv_xpmversion" >&6; } XPM_VERSION=${xforms_cv_xpmversion} case "$xforms_cv_xpmr" in [789]|[0-9][0-9]*) ;; *) xforms_warning_txt="$xforms_warning_txt == Version $xforms_cv_xpmversion of the Xpm library is a bit old. If you experience strange crashes with xforms, try to upgrade to at least version 4.7 (aka 3.4g). If you have installed a newer version of the library, check whether you have an old xpm.h header file in your include path. " xforms_warning=yes;; esac fi ### Check for Jpeg library { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; } if test "${ac_cv_lib_jpeg_jpeg_CreateDecompress+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jpeg_CreateDecompress (); int main () { return jpeg_CreateDecompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_CreateDecompress=yes else ac_cv_lib_jpeg_jpeg_CreateDecompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; } if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = x""yes; then : JPEG_LIB="-ljpeg" else xforms_error_txt="$xforms_error_txt ** Cannot find libjpeg. Please check that the jpeg library is correctly installed on your system. " xforms_error=yes fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF if test $ac_cv_type_signal = "void" ; then $as_echo "#define RETSIGTYPE_IS_VOID 1" >>confdefs.h fi for ac_func in snprintf strcasecmp strerror usleep nanosleep vsnprintf sigaction do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stdio.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if snprintf is declared by header $ac_header" >&5 $as_echo_n "checking if snprintf is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "snprintf" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done for ac_header in stdio.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf is declared by header $ac_header" >&5 $as_echo_n "checking if vsnprintf is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "vsnprintf" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF #define HAVE_DECL_VSNPRINTF 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done for ac_header in signal.h do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction is declared by header $ac_header" >&5 $as_echo_n "checking if sigaction is declared by header $ac_header... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sigaction" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SIGACTION 1 _ACEOF break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* done ### Some information on what just happened VERSION_INFO="Configuration\n\ Host type: ${host}\n\ Special build flags: ${xforms_flags}\n\ C Compiler: ${CC}\n\ C Compiler flags: ${CFLAGS}\n\ Linker flags: ${LDFLAGS}\n" ### Not used for now. ### AC_SUBST(VERSION_INFO) ## Some config.h stuff ### Finish the work. ac_config_files="$ac_config_files Makefile xforms.spec lib/include/AAA.h config/Makefile lib/Makefile lib/bitmaps/Makefile lib/fd/Makefile lib/include/Makefile lib/private/Makefile image/Makefile gl/Makefile fdesign/Makefile fdesign/fd/Makefile fdesign/fd4test/Makefile fdesign/notes/Makefile fdesign/spec/Makefile fdesign/xpm/Makefile fd2ps/Makefile fd2ps/test/Makefile demos/Makefile demos/fd/Makefile doc/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_BWC_BS_HACK_TRUE}" && test -z "${USE_BWC_BS_HACK_FALSE}"; then as_fn_error "conditional \"USE_BWC_BS_HACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DEMOS_TRUE}" && test -z "${BUILD_DEMOS_FALSE}"; then as_fn_error "conditional \"BUILD_DEMOS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then as_fn_error "conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_GL_TRUE}" && test -z "${BUILD_GL_FALSE}"; then as_fn_error "conditional \"BUILD_GL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by xforms $as_me 1.0.93sp1, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ xforms config.status 1.0.93sp1 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "xforms.spec") CONFIG_FILES="$CONFIG_FILES xforms.spec" ;; "lib/include/AAA.h") CONFIG_FILES="$CONFIG_FILES lib/include/AAA.h" ;; "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/bitmaps/Makefile") CONFIG_FILES="$CONFIG_FILES lib/bitmaps/Makefile" ;; "lib/fd/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fd/Makefile" ;; "lib/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/include/Makefile" ;; "lib/private/Makefile") CONFIG_FILES="$CONFIG_FILES lib/private/Makefile" ;; "image/Makefile") CONFIG_FILES="$CONFIG_FILES image/Makefile" ;; "gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;; "fdesign/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/Makefile" ;; "fdesign/fd/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/fd/Makefile" ;; "fdesign/fd4test/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/fd4test/Makefile" ;; "fdesign/notes/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/notes/Makefile" ;; "fdesign/spec/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/spec/Makefile" ;; "fdesign/xpm/Makefile") CONFIG_FILES="$CONFIG_FILES fdesign/xpm/Makefile" ;; "fd2ps/Makefile") CONFIG_FILES="$CONFIG_FILES fd2ps/Makefile" ;; "fd2ps/test/Makefile") CONFIG_FILES="$CONFIG_FILES fd2ps/test/Makefile" ;; "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;; "demos/fd/Makefile") CONFIG_FILES="$CONFIG_FILES demos/fd/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # show version information echo printf "$VERSION_INFO" echo # Display a final warning if there has been a XFORMS_ERROR if test x$xforms_error = xyes; then cat <../acinclude.m4) echo "done." # Generate the Makefiles and configure files if ( $ACLOCAL --version ) < /dev/null > /dev/null 2>&1; then echo "Building macros..." for dir in . ; do echo " $dir" ( cd $dir ; $ACLOCAL ) done echo "done." else echo "aclocal not found -- aborting" exit fi if ( $AUTOHEADER --version ) < /dev/null > /dev/null 2>&1; then echo "Building config header template..." for dir in . ; do echo " $dir" ( cd $dir ; $AUTOHEADER ) done echo "done." else echo "autoheader not found -- aborting" exit fi if ( $AUTOMAKE --version ) < /dev/null > /dev/null 2>&1; then echo "Building Makefile templates..." for dir in . ; do echo " $dir" ( cd $dir ; $AUTOMAKE ) done echo "done." else echo "automake not found -- aborting" exit fi if ( $AUTOCONF --version ) < /dev/null > /dev/null 2>&1; then echo "Building configure..." for dir in . ; do echo " $dir" ( cd $dir ; $AUTOCONF ) done echo "done." else echo "autoconf not found -- aborting" exit fi echo echo 'run "./configure ; make"' echo xforms-1.0.93sp1/config/0000755000175000017500000000000011377311602013474 5ustar jensjensxforms-1.0.93sp1/config/libtool.m40000644000175000017500000072167011171560225015416 0ustar jensjens# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, ## 2008 Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## ## This file is free software; the Free Software Foundation gives ## unlimited permission to copy and/or distribute it, with or without ## modifications, as long as this notice is preserved. # serial 52 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [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]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--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([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])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 $CC]) 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. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname 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(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" 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]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=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't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi 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]].*|aix[[5-9]]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; 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. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) xforms-1.0.93sp1/config/texinfo.tex0000644000175000017500000107011111204021075015662 0ustar jensjens% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2008-11-17.21} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008 Free Software Foundation, Inc. % % This texinfo.tex 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 3 of the % License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% Math-mode def from plain.tex. % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\undefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty out of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% \kern-.15em \TeX } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in % Old definition--didn't work. %\parseargdef\need{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @comma{} is so commas can be inserted into text without messing up % Texinfo's parsing. % \let\comma = , % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as \undefined, % borrowed from ifpdf.sty. \ifx\pdfoutput\undefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html % (and related messages, the final outcome is that it is up to the TeX % user to double the backslashes and otherwise make the string valid, so % that's what we do). % double active backslashes. % {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @let\=@doublebackslash} } % To handle parens, we must adopt a different approach, since parens are % not active characters. hyperref.dtx (which has the same problem as % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. % % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. % \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% \ifx\\##2\\% \else #2% \HyReturnAfterFi{% \HyPsdReplace##2\END }% \fi }% \xdef#3{\expandafter\HyPsdReplace#3#1\END}% } \long\def\HyReturnAfterFi#1\fi{\fi#1} % #1 is a control sequence in which to do the replacements. \def\backslashparens#1{% \xdef#1{#1}% redefine it as its expansion; the definition is simply % \lastnode when called from \setref -> \pdfmkdest. \HyPsdSubst{(}{\realbackslash(}{#1}% \HyPsdSubst{)}{\realbackslash)}{#1}% } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex. \def\cmykDarkRed{0.28 1 1 0.35} \def\cmykBlack{0 0 0 1} % \def\pdfsetcolor#1{\pdfliteral{#1 k}} % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\cmykBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .png, .jpg, .pdf (among % others). Let's try in that order. \let\pdfimgext=\empty \begingroup \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% \backslashparens\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\cmykDarkRed} \def\linkcolor{\cmykDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else % Doubled backslashes in the name. {\activebackslashdouble \xdef\pdfoutlinedest{#3}% \backslashparens\pdfoutlinedest}% \fi % % Also double the backslashes in the display string. {\activebackslashdouble \xdef\pdfoutlinetext{#1}% \backslashparens\pdfoutlinetext}% % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % % Read toc silently, to get counts of subentries for \pdfoutline. \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % xx to do this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Right % now, I guess we'll just let the pdf reader have its way. \indexnofonts \setupdatafile \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\undefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} % reset the current fonts \textfonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} % reduce space between paragraphs \divide\parskip by 2 % reset the current fonts \textfonts \rm } % end of 10pt text font size definitions % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xword{10} \def\xiword{11} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% \wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % % I wish the USA used A4 paper. % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally uses \ttsl. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\slanted=\smartslanted \def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic % @b, explicit bold. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} \setfont\keyrm\rmshape{8}{1000}{OT1} \font\keysy=cmsy9 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} \def\key #1{{\setupmarkupstyle{key}\nohyphenation \uppercase{#1}}\null} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } \def\codex #1{\tclose{#1}\endgroup} % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg'}% \fi\fi } % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct.' \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Hacks for glyphs from the EC fonts similar to \euro. We don't % use \let for the aliases, because sometimes we redefine the original % macro, and the alias should reflect the redefinition. \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{% \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi \def\itemcontents{#1}% % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. Note that \everycr resets \everytab. \def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we encounter the problem it was intended to solve again. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control% words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\L \definedummyword\OE \definedummyword\O \definedummyword\aa \definedummyword\ae \definedummyword\l \definedummyword\oe \definedummyword\o \definedummyword\ss \definedummyword\exclamdown \definedummyword\questiondown \definedummyword\ordf \definedummyword\ordm % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\expansion \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sc \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % Hopefully, all control words can become @asis. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\aa{aa}% \def\ae{ae}% \def\l{l}% \def\oe{oe}% \def\o{o}% \def\ss{ss}% \def\exclamdown{!}% \def\questiondown{?}% \def\ordf{a}% \def\ordm{o}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\registeredsymbol{R}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\expansion{==>}% \def\minus{-}% \def\pounds{pounds}% \def\point{.}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\result{=>}% \def\textdegree{degrees}% % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % \unnumberedno is an oxymoron, of course. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achive this, remember the "biggest" unnum. sec. we are currently in: \chardef\unmlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unmlevel \chardef\unmlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unmlevel \def\headtype{U}% \else \chardef\unmlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % \message{\putwordChapter\space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % \def\appendixnum{\putwordAppendix\space \appendixletter}% \message{\appendixnum}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } \outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } \outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. \outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } \outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% \hbox to 0pt{}% \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rmisbold #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: % % @section sec-whatever % @deffn def-whatever \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright \let\markupsetuplqsamp \markupsetnoligaturesquoteleft \let\markupsetuplqkbd \markupsetnoligaturesquoteleft % Allow an option to not replace quotes with a regular directed right % quote/apostrophe (char 0x27), but instead use the undirected quote % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it % the default, but it works for pasting with more pdf viewers (at least % evince), the lilypond developers report. xpdf does work with the % regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of \def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it by one command: \def\makedispenv #1#2{ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two synonyms: \def\maketwodispenvs #1#2#3{ \makedispenv{#1}{#3} \makedispenv{#2}{#3} } % @lisp: indented, narrowed, typewriter font; @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvs {lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenv {display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenv{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill \gobble } \let\Eflushright = \afterenvbreak % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } \envdef\quotation{% \setnormaldispenv \quotationstart } \envdef\smallquotation{% \setsmalldispenv \quotationstart } \let\Esmallquotation = \Equotation % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\undefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a minor refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } %%% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } %%% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } %%% Type: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % How we'll format the type name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % (plain.tex says that \dimen1 should be used only as global.) \parshape 2 0in \dimen0 \defargsindent \dimen2 % % Put the type name to the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% return value type \ifx\temp\empty\else \tclose{\temp} \fi #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{% \begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % ... and \example \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newline. % I've verified that it is necessary both for e-TeX and for ordinary TeX % --kasal, 29nov03 \scantokens{#1\endinput}% \endgroup } \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\scanctxt{% \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% \scanctxt \catcode`\\=\other } % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout }% \fi } % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printedrefname{\ignorespaces #3}% \setbox1=\hbox{\printedmanual\unskip}% \setbox0=\hbox{\printedrefname\unskip}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd0 = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd1 > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifdim \wd1 > 0pt \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via a macro so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing this stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip \fi % space after the standalone image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} } % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \def\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \input txi-#1.tex \fi \closein 1 } % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{~} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guilletright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{~} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'\i} \gdef^^ee{\^\i} \gdef^^ef{\v d} % \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active @def@normalbackslash{{@tt@backslashcurfont}} % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore xforms-1.0.93sp1/config/config.sub0000755000175000017500000007751111171560225015471 0ustar jensjens#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2008-12-12' # 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 XForms. If not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # 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, 2002, 2003, 2004, 2005 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 ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # 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 ;; * ) 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* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-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 | -knuth | -cray) 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 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -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/'` ;; -sco5v6*) # 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] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | 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) ;; ms1) basic_machine=mt-unknown ;; # 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-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | 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 ;; abacus) basic_machine=abacus-unknown ;; 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 ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; 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 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; 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 ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; 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 ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; 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 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-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-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`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 ;; rdos) basic_machine=i386-pc os=-rdos ;; 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 ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; 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 ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-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 ;; tpf) basic_machine=s390x-ibm os=-tpf ;; 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 ;; xbox) basic_machine=i686-pc os=-mingw32 ;; 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 ;; mmix) basic_machine=mmix-knuth ;; 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 ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 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* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -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-gnu* | -linux-newlib* | -linux-uclibc* \ | -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* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # 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* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -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 ;; -tpf*) os=-tpf ;; -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 ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -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 score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # 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 ;; mep-*) os=-elf ;; 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 ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-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 ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -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 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xforms-1.0.93sp1/config/config.guess0000755000175000017500000012671511171560225016027 0ustar jensjens#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2008-12-12' # 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 XForms. If not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by 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, 2002, 2003, 2004, 2005 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 ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # 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. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 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 ; 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 ; set_cc_for_build= ;' # 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 # 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 ;; sh5el) machine=sh5le-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 ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # 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. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; 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 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; 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 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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 ;; 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 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; 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 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # 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 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; 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 && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; 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 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; 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 ;; *: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 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi 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 ;; *: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 ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 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` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 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 && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 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 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; 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 | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; 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 | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; 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}-unknown-linux-gnu${LIBC} exit ;; 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-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa:Linux:*:*) echo xtensa-unknown-linux-gnu exit ;; 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}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; 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 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; 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 ;; 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 ;; 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 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; 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 ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. 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 ;; 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 ;; 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 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; 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 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*: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 | SHG2:*:4.0:3.0 | S7501*:*: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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *: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 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; 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 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *: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 ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *: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 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; 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\n"); 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 && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # 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 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; 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: xforms-1.0.93sp1/config/Makefile.am0000644000175000017500000000036611171560225015534 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = common.am config.guess config.sub cygwin.m4 depcomp \ libtool.m4 ltmain.sh xformsinclude.m4 # MAINTAINERCLEANFILES += $(srcdir)/install-sh \ # $(srcdir)/missing \ # $(srcdir)/mkinstalldirs xforms-1.0.93sp1/config/cygwin.m40000644000175000017500000000306011171560225015234 0ustar jensjens# Macro added for some Cygwin-specific support -*- sh -*- # @author@: Kayvan Sylvan AC_DEFUN([CHECK_WITH_CYGWIN], [ case $host_os in cygwin* | mingw* | pw32* ) if test "$GCC" = yes; then # Ensure MSVC-compatible struct packing convention. # Depends on GCC version. gcc2 uses -fnative-struct while # gcc3 uses -mms-bitfields. # msnative_struct='' AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) case `$CC --version | sed -e 's,\..*,.,' -e q` in 2.) if $CC -v --help 2>/dev/null | grep fnative-struct > /dev/null; then msnative_struct='-fnative-struct' fi ;; *) if $CC -v --help 2>/dev/null | grep ms-bitfields > /dev/null; then msnative_struct='-mms-bitfields' fi ;; esac if test x"$msnative_struct" = x; then AC_MSG_RESULT([no way]) AC_MSG_WARN([produced libraries might be incompatible with MSVC libs]) else CXXFLAGS="$CXXFLAGS $msnative_struct" AC_MSG_RESULT([${msnative_struct}]) fi fi # Export all symbols to Win32 DLL using MinGW 2.0 ld. WIN32_LD_EXPORT_ALL_SYMBOLS='' AC_MSG_CHECKING([whether ld accepts --export-all-symbols]) if $LD --help 2>&1 | egrep 'export-all-symbols' > /dev/null; then WIN32_LD_EXPORT_ALL_SYMBOLS='-Wl,--export-all-symbols' AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi if test x"$WIN32_LD_EXPORT_ALL_SYMBOLS" != x; then LDFLAGS="$LDFLAGS $WIN32_LD_EXPORT_ALL_SYMBOLS" fi ;; esac ]) xforms-1.0.93sp1/config/depcomp0000755000175000017500000004212711171560225015056 0ustar jensjens#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2008-12-12.02 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with XForms. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # 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. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. 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$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. 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 # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xforms-1.0.93sp1/config/xformsinclude.m40000644000175000017500000001775411171560225016635 0ustar jensjensdnl Some useful functions for xforms configure.in -*- sh -*- dnl Author: Jean-Marc Lasgouttes (lasgouttes@lyx.org) dnl Lars Gullik Bjønnes (larsbj@lyx.org) dnl Allan Rae (rae@lyx.org) dnl Usage XFORMS_CHECK_VERSION dnl Sets variables VERSION, FL_VERSION, FL_REVISION, FL_FIXLEVEL and dnl xforms_devel_version. AC_DEFUN([XFORMS_CHECK_VERSION],[ AC_SUBST(PACKAGE, $PACKAGE_NAME) AC_SUBST(VERSION, $PACKAGE_VERSION) [eval] `echo $PACKAGE_VERSION | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/FL_VERSION=\1; FL_REVISION=\2; FL_FIXLEVEL=\3/'` AC_SUBST(FL_VERSION) AC_SUBST(FL_REVISION) AC_SUBST(FL_FIXLEVEL) echo "configuring xforms version $VERSION" xforms_devel_version=no case $VERSION in dnl ( *.[[5-9]][[0-9]]) xforms_devel_version=yes AC_DEFINE(DEVEL_VERSION, 1, Define if you are building a development version of xforms) echo "WARNING: This is a development version. Expect bugs." ;; esac]) dnl Usage XFORMS_CHECK_LIB_JPEG: Checks for jpeg library AC_DEFUN([XFORMS_CHECK_LIB_JPEG],[ ### Check for Jpeg library AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, JPEG_LIB="-ljpeg", [XFORMS_LIB_ERROR(libjpeg,jpeg)]) AC_SUBST(JPEG_LIB) ]) dnl Usage XFORMS_PATH_XPM: Checks for xpm library and header AC_DEFUN([XFORMS_PATH_XPM],[ ### Check for Xpm library SAVE_LIBS="$LIBS" LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage, XPM_LIB="-lXpm", [XFORMS_LIB_ERROR(libXpm,Xpm)]) AC_SUBST(XPM_LIB) LIBS="$SAVE_LIBS" ### Check for Xpm headers SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" xforms_cv_xpm_h_location="" AC_CHECK_HEADER(X11/xpm.h,[ ac_cv_header_xpm_h=yes xforms_cv_xpm_h_location=""],[ AC_CHECK_HEADER(xpm.h,[],[ XFORMS_LIB_ERROR(xpm.h,Xpm)])]) AC_DEFINE_UNQUOTED(XPM_H_LOCATION,$xforms_cv_xpm_h_location, [define this to the location of xpm.h to be used with #include, e.g. ]) CPPFLAGS="$SAVE_CPPFLAGS" ### Test for the header version if test $ac_cv_header_xpm_h = yes; then AC_CACHE_CHECK([xpm header version],xforms_cv_xpmversion, [ cat > conftest.$ac_ext <&5 | \ grep '^"%%%"' 2>/dev/null | \ sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'` case "$xforms_cv_xpmr" in changequote(,) [0-9]) xformsxpmr_alpha=`echo $xforms_cv_xpmr |tr 123456789 abcdefghi` xformsxpmv_alpha=" (aka 3.$xforms_cv_xpmv$xformsxpmr_alpha)";; changequote([,]) *) ;; esac xforms_cv_xpmversion="$xforms_cv_xpmv.$xforms_cv_xpmr$xformsxpmv_alpha" rm -f conftest*]) XPM_VERSION=${xforms_cv_xpmversion} case "$xforms_cv_xpmr" in changequote(,) [789]|[0-9][0-9]*) ;; changequote([,]) *) XFORMS_WARNING([Version $xforms_cv_xpmversion of the Xpm library is a bit old. If you experience strange crashes with xforms, try to upgrade to at least version 4.7 (aka 3.4g). If you have installed a newer version of the library, check whether you have an old xpm.h header file in your include path.]);; esac fi]) dnl Usage: XFORMS_ERROR(message) Displays the warning "message" and sets the dnl flag xforms_error to yes. AC_DEFUN([XFORMS_ERROR],[ xforms_error_txt="$xforms_error_txt ** $1 " xforms_error=yes]) dnl Usage: XFORMS_WARNING(message) Displays the warning "message" and sets the dnl flag xforms_warning to yes. AC_DEFUN([XFORMS_WARNING],[ xforms_warning_txt="$xforms_warning_txt == $1 " xforms_warning=yes]) dnl Usage: XFORMS_LIB_ERROR(file,library) Displays an error message indication dnl that 'file' cannot be found because 'lib' may be uncorrectly installed. AC_DEFUN([XFORMS_LIB_ERROR],[ XFORMS_ERROR([Cannot find $1. Please check that the $2 library is correctly installed on your system.])]) dnl Usage: XFORMS_CHECK_ERRORS Displays a warning message if a XFORMS_ERROR dnl has occured previously. AC_DEFUN([XFORMS_CHECK_ERRORS],[ if test x$xforms_error = xyes; then cat </dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then $1="${$1} -Wl[,]-R$2" else $1="${$1} -R$2" fi fi]) dnl Usage: XFORMS_ADD_INC_DIR(var-name,dir) Adds a -I directive to variable dnl var-name. AC_DEFUN([XFORMS_ADD_INC_DIR],[$1="${$1} -I$2 "]) dnl this is used by the macro below to general a proper config.h.in entry m4_define([XFORMS_AH_CHECK_DECL], [AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_$1), [Define if you have the prototype for function `$1'])]) dnl Check things are declared in headers to avoid errors or warnings. dnl Called like XFORMS_CHECK_DECL(function, header1 header2...) dnl Defines HAVE_DECL_{FUNCTION} AC_DEFUN([XFORMS_CHECK_DECL], [XFORMS_AH_CHECK_DECL($1) for ac_header in $2 do AC_MSG_CHECKING([if $1 is declared by header $ac_header]) AC_EGREP_HEADER($1, $ac_header, [AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_DECL_$1)) break], [AC_MSG_RESULT(no)]) done]) xforms-1.0.93sp1/config/install-sh0000755000175000017500000003246411171566451015517 0ustar jensjens#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xforms-1.0.93sp1/config/mkinstalldirs0000755000175000017500000000664711171560225016316 0ustar jensjens#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2006-05-11.19 # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # 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 # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue 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 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xforms-1.0.93sp1/config/.cvsignore0000644000175000017500000000006611171560225015475 0ustar jensjensMakefile Makefile.in install-sh missing mkinstalldirs xforms-1.0.93sp1/config/missing0000755000175000017500000002557711171566451015121 0ustar jensjens#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # 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 msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -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' autom4te touch the output file, or create a stub one 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] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 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' $msg. 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. 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." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # 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 is $msg. 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 prerequisites 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 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xforms-1.0.93sp1/config/common.am0000644000175000017500000000026311204103120015263 0ustar jensjensAUTOMAKE_OPTIONS = foreign DISTCLEANFILES= *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D xforms-1.0.93sp1/config/Makefile.in0000644000175000017500000002441111377311602015543 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am config.guess config.sub depcomp \ install-sh ltmain.sh missing mkinstalldirs texinfo.tex subdir = config ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = common.am config.guess config.sub cygwin.m4 depcomp \ libtool.m4 ltmain.sh xformsinclude.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # MAINTAINERCLEANFILES += $(srcdir)/install-sh \ # $(srcdir)/missing \ # $(srcdir)/mkinstalldirs # 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: xforms-1.0.93sp1/config/ltmain.sh0000644000175000017500000060500611171560225015322 0ustar jensjens# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007 Free Software Foundation, Inc. # 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 XForms. If not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION="1.5.24 Debian 1.5.24-1ubuntu1" TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2007 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." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: xforms-1.0.93sp1/New_Features.txt0000644000175000017500000003226411171560225015365 0ustar jensjensThe documentation for XForms, see e.g. http://download.savannah.gnu.org/releases/xforms/forms.ps.gz has become a bit outdated. Unfortunately, the sources for the documentation aren't available anymore, so it will have to be rewritten from scratch sometime in the (hopefully not too far) future. Since there have been a few additions they are documen- ted here. New functions: -------------- The first one isn't really a new function, it already exists for some time but wasn't documented. It's called int fl_set_directory( const char * path ) and allows to set a new path for the file selector. There are three new functions for determining properties of an object: a) void fl_get_object_bw( FL_OBJECT * obj, int * bw ) It returns the borderwidth set for object 'obj' via 'bw'. b) void fl_get_object_gravity( FL_OBJECT * obj, unsigned int * nw, unsigned int * se ) It returns the NWgravity of object 'obj' via 'nw' and the SEgravity via 'se'. c) void fl_get_object_resize( FL_OBJECT * obj, unsigned int * resize ) It returns the resize setting for object 'obj'. The next two functions allow to set and query to which mouse buttons a button will react. Per default a button reacts to all mouse buttons, including "clicks" generated by mouse wheel. Sometimes this is not desired and the behaviour of each button can be controlled via the function void fl_set_button_mouse_buttons( FL_OBJECT * ob, int mouse_buttons ) The 'mouse_button' argument is the inclusive or of the numbers 1 for the left mouse button, 2 for the middle and 4 for the right mouse button, 8 for moving the scroll wheel up and 16 for scrolling down. The corresponding function to find out to which mouse buttons a button reacts is void fl_get_button_mouse_buttons( FL_OBJECT * obj, unsigned int * mouse_buttons ) which returns the setting for the button in the same way as it has to be passed to fl_set_button_mouse_buttons(). This property of a buttons can also be set via fdesign under the "Spec" tabfolder in the window for setting object attributes. There is now a third goodie function for creating a message box void fl_show_msg( const char * fmt, ... ) It expects a printf()-like format string 'fmt' and as many more arguments as there are format specifiers in the format string. The resulting string can have arbitrary length and embedded newline characters ('\n') produce line breaks. The size of the message box gets set in a way that the whole text fits into it. Also the alert boxes got changed so that they automatically get a size that all text will fit. And there's another new function void fl_show_alert2( int c, const char * fmt, ... ) The first argument is the same as the one for fl_show_alert(), i.e. it tells if the alert box is to be centered on the scrren. The second argument is a printf()-like format string 'fmt', followed by as many more arguments as there are format specifiers in the format string. The resulting string can have arbitrary length and the first embedded form-feed character is used as the separator between the title string and the message of the alert box. Embedded newline characters ('\n') produce lines break. The new function int fl_set_menu_notitle( FL_OBJECT * ob, int off ) allows to switch off the "title" which per default is displayed at the top of a menu. The second argment is a boolean value, if non-zero the menu title will not be displayed, if 0 they again be displayed. The function returns the previous setting. For FL_PUSH_MENU objects with the title set to off this has the additional the consequence that they only get opened when the mouse button has been released and they appear just below the menu button (just like in the case of FL_PULLDOWN_MENU objects). The function void fl_get_decoration_sizes( FL_FORM * form, int * top, int * right, int * bottom, int * left ) tries to determine the widths of the decorations the window manager puts around the window 'form' is displazed in. The function returns 0 if it was successful, 1 otherwise. 'form' must be a form that is currently displayed and it can't be a form embedded in another form (like e.g. forms that are part of a tab-folder). Finally int fl_form_is_isconified( FL_FORM *form ) allows to query if a form's (visible) window is in iconified state. Handling of counter objects has been changed. Before counters changed values with a constant (normally rather fast) repeat rate. This lead to some problems when one wanted to only change a counters value by a single step. Now the default is that the first step takes a longer time and the times betwen following steps get shorter and shorter until a minumum delay is reached. The function fl_set_counter_repeat(), that previously allowed to set the delay between steps now conrols the delay for the first step. The final, short delay between step can be set and queried by the functions void fl_set_counter_min_repeat( FL_OBJECT * ob, int millisec ); int fl_get_counter_min_repeat( FL_OBJECT * ob ); In case the old behaviour is desired simply set the times set by fl_set_counter_repeat() and fl_set_counter_min_repeat() to the same value. It's also possible to hav just the very first delay being different from the others. To achieve this set the the first delay time via fl_set_counter_repeat() and the time for all other delays by fl_get_counter_min_repeat() and then call the function void fl_set_counter_sppedjump( FL_OBJECT * ob, int yes_no ); with a true value for the argument 'yes_no'. The actual value for this setting can be queried by using int fl_get_counter_speedjump( FL_OBJECT * ob ); Changes in Menu handling ------------------------ In 1.0.90 and before it was neither possible to set menu item IDs (the value returned when a menu item has been selected and reported by fl_get_menu()) nor to associate an item with a call- back function (except when menus were created with the function fl_set_menu_entries). Also, when a menu item got deleted, the values returned when selecting menu items could change. This made the interface a bit awkward to use. All changes only concern menus created via either fl_set_menu() or fl_addto_menu(). For those created via fl_set_menu_entries() nothing has changed (and they still do not allow e.g. removing a menu item). Since now a value to be returned (in the following called "menu item ID") or reported by fl_get_menu() when a certain menu item is selected a few rules have to be clarified: a) A menu item ID can be associated with a certain menu item using "%xn" in the string for the text of the menu item. Note that 'n' must be a number larger than 0. This concerns both the functions fl_set_menu() and fl_addto_menu(). b) If no menu item ID is assigned explicitely it gets its ID from a counter that is incremented for each menu item added (starting from 1). This number is never re-used, even when menu items get deleted. The only exception is that on a call of fl_clear_menu() also the counter gets reset to 1. c) fl_get_menu() now returns the menu item ID and not an index (if no menu item IDs have been set and no menu items deleted this number is identical to the index). d) To all functions expecting an item number the menu item ID must now be passed. e) If two menu items receive the same menu item ID the results are unspecified, so the user must make sure that this never happens. f) If a menu item gets delete via fl_delete_menu_item() all other items keep their menu item IDs, even if no menu item IDs have been set for them explicitely. g) Menu items can now get associated with a callback function that is executed when the menu item is selected. The callback function is of type FL_PUP_CB, which receives the menu item ID of the selected menu. The return value of the callback function over- rides the menu item ID that normally would be returned. All this was done this way to make menus behave as far as possible like popups. Three functions now have a slightly different prototype but which should be compatible with previous versions. The functions now accept in addition to their traditional arguments an unspecified number of extra arguments: void fl_set_menu( FL_OBJECT *ob, const char * menustr, ... ); int fl_addto_menu( FL_OBJECT *ob, const char * menustr, ... ); fl_replace_menu_item( FL_OBJECT *ob, int numb, const char * menustr, ... ); These addition was necessary in order to allow that pointers to callback functions for menu items can be added. If this is done the 'menustr' variable must contain the characters "%f" for each of the additional argument function pointers. This is exactly the same way as callback functions can be set for popup items. A typical invokation now is fl_set_menu( obj, "Item1|Item2|Item3%f|Item4", item3_cb ); This creates a menu with 4 items and at the same time sets the function 'item3_cb' as the callback function for menu item3. As it was already possible for popups now also the menu item ID can be set when a menu item gets created. The above invokation may thus become fl_set_menu( obj, "Item1|Item2|Item3%f%x10|Item4", item3_cb ); This results in item 3 returning 10 (the number directly following "%x") instead of the default value of 3. This menu item ID is then to be used in all calls of functions that expect menu item identifiers (with one exception, see below). Callback functions can also be set or changed via the new function FL_PUP_CB fl_set_menu_item_callback( FL_OBJECT * ob, int numb, FL_PUP_CB cb ); The arguments are the menu object, the menu item ID of the menu item for which the callback is to be set and the address of the callback function (NULL switches the callback mechansim off). The function returns the address of the previously set callback func- tion (or NULL if none was set), The menu item ID associated with a menu item can also be set or changed at any time by calling int fl_set_menu_item_id( FL_OBJECT * ob, int index, int id ); Please note: the second argument is not the menu item ID but the index of the menu item. This allows to correct situations were erroneously two menu items got assigned the same menu item ID and thus addressing a specific menu item isn't possible anymore. The first argument is again the menu object and the last one the new menu item ID. The function returns the previous value of the menu item ID or -1 on error (it's an error if either the menu was created with fl_set_menu_entries(), the new 'id' is smaller than 1 or 'index' does not address an existing menu item). The additions made above are also reflected in the handling of menus in fdesign. Here under the 'Spec' attributes the callback for a menu item can now be set and a stub for the callback function gets created if requested. For menus to be created via the fl_set_menu() or fl_addto_menu() also the menu item ID can be set (this is the case when the button 'Use Struct', which toggles between creation of menus with the fl_set_menu_entries() and fl_addto_menu(), is off). Miscellaneous changes --------------------- The '-debug' option has been renamed to '-fldebug' to avoid problems with programs that use the same option. The new '-flhelp' option outputs a list of all options that the library accepts. The default borderwidth of object has been reduced to 1. Input objects now lose the focus (and report changes back to the program) on clicks of other objects that accept a click with the mouse (buttons, sliders, etc.). This gets around the problem that if one had an input field, edited something in it (without hitting the ENTER or TAB key) and then clicked on some button that's supposed to make use of what just had been entered, the function fl_get_input() still returned the unchanged value since the input field never lost its focus and thus didn't accept the changes. When the mouse gets moved out of a window with an active input object and moved into another window keyboard input now goes to the new window instead of to the one that had been left. Multi-line inpput object now also can be left by pressing the (or ) keys. Date input fields handle verification of leap years correctly. ince the 0.89 version on calling fl_initialize() the locale for the program was set to the default locale on the machine the pro- gram was running on. Unfortunately, this was never documented and led to trouble in several cases. This has now been removed. When a file selector has a callback installed the field for manually entering a file name isn't shown anymore - that field could not be used anyway. Message boxes created by fl_show_message() and fl_show_messages() now can display an unlimited amount of text and they automatically get a size so that the whole text fits in. fdesign and the library can now deal with an arbitrary number of forms, groups and objects. No error messages are output anymore via popup windows. xforms-1.0.93sp1/image/0000755000175000017500000000000011377311602013311 5ustar jensjensxforms-1.0.93sp1/image/ps_core.c0000644000175000017500000012232311321671562015115 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1997-2002 by T.C. Zhao * All rights reserved. * * Some primitive drawing routines is PS * * (x,y) (w,h) passed to all drawing functions are relative * to PS coordinate system and the unit is pixel/point. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pflps.h" #include #include FLPSInfo *flps; /*************************************** ***************************************/ FLPS_CONTROL * flps_init( void ) { static FLPSInfo *local_flps; if ( ! local_flps ) { local_flps = fl_calloc( 1, sizeof *flps ); local_flps->ps_color = FLPS_COLOR; local_flps->orientation = FLPS_AUTO; local_flps->paper_w = 8.5; local_flps->paper_h = 11.0; local_flps->auto_fit = 1; local_flps->xscale = local_flps->yscale = 1.0; /* driver will fill-in appropriate vals for minus */ local_flps->drawbox = -1; local_flps->xdpi = local_flps->ydpi = fli_dpi; local_flps->pack = 1; /* Cache */ local_flps->cur_color = FL_NoColor; local_flps->cur_style = local_flps->cur_size = -1; local_flps->cur_lw = -1; } return ( FLPS_CONTROL * ) ( flps = local_flps ); } /*************************************** ***************************************/ void flps_switch_flps( FLPSInfo * info ) { flps = info; } /*************************************** ***************************************/ void flps_restore_flps( void ) { flps_init( ); } /*************************************** ***************************************/ void flps_reset_cache( void ) { flps_invalidate_font_cache( ); flps_invalidate_color_cache( ); flps_invalidate_symbol_cache( ); flps_invalidate_linewidth_cache( ); } /*************************************** * write some arbitary text into the output stream ***************************************/ void flps_log( const char * s ) { fprintf( flps->fp, "%%%s", s ); } #include #define LEFT '(' #define RIGHT ')' /*************************************** ***************************************/ void flps_output( const char * fmt, ... ) { va_list args; char buf[ 2048 ], *q; int lastc = flps->lastc; /* Flush */ if ( ! fmt ) { if ( flps->pack && flps->len ) { putc( '\n', flps->fp ); flps->len = 0; } return; } va_start( args, fmt ); vsprintf( buf, fmt, args ); va_end( args ); if ( ! flps->pack ) fprintf( flps->fp, "%s", buf ); else { for ( q = buf; *q; q++ ) { if ( *q == '\n' ) *q = ' '; /* this is less than robust */ if ( *q == LEFT ) flps->literal = 1; else if ( *q == RIGHT ) flps->literal = 0; if ( lastc == ' ' && *q == ' ' && ! flps->literal ) continue; if ( *q == ' ' && flps->len == 0 ) continue; if ( *q == ' ' && flps->len >= 70 ) { putc( '\n', flps->fp ); flps->len = 0; } else { lastc = *q; flps->len++; putc( *q, flps->fp ); } } flps->lastc = lastc; } } /*************************************** * flps_linewidth() and flps_reset_linewidth() must be used in pairs ***************************************/ void flps_linewidth( int lw ) { float flw; if ( lw == flps->cur_lw ) return; flps->last_lw = flps->cur_lw; flps->cur_lw = lw; flw = 0.9 * lw; if ( flps->final_xscale + flps->final_yscale > 2 ) flw = 0.9 * lw; if ( flw < 0.4 ) flw = 0.4; flps_output( " %.1f %.1f LW\n", flw, flw ); } /*************************************** ***************************************/ int flps_get_linewidth( void ) { return flps->cur_lw; } /*************************************** ***************************************/ void flps_reset_linewidth( void ) { flps_linewidth( flps->last_lw ); flps_log( "resetline" ); } /*************************************** ***************************************/ void flps_invalidate_linewidth_cache( void ) { flps->cur_lw = -1; } static int ps_ls = FL_SOLID; /*************************************** ***************************************/ void flps_linestyle( int n ) { if ( ps_ls == n ) return; switch ( n ) { case FL_DOT : flps_output( "DT " ); break; case FL_DOTDASH : flps_output( "DTD " ); break; case FL_DASH : flps_output( "D " ); break; case FL_LONGDASH : flps_output( "LD " ); break; case FL_SOLID : case FL_USERDASH : case FL_USERDOUBLEDASH : case -1: flps_output( "SL " ); ps_ls = FL_SOLID; break; default: fprintf( stderr, "Unknown dashstyle: %d\n", n ); return; } ps_ls = n; } /*************************************** ***************************************/ int flps_get_linestyle( void ) { return ps_ls; } /*************************************** * Draw a line in abs coordinate system ***************************************/ void flps_line( int xi, int yi, int xf, int yf, FL_COLOR col ) { flps_color( col ); flps_output( "%d %d %d %d L S\n", xf, yf, xi, yi ); } /*************************************** * ghostview and some printers have problems with too many * points on the stack. We break the points into batches of * PSMAXP pairs ***************************************/ #define PSMAXP 350 static void small_flps_lines( FL_POINT * xp, int n, FL_COLOR col ) { FL_POINT *xps = xp + n; int cnt = 1; flps_color( col ); for ( ; xp < xps; xp++, cnt++ ) { flps_output( "%d %d ", ( int ) xp->x, ( int ) xp->y ); if ( cnt % 6 == 0 ) flps_output( "\n" ); } if ( n ) flps_output( "%d lines\n", n ); } /*************************************** ***************************************/ void flps_lines( FL_POINT * xp, int n, FL_COLOR col ) { int k = n / PSMAXP, r = n % PSMAXP; int b; /* need to backup one point if broken up the batch */ for ( b = 0; b < k; b++ ) small_flps_lines( xp + b * PSMAXP - ( b > 0 ), PSMAXP + ( b > 0 ), col ); if ( r ) small_flps_lines( xp + k * PSMAXP - ( k > 0 ), r + ( k > 0 ), col ); } /*************************************** ***************************************/ void flps_poly( int fill, FL_POINT * xp, int n, FL_COLOR col ) { FL_POINT *xps = xp + n; int cnt = 1; flps_color( col ); for ( ; xp < xps; xp++, cnt++ ) { flps_output( "%d %d ", ( int ) xp->x, ( int ) xp->y ); if ( cnt % 6 == 0 ) flps_output( "\n" ); } flps_output( "%d P %c\n", n, "SF"[ fill ] ); } /*************************************** ***************************************/ void flps_rectangle( int fill, int x, int y, int w, int h, FL_COLOR col) { flps_color( col ); flps_output( "%d %d %d %d %d %d %d %d 4 P", x, y, x, y + h - 1, x + w - 1, y + h - 1, x + w - 1, y ); flps_output( " %c\n", "SF"[ fill ] ); } /*************************************** ***************************************/ void flps_oval( int fill, int x, int y, int w, int h, FL_COLOR col ) { flps_pieslice( fill, x, y, w, h, 0.0, 3600.0, col ); } /*************************************** ***************************************/ void flps_circ( int fill, int x, int y, int r, FL_COLOR col ) { flps_color( col ); flps_output( "newpath %d %d %d 0 360 arc %c\n", x, y, r, "SF"[ fill ] ); } /*************************************** * Draw an circular arc, optionally filled. Angle t1 and t2 are in one-tenth of * a degree ***************************************/ void flps_arc( int fill, int x, int y, int r, int t1, int t2, FL_COLOR col ) { flps_color( col ); flps_output( "newpath %d %d %d %.1f %.1f arc %c\n", x, y, r, t1 * 0.1, t2 * 0.1, "SF"[ fill ] ); } /*************************************** * Only fill does a pie slice ***************************************/ void flps_pieslice( int fill, int x, int y, int w, int h, int t1, int t2, FL_COLOR col ) { float sx = 1.0, sy = ( float ) h / w; flps_color( col ); flps_output( "gsave newpath %.1f %.1f translate %.1f %.1f scale\n", x + 0.5f * w, y + 0.5f * h, sx, sy ); if ( ! fill ) flps_output( "0 0 %.1f %.1f %.1f arc S grestore\n", w * 0.5, t1 * 0.1, t2 * 0.1 ); else flps_output( "0 0 M 0 0 %.1f %.1f %.1f arc C F grestore\n", w * 0.5, t1 * 0.1, t2 * 0.1 ); flps_invalidate_color_cache( ); } /************************************************************** * basic color routines **************************************************************/ #define VN( a ) a,#a #define NV( a ) #a,a /* slightly different from XForms' built-in due to the difference * between printer and screen */ #define PREVIEW static FLI_IMAP fl_imap[ ] = { { NV( FL_BLACK ), 0, 0, 0, 0, 0 }, { NV( FL_WHITE ), 255, 255, 255, 0, 0 }, { NV( FL_COL1 ), 161, 161, 161, 0, 0 }, { NV( FL_BOTTOM_BCOL ), 89, 89, 89, 0, 0 }, { NV( FL_RIGHT_BCOL ), 41, 41, 41, 0, 0 }, { NV( FL_MCOL ), 191, 191, 191, 0, 0 }, { NV( FL_LEFT_BCOL ), 222, 222, 222, 0, 0 }, { NV( FL_SLATEBLUE ), 113, 113, 198, 0, 0 }, { NV( FL_INDIANRED ), 198, 113, 113, 0, 0 }, { NV( FL_RED ), 255, 0, 0, 0, 0 }, { NV( FL_BLUE ), 0, 0, 255, 0, 0 }, { NV( FL_GREEN ), 0, 255, 0, 0, 0 }, { NV( FL_YELLOW ), 255, 255, 0, 0, 0 }, { NV( FL_MAGENTA ), 255, 0, 255, 0, 0 }, { NV( FL_CYAN ), 0, 255, 255, 0, 0 }, { NV( FL_TOMATO ), 255, 99, 71, 0, 0 }, { NV(FL_INACTIVE ), 110, 110, 110, 0, 0 }, { NV(FL_TOP_BCOL ), 204, 204, 204, 0, 0 }, { NV( FL_PALEGREEN ), 113, 198, 113, 0, 0 }, { NV( FL_DARKGOLD ), 205, 149, 10, 0, 0 }, { NV( FL_ORCHID ), 205, 105, 201, 0, 0 }, { NV( FL_DARKCYAN ), 40, 170, 175, 0, 0 }, { NV( FL_DARKTOMATO ), 139, 54, 38, 0, 0 }, { NV( FL_WHEAT ), 255, 231, 155, 0, 0 }, { NV( FL_DARKORANGE ), 255, 128, 0, 0, 0 }, { NV( FL_DEEPPINK ), 255, 0, 128, 0, 0 }, { NV( FL_CHARTREUSE ), 128, 255, 0, 0, 0 }, { NV( FL_DARKVIOLET ), 128, 0, 255, 0, 0 }, { NV( FL_SPRINGGREEN ), 0, 255, 128, 0, 0 }, { NV( FL_DODGERBLUE ), 0, 128, 255, 0, 0 }, { NV( FL_DOGERBLUE ), 0, 128, 255, 0, 0 }, { NV( FL_LIGHTER_COL1 ), 204, 204, 204, 0, 0 }, { NV( FL_DARKER_COL1 ), 161, 161, 161, 0, 0 }, { NV( FL_ALICEBLUE ), 240, 248, 255, 0, 0 }, { NV( FL_ANTIQUEWHITE ), 250, 235, 215, 0, 0 }, { NV( FL_AQUA ), 0, 255, 255, 0, 0 }, { NV( FL_AQUAMARINE ), 127, 255, 212, 0, 0 }, { NV( FL_AZURE ), 240, 255, 255, 0, 0 }, { NV( FL_BEIGE ), 245, 245, 220, 0, 0 }, { NV( FL_BISQUE ), 255, 228, 196, 0, 0 }, { NV( FL_BLANCHEDALMOND ), 255, 235, 205, 0, 0 }, { NV( FL_BLUEVIOLET ), 138, 43, 226, 0, 0 }, { NV( FL_BROWN ), 165, 42, 42, 0, 0 }, { NV( FL_BURLYWOOD ), 222, 184, 135, 0, 0 }, { NV( FL_CADETBLUE ), 95, 158, 160, 0, 0 }, { NV( FL_CHOCOLATE ), 210, 105, 30, 0, 0 }, { NV( FL_CORAL ), 255, 127, 80, 0, 0 }, { NV( FL_CORNFLOWERBLUE ), 100, 149, 237, 0, 0 }, { NV( FL_CORNSILK ), 255, 248, 220, 0, 0 }, { NV( FL_CRIMSON ), 220, 20, 60, 0, 0 }, { NV( FL_DARKBLUE ), 0, 0, 139, 0, 0 }, { NV( FL_DARKGOLDENROD ), 184, 134, 11, 0, 0 }, { NV( FL_DARKGRAY ), 169, 169, 169, 0, 0 }, { NV( FL_DARKGREEN ), 0, 100, 0, 0, 0 }, { NV( FL_DARKGREY ), 169, 169, 169, 0, 0 }, { NV( FL_DARKKHAKI ), 189, 183, 107, 0, 0 }, { NV( FL_DARKMAGENTA ), 139, 0, 139, 0, 0 }, { NV( FL_DARKOLIVEGREEN ), 85, 107, 47, 0, 0 }, { NV( FL_DARKORCHID ), 153, 50, 204, 0, 0 }, { NV( FL_DARKRED ), 139, 0, 0, 0, 0 }, { NV( FL_DARKSALMON ), 233, 150, 122, 0, 0 }, { NV( FL_DARKSEAGREEN ), 143, 188, 143, 0, 0 }, { NV( FL_DARKSLATEBLUE ), 72, 61, 139, 0, 0 }, { NV( FL_DARKSLATEGRAY ), 47, 79, 79, 0, 0 }, { NV( FL_DARKSLATEGREY ), 47, 79, 79, 0, 0 }, { NV( FL_DARKTURQUOISE ), 0, 206, 209, 0, 0 }, { NV( FL_DEEPSKYBLUE ), 0, 191, 255, 0, 0 }, { NV( FL_DIMGRAY ), 105, 105, 105, 0, 0 }, { NV( FL_DIMGREY ), 105, 105, 105, 0, 0 }, { NV( FL_FIREBRICK ), 178, 34, 34, 0, 0 }, { NV( FL_FLORALWHITE ), 255, 250, 240, 0, 0 }, { NV( FL_FORESTGREEN ), 34, 139, 34, 0, 0 }, { NV( FL_FUCHSIA ), 255, 0, 255, 0, 0 }, { NV( FL_GAINSBORO ), 220, 220, 220, 0, 0 }, { NV( FL_GHOSTWHITE ), 248, 248, 255, 0, 0 }, { NV( FL_GOLD ), 255, 215, 0, 0, 0 }, { NV( FL_GOLDENROD ), 218, 165, 32, 0, 0 }, { NV( FL_GRAY ), 128, 128, 128, 0, 0 }, { NV( FL_GREENYELLOW ), 173, 255, 47, 0, 0 }, { NV( FL_GREY ), 128, 128, 128, 0, 0 }, { NV( FL_HONEYDEW ), 240, 255, 240, 0, 0 }, { NV( FL_HOTPINK ), 255, 105, 180, 0, 0 }, { NV( FL_INDIGO ), 75, 0, 130, 0, 0 }, { NV( FL_IVORY ), 255, 255, 240, 0, 0 }, { NV( FL_KHAKI ), 240, 230, 140, 0, 0 }, { NV( FL_LAVENDER ), 230, 230, 250, 0, 0 }, { NV( FL_LAVENDERBLUSH ), 255, 240, 245, 0, 0 }, { NV( FL_LAWNGREEN ), 124, 252, 0, 0, 0 }, { NV( FL_LEMONCHIFFON ), 255, 250, 205, 0, 0 }, { NV( FL_LIGHTBLUE ), 173, 216, 230, 0, 0 }, { NV( FL_LIGHTCORAL ), 240, 128, 128, 0, 0 }, { NV( FL_LIGHTCYAN ), 224, 255, 255, 0, 0 }, { NV( FL_LIGHTGOLDENRODYELLOW ), 250, 250, 210, 0, 0 }, { NV( FL_LIGHTGRAY ), 211, 211, 211, 0, 0 }, { NV( FL_LIGHTGREEN ), 144, 238, 144, 0, 0 }, { NV( FL_LIGHTGREY ), 211, 211, 211, 0, 0 }, { NV( FL_LIGHTPINK ), 255, 182, 193, 0, 0 }, { NV( FL_LIGHTSALMON ), 255, 160, 122, 0, 0 }, { NV( FL_LIGHTSEAGREEN ), 32, 178, 170, 0, 0 }, { NV( FL_LIGHTSKYBLUE ), 135, 206, 250, 0, 0 }, { NV( FL_LIGHTSLATEGRAY ), 119, 136, 153, 0, 0 }, { NV( FL_LIGHTSLATEGREY ), 119, 136, 153, 0, 0 }, { NV( FL_LIGHTSTEELBLUE ), 176, 196, 222, 0, 0 }, { NV( FL_LIGHTYELLOW ), 255, 255, 224, 0, 0 }, { NV( FL_LIME ), 0, 255, 0, 0, 0 }, { NV( FL_LIMEGREEN ), 50, 205, 50, 0, 0 }, { NV( FL_LINEN ), 250, 240, 230, 0, 0 }, { NV( FL_MAROON ), 128, 0, 0, 0, 0 }, { NV( FL_MEDIUMAQUAMARINE ), 102, 205, 170, 0, 0 }, { NV( FL_MEDIUMBLUE ), 0, 0, 205, 0, 0 }, { NV( FL_MEDIUMORCHID ), 186, 85, 211, 0, 0 }, { NV( FL_MEDIUMPURPLE ), 147, 112, 219, 0, 0 }, { NV( FL_MEDIUMSEAGREEN ), 60, 179, 113, 0, 0 }, { NV( FL_MEDIUMSLATEBLUE ), 123, 104, 238, 0, 0 }, { NV( FL_MEDIUMSPRINGGREEN ), 0, 250, 154, 0, 0 }, { NV( FL_MEDIUMTURQUOISE ), 72, 209, 204, 0, 0 }, { NV( FL_MEDIUMVIOLETRED ), 199, 21, 133, 0, 0 }, { NV( FL_MIDNIGHTBLUE ), 25, 25, 112, 0, 0 }, { NV( FL_MINTCREAM ), 245, 255, 250, 0, 0 }, { NV( FL_MISTYROSE ), 255, 228, 225, 0, 0 }, { NV( FL_MOCCASIN ), 255, 228, 181, 0, 0 }, { NV( FL_NAVAJOWHITE ), 255, 222, 173, 0, 0 }, { NV( FL_NAVY ), 0, 0, 128, 0, 0 }, { NV( FL_OLDLACE ), 253, 245, 230, 0, 0 }, { NV( FL_OLIVE ), 128, 128, 0, 0, 0 }, { NV( FL_OLIVEDRAB ), 107, 142, 35, 0, 0 }, { NV( FL_ORANGE ), 255, 165, 0, 0, 0 }, { NV( FL_ORANGERED ), 255, 69, 0, 0, 0 }, { NV( FL_PALEGOLDENROD ), 238, 232, 170, 0, 0 }, { NV( FL_PALETURQUOISE ), 175, 238, 238, 0, 0 }, { NV( FL_PALEVIOLETRED ), 219, 112, 147, 0, 0 }, { NV( FL_PAPAYAWHIP ), 255, 239, 213, 0, 0 }, { NV( FL_PEACHPUFF ), 255, 218, 185, 0, 0 }, { NV( FL_PERU ), 205, 133, 63, 0, 0 }, { NV( FL_PINK ), 255, 192, 203, 0, 0 }, { NV( FL_PLUM ), 221, 160, 221, 0, 0 }, { NV( FL_POWDERBLUE ), 176, 224, 230, 0, 0 }, { NV( FL_PURPLE ), 128, 0, 128, 0, 0 }, { NV( FL_ROSYBROWN ), 188, 143, 143, 0, 0 }, { NV( FL_ROYALBLUE ), 65, 105, 225, 0, 0 }, { NV( FL_SADDLEBROWN ), 139, 69, 19, 0, 0 }, { NV( FL_SALMON ), 250, 128, 114, 0, 0 }, { NV( FL_SANDYBROWN ), 244, 164, 96, 0, 0 }, { NV( FL_SEAGREEN ), 46, 139, 87, 0, 0 }, { NV( FL_SEASHELL ), 255, 245, 238, 0, 0 }, { NV( FL_SIENNA ), 160, 82, 45, 0, 0 }, { NV( FL_SILVER ), 192, 192, 192, 0, 0 }, { NV( FL_SKYBLUE ), 135, 206, 235, 0, 0 }, { NV( FL_SLATEGRAY ), 112, 128, 144, 0, 0 }, { NV( FL_SLATEGREY ), 112, 128, 144, 0, 0 }, { NV( FL_SNOW ), 255, 250, 250, 0, 0 }, { NV( FL_STEELBLUE ), 70, 130, 180, 0, 0 }, { NV( FL_TAN ), 210, 180, 140, 0, 0 }, { NV( FL_TEAL ), 0, 128, 128, 0, 0 }, { NV( FL_THISTLE ), 216, 191, 216, 0, 0 }, { NV( FL_TURQUOISE ), 64, 224, 208, 0, 0 }, { NV( FL_VIOLET ), 238, 130, 238, 0, 0 }, { NV( FL_WHITESMOKE ), 245, 245, 245, 0, 0 }, { NV( FL_YELLOWGREEN ), 154, 205, 50, 0, 0 } }; #define builtin ( sizeof fl_imap / sizeof *fl_imap ) /*************************************** * do gamma adjustment ***************************************/ void flps_apply_gamma( float gamma ) { FLI_IMAP *fm = fl_imap, *fs; float lastgamma = 1.0; if ( FL_abs(gamma) < 1.0e-3 ) { fprintf( stderr, "fd2ps: Bad Gamma value %.2f\n", gamma ); return; } for ( fs = fm + builtin; fm < fs; fm++ ) { if ( flps->verbose ) fprintf( stderr, "fm->r=%d\n", fm->r ); fm->r = 0.4 + 255 * ( pow( fm->r / 255.0, lastgamma / gamma ) ); fm->g = 0.4 + 255 * ( pow( fm->g / 255.0, lastgamma / gamma ) ); fm->b = 0.4 + 255 * ( pow( fm->b / 255.0, lastgamma / gamma ) ); if ( flps->verbose ) fprintf( stderr, "fm->r=%d\n", fm->r ); } lastgamma = gamma; } /*************************************** ***************************************/ static void flps_query_imap( FL_COLOR col, int * r, int * g, int * b ) { FLI_IMAP *flmap = fl_imap, *flmape = flmap + builtin; for ( ; flmap < flmape; flmap++ ) if ( col == flmap->index ) { *r = flmap->r; *g = flmap->g; *b = flmap->b; return; } } #define C2NC( c ) ( 1.0 / 255.0 * c ) #define rgb2gray( r, g, b ) ( 0.299 * ( r ) + 0.587 * ( g ) + 0.114 * ( b ) ) #ifndef FL_PACK #define FL_PACK( r, g, b ) ( ( b ) << 16 | ( g ) << 8 | ( r ) ) #define FL_UNPACK( p, r, g, b ) \ do { \ r = ( ( p ) ) & 0xff; \ g = ( ( p ) >> 8 ) &0xff; \ b = ( ( p ) >> 16 ) &0xff; \ } while ( 0 ) #endif /*************************************** ***************************************/ void flps_invalidate_color_cache( void ) { flps->cur_color = FL_NoColor; } /*************************************** ***************************************/ void flps_color( FL_COLOR color ) { int r = 0, g = 0, b = 0; if ( color == FL_NoColor ) return; if ( flps->isRGBColor ) FL_UNPACK( color, r, g, b ); else flps_query_imap( color, &r, &g, &b ); if ( ( FL_COLOR ) FL_PACK( r, g, b ) != flps->cur_color ) flps_rgbcolor( r, g, b ); } /*************************************** ***************************************/ void flps_rgbcolor( int r, int g, int b ) { unsigned int packed = FL_PACK( r, g, b ); if ( flps->cur_color == packed ) return; if ( flps->ps_color == FLPS_COLOR && ( r != g || r != b ) ) flps_output( "%.3g %.3g %.3g RGB ", C2NC( r ), C2NC( g ), C2NC( b ) ); else if ( flps->ps_color == FLPS_BW ) flps_output("%d G ", C2NC( rgb2gray( r, g, b ) ) > 0.62 ); else flps_output( "%.3g G ", C2NC( rgb2gray( r, g, b ) ) ); flps->cur_color = FL_PACK( r, g, b ); } /*************************************** ***************************************/ int flps_get_gray255( FL_COLOR color ) { int r = 0, g = 0, b = 0; if ( flps->isRGBColor ) FL_UNPACK( color, r, g, b ); else flps_query_imap( color, &r, &g, &b ); return rgb2gray( r, g, b ) + 0.1; } /*************************************** ***************************************/ FL_COLOR flps_get_namedcolor( const char * s ) { FLI_IMAP *flmap = fl_imap, *flmape = flmap + builtin; for ( ; s && flmap < flmape; flmap++ ) if ( strcmp( s, flmap->name ) == 0 ) return flmap->index; /* a wild shot */ return atoi( s ); } /************** Handle built-in symbols. ****************{*/ typedef void ( * PSdrawit )( int, int, int, int, int, FL_COLOR ); typedef struct { const char * name; const char * psname; const char * draw; int otherdef; PSdrawit fdrawit; int abs_coordinate; /* fdrawit uses abs coordinate system */ int defined; /* if def code emitted */ } PS_draw; /*************************************** ***************************************/ static void draw_dnline( int x FL_UNUSED_ARG, int y FL_UNUSED_ARG, int w, int h, int angle FL_UNUSED_ARG, FL_COLOR col FL_UNUSED_ARG ) { float t = 0.2, len; flps_output( "%.2f %.2f LW ", 3.5 / ( w + h ), 3.5 / ( w + h ) ); if ( w + h > 200 ) len = 0.99; else if ( w + h > 150 ) len = 0.98; else len = 0.93; flps_color( FL_RIGHT_BCOL ); flps_output( "-%.3f %.2f M %.3f %.2f LT S\n", len, t, len, t ); flps_color( FL_LEFT_BCOL ); flps_output( "-%.3f -%.2f M %.3f -%.2f LT S\n", len, t, len, t ); } /*************************************** ***************************************/ static void draw_upline( int x FL_UNUSED_ARG, int y FL_UNUSED_ARG, int w, int h, int angle FL_UNUSED_ARG, FL_COLOR col FL_UNUSED_ARG ) { float t = 0.033; flps_color( FL_LEFT_BCOL ); flps_output( "%.3f %.3f LW ", 3.7 / ( w + h ), 3.7 / ( w + h ) ); flps_output( "-0.9 %.3f M 0.9 %.3f LT S\n", t, t ); flps_color( FL_RIGHT_BCOL ); flps_output( "0.9 -%.3f M 0.9 %.3f LT S ", t, t ); flps_output( "-0.9 -%.3f M 0.9 -%.3f LT S\n", t, t ); } /* Due to pixel precision problems, we have to draw uparrow, downarrow and * ripple line in absolute unit with the origin at the center of the figure. */ /*************************************** ***************************************/ static void draw_uparrow( int x, int y, int w, int h, int angle, FL_COLOR col FL_UNUSED_ARG ) { float yc = y + h * 0.5; float xc = x + w * 0.5; float dx, dy; int d = 3 + ( w + h ) * 0.06; x += d; y += d; w -= 2 * d; h -= 2 * d; dx = w / 2; dy = h / 2; if ( angle == 90 ) { flps_line( xc, yc + dy, xc - dx, yc - dy, FL_LEFT_BCOL ); flps_line( xc - dx, yc - dy, xc + dx, yc - dy, FL_BOTTOM_BCOL ); flps_line( xc + dx, yc - dy, xc, yc + dy, FL_RIGHT_BCOL ); } else if ( angle == 180 ) { flps_line( xc - dx, yc, xc + dx, yc + dy, FL_TOP_BCOL ); flps_line( xc + dx, yc + dy, xc + dx, yc - dy, FL_RIGHT_BCOL ); flps_line( xc + dx, yc - dy, xc - dx, yc, FL_BOTTOM_BCOL ); } else if ( angle == 270 ) { flps_line( xc - dx, yc + dy, xc, yc - dy, FL_BOTTOM_BCOL ); flps_line( xc, yc - dy, xc + dx, yc + dy, FL_RIGHT_BCOL ); flps_line( xc + dx, yc + dy, xc - dx, yc + dy, FL_TOP_BCOL ); } else { flps_line( x, yc - dy, x + w, yc, FL_BOTTOM_BCOL ); flps_line( x, yc + dy, x + w, yc, FL_RIGHT_BCOL ); flps_line( x, yc - dy, x, yc + dy, FL_LEFT_BCOL ); } } /*************************************** ***************************************/ static void draw_dnarrow( int x, int y, int w, int h, int angle, FL_COLOR col FL_UNUSED_ARG ) { float yc = y + h * 0.5; float xc = x + w * 0.5; float dx, dy; int d = 3 + ( w + h ) * 0.06; x += d; y += d; w -= 2 * d; h -= 2 * d; dx = w / 2; dy = h / 2; if ( angle == 90 ) { flps_line( xc, yc + dy, xc - dx, yc - dy, FL_RIGHT_BCOL ); flps_line( xc - dx, yc - dy, xc + dx, yc - dy, FL_TOP_BCOL ); flps_line( xc + dx, yc - dy, xc, yc + dy, FL_TOP_BCOL ); } else if ( angle == 180 ) { flps_line( xc - dx, yc, xc + dx, yc + dy, FL_RIGHT_BCOL ); flps_line( xc + dx, yc + dy, xc + dx, yc - dy, FL_LEFT_BCOL ); flps_line( xc + dx, yc - dy, xc - dx, yc, FL_TOP_BCOL ); } else if ( angle == 270 ) { flps_line( xc - dx, yc + dy, xc, yc - dy, FL_RIGHT_BCOL ); flps_line( xc, yc - dy, xc + dx, yc + dy, FL_LEFT_BCOL ); flps_line( xc + dx, yc + dy, xc - dx, yc + dy, FL_BOTTOM_BCOL ); } else { flps_line( xc - dx, yc - dy, xc - dx, yc + dy, FL_RIGHT_BCOL ); flps_line( xc - dx, yc - dy, xc + dx, yc, FL_TOP_BCOL ); flps_line( xc - dx, yc + dy, xc + dx, yc, FL_BOTTOM_BCOL ); } } /*************************************** * need single pixel precision, draw in abs. coordiante system ***************************************/ static void draw_ripple_lines( int x, int y, int w, int h, int angle, FL_COLOR col FL_UNUSED_ARG ) { float ym = y + h / 2, ys; float xm = x + w / 2, xs; int i, mw = FL_BOUND_WIDTH; if ( h < 14 ) return; xs = xm + 5; ys = ym + 5; if ( angle == 90 || angle == 270 ) { for ( i = 0; i < 3; i++ ) { flps_line( xs, y + mw, xs, y + h - mw - 1, FL_RIGHT_BCOL ); xs -= 1; flps_line( xs, y + mw, xs, y + h - mw - 1, FL_LEFT_BCOL ); xs -= 3; } } else { for ( i = 0; i < 3; i++ ) { flps_line( x + mw, ys, x + w - mw - 1, ys, FL_LEFT_BCOL ); ys -= 1; flps_line( x + mw, ys, x + w - mw - 1, ys, FL_RIGHT_BCOL ); ys -= 3; } } } #define AddVertex( p, xp, yp) do { \ p->x = xp; \ p->y = yp; \ p++; \ } while ( 0 ) /*************************************** ***************************************/ static void draw_bararrowhead( int x, int y, int w, int h, int angle, FL_COLOR col ) { float xc = x + 0.5 * w, yc = y + 0.5 * h; int d = 3 + ( w + h ) * 0.06; float dx, dy, mar, dbar, xl; FL_POINT point[ 5 ], *p; x += d; y += d; w -= 2 * d; h -= 2 * d; dx = w / 2; dy = h / 2; dbar = dx * 0.4; mar = 0.2 * dx; flps_output( "gsave %.1f %.1f translate %d rotate\n", xc, yc, angle ); xl = -dx + 1.1 * mar; p = point; AddVertex( p, xl, -dy ); AddVertex( p, xl + dbar, -dy ); AddVertex( p, xl + dbar, dy ); AddVertex( p, xl, dy ); flps_poly( 1, point, 4, col ); flps_poly( 0, point, 4, FL_RIGHT_BCOL ); p = point; AddVertex( p, -mar, -dy ); AddVertex( p, -mar + dx, 0 ); AddVertex( p, -mar, dy ); flps_poly( 1, point, 3, col ); flps_poly( 0, point, 3, FL_RIGHT_BCOL ); flps_output( "grestore\n" ); } /* all PS drawings have a size of 2 pixels and centered at origin */ static PS_draw psdraw[ ] = { { "returnarrow", "symreturnarrow", "-0.8 0.0 -0.1 0.7 -0.1 0.05 0.6 0.05 0.6 0.7 0.7 0.7 0.7 -0.05\n" "-0.1 -0.05 -0.1 -0.7 9 P", 0, 0, 0, 0 }, { "->", "symrarrow", "-0.8 -0.4 -0.8 0.4 0 0.4 0 0.8 0.8 0 0 -0.8 0 -0.4 7 P", 0, 0, 0, 0 }, { "<-", "180 rotate", 0, -1, 0, 0, 0 }, { ">", "symrarrowh", "-0.2 0.7 M 0.5 0.0 LT -0.2 -0.7 LT C", 0, 0, 0, 0 }, { "<", "180 rotate", 0, -1, 0, 0, 0 }, { "<->", "symdarrow", "-0.25 0.4 0.25 0.4 0.25 0.8 0.85 0 0.25 -0.8 0.25 -0.4 -0.25 -0.4\n" "-0.25 -0.8 -0.85 0 -0.25 0.8 10 P", 0, 0, 0, 0 }, { "plus", "symplus", "-0.9 -0.13 -0.9 0.13 -0.13 0.13 -0.13 0.9 0.13 0.9 0.13 0.13 0.9 0.13\n" "0.9 -0.13 0.13 -0.13 0.13 -0.9 -0.13 -0.9 -0.13 -0.13 12 P", 0, 0, 0, 0 }, { ">>", "symdarrowh", "0.15 0.7 0.85 0 0.15 -0.7 0.15 -0.001 -0.55 -0.7 -0.55 0.7 0.15 0.001\n" "7 P", 0, 0, 0, 0 }, { "<<", "180 rotate", 0, -1, 0, 0, 0 }, { "arrow", "symthinarrow", "-0.9 0.02 M 0.65 0.02 LT 0.65 0.15 LT 0.9 0 LT 0.65 -0.15 LT\n" "0.65 -0.02 LT -0.9 -0.02 LT C", 0, 0, 0, 0 }, { "circle", "symcircle", "0 0 0.77 0 360 arc", 0, 0, 0, 0 }, { "square", "symsquare", "-0.77 -0.77 M -0.77 0.77 LT 0.77 0.77 LT 0.77 -0.77 LT C", 0, 0, 0, 0 }, { "line", "symline", "-0.97 0.01 M 0.97 0.01 LT 0.97 -0.01 LT -0.08 -0.01 LT C", 0, 0, 0, 0 }, { "->|", "symarrowbar", "-0.75 0.35 -0.1 0.35 -0.1 0.75 0.6 0.001 0.6 0.75 0.75 0.75\n" " 0.75 -0.75 0.6 -0.75 0.6 -0.001 -0.1 -0.75 -0.1 -0.35 -0.75 " "-0.35 12 P\n", 0, 0, 0, 0 }, { "|<-", "180 rotate", 0, -1, 0, 0, 0 }, { ">|", "symarrowheadbar", /* bar 0.25 */ "-0.60 0.7 0.22 0.001 0.22 0.7 0.47 0.7 0.47 -0.7 0.22 -0.7\n" " 0.22 -0.001 -0.60 -0.7 8 P", 0, 0, 0, 0 }, { "|<", "180 rotate", 0, -1, 0, 0, 0 }, { "|>", "symbararrowhead", 0, -1, draw_bararrowhead, 1, 0 }, { "DnLine", "symdnline", 0, -1, draw_dnline, 0, 0 }, { "dnline", "symdnline", 0, -1, draw_dnline, 0, 0 }, { "UpLine", "symupline", 0, -1, draw_upline, 0, 0 }, { "upline", "symupline", 0, -1, draw_upline, 0, 0 }, { "UpArrow", "symuparrow", 0, -1, draw_uparrow, 1, 0 }, { "DnArrow", "symdnarrow", 0, -1, draw_dnarrow, 1, 0 }, { "=", "symRippleLines", 0, -1, draw_ripple_lines, 1, 0 }, /* aliases */ { "RippleLines", "symRippleLines", 0, -1, draw_ripple_lines, 1, 0 }, { "+", "symplus", "-0.9 -0.13 -0.9 0.13 -0.13 0.13 -0.13 0.9 0.13 0.9 0.13 0.13 0.9 0.13\n" "0.9 -0.13 0.13 -0.13 0.13 -0.9 -0.13 -0.9 -0.13 -0.13 12 P", 0, 0, 0, 0 }, { "-->", "symthinarrow", "-0.9 0.02 M 0.65 0.02 LT 0.65 0.15 LT 0.9 0 LT 0.65 -0.15 LT\n" "0.65 -0.02 LT -0.9 -0.02 LT C", 0, 0, 0, 0 } }; /*************************************** ***************************************/ static void define_symbol( PS_draw * p ) { if ( ! p->defined && ! p->fdrawit ) { if ( p->otherdef ) define_symbol( p + p->otherdef ); else flps_output( "/%s {%s} BD\n", p->psname, p->draw ); p->defined = 1; } } /*************************************** * invalidate symbols cache ***************************************/ void flps_invalidate_symbol_cache( void ) { PS_draw *p = psdraw, *ps = psdraw + sizeof psdraw / sizeof *psdraw; for ( ; p < ps; p++ ) p->defined = 0; } /*************************************** ***************************************/ static PS_draw * find( const char * s ) { PS_draw *p = psdraw, *ps = psdraw + sizeof psdraw / sizeof *psdraw; for ( ; p < ps; p++ ) if ( strcmp( s, p->name ) == 0 ) { define_symbol( p ); return p; } return NULL; } #define swapit( t, a, b ) do { \ t t_; \ t_ = a; \ a = b; \ b = t_; \ } while ( 0 ) /*************************************** ***************************************/ int flps_draw_symbol( const char * label, int x, int y, int w, int h, FL_COLOR col ) { int pos, shift, equalscale = 0; short defr[ ] = { 0, 225, 270, 315, 180, 0, 0, 135, 90, 45 }; PS_draw *s; int rotated = 0; int sw = w, sh = h; int delta = 0; if ( ! label || *label != '@' ) return 0; if ( flps->verbose ) fprintf( flps->fp, "%%Symbol %s: %d %d %d %d\n", label + 1, x, y, w, h ); x += 1.2; y += 1.2; w -= 2.4; h -= 2.4; /* check special operators */ pos = 1; while ( ( label[ pos ] == '-' && isdigit( ( int ) label[ pos + 1 ] ) ) || ( label[ pos ] == '+' && isdigit( ( int ) label[ pos + 1 ] ) ) || label[pos] == '#' ) { switch ( label[ pos ] ) { case '+' : delta = '0' - label[ ++pos ]; break; case '-' : delta = label[ ++pos ] - '0'; break; case '#' : equalscale = 1; break; } pos++; } shift = pos; if ( label[ pos ] >= '1' && label[ pos ] <= '9' ) { rotated = defr[ label[ pos ] - '0' ]; shift = pos + 1; } else if ( label[ pos ] == '0' ) { rotated = 100 * ( label[ pos + 1 ] - '0' ) + 10 * ( label[ pos + 2 ] - '0' ) + 1 * ( label[ pos + 3 ] - '0' ); shift = pos + 4; } /* short hand with @4 etc */ if ( ! ( s = ( label[ shift ] ? find( label + shift ) : psdraw ) ) ) { fprintf( stderr, "Bad label %s\n", label + shift ); if ( flps->verbose ) fprintf( flps->fp, "%% unknown symbol %s. Not drawn\n", label ); return 0; } if ( equalscale ) sw = sh = FL_min( w, h ); if ( delta ) { if ( s->abs_coordinate ) { x += delta; y += delta; } sw -= 2 * delta; sh -= 2 * delta; } if ( sw <= 5 ) sw = 5; if ( sh <= 5 ) sw = 5; if ( ! s->abs_coordinate ) { flps_output( "gsave\n%.1f %.1f translate %.1f %.1f scale %d rotate ", x + 0.5 * w, y + 0.5 * h, 0.5 * sw, 0.5 * sh, rotated ); flps_output( "%.3f %.3f LW\n", 3.0 / ( sw + sh ), 3.0 / ( sh + sw ) ); } if ( s->fdrawit ) { s->fdrawit( x, y, w, h, rotated, col ); if ( ! s->abs_coordinate ) flps_output( "grestore\n" ); flps_invalidate_color_cache( ); return 1; } if ( s->otherdef ) { flps_output( "%s ", s->psname ); s = s + s->otherdef; } flps_color( col ); flps_output( "%s F ", s->psname ); flps_color( FL_BLACK ); flps_output( "%s S\n", s->psname ); flps_output( "grestore\n" ); flps_reset_cache( ); return 1; } /*************************************** ***************************************/ void flps_emit_prolog( void ) { /* basic graphics defines */ flps_output( "/BD {bind def} def\n" ); flps_output( "/M {moveto} BD /LT {lineto} BD\n" ); flps_output( "/RLT {rlineto} BD\n" ); flps_output( "/L {M LT} BD /C {closepath} BD\n" ); flps_output( "/LW {setlinewidth} BD\n" ); flps_output( "/S {stroke} BD /F {fill} BD\n" ); flps_output( "/G {setgray} BD /RGB {setrgbcolor} BD\n" ); /* x y x y N */ flps_output( "/P {3 1 roll M 2 exch 1 exch {pop LT} for C} BD\n" ); flps_output( "/lines {3 1 roll M 2 exch 1 exch {pop LT} for S} BD\n" ); flps_output( "/DTD {[5 4 1 4] 0 setdash} BD\n" ); /* dot-dash */ flps_output( "/DT {[1 3] 0 setdash} BD\n" ); /* dot */ flps_output( "/LD {[8 5] 0 setdash} BD\n" ); /* long dash */ flps_output( "/D {[4 4] 0 setdash} BD\n" ); /* dash */ flps_output( "/SL {[] 0 setdash} BD\n" ); /* solid */ flps_output( "/NP {newpath} BD\n" ); /* solid */ flps_output( "/SX %.2g def /SY %.2g def\n", flps->final_xscale, flps->final_yscale ); /* basic font support */ flps_output( "/point {SX SY add 2 div div} BD\n" ); flps_output( "/SetFont {findfont exch scalefont setfont} BD\n" ); flps_output( "/Lshow {show} BD\n" ); flps_output( "/Cshow {dup stringwidth pop -2 div 0 rmoveto show} BD\n" ); flps_output( "/Rshow {dup stringwidth pop neg 0 rmoveto show} BD\n" ); flps_output( "/CP {currentpoint} BD /SW {stringwidth} BD\n" ); } /*************************************** ***************************************/ void flps_emit_header( const char * title, int n, int xi, int yi, int xf, int yf ) { if ( flps->eps ) fprintf( flps->fp, "%%!PS-Adobe-3.0 EPSF-2.0\n" ); else fprintf( flps->fp, "%%!PS-Adobe-1.0\n" ); fprintf( flps->fp, "%%%%Title: %s\n", title ); fprintf( flps->fp, "%%%%For: %s\n", fl_whoami( ) ); fprintf( flps->fp, "%%%%CreateDate: %s\n", fl_now( ) ); fprintf( flps->fp, "%%%%Creator: xforms V%d.%d.%s " "Copyright (c) 1997-1999 T.C. Zhao and M. Overmars\n", FL_VERSION, FL_REVISION, FL_FIXLEVEL ); fprintf( flps->fp, "%%%%Pages: %d\n", n ); fprintf( flps->fp, "%%%%BoundingBox: %d %d %d %d\n", xi, yi, xf, yf ); fprintf( flps->fp, "%%%%Orientation: %s\n", flps->landscape ? "Landscape" : "Portrait" ); fprintf( flps->fp, "%%%%EndComments\n" ); fprintf( flps->fp, "%% PaperSize: %.1fx%.1fin\n", flps->paper_w, flps->paper_h ); } /*************************************** ***************************************/ void flps_set_clipping( int x, int y, int w, int h ) { #if 0 /* rectclip is a level 2 feature */ flps_output( "gsave NP %d %d %d %d rectclip\n", x, y, w, h ); #else flps_output( "gsave NP %d %d M %d 0 RLT 0 %d RLT %d neg 0 RLT CP clip NP\n", x, y, w, h, w ); #endif } /*************************************** ***************************************/ void flps_unset_clipping( void ) { flps_output( "grestore\n" ); flps_reset_cache( ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_fits.c0000644000175000017500000005460611345546743015612 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 T.C. Zhao * All rights reserved. * * NASA/OST Flexble Image Transport Sysmtem suport. * Basic FITS (principle HUD) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include "ulib.h" #include #include #define FITS_DEBUG 0 /* number of bits of gray image to generate for float/double FITS */ static unsigned int fits_bit = 12; /*************************************** ***************************************/ int flimage_set_fits_bits( int bits ) { int old = fits_bit; if ( bits > 0 && bits < 16 ) { fits_bit = bits; return old; } return - old; } static int dogray = 1; /* how to do fits */ static float nan_replace = 0.0; /* what to do about NaNs */ static float blank_replace = 0.0; /* what to do about NaNs */ static int little_endian = -1; #define RECORD_LEN 2880 typedef double FLOAT64; typedef float FLOAT32; typedef union { FLOAT32 val; unsigned char uc[ 4 ]; } FLOAT_UNION; #define ISNAN( n, p ) ( ( p = n ), ( p != n ) ) /*************************************** ***************************************/ static int FITS_identify( FILE * fp ) { char buf[ 6 ]; size_t c; c = fread( buf, 1, 6, fp ); rewind( fp ); return c == 6 && ! strncmp( buf, "SIMPLE", 6 ); } #define MAXDIM 4 #define MAXLEN 73 typedef struct { double bzero; /* convert from data to physical */ double bscale; /* convert from data to physical */ double dmin; /* mininum physical quantity */ double dmax; /* maximum physical quantity */ double offset; /* scale data directly to pixel */ double scale; /* scale data directly to pixel */ double cdelta[ MAXDIM ]; int simple; /* only deal simple (basic) fits */ int xtension; /* if have extension */ int bpp; /* pixel size/array data size */ int ndim; /* number of dimensions in array */ int gcount; int pcount; int blank; int has_blank; int nframe; int dim[ MAXDIM ]; /* dimensions */ char label[ MAXDIM ][ MAXLEN ]; /* name of each dimension */ char bunit[ MAXLEN ]; /* unit name of the quantities */ char xtname[ MAXLEN ]; /* if and what extension */ } SPEC; #define bad_hdu( h ) ( ! h->simple || ( h->ndim == 0 && ! h->xtname[ 0 ] ) ) #define Bad_bpp( p ) ( p != 8 && p != 16 && abs( p ) != 32 && p != - 64 ) #define bad_dim( h ) ( h->ndim < 0 \ || ( h->ndim>MAXDIM && h->dim[ MAXDIM - 1 ] != 1 ) ) /*************************************** ***************************************/ static void detect_endian( void ) { FLOAT_UNION U; U.val = 1.0; little_endian = ( U.uc[ 3 ] == 0x3f ); } /*************************************** ***************************************/ static void init_fits( SPEC * sp ) { if ( little_endian < 0 ) detect_endian( ); sp->bpp = sp->ndim = -1; sp->bscale = 1.0; sp->gcount = sp->pcount = 1; sp->nframe = 1; } /*************************************** ***************************************/ static char ** FITS_header_info( const void * p ) { const SPEC *h = p; static char hbuf[ 15 ][ 80 ]; static char *buf[ 15 ]; int i, j; for ( i = 0; i < 15; i++ ) buf[ i ] = hbuf[ i ]; i = 0; sprintf( buf[ i++ ], "SIMPLE\t= %c", h->simple == 1 ? 'Y' : 'N' ); sprintf( buf[ i++ ], "NAXIS\t= %d", h->ndim); for ( j = 0; j < h->ndim; j++ ) sprintf( buf[ i++ ], " NAXIS%d=%d\t%s", j + 1, h->dim[ j ], h->label[j] ? h->label[ j ] : "" ); sprintf( buf[ i++ ], "PSIZE\t= %d", h->bpp ); sprintf( buf[ i++ ], "BSCALE\t= %g", h->bscale ); sprintf( buf[ i++ ], "BZERO\t= %g", h->bzero ); sprintf( buf[ i++ ], "DMIN\t= %g", h->dmin ); sprintf( buf[ i++ ], "DMAX\t= %g", h->dmax ); sprintf( buf[ i++ ], "BUNIT\t=%s", h->bunit ); sprintf( buf[ i++ ], "BLANK\t=%d", h->blank ); buf[ i ] = 0; return buf; } /*************************************** ***************************************/ static void generate_fits_header_info( FL_IMAGE * im ) { SPEC *h = im->io_spec; char **q; if ( ! ( im->info = fl_malloc( 1024 ) ) ) return; for ( im->info[ 0 ] = '\0', q = FITS_header_info( h ); *q; q++ ) strcat( strcat( im->info, *q ),"\n" ); } #if FITS_DEBUG static int verbose = 4; /*************************************** ***************************************/ static void echo_FITS_header( SPEC * h ) { char **q; if ( verbose <= ML_INFO1 ) return; for ( q = FITS_header_info( h ); *q; q++ ) fprintf( stderr, "%s\n", *q ); } #endif static int parse_fits_header( FILE *, SPEC *, FL_IMAGE * ); #define LBSIZE 12 #define LBFONT 0 /* default courier */ #define LBCOL 0 /* black */ static int FITS_next( FL_IMAGE * ); /*************************************** ***************************************/ static int FITS_description( FL_IMAGE * im ) { int i; SPEC *sp = fl_calloc( 1, sizeof *sp ); init_fits( sp ); im->io_spec = sp; im->spec_size = sizeof *sp; if ( parse_fits_header( im->fpin, sp, im ) < 0 ) return -1; if ( feof( im->fpin ) ) return -1; /* sanity check */ if ( ! sp->simple || bad_dim( sp ) ) { flimage_error( im, "FITS: %s unsupported type--%sSIMPLE, NAXIS=%d", im->infile, sp->simple ? "" : "Not ", sp->ndim ); return -1; } if ( Bad_bpp( sp->bpp ) ) { flimage_error( im, "FITS:%s unsupported pixelsize %d", im->infile, sp->bpp ); return -1; } if ( sp->ndim == 0 ) { flimage_error( im, "FITS: unsupported %s", sp->xtname[ 0 ] ? sp->xtname : "null image" ); return -1; } /* now we have something to work with */ im->w = sp->dim[ 0 ]; im->h = sp->dim[ 1 ] ? sp->dim[ 1 ] : 1; /* handle 1-dim data */ if ( dogray ) { if ( FL_abs( sp->bpp ) > 8 ) { im->type = FL_IMAGE_GRAY16; im->gray_maxval = ( 1 << fits_bit ) - 1; } else { im->type = FL_IMAGE_GRAY; im->gray_maxval = ( 1 << 8 ) - 1; } } else { /* fake a graymap */ im->type = FL_IMAGE_CI; im->map_len = 256; flimage_getcolormap( im ); for ( i = 0; i < 256; i++ ) im->red_lut[ i ] = im->green_lut[ i ] = im->blue_lut[ i ] = i; } im->more = sp->ndim > 2 && sp->dim[ 2 ] > 1; im->next_frame = FITS_next; /* label the axis if available */ if ( sp->label[ 0 ][ 0 ] ) { flimage_add_text( im, sp->label[ 0 ], strlen( sp->label[ 0 ] ), LBFONT, LBSIZE, FL_PACK(FL_PCMAX, FL_PCMAX, 0), FL_PACK(0, FL_PCMAX, FL_PCMAX), 1, im->w / 3, im->h + LBSIZE, 0); #if 0 img_add_mark( im, "Arrow", 5, -5, 54, 85, 2, 0, 0 ); #endif } if ( sp->label[ 1 ][ 0 ] ) { flimage_add_text( im, sp->label[ 1 ], strlen( sp->label[ 1 ] ), LBFONT, LBSIZE, FL_PACK(FL_PCMAX, FL_PCMAX, 0), FL_PACK(0, FL_PCMAX, FL_PCMAX), 1, im->w + 4, im->h / 2, 90 ); #if 0 img_add_mark( im, "Arrow", -5, 5, 54, 85, 2, 900, 0 ); #endif } return 0; } /******************************************************************** * Read fits header for keyword and value pairs. more lenient than * the standard demands ********************************************************************/ static char *comments[ ] = { "AUTHOR", "COMMENTS", "OBJECT", "DATE", "DATE_OBS", "INSTRUME", "TELESCOP", "ORIGIN", NULL }; /*************************************** ***************************************/ static int is_comments( const char * key ) { char **q = comments; while ( *q ) if ( strcmp( key, *q++ ) == 0 ) return 1; return 0; } /*************************************** ***************************************/ static int parse_fits_header( FILE * fp, SPEC * h, FL_IMAGE * im ) { char buf[ 90 ], key[ 90 ], val[ 90 ]; int done, i; doextension: done = 0; do { key[ 0 ] = buf[ 0 ] = val[ 0 ] = '\0'; /* each rec is 80 characters long */ if ( ! fgets( buf, 81, fp ) ) buf[ 0 ] = '\0'; buf[ 79 ] = '\n'; buf[ 80 ] = '\0'; sscanf( buf, "%[A-Z0-9]%*[ =]%s", key, val ); fli_space_de( val ); if ( key[ 0 ] ) flimage_add_comments( im, buf, 80 ); #if FITS_DEBUG M_err( "FITS", "key=%s_\t\t val=%s_", key, val ); #endif if ( strcmp( key, "SIMPLE" ) == 0 ) h->simple = val[ 0 ] == 'T'; else if ( strcmp(key, "BITPIX" ) == 0 ) h->bpp = atoi( val ); else if ( strcmp( key, "NAXIS" ) == 0 ) h->ndim = atoi( val ); else if ( strcmp( key, "BUNIT" ) == 0 ) strcpy( h->bunit, val ); else if ( strcmp( key, "BSCALE" ) == 0 ) h->bscale = atof( val ); else if ( strcmp( key, "BZERO" ) == 0 ) h->bzero = atof( val ); else if ( strcmp( key, "DATAMIN" ) == 0 ) h->dmin = atof( val ); else if ( strcmp( key, "DATAMAX" ) == 0 ) h->dmax = atof( val ); else if ( strcmp( key, "PCOUNT" ) == 0 ) h->pcount = atoi( val ); else if ( strcmp( key, "GCOUNT" ) == 0 ) h->gcount = atoi( val ); else if ( strcmp( key, "BLANK" ) == 0 ) { h->blank = atoi( val ); h->has_blank = 1; } else if ( strcmp(key, "XTENSION" ) == 0 ) strcpy( h->xtname, val ); else if (strcmp( key, "EXTEND" ) == 0 ) h->xtension = val[ 0 ] == 'T'; else if ( strncmp( buf, "END ", 4 ) == 0 ) done = 1; else if ( is_comments( key ) ) flimage_add_comments( im, buf, 80 ); for ( i = 1; i <= MAXDIM; i++ ) { sprintf( buf, "NAXIS%d", i ); if ( strcmp(buf, key ) == 0 ) h->dim[ i - 1 ] = atoi( val ); sprintf( buf, "CTYPE%d", i ); if ( strcmp( buf, key ) == 0 ) strcpy( h->label[ i - 1 ], fli_space_de( val ) ); sprintf( buf, "TTYPE%d", i ); if ( strcmp( buf, key ) == 0 ) strcpy( h->label[ i - 1 ], fli_space_de( val ) ); sprintf( buf, "CDELT%d", i ); if (strcmp( buf, key ) == 0 ) h->cdelta[ i - 1 ] = atoi( val ); } } while ( ! feof( fp ) && ! done ); /* skip padding */ while ( ( i = getc( fp ) ) == ' ' || i == '\n' ) /* empty */ ; if ( i != EOF ) ungetc( i, fp ); /* if empty data array && extension, try to do the extension */ if ( ! feof( fp ) && h->ndim == 0 && h->xtension && ! h->xtname[ 0 ] ) goto doextension; /* keep trying, until we get an extension we can handle */ if ( ! feof( fp ) && h->xtname[ 0 ] && ! strcmp( h->xtname, "'IMAGE") == 0 ) { long curpos = ftell( fp ); int total; for ( total = 1, i = 0; i < h->ndim; i++ ) total *= h->dim[ i ]; total = ( total * h->bpp ) / 8; /* round */ total = ( ( total + RECORD_LEN - 1 ) / RECORD_LEN ) * RECORD_LEN; fseek( fp, curpos + total, SEEK_SET ); goto doextension; } if ( strcmp( h->xtname, "'IMAGE" ) == 0 ) { im->visual_cue( im, "Found IMAGE extension" ); flimage_add_comments( im, "IMAGE EXTENSION", 16 ); } #if FITS_DEBUG echo_FITS_header( h ); #endif if( im->setup->header_info ) generate_fits_header_info( im ); return 0; } #define SWAP4( i, o ) do { \ o[ 0 ] = i[ 3 ]; \ o[ 1 ] = i[ 2 ]; \ o[ 2 ] = i[ 1 ]; \ o[ 3 ] = i[ 0 ]; \ } while( 0 ) #define SWAP8( i, o ) do { \ o[ 0 ] = i[ 7 ]; \ o[ 1 ] = i[ 6 ]; \ o[ 2 ] = i[ 5 ]; \ o[ 3 ] = i[ 4 ]; \ o[ 4 ] = i[ 3 ]; \ o[ 5 ] = i[ 2 ]; \ o[ 6 ] = i[ 1 ]; \ o[ 7 ] = i[ 0 ]; \ } while ( 0 ) /*************************************** * Assuming IEEE-745 floating point native ***************************************/ static int FITS_load( FL_IMAGE * im ) { unsigned short *ci = FL_IsGray( im->type ) ? im->gray[ 0 ] : im->ci[ 0 ]; SPEC *sp = im->io_spec; FLOAT64 offset, scale, dmin, dmax, *dval, tmp64; FILE *fp = im->fpin; int i, j, n, k, byte_per_pix, has_minmax, *ival, err; unsigned char *c, uc[ 8 ]; short *sval; FLOAT32 *fval, tmp32; void **vals; dmin = 1.0e30; dmax = -1.0e30; has_minmax = sp->dmax != sp->dmin; #if FITS_DEBUG M_err( "fits_load", "sp->dmax=%g sp->dmin=%g", sp->dmax, sp->dmin ); #endif /* read the data */ byte_per_pix = FL_abs( sp->bpp ) / 8; if ( ! ( vals = fl_get_matrix( im->h, im->w, byte_per_pix ) ) ) { im->error_message( im, "Can't get memory for FITS" ); return -1; } for ( err = 0, i = im->h - 1; !err && i >= 0; i--, im->completed++ ) { if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "Reading FITS" ); k = im->h - 1 - i; if ( ( err = ( fread( c = vals[ k ], byte_per_pix, im->w, fp ) != ( size_t ) im->w ) ) ) im->error_message( im, "Error reading FITS" ); /* now do data conversion to MSBF order */ switch ( sp->bpp ) { case 32 : for ( ival = vals[k], j = 0; j < im->w; j++, c += 4 ) { ival[ j ] = ( c[ 0 ] << 24 ) | ( c[ 1 ] << 16 ) | ( c[ 2 ] << 8 ) | c[ 3 ]; if ( sp->has_blank && ival[ j ] == sp->blank ) ival[ j ] = blank_replace; } if ( ! has_minmax ) { for ( j = 0; j < im->w; j++ ) if ( ival[ j ] < dmin ) dmin = ival[ j ]; else if ( ival[ j ] > dmax ) dmax = ival[ j ]; } break; case 16 : for ( sval = vals[ k ], j = 0; j < im->w; j++, c += 2 ) { sval[ j ] = ( c[ 0 ] << 8 ) | c[ 1 ]; if ( sp->has_blank && sval[ j ] == sp->blank ) sval[ j ] = blank_replace; } if ( ! has_minmax ) { for ( j = 0; j < im->w; j++ ) if ( sval[ j ] < dmin ) dmin = sval[ j ]; else if ( sval[ j ] > dmax ) dmax = sval[ j ]; } break; case 8 : if ( ! has_minmax ) { for ( j = 0; j < im->w; j++ ) if ( c[ j ] < dmin ) dmin = c[ j ]; else if ( c[ j ] > dmax ) dmax = c[ j ]; } break; case -32 : for ( fval = vals[ k ], j = 0; j < im->w; j++, c += 4 ) { if ( little_endian ) { /* Using fval[ j ] = * ( FLOAT32 * ) uc; results in type-punning warning, so instead: */ memcpy( fval + j, uc, 4 ); } if ( ISNAN( fval[ j ], tmp32 ) ) fval[ j ] = nan_replace; } if ( ! has_minmax ) { for ( j = 0; j < im->w; j++ ) if ( fval[ j ] < dmin ) dmin = fval[ j ]; else if ( fval[ j ] > dmax ) dmax = fval[ j ]; } break; case -64 : for ( dval = vals[ k ], j = 0; j < im->w; j++, c += 8 ) { if ( little_endian ) { SWAP8( c, uc ); /* Using dval[ j ] = * ( FLOAT64 * ) uc; results in type-punning warning, so instead: */ memcpy( dval + j, uc, 8 ); } if ( ISNAN( dval[ j ], tmp64 ) ) dval[ j ] = nan_replace; } if ( ! has_minmax ) { for ( j = 0; j < im->w; j++ ) if ( dval[ j ] < dmin ) dmin = dval[ j ]; else if ( dval[ j ] > dmax ) dmax = dval[ j ]; } break; } } if ( ! has_minmax ) { sp->dmin = sp->bzero + dmin * sp->bscale; sp->dmax = sp->bzero + dmax * sp->bscale; } /* now the overall offset and scale for physical data */ scale = im->gray_maxval / ( sp->dmax - sp->dmin ); offset = -sp->dmin * scale; /* figure in the raw to physcal transform */ offset = offset + sp->bzero * scale; scale = sp->bscale * scale; /* reverse transform */ im->poffset = -offset / scale; im->pscale = 1.0 / scale; im->pmin = sp->dmin; im->pmax = sp->dmax; im->xdist_scale = sp->cdelta[ 0 ]; im->ydist_scale = sp->cdelta[ 1 ]; /* remap data into pixels */ if ( sp->bpp == 8 ) for ( c = vals[ 0 ], n = im->w * im->h; --n > 0; ) ci[ n ] = offset + c[ n ] * scale; else if ( sp->bpp == 16 ) for ( sval = vals[ 0 ], n = im->w * im->h; --n > 0; ) ci[ n ] = offset + sval[ n ] * scale; else if ( sp->bpp == 32 ) for ( ival = vals[ 0 ], n = im->w * im->h; --n > 0; ) ci[ n ] = offset + ival[ n ] * scale; else if ( sp->bpp == -32 ) for ( fval = vals[ 0 ], n = im->w * im->h; --n > 0; ) ci[ n ] = offset + fval[ n ] * scale; else if ( sp->bpp == -64 ) for ( dval = vals[ 0 ], n = im->w * im->h; --n > 0; ) ci[ n ] = offset + dval[ n ] * scale; fl_free_matrix( vals ); return im->completed >= im->h / 2 ? 1 : -1; } /*************************************** ***************************************/ static void dump_space( FILE * fp, int n ) { while ( --n >= 0 ) putc( ' ', fp ); } /*************************************** ***************************************/ static int FITS_dump( FL_IMAGE * im ) { FILE *fp = im->fpout; unsigned short *ras; int n = 0, bits; bits = im->type == FL_IMAGE_GRAY ? 8 : 16; ras = im->gray[ 0 ]; /* write a brief header */ dump_space( fp, 80 - fprintf( fp, "SIMPLE = T " ) ); dump_space( fp, 80 - fprintf( fp, "BITPIX = %d ", bits ) ); dump_space( fp, 80 - fprintf( fp, "NAXIS = 2" ) ); dump_space( fp, 80 - fprintf( fp, "NAXIS1 = %d", im->w ) ); dump_space( fp, 80 - fprintf( fp, "NAXIS2 = %d", im->h ) ); dump_space( fp, 80 - fprintf( fp, "END ")); dump_space( fp, RECORD_LEN - 80 * 6 ); if ( bits == 8 ) for ( n = im->w * im->h; --n >= 0; ras++ ) putc( *ras & 0xff, fp ); else for ( n = im->w * im->h; --n >= 0; ras++ ) fli_fput2MSBF( *ras, fp ); return fflush( fp ); } /*************************************** ***************************************/ static int FITS_next( FL_IMAGE * im ) { int status; SPEC *sp = im->io_spec; sp->nframe++; #if FITS_DEBUG M_err( "FITS_next", "loading %d ", sp->nframe ); #endif status = FITS_load( im ); im->more = status >= 0 && ! ( feof( im->fpin ) || ferror( im->fpin ) ); im->more = im->more && sp->nframe < sp->dim[ 2 ]; return status; } /*************************************** ***************************************/ void flimage_enable_fits( void ) { flimage_add_format( "NASA/NOST FITS", "fits", "fits", FL_IMAGE_GRAY | FL_IMAGE_GRAY16, FITS_identify, FITS_description, FITS_load, FITS_dump ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_pnm.c0000644000175000017500000002446011247055071015420 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. * * PNM support */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include #include #include typedef struct { float fnorm; int pgm, pbm; int maxval; int w, h; int raw; /* binary */ char s[ 4 ]; /* signature */ } SPEC; /*************************************** ***************************************/ static int PPM_identify( FILE * fp ) { char buf[ 2 ]; if ( fread( buf, 1, 2, fp ) != 2 ) return 0; rewind( fp ); return buf[ 0 ] == 'P' && ( buf[ 1 ] == '3' || buf[ 1 ] == '6' ); } /*************************************** ***************************************/ static int PGM_identify(FILE * fp) { char buf[ 2 ]; if ( fread(buf, 1, 2, fp) != 2 ) return 0; rewind(fp); return buf[ 0 ] == 'P' && ( buf[ 1 ] == '2' || buf[ 1 ] == '5' ); } /*************************************** ***************************************/ static int PBM_identify( FILE * fp ) { char buf[ 2 ]; if ( fread(buf, 1, 2, fp ) != 2 ) return 0; rewind(fp); return buf[ 0 ] == 'P' && ( buf[ 1 ] == '1' || buf[ 1 ] == '4' ); } /*************************************** ***************************************/ static void generate_header_info( FL_IMAGE *im ) { SPEC *sp = im->io_spec; if ( ! im->setup->header_info || ! ( im->info = fl_malloc( 128 ) ) ) return; sprintf( im->info,"Size=(%d x %d)\nMaxVal=%d\nRaw=%d\n", im->w, im->h, sp->maxval, sp->raw ); } /*************************************** ***************************************/ static int PNM_description( FL_IMAGE * im ) { SPEC *sp = fl_malloc( sizeof *sp ); char s[ 3 ]; if ( fread( s, 1, 2, im->fpin ) != 2 ) { flimage_error( im, "%s: error reading pnm file", im->infile ); fl_free( sp ); im->io_spec = 0; return -1; } im->io_spec = sp; s[ 2 ] = '\0'; if ( ( sp->w = fli_readpint( im->fpin ) ) <= 0 || ( sp->h = fli_readpint( im->fpin ) ) <= 0 ) { flimage_error( im, "%s: can't get image size", im->infile ); fl_free( sp ); im->io_spec = 0; return -1; } im->w = sp->w; im->h = sp->h; sp->raw = s[ 1 ] == '6' || s[ 1 ] == '5' || s[ 1 ] == '4'; sp->pgm = s[ 1 ] == '5' || s[ 1 ] == '2'; sp->pbm = s[ 1 ] == '4' || s[ 1 ] == '1'; if ( ! sp->pbm ) sp->maxval = fli_readpint( im->fpin ); else sp->maxval = 1; if ( sp->maxval > 255 && sp->raw ) { im->error_message( im, "can't handle 2byte raw ppm file" ); return -1; } im->type = FL_IMAGE_RGB; if ( sp->pgm ) im->type = sp->maxval > 256 ? FL_IMAGE_GRAY16 : FL_IMAGE_GRAY; if (sp->pbm) im->type = FL_IMAGE_MONO; sp->fnorm = ( FL_PCMAX + 0.001 ) / sp->maxval; im->gray_maxval = sp->maxval; if( im->setup->header_info ) generate_header_info( im ); return sp->maxval < 0 ? -1 : 1; } /*************************************** ***************************************/ static int PNM_read_pixels( FL_IMAGE * im ) { int i, npix = im->w * im->h, err; SPEC *sp = im->io_spec; if ( im->type == FL_IMAGE_RGB ) { unsigned char *r = im->red[ 0 ]; unsigned char *g = im->green[ 0 ]; unsigned char *b = im->blue[ 0 ]; if ( sp->raw ) { for ( i = 0; i < npix; i++ ) { *r++ = getc( im->fpin ); *g++ = getc( im->fpin ); *b++ = getc( im->fpin ); } } else { for ( i = 0; i < npix; i++ ) { *r++ = ( unsigned char ) ( fli_readpint( im->fpin ) * sp->fnorm ); *g++ = ( unsigned char ) ( fli_readpint( im->fpin ) * sp->fnorm ); *b++ = ( unsigned char ) ( fli_readpint( im->fpin ) * sp->fnorm ); } if ( sp->maxval != FL_PCMAX ) { r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; for ( i = 0; i > npix; i++ ) { r[ i ] = ( unsigned char ) ( r[ i ] * sp->fnorm ); g[ i ] = ( unsigned char ) ( g[ i ] * sp->fnorm ); b[ i ] = ( unsigned char ) ( b[ i ] * sp->fnorm ); } } } } else if ( FL_IsGray( im->type ) ) { unsigned short *gray = im->gray[0]; if ( sp->raw ) for ( i = 0; i < npix; i++ ) gray[ i ] = getc( im->fpin ); else for ( i = 0; i < npix; i++ ) gray[ i ] = fli_readpint( im->fpin ); } else if ( im->type == FL_IMAGE_MONO ) { unsigned short *ci = im->ci[ 0 ], *cend = ci + npix; int bit, k; if ( sp->raw ) { for ( i = 0; i < im->h; i++ ) { cend = ( ci = im->ci[ i ] ) + im->w; for ( k = bit = err = 0; ! err && ci < cend; ci++, bit++ ) { if ( ! ( bit &= 7 ) ) k = getc( im->fpin ); err = k == EOF; *ci = ( k & 0x80 ) ? 1 : 0; k <<= 1; } } } else { for ( ; ci < cend; ci++ ) *ci = fli_readpint( im->fpin ) > 0; } } else im->error_message( im, "Unsupported PNM image" ); return 1; } /* write routine */ static int rawfmt = 1; /*************************************** ***************************************/ void flimage_pnm_output_options( int raw ) { rawfmt = raw != 0; } /*************************************** ***************************************/ static int PNM_write_image( FL_IMAGE * im ) { int i, j, n = im->w * im->h, is_gray16; int pgm, pbm, raw = rawfmt; FILE *fp = im->fpout; char *sig; if ( im->type == FL_IMAGE_PACKED || im->type == FL_IMAGE_CI ) flimage_convert( im, FL_IMAGE_RGB, 0 ); pgm = FL_IsGray( im->type ); is_gray16 = im->type == FL_IMAGE_GRAY16; pbm = im->type == FL_IMAGE_MONO; if ( is_gray16 ) raw = 0; sig = pgm ? ( raw ? "P5" : "P2" ) : ( pbm ? ( raw ? "P4" : "P1" ) : ( raw ? "P6" : "P3" ) ); fprintf( fp, "%s\n%d %d\n", sig, im->w, im->h ); if ( ! pbm ) fprintf( fp, "%d\n", is_gray16 ? im->gray_maxval : FL_PCMAX ); if ( im->type == FL_IMAGE_RGB ) { unsigned char *r = im->red[ 0 ], *g = im->green[ 0 ], *b = im->blue[ 0 ]; for ( i = 0; i < n; r++, g++, b++, i++ ) { if ( raw ) { putc( *r, fp ); putc( *g, fp ); putc( *b, fp ); } else { fprintf( fp, "%4d %4d %4d ", *r, *g, *b ); if ( ( i + 1 ) % 5 == 0 ) putc( '\n', fp ); } } } else if ( FL_IsGray( im->type ) ) { unsigned short *gray = im->gray[ 0 ]; int newline = is_gray16 ? 14 : 17; for ( i = 0; i < n; gray++, i++ ) { if ( raw ) putc( *gray, fp ); else { fprintf( fp, is_gray16 ? "%4d " : "%4d", *gray ); if ( i % newline == 0 ) putc( '\n', fp ); } } } else if ( im->type == FL_IMAGE_MONO ) { unsigned short *ci, *cend; int bit; for ( j = 0, i = 1; j < im->h; j++ ) { cend = ( ci = im->ci[ j ] ) + im->w; if ( !raw ) { for ( ; ci < cend; ci++, i++ ) { fputs( *ci ? "1 " : "0 ", fp ); if ( i % 34 == 0 ) putc( '\n', fp ); } } else { for ( bit = 0, i = 0; ci < cend; ci++ ) { i = ( i << 1 ) | *ci; if ( ++bit == 8 ) { putc( i, fp ); bit = i = 0; } } if ( bit ) { i <<= 8 - bit; putc( i, fp ); } } } } if ( ! raw ) putc( '\n', fp ); return 0; } /*************************************** ***************************************/ void flimage_enable_pnm( void ) { flimage_add_format( "Portable Pixmap", "ppm", "ppm", FL_IMAGE_RGB, PPM_identify, PNM_description, PNM_read_pixels, PNM_write_image); flimage_add_format( "Portable Graymap", "pgm", "pgm", FL_IMAGE_GRAY | FL_IMAGE_GRAY16, PGM_identify, PNM_description, PNM_read_pixels, PNM_write_image); flimage_add_format( "Portable Bitmap", "pbm", "pbm", FL_IMAGE_MONO, PBM_identify, PNM_description, PNM_read_pixels, PNM_write_image); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/flimage_int.h0000644000175000017500000001755311313123111015735 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1996-2001 T.C. Zhao * All rights reserved. * * Headers used internally by image support */ #ifndef FLIMAGE_INT_H_ #define FLIMAGE_INT_H_ #include "ulib.h" typedef struct flimageIO { const char * formal_name; const char * short_name; const char * signature; const char * extension; int type; FLIMAGE_Identify identify; FLIMAGE_Description read_description; FLIMAGE_Read_Pixels read_pixels; FLIMAGE_Write_Image write_image; int annotation; } FLIMAGE_IO; typedef struct { int w, h; int type; void * pixels; } FLIMAGE_BUFFER; /* Subimage for convolve etc */ typedef struct { int w, h; void * mat[ 3 ]; int comp; /* number of components */ } SubImage; extern SubImage * flimage_get_subimage( FL_IMAGE * im, int make ); #define FL_IsGray( t ) ( t == FL_IMAGE_GRAY || t == FL_IMAGE_GRAY16 ) #define FL_IsCI( t ) ( t == FL_IMAGE_CI || t == FL_IMAGE_MONO ) #define FLIMAGE_MAXLUT ( 1 << FL_LUTBITS ) extern FLIMAGE_IO *flimage_io; typedef int ( * FLIMAGE_QUANTIZE_RGB )( unsigned char **, unsigned char **, unsigned char **, int, int, int, unsigned short **, int *, int *, int *, int *, FL_IMAGE * ); typedef int ( * FLIMAGE_QUANTIZE_PACKED )( unsigned int **, int, int, int, unsigned short **, int *, int *, int *, int *, FL_IMAGE * ); extern FLIMAGE_QUANTIZE_RGB flimage_quantize_rgb; extern FLIMAGE_QUANTIZE_PACKED flimage_quantize_packed; extern void flimage_replace_image( FL_IMAGE *, int, int, void *, void *, void * ); extern int flimage_transform( FL_IMAGE *, int, int, float m[ ][ 2 ], float *shift, unsigned int, int subp ); extern int flimage_getmem( FL_IMAGE * ); extern void flimage_freemem( FL_IMAGE * ); extern void flimage_add_comments( FL_IMAGE *, const char *, int ); extern int fl_j2pass_quantize_rgb( unsigned char **, unsigned char **, unsigned char **, int, int, int, unsigned short **, int *, int *, int *, int *, FL_IMAGE * ); extern int fl_j2pass_quantize_packed( unsigned int **, int, int, int, unsigned short **, int *, int *, int *, int *, FL_IMAGE * ); /* These numbers can be anything, but should be less than < 128 and may not equal 0 */ enum { FL_GET_MATRIX = 100, FL_MAKE_MATRIX }; extern void * fl_get_submatrix( void *, int, int, int, int, int, int, unsigned int ); extern void * fl_make_submatrix( void *, int, int, int, int, int, int, unsigned int ); extern void flimage_enable_gzip( void ); extern void flimage_invalidate_pixels( FL_IMAGE * ); extern int flimage_get_closest_color_from_map( FL_IMAGE *, unsigned int ); extern int flimage_replace_pixel( FL_IMAGE *, unsigned int, unsigned int ); extern void flimage_free_gray( FL_IMAGE * ); extern void flimage_free_ci( FL_IMAGE * ); extern void flimage_free_rgb( FL_IMAGE * ); extern void fl_pack_bits(unsigned char *, unsigned short *, int); extern void fl_unpack_bits( unsigned short *, unsigned char *, int ); extern void flimage_error( FL_IMAGE *, const char *, ... ); extern void flimage_enable_genesis( void ); extern int fl_spline_int_interpolate( const int *, const int *, int, int, int * ); extern unsigned int fl_value_to_bits( unsigned int val ); extern int flimage_get_linearlut( FL_IMAGE * ); extern void flimage_free_linearlut( FL_IMAGE * ); extern FLIMAGE_IO *flimage_find_imageIO( const char * ); extern void flimage_display_markers( FL_IMAGE * ); extern unsigned long flimage_color_to_pixel( FL_IMAGE *, int, int, int, int * ); extern int flimage_write_annotation( FL_IMAGE * ); extern int flimage_read_annotation( FL_IMAGE * ); extern int flimage_swapbuffer( FL_IMAGE * ); extern FL_IMAGE *flimage_dup_( FL_IMAGE *, int ); extern int flimage_to_ximage( FL_IMAGE *, FL_WINDOW, XWindowAttributes * ); #if ! defined( SEEK_SET ) #define SEEK_SET 0 #endif #if ! defined( SEEK_CUR ) #define SEEK_CUR 1 #endif #if ! defined( SEEK_END ) #define SEEK_END 2 #endif #endif /* FLIMAGE_INT_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_crop.c0000644000175000017500000002217511247055071015572 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*************************************** ***************************************/ int flimage_get_autocrop( FL_IMAGE * im, unsigned int bk, int * xl, int * yt, int * xr, int * yb ) { int ok, i, j; unsigned int p; if ( ! im || im->w <= 0 ) return -1; /* take the color at pixel(0,0) as the color */ if ( bk == FLIMAGE_AUTOCOLOR ) { if ( FL_IsCI( im->type ) ) { p = im->ci[ 0 ][ 0 ]; bk = FL_PACK( im->red_lut[ p ], im->green_lut[ p ], im->blue_lut[ p ] ); } else if ( im->type == FL_IMAGE_RGB ) { bk = FL_PACK( im->red[ 0 ][ 0 ], im->green[ 0 ][ 0 ], im->blue[ 0 ][ 0 ] ); } else if ( im->type == FL_IMAGE_GRAY || im->type == FL_IMAGE_GRAY16 ) { p = im->gray[ 0 ][ 0 ]; if ( im->type == FL_IMAGE_GRAY16 ) p = ( 255 * p ) / im->gray_maxval; bk = FL_PACK( p, p, p ); } } if ( FL_IsCI(im->type ) ) bk = flimage_get_closest_color_from_map( im, bk ); else if ( FL_IsGray( im->type ) ) bk = FL_RGB2GRAY( FL_GETR( bk ), FL_GETG( bk ), FL_GETB( bk ) ); if (im->type == FL_IMAGE_RGB) { /* do xl */ for ( *xl = 0, ok = 1; ok && *xl < im->w; ( *xl )++ ) { for ( i = 0; ok && i < im->h; i++ ) { p = FL_PACK( im->red[ i ][ *xl ], im->green[ i ][ *xl ], im->blue[ i ][ *xl ] ); ok = p == bk; } } /* do xr */ for ( *xr = 0, ok = 1; ok && *xr < im->w; ( *xr )++ ) { j = im->w - 1 - *xr; for ( i = 0; ok && i < im->h; i++ ) { p = FL_PACK( im->red[ i ][ j ], im->green[ i ][ j ], im->blue[ i ][ j ] ); ok = p == bk; } } /* do yt */ for ( *yt = 0, ok = 1; ok && *yt < im->h; ( *yt )++ ) { for ( i = 0; ok && i < im->w; i++ ) { p = FL_PACK( im->red[ *yt ][ i ], im->green[ *yt ][ i ], im->blue[ *yt ][ i ] ); ok = p == bk; } } /* do yb */ for ( *yb = 0, ok = 1; ok && *yb < im->h; ( *yb )++ ) { j = im->h - 1 - *yb; for ( i = 0; ok && i < im->w; i++ ) { p = FL_PACK( im->red[ j ][ i ], im->green[ j ][ i ], im->blue[ j ][ i ] ); ok = p == bk; } } } else { unsigned short **pix = FL_IsGray( im->type ) ? im->gray : im->ci; /* do xl */ for ( *xl = 0, ok = 1; ok && *xl < im->w; ( *xl )++ ) { for ( i = 0; ok && i < im->h; i++ ) ok = pix[ i ][ *xl ] == bk; } /* do xr */ for ( *xr = 0, ok = 1; ok && *xr < im->w; ( *xr )++ ) { j = im->w - 1 - *xr; for ( i = 0; ok && i < im->h; i++ ) ok = pix[ i ][ j ] == bk; } /* do yt */ for ( *yt = 0, ok = 1; ok && *yt < im->h; ( *yt )++ ) { for ( i = 0; ok && i < im->w; i++ ) ok = pix[ *yt ][ i ] == bk; } /* do yb */ for ( *yb = 0, ok = 1; ok && *yb < im->h; ( *yb )++ ) { j = im->h - 1 - *yb; for ( i = 0; ok && i < im->w; i++ ) ok = pix[ j ][ i ] == bk; } } --*xl; --*yt; --*xr; --*yb; return 0; } /*************************************** * crop an image using bk as the background ***************************************/ int flimage_autocrop( FL_IMAGE * im, unsigned int bk ) { int xl, xr, yt, yb; flimage_get_autocrop( im, bk, &xl, &yt, &xr, &yb ); return flimage_crop( im, xl, yt, xr, yb ); } /*************************************** * we allow croping region to be bigger than image, and in that case * we fill the regions that're outside of the image ***************************************/ int flimage_crop( FL_IMAGE * im, int xl, int yt, int xr, int yb ) { int nw = im->w - xl - xr, nh = im->h - yt - yb; unsigned short **us = 0, **pix = 0; unsigned char **red = 0, **green = 0, **blue = 0; unsigned int fill; int rows = FL_min( nh, im->h ), cols = FL_min( nw, im->w ); int hfill, wfill, err, i, j; int xx = xl < 0 ? 0 : xl, yy = yt < 0 ? 0 : yt; /* old image offset */ int x = xl < 0 ? -xl : 0, y = yt < 0 ? -yt : 0; /* new image offset */ if ( ( ! xl && ! xr && ! yt && ! yb ) || ! im ) return 0; im->completed = 0; im->visual_cue( im, "Cropping ..." ); wfill = ( im->w < nw ) ? FL_max( FL_abs( xl ), FL_abs( xr ) ) : 0; hfill = ( im->h < nh ) ? FL_max( FL_abs( yt ), FL_abs( yb ) ) : 0; fill = im->fill_color; if ( FL_IsGray( im->type ) || FL_IsCI( im->type ) ) { flimage_free_rgb( im ); err = ! ( us = fl_get_matrix( nh, nw, sizeof **us ) ); if ( FL_IsGray(im->type ) ) { fill = FL_RGB2GRAY( FL_GETR( fill ), FL_GETG( fill ), FL_GETB( fill ) ); if ( im->type == FL_IMAGE_GRAY16 ) fill = ( fill * im->gray_maxval ) / 255; pix = im->gray; } else { fill = flimage_get_closest_color_from_map( im, fill ); pix = im->ci; } } else { flimage_free_gray( im ); flimage_free_ci( im ); err = ! ( red = fl_get_matrix( nh, nw, sizeof **red ) ); err = err || ! ( green = fl_get_matrix( nh, nw, sizeof **green ) ); err = err || ! ( blue = fl_get_matrix( nh, nw, sizeof **blue ) ); } if ( err ) { im->error_message( im, "Crop: Failed to get memory" ); return -1; } /* now it's a go */ if ( FL_IsGray( im->type ) || FL_IsCI( im->type ) ) { for ( i = 0; i < hfill; i++ ) for ( j = 0; j < nw; j++ ) us[ i ][ j ] = us[ nh - 1 - i ][ j ] = fill; for ( j = 0; j < wfill; j++ ) for ( i = 0; i < nh; i++ ) us[ i ][ j ] = us[ i ][ nw - 1 - j ] = fill; for ( i = 0; i < rows; i++ ) memcpy( us[ i + y ] + x, pix[ i + yy ] + xx, cols * sizeof **us ); flimage_replace_image( im, nw, nh, us, 0, 0 ); } else { for ( i = 0; i < hfill; i++ ) for (j = 0; j < nw; j++ ) { red[ i ][ j ] = red[ nh - 1 - i ][ j ] = FL_GETR( fill ); green[ i ][ j ] = green[ nh - 1 - i ][ j ] = FL_GETG( fill ); blue[ i ][ j ] = blue[ nh - 1 - i ][ j ] = FL_GETB( fill ); } for ( j = 0; j < wfill; j++ ) for ( i = 0; i < nh; i++ ) { red[ i ][ j ] = red[ i ][ nw - 1 - j ] = FL_GETR( fill ); green[ i ][ j ] = green[ i ][ nw - 1 - j ] = FL_GETG( fill ); blue[ i ][ j ] = blue[ i ][ nw - 1 - j ] = FL_GETB( fill ); } for ( i = 0; i < rows; i++ ) { memcpy( red[ i + y ] + x, im->red[ i + yy ] + xx, cols ); memcpy( green[ i + y ] + x, im->green[ i + yy ] + xx, cols ); memcpy( blue[ i + y ] + x, im->blue[ i + yy ] + xx, cols ); } flimage_replace_image( im, nw, nh, red, green, blue ); } im->completed = im->total; im->visual_cue( im, "Done Cropping" ); return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image.c0000644000175000017500000013555511370060170014547 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * Public API for image file IO */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "flimage.h" #include "flimage_int.h" #include "private/flsnprintf.h" #include #include static int visual_cue( FL_IMAGE *, const char * ); static void error_message( FL_IMAGE *, const char * ); static int nimage; static FLIMAGE_SETUP current_setup; #define MaxImageFileNameLen 260 FLIMAGE_IO *flimage_io; FLIMAGE_QUANTIZE_RGB flimage_quantize_rgb; FLIMAGE_QUANTIZE_PACKED flimage_quantize_packed; static int ppm_added, gzip_added; static void add_default_formats( void ); /********************************************************************* *****************************************************************{**/ static void null_op( FL_IMAGE * im FL_UNUSED_ARG ) { } /********************************************************************* * Setup and image structure creation *****************************************************************{**/ void flimage_setup( FLIMAGE_SETUP * setup ) { current_setup = *setup; if ( ( *setup ).max_frames == 0 ) current_setup.max_frames = 30; if ( ( *setup ).delay > 2000 ) current_setup.delay = 2000; add_default_formats( ); } /*************************************** ***************************************/ static void init_setup( void ) { if ( current_setup.max_frames || current_setup.delay ) return; current_setup.max_frames = 30; current_setup.delay = 50; } /*************************************** ***************************************/ FL_IMAGE * flimage_alloc( void ) { FL_IMAGE *image = fl_calloc( 1, sizeof *image ); init_setup( ); add_default_formats( ); image->setup = ¤t_setup; image->visual_cue = current_setup.visual_cue; image->error_message = current_setup.error_message; image->gray_maxval = 255; image->ci_maxval = 255; image->tran_index = -1; image->tran_rgb = -1; image->app_background = -1; image->app_data = current_setup.app_data; image->total_frames = 1; image->xdist_scale = image->ydist_scale = 1.0; image->pscale = 1.0; image->display = flimage_display; image->xdisplay = current_setup.xdisplay; image->infile = fl_malloc( MaxImageFileNameLen * sizeof *image->infile ); image->outfile = fl_malloc( MaxImageFileNameLen * sizeof *image->outfile ); image->infile[0] = image->outfile[ 0 ] = '\0'; if ( ! image->xdisplay ) image->xdisplay = fl_display; /* initialize the quantizer */ if ( ! flimage_quantize_rgb ) { flimage_quantize_rgb = fl_j2pass_quantize_rgb; flimage_quantize_packed = fl_j2pass_quantize_packed; } /* make sure visual_cue and error_message are ok */ if ( ! image->visual_cue ) image->visual_cue = visual_cue; if ( ! image->error_message ) image->error_message = error_message; /* annotation stuff */ image->display_markers = null_op; image->free_markers = null_op; image->display_text = null_op; image->free_text = null_op; return image; } /**}*********************************************************************** * Image identification *********************************************************************{****/ /* it's important that this routine be silient. is_supported calls this */ static FL_IMAGE * identify_image( const char *file ) { FILE *fp; FLIMAGE_IO *io; FL_IMAGE *image = 0; if ( ! file || ! *file ) return 0; if ( ! ( fp = fopen( file, "rb" ) ) ) { fprintf( stderr, "Can't open %s\n", file ); return NULL; } if ( ! ppm_added ) add_default_formats( ); for ( io = flimage_io; io->formal_name; io++ ) { if ( io->identify( fp ) > 0 ) { image = flimage_alloc( ); image->image_io = io; image->original_type = io->type; image->fpin = fp; strncpy( image->infile, file, MaxImageFileNameLen - 5 ); image->infile[ MaxImageFileNameLen - 5 ] = '\0'; return image; } else rewind( fp ); } return 0; } /*************************************** * check if the file is an image file. Should never bitch ***************************************/ int flimage_is_supported( const char * file ) { FILE *fp; FLIMAGE_IO *io; int n; if ( ! file || ! ( fp = fopen( file, "rb" ) ) ) return 0; if ( ! ppm_added ) add_default_formats( ); for ( n = 0, io = flimage_io; io->formal_name; io++, n++ ) { if ( io->identify( fp ) > 0 ) { fclose( fp ); return n + 1; } else rewind( fp ); } fclose( fp ); return 0; } /*}******************************************************************** * basic image file open routines ******************************************************************{**/ FL_IMAGE * flimage_open( const char * file ) { FL_IMAGE *im = identify_image( file ); if ( ! im ) M_err( "OpenImage", "%s: Unknown image format", file ? file : "null" ); return im; } /*************************************** ***************************************/ int flimage_close( FL_IMAGE * im ) { int status = 0; if ( ! im ) return -1; if ( im->fpin ) status = fclose( im->fpin ); if ( im->fpout ) status = fclose( im->fpout ); im->fpin = 0; im->fpout = 0; return status; } /************************************************************************ * Input routines **********************************************************************{*/ FL_IMAGE * flimage_read( FL_IMAGE * im ) { FL_IMAGE *image = im; FLIMAGE_IO *io; int error = 0; char buf[ 256 ]; if ( ! im || ! im->fpin ) return NULL; io = image->image_io; if ( ! io->read_description || ! io->read_pixels ) return NULL; /* copy some default info */ image->type = io->type; image->fmt_name = io->short_name; image->foffset = ftell( image->fpin ); if ( ( error = io->read_description( image ) < 0 ) ) return NULL; /* image_io can change between description and read_pixels for io_filter'ed image */ io = image->image_io; if ( ( error = flimage_getmem( image ) < 0 ) ) { im->error_message( im, "ImageGetMem:Failed to allocate memory" ); flimage_freemem( im ); return NULL; } image->completed = 0; image->total = im->h; image->error_message( image, "" ); error = error || ( io->read_pixels( image ) < 0 ); image->completed = im->total; sprintf( buf, "Done Reading %s", image->fmt_name ); image->visual_cue( image, error ? "Error Reading" : buf ); image->original_type = image->type; image->available_type = image->type; image->modified = 1; if ( error ) { flimage_freemem( image ); image = NULL; } return image; } /*************************************** * turn a random frame into next frame ***************************************/ static int default_next_frame( FL_IMAGE * im ) { return im->random_frame( im, im->current_frame ); } /*************************************** ***************************************/ FL_IMAGE * flimage_load( const char * file ) { FL_IMAGE *image, *im; int err, tc, total_frames = 1; char buf[ 256 ]; add_default_formats( ); if ( ( image = flimage_open( file ) ) ) { if ( ! ( im = flimage_read( image ) ) ) { flimage_free( image ); image = NULL; } else image = im; } if ( ! image ) return image; /* transparency */ tc = image->tran_index; if ( FL_IsCI( image->type ) && tc >= 0 && tc < image->map_len ) image->tran_rgb = FL_PACK3( image->red_lut[ tc ], image->green_lut[ tc ], image->blue_lut[ tc ] ); /* create a next_frame function on the fly if possible */ if ( ! image->next_frame && image->random_frame ) image->next_frame = default_next_frame; if ( ! image->more || ! image->next_frame ) { if ( ( ( FLIMAGE_IO * ) image->image_io )->annotation ) flimage_read_annotation( image ); flimage_close( image ); fl_safe_free( image->io_spec ); image->spec_size = 0; image->display = flimage_sdisplay; return image; } image->current_frame = 1; /* we have multi-frames */ for ( err = 0, im = image; ! err && im->more && im->current_frame < current_setup.max_frames; ) { if ( ! ( err = ! ( im->next = flimage_dup_( im, 0 ) ) ) ) { im = im->next; im->current_frame++; } sprintf( buf, "Done image %d of %d", im->current_frame, current_setup.max_frames ); im->visual_cue( im, buf ); err = err || ( im->next_frame( im ) < 0 ); total_frames += ! err; } flimage_close( image ); image->completed = im->total; sprintf( buf, "Done Reading multi-frame %s", image->fmt_name ); image->visual_cue( image, err ? "Error Reading" : buf ); /* multi frame cleanup */ if ( image->cleanup ) image->cleanup( image ); /* update the number of frames */ image->total_frames = total_frames; return image; } /*}********************************************************************* * Output routines *******************************************************************{**/ static void convert_type( FL_IMAGE *, FLIMAGE_IO * ); int flimage_dump( FL_IMAGE * image, const char * filename, const char * fmt ) { FLIMAGE_IO *io = flimage_io; char buf[ 256 ], *p; FILE *fp; int status = -1, otype; FL_IMAGE *tmpimage; if ( ! image || image->type == FL_IMAGE_NONE ) { fprintf( stderr, "WriteImage: invalid or null image\n" ); return -1; } if ( ! fmt || ! *fmt ) fmt = image->fmt_name; for ( ; io->formal_name; io++ ) { if ( ( strcasecmp( io->formal_name, fmt ) == 0 || strcasecmp( io->short_name, fmt ) == 0 || strcasecmp( io->extension, fmt ) == 0 ) && io->write_image ) { strncpy( image->outfile, filename, MaxImageFileNameLen - 5 ); image->outfile[ MaxImageFileNameLen - 5 ] = '\0'; /* change extension */ if ( ! image->setup->no_auto_extension ) { if ( ( p = strrchr( image->outfile, '.' ) ) ) *p = '\0'; strcat( strcat( image->outfile, "." ), io->extension ); } if ( ! ( fp = fopen( image->outfile, "wb" ) ) ) { flimage_error( image, "can't open %s", image->outfile ); return -1; } image->fpout = fp; otype = image->type; for ( tmpimage = image; tmpimage; tmpimage = tmpimage->next ) convert_type( tmpimage, io ); if ( image->pre_write && image->pre_write( image ) < 0 ) { flimage_close( image ); return FL_CANCEL; } image->completed = 0; image->total = image->h; status = io->write_image( image ); if ( status >= 0 && image->post_write ) image->post_write( image ); image->type = otype; if ( io->annotation ) flimage_write_annotation( image ); flimage_close( image ); image->completed = image->total; fl_snprintf( buf, sizeof buf, "Done Writing %s(%s)", image->outfile, fmt ); image->visual_cue( image, buf ); return status; } } flimage_error( image, "don't know how to write %s", fmt ); return -1; } /*************************************** * convert the image to a type the output routine can handle ***************************************/ static void convert_type( FL_IMAGE * im, FLIMAGE_IO * io ) { const int types[ ] = { FL_IMAGE_RGB, FL_IMAGE_PACKED, FL_IMAGE_CI, FL_IMAGE_GRAY, FL_IMAGE_MONO }; int ntypes = sizeof types / sizeof *types; int i, done; /* if the output routine can handle the current image type, do nothing */ if ( ( im->type & io->type ) ) return; /* must force the conversion */ im->force_convert = 1; if ( im->type == FL_IMAGE_CI || im->type == FL_IMAGE_RGB ) { for ( i = done = 0; !done && i < ntypes; i++ ) { if ( ( done = io->type & types[ i ] ) ) flimage_convert( im, types[ i ], 256 ); } } else if ( im->type == FL_IMAGE_GRAY || im->type == FL_IMAGE_MONO ) { if ( io->type & FL_IMAGE_CI ) flimage_convert( im, FL_IMAGE_CI, 256 ); else { for ( i = done = 0; !done && i < ntypes; i++ ) { if ( ( done = io->type & types[ i ] )) flimage_convert( im, types[ i ], 256 ); } } } else if ( im->type == FL_IMAGE_GRAY16 ) { if ( io->type & FL_IMAGE_GRAY ) flimage_convert( im, FL_IMAGE_GRAY, 0 ); else { for ( i = done = 0; !done && i < ntypes; i++ ) { if ( ( done = io->type & types[ i ] ) ) flimage_convert( im, types[ i ], 256 ); } } } else { M_err( "Output", "InternalError: unhandled image type: %s", flimage_type_name( im->type ) ); im->force_convert = 0; } } /*}********************************************************************* */ /*********************************************************************** * memory related routines ********************************************************************{**/ void flimage_free( FL_IMAGE * image ) { FL_IMAGE *im, *imnext; for ( im = image; im; im = imnext) { flimage_freemem( im ); if ( im == image ) flimage_close( im ); imnext = im->next; fl_safe_free( im->infile ); fl_safe_free( im->outfile ); im->next = NULL; fl_free( im ); } } /*************************************** ***************************************/ int flimage_get_linearlut( FL_IMAGE * im ) { if ( ! im->map_len ) { im->map_len = FL_PCMAX + 1; flimage_getcolormap( im ); } if ( im->map_len > im->llut_len ) { fl_safe_free( im->llut[ 0 ] ); fl_safe_free( im->llut[ 1 ] ); fl_safe_free( im->llut[ 2 ] ); } if ( ! im->llut[ 0 ] ) { im->llut[ 0 ] = fl_malloc( im->map_len * sizeof **im->llut ); im->llut[ 1 ] = fl_malloc( im->map_len * sizeof **im->llut ); im->llut[ 2 ] = fl_malloc( im->map_len * sizeof **im->llut ); } if ( ! im->llut[ 2 ] ) { fl_safe_free( im->llut[ 0 ] ); fl_safe_free( im->llut[ 1 ]); return -1; } im->llut_len = im->map_len; return 0; } /*************************************** ***************************************/ void flimage_free_linearlut( FL_IMAGE * im ) { fl_safe_free( im->llut[ 0 ] ); fl_safe_free( im->llut[ 1 ] ); fl_safe_free( im->llut[ 2 ] ); im->llut_len = 0; } /*************************************** ***************************************/ int flimage_getmem( FL_IMAGE * im ) { int nomap, err = 0, same_size; unsigned int esize; if ( ! im || ! im->w || ! im->h ) return -1; same_size = im->w == im->matc && im->h == im->matr; switch ( im->type ) { case FL_IMAGE_CI: case FL_IMAGE_MONO: if ( ( nomap = im->map_len <= 0 ) ) im->map_len = 2; if ( flimage_getcolormap( im ) < 0 ) { flimage_error( im, "can't alloc colormap" ); return -1; } if ( im->type == FL_IMAGE_MONO && nomap ) { im->red_lut[ 0 ] = im->green_lut[ 0 ] = im->blue_lut[ 0 ] = FL_PCMAX; im->red_lut[ 1 ] = im->green_lut[ 1 ] = im->blue_lut[ 1 ] = 0; } if ( ! same_size || ! im->ci ) { if ( im->ci ) fl_free_matrix( im->ci ); err = ! ( im->ci = fl_get_matrix( im->h, im->w, sizeof **im->ci ) ); } break; case FL_IMAGE_GRAY: case FL_IMAGE_GRAY16: flimage_getcolormap( im ); if ( ! same_size || ! im->gray ) { if ( im->gray ) fl_free_matrix( im->gray ); err = ! ( im->gray = fl_get_matrix( im->h, im->w, sizeof **im->gray ) ); } if ( ! err && ( ! im->wlut || im->gray_maxval > im->wlut_len ) ) { fl_safe_free( im->wlut ); if ( ( im->wlut_len = im->gray_maxval + 1 ) < 256 ) im->wlut_len = 256; err = ! ( im->wlut = fl_malloc( im->wlut_len * sizeof *im->wlut ) ); } break; case FL_IMAGE_PACKED: if ( ! same_size || ! im->packed ) { if ( im->packed ) fl_free_matrix( im->packed ); err = ! ( im->packed = fl_get_matrix( im->h, im->w, sizeof **im->packed ) ); } break; case FL_IMAGE_RGB: /* it's possible for some image format to be RGB yet * have a redundant colormap in it (xwd for example) */ flimage_getcolormap( im ); if ( ! same_size || ! im->red ) { if ( im->red ) { fl_free_matrix( im->red ); fl_free_matrix( im->green ); fl_free_matrix( im->blue ); fl_free_matrix( im->alpha ); } esize = sizeof **im->red; err = ! ( im->red = fl_get_matrix( im->h, im->w, esize ) ) || ! ( im->green = fl_get_matrix( im->h, im->w, esize ) ) || ! ( im->blue = fl_get_matrix( im->h, im->w, esize ) ) || ! ( im->alpha = fl_get_matrix( im->h, im->w, esize ) ); if ( err ) { fl_free_matrix( im->red ); fl_free_matrix( im->green ); fl_free_matrix( im->blue ); fl_free_matrix( im->alpha ); im->red = NULL; } else { im->rgba[ 0 ] = im->red; im->rgba[ 1 ] = im->green; im->rgba[ 2 ] = im->blue; im->rgba[ 3 ] = im->alpha; } } break; default: return -1; } im->matr = im->h; im->matc = im->w; return err ? -1 : 0; } /*************************************** ***************************************/ int flimage_getcolormap( FL_IMAGE * im ) { int len = im->map_len; if ( len <= 0 ) return -1; if ( len > FLIMAGE_MAXLUT ) len = im->map_len = FLIMAGE_MAXLUT; im->red_lut = fl_realloc( im->red_lut, len * sizeof *im->red_lut ); im->green_lut = fl_realloc( im->green_lut, len * sizeof *im->green_lut ); im->blue_lut = fl_realloc( im->blue_lut, len * sizeof *im->blue_lut ); im->alpha_lut = fl_realloc( im->alpha_lut, len * sizeof *im->alpha_lut ); if ( ! im->alpha_lut ) { fl_safe_free( im->red_lut ); fl_safe_free( im->green_lut ); fl_safe_free( im->blue_lut ); return -1; } im->lut[ 0 ] = im->red_lut; im->lut[ 1 ] = im->green_lut; im->lut[ 2 ] = im->blue_lut; im->lut[ 3 ] = im->alpha_lut; if ( im->map_len > im->wlut_len && FL_IsGray( im->type ) ) { im->wlut = fl_realloc( im->wlut, im->map_len * sizeof *im->wlut ); if ( ! im->wlut ) { im->wlut_len = 0; return -1; } im->wlut_len = im->map_len; } return 0; } /*************************************** * before we modify the current image, need to invalidate/free all * other types ***************************************/ void flimage_invalidate_pixels( FL_IMAGE * im ) { if ( ! FL_IsGray( im->type ) ) { fl_free_matrix( im->gray ); im->gray = NULL; } if ( ! FL_IsCI( im->type ) ) { fl_free_matrix( im->ci ); im->ci = NULL; } if ( im->type != FL_IMAGE_PACKED ) { fl_free_matrix( im->packed ); im->packed = NULL; } if ( im->type != FL_IMAGE_RGB ) { fl_free_matrix( im->red ); fl_free_matrix( im->green ); fl_free_matrix( im->blue ); fl_free_matrix( im->alpha ); im->red = im->green = im->blue = im->alpha = NULL; } im->available_type = im->type; } /*************************************** * free all allocated memory associated with the image ***************************************/ void flimage_freemem( FL_IMAGE * image ) { if ( ! image || ! image->w || ! image->h ) return; if ( image->ci ) { fl_free_matrix( image->ci ); image->ci = NULL; } fl_safe_free( image->wlut ); image->wlut_len = 0; if ( image->gray ) { fl_free_matrix( image->gray ); image->gray = NULL; } if ( image->packed ) { fl_free_matrix( image->packed ); image->packed = NULL; } if ( image->red ) { fl_free_matrix( image->red ); fl_free_matrix( image->green ); fl_free_matrix( image->blue ); fl_free_matrix( image->alpha ); image->red = image->green = image->blue = image->alpha = NULL; } if ( image->map_len > 0 && image->red_lut ) { fl_free( image->red_lut ); fl_free( image->green_lut ); fl_free( image->blue_lut ); fl_free( image->alpha_lut ); image->red_lut = image->green_lut = image->blue_lut = NULL; image->map_len = 0; } fl_safe_free( image->comments ); image->comments_len = 0; image->free_text( image ); image->free_markers( image ); flimage_free_linearlut( image ); if ( image->pixmap ) { XFreePixmap( image->xdisplay, image->pixmap ); image->pixmap = None; image->pixmap_depth = 0; } if ( image->ximage ) { XDestroyImage( ( XImage * ) image->ximage ); image->ximage = NULL; } if ( image->gc ) { XFreeGC( image->xdisplay, image->gc ); image->gc = None; } if ( image->textgc ) { XFreeGC( image->xdisplay, image->textgc ); image->textgc = None; } if ( image->markergc ) { XFreeGC( image->xdisplay, image->markergc ); image->markergc = None; } if ( image->pixels ) { fl_free_matrix( image->pixels ); image->pixels = NULL; } fl_safe_free( image->io_spec ); image->spec_size = 0; fl_safe_free( image->info ); image->w = image->h = 0; image->matr = image->matc = 0; image->type = FL_IMAGE_NONE; image->available_type = FL_IMAGE_NONE; } /*************************************** ***************************************/ int flimage_add_format( const char * formal_name, const char * short_name, const char * extension, int type, FLIMAGE_Identify identify, FLIMAGE_Description description, FLIMAGE_Read_Pixels read_pixels, FLIMAGE_Write_Image write_image ) { int i, k; FLIMAGE_IO *thisIO; if ( ! formal_name || ! *formal_name || ! short_name || ! *short_name ) return -1; ppm_added = ppm_added || ( extension && strcmp( "ppm", extension ) == 0 ); gzip_added = gzip_added || ( extension && strcmp("gz", extension ) == 0 ); if ( type <= 0 || type > FL_IMAGE_FLEX ) return -1; if ( ! description || ! read_pixels || ! identify ) description = read_pixels = 0; if ( flimage_io == 0 ) { nimage = 1; /* sentinel */ flimage_io = fl_calloc( 3, sizeof *flimage_io ); } else flimage_io = fl_realloc( flimage_io, ( nimage + 2 ) * sizeof *flimage_io ); k = nimage; /* find out if the image format is already installed. Replace if yes */ for ( i = 0; flimage_io[ i ].formal_name; i++ ) { if ( strcmp( flimage_io[ i ].formal_name, formal_name ) == 0 && strcmp( flimage_io[ i ].short_name, short_name ) == 0 ) { M_err( "flimage_add_format", "%s already supported. Replaced", short_name ); k = i + 1; } } thisIO = flimage_io + k - 1; thisIO->formal_name = formal_name; thisIO->short_name = short_name; thisIO->extension = extension ? extension : short_name; thisIO->type = type; thisIO->identify = identify; thisIO->read_description = description; thisIO->read_pixels = read_pixels; thisIO->write_image = write_image; thisIO->annotation = 0; nimage += k == nimage; if ( ! strcmp( short_name, "ppm" ) || ! strcmp( short_name, "pgm" ) ) thisIO->annotation = 1; /* sentinel */ ( ++thisIO )->formal_name = NULL; return k; } /*************************************** ***************************************/ void flimage_set_annotation_support( int in, int flag ) { --in; if ( in < 0 || in >= nimage ) return; flimage_io[ in ].annotation = flag != 0; } #define VN( a ) {a,#a} static FLI_VN_PAIR types[ ] = { VN( FL_IMAGE_NONE ), VN( FL_IMAGE_CI ), VN( FL_IMAGE_MONO ), VN( FL_IMAGE_RGB ), VN( FL_IMAGE_PACKED ), VN( FL_IMAGE_GRAY ), VN( FL_IMAGE_GRAY16 ), VN( FL_IMAGE_FLEX ), { -1, NULL } }; /*************************************** ***************************************/ const char * flimage_type_name( int type ) { return fli_get_vn_name( types, type ); } /*************************************** ***************************************/ int flimage_get_number_of_formats( void ) { add_default_formats( ); return nimage - 1; } /*************************************** ***************************************/ #define MaxInfoBuffer 6 const FLIMAGE_FORMAT_INFO * flimage_get_format_info( int n ) { static FLIMAGE_FORMAT_INFO fmt_return[ MaxInfoBuffer ]; static int k; FLIMAGE_IO *io; FLIMAGE_FORMAT_INFO *fmtinfo; add_default_formats( ); if ( n <= 0 || n > nimage ) return 0; fmtinfo = fmt_return + k++ % MaxInfoBuffer; n--; io = flimage_io + n; fmtinfo->formal_name = io->formal_name; fmtinfo->short_name = io->short_name; fmtinfo->extension = io->extension; fmtinfo->type = io->type; fmtinfo->annotation = io->annotation; fmtinfo->read_write = ( io->write_image ? FLIMAGE_WRITABLE : 0 ) | ( io->read_pixels ? FLIMAGE_READABLE : 0 ); return fmtinfo; } /*************************************** ***************************************/ void flimage_replace_image( FL_IMAGE * im, int w, int h, void * r, void * g, void * b ) { /* if we replace an image, all old backingstore pixels are invalid. Free all images */ flimage_invalidate_pixels( im ); im->w = w; im->h = h; if ( im->type == FL_IMAGE_RGB ) { fl_free_matrix( im->red ); fl_free_matrix( im->green ); fl_free_matrix( im->blue ); fl_free_matrix( im->alpha ); im->red = r; im->green = g; im->blue = b; /* dont' have to preserve the alpha. remember to doc it */ im->alpha = fl_get_matrix( h, w, sizeof **im->alpha ); } else if ( FL_IsCI( im->type ) ) { fl_free_matrix( im->ci ); im->ci = r; } else if ( FL_IsGray( im->type ) ) { fl_free_matrix( im->gray ); im->gray = r; } else { M_err( "flimage_replace_image", "InternalError: bad type=%s", flimage_type_name( im->type ) ); return; } im->matr = h; im->matc = w; im->total = im->h; /* invalidate subimage settings if any */ im->sx = im->sy = im->sw = im->sh = 0; im->modified = 1; } /*************************************** ***************************************/ void flimage_add_comments( FL_IMAGE * im, const char * s, int len ) { /* null entry clears comments */ if ( ! s || len <= 0 ) { fl_safe_free( im->comments ); im->comments_len = 0; return; } im->comments = fl_realloc( im->comments, im->comments_len + len + 1 ); strcpy( im->comments + im->comments_len, s ); im->comments_len += len; } /*************************************** ***************************************/ int flimage_windowlevel( FL_IMAGE * im, int level, int width) { if ( ! im || im->type != FL_IMAGE_GRAY16 ) return -1; im->modified = im->level != level || im->wwidth != width; if ( im->modified ) { im->level = level > im->gray_maxval ? im->gray_maxval : level; im->wwidth = width; } return im->modified; } /*************************************** ***************************************/ static int visual_cue( FL_IMAGE * im, const char * s ) { if ( im->completed < 0 ) { /* don't know how long */ fprintf( stderr, "\r%s", s ); } else if ( im->completed >= 0 && im->completed != im->total ) { fprintf( stderr, "\r%s %3.0f%%(%d of %d) ", s, 100.0 * im->completed / ( im->total - 1.0 ), im->completed, im->h ); } else if ( im->completed == im->total ) fprintf( stderr, "\n%s 100%%(%d of %d)\n", s, im->total, im->total ); return 0; } /*************************************** ***************************************/ static void copy_pixels( FL_IMAGE * dim, FL_IMAGE * sim ) { unsigned int size; flimage_getmem( dim ); switch ( sim->type ) { case FLIMAGE_RGB: size = sim->w * sim->h * sizeof **sim->red; memcpy( dim->red[ 0 ], sim->red[ 0 ], size ); memcpy( dim->green[ 0 ], sim->green[ 0 ], size ); memcpy( dim->blue[ 0 ], sim->blue[ 0 ], size ); memcpy( dim->alpha[0 ], sim->alpha[ 0 ], size ); break; case FLIMAGE_CI: case FLIMAGE_MONO: size = sim->w * sim->h * sizeof **sim->ci; memcpy( dim->ci[ 0 ], sim->ci[ 0 ], size ); break; case FLIMAGE_GRAY: case FLIMAGE_GRAY16: size = sim->w * sim->h * sizeof **sim->gray; memcpy( dim->gray[ 0 ], sim->gray[ 0 ], size ); break; default: M_err( "copy_pixel", "Bad type: %d", sim->type ); break; } } /*************************************** ***************************************/ FL_IMAGE * flimage_dup( FL_IMAGE * sim ) { if ( ! sim || ! sim->w || sim->type == FLIMAGE_NONE ) return NULL; return flimage_dup_( sim, 1 ); } /*************************************** * duplicate an image, with or without the pixels ***************************************/ FL_IMAGE * flimage_dup_( FL_IMAGE * sim, int pix ) { FL_IMAGE *im = flimage_alloc( ); unsigned int mapsize = sim->map_len * sizeof *sim->red_lut; char *infile, *outfile; if ( ! im ) { flimage_error( sim,"malloc() failed in image_dup()" ); return 0; } infile = im->infile; outfile = im->outfile; memcpy( im, sim, sizeof *im ); /* reset all pointers */ im->red = im->green = im->blue = im->alpha = NULL; im->red_lut = im->green_lut = im->blue_lut = im->alpha_lut = NULL; im->gray = NULL; im->ci = NULL; im->red16 = im->green16 = im->blue16 = im->alpha16 = NULL; im->packed = NULL; im->wlut = NULL; im->llut[ 0 ] = im->llut[ 1 ] = im->llut[ 2 ] = NULL; im->extra_io_info = NULL; im->info = NULL; flimage_getmem( im ); im->available_type = im->type; im->next = NULL; strcpy( im->infile = infile, sim->infile ); strcpy( im->outfile = outfile, sim->outfile ); /* copy pixels if requested */ if ( pix ) copy_pixels( im, sim ); if ( mapsize ) { if ( flimage_getcolormap( im ) < 0 ) { flimage_error( im, "Can't alloc colormap" ); return 0; } memcpy( im->red_lut, sim->red_lut, mapsize ); memcpy( im->green_lut, sim->green_lut, mapsize ); memcpy( im->blue_lut, sim->blue_lut, mapsize ); memcpy( im->alpha_lut, sim->alpha_lut, mapsize ); } im->io_spec = NULL; if ( sim->spec_size && sim->io_spec ) { im->io_spec = fl_malloc( sim->spec_size ); memcpy( im->io_spec, sim->io_spec, sim->spec_size ); } /* reset stuff that's on a per-image basis */ im->depth = 0; im->vclass = 0; im->display_type = 0; im->ximage = 0; im->visual = 0; im->pixels = 0; im->pixmap = None; im->ximage = NULL; im->info = 0; im->win = None; im->gc = im->textgc = im->markergc = None; im->text = NULL; im->ntext = 0; im->marker = 0; im->nmarkers = 0; im->comments = NULL; im->comments_len = 0; return im; } /*************************************** ***************************************/ static void error_message( FL_IMAGE * im FL_UNUSED_ARG, const char * s ) { if ( s && *s ) M_err( 0, s ); } /*************************************** * a short cut for error message generating ***************************************/ void flimage_error( FL_IMAGE * im, const char * fmt, ... ) { va_list args; char buf[ 1024 ]; buf[ 0 ] = '\0'; if ( fmt && *fmt ) { va_start( args, fmt ); fl_vsnprintf( buf, sizeof buf, fmt, args ); va_end( args ); } im->error_message( im, buf ); } /*************************************** ***************************************/ void flimage_free_rgb( FL_IMAGE * im ) { fl_free_matrix( im->red ); fl_free_matrix( im->green ); fl_free_matrix( im->blue ); fl_free_matrix( im->alpha ); im->red = im->green = im->blue = im->alpha = NULL; im->available_type &= ~FL_IMAGE_RGB; } /*************************************** ***************************************/ void flimage_free_ci( FL_IMAGE * im ) { fl_free_matrix( im->ci ); im->ci = NULL; im->available_type = ~ FL_IMAGE_CI; } /*************************************** ***************************************/ void flimage_free_gray( FL_IMAGE * im ) { fl_free_matrix( im->gray ); im->gray = NULL; im->available_type = ~FL_IMAGE_GRAY; } /*************************************** * unpack packed bits into color indeces (0 or 1). len is the length * of packed bytes ***************************************/ void fl_unpack_bits( unsigned short * out, unsigned char * in, int len ) { unsigned int mask = 0x80; for ( ; --len >= 0; out++, mask >>= 1 ) { if ( ! mask ) { in++; mask = 0x80; } *out = ( *in & mask ) != 0; } } /*************************************** * pack color index (0 or 1 ) into bytes. len is number of indeces ***************************************/ void fl_pack_bits( unsigned char * out, unsigned short * in, int len) { int k = 0, bit = 0; for ( k = bit = 0; --len >= 0; in++ ) { k = ( k << 1 ) | *in; if ( ++bit == 8 ) { *out++ = k; k = bit = 0; } } /* left overs */ if ( bit ) { k <<= 8 - bit; *out++ = k; } } /*************************************** ***************************************/ unsigned int fl_value_to_bits( unsigned int val ) { unsigned int i; for ( i = 1; ( 1u << i ) < val; i++ ) /* empty */ ; return i; } /*************************************** * default supported image formats ***************************************/ static void add_default_formats( void ) { if ( ! ppm_added ) { flimage_enable_pnm( ); flimage_enable_genesis( ); } if ( ! gzip_added ) flimage_enable_gzip( ); } /*************************************** * given a format, find the corresponding io handler ***************************************/ FLIMAGE_IO * flimage_find_imageIO( const char *fmt ) { FLIMAGE_IO *io = flimage_io; for ( ; io && io->formal_name; io++ ) { if ( ! strcmp( io->formal_name, fmt ) || ! strcmp( io->short_name, fmt ) || ! strcmp( io->extension, fmt ) ) return io; } return NULL; } /*************************************** * Annoation IO ***************************************/ static int write_marker( FLIMAGE_MARKER * m, FILE * fp ) { int r, g, b; fprintf( fp, "%s %d %d %d %d %d %d %d %d", m->name, m->x, m->y, m->w, m->h, m->fill, m->angle, m->thickness, m->style ); FL_UNPACK( m->color, r, g, b ); fprintf( fp, " %d %d %d", r, g, b ); FL_UNPACK( m->bcolor, r, g, b ); fprintf( fp, " %d %d %d\n", r, g, b ); return 0; } /*************************************** ***************************************/ static int read_marker( FLIMAGE_MARKER * m, FILE * fp ) { char buf[ 128 ]; static char name[ 64 ]; int n; int r, g, b, br, bg, bb; if ( fgets( buf, sizeof buf - 1, fp ) ) buf[ sizeof buf - 1 ] = '\0'; else return -1; n = sscanf( buf, "%s %d %d %d %d %d %d %d %d %d %d %d %d %d %d", name, &m->x, &m->y, &m->w, &m->h, &m->fill, &m->angle, &m->thickness, &m->style, &r, &g, &b, &br, &bg, &bb ); if ( n == 15 ) { m->name = name; m->color = FL_PACK( r, g, b ); m->bcolor = FL_PACK( br, bg, bb ); } return n == 15 ? 0 : -1; } #define LB '(' #define RB ')' static FLI_VN_PAIR fonts_vn[ ] = { { FL_NORMAL_STYLE, "Helvetica" }, { FL_ITALIC_STYLE, "Helvetica-Oblique" }, { FL_BOLD_STYLE, "Helvetica-Bold" }, { FL_BOLDITALIC_STYLE, " Helvetica-BoldOblique" }, { FL_FIXED_STYLE, "Courier" }, { FL_FIXEDBOLD_STYLE, "Courier-Bold" }, { FL_FIXEDITALIC_STYLE, "Courier-Oblique" }, { FL_FIXEDBOLDITALIC_STYLE, "Courier-BoldOblique" }, { FL_TIMES_STYLE, "Times-Roman" }, { FL_TIMESBOLD_STYLE, "Times-Bold" }, { FL_TIMESITALIC_STYLE, "Times-Oblique" }, { FL_TIMESBOLDITALIC_STYLE, "Times-BoldOblique" }, { FL_SYMBOL_STYLE, "Symbol" }, { FL_SHADOW_STYLE, "Shadow" }, { FL_ENGRAVED_STYLE, "Engraved" }, { FL_ENGRAVED_STYLE, "Enbossed" }, { -1, NULL } /* sentinel */ }; /*************************************** ***************************************/ static const char * get_font_style( int fstyle ) { static char retbuf[ 128 ]; const char *font_spstyle = "normal"; int spstyle = fstyle / FL_SHADOW_STYLE; int style = fstyle % FL_SHADOW_STYLE; strcpy( retbuf, fli_get_vn_name( fonts_vn, style ) ); if ( spstyle ) font_spstyle = fli_get_vn_name( fonts_vn, spstyle * FL_SHADOW_STYLE ); return strcat( strcat( retbuf, " " ), font_spstyle ); } static FLI_VN_PAIR align_vn[ ] = { { FL_ALIGN_CENTER, "center" }, { FL_ALIGN_TOP, "top" }, { FL_ALIGN_LEFT, "left" }, { FL_ALIGN_RIGHT, "right" }, { FL_ALIGN_LEFT_TOP, "lefttop" }, { FL_ALIGN_RIGHT_TOP, "righttop" }, { FL_ALIGN_LEFT_BOTTOM, "leftbottom" }, { FL_ALIGN_RIGHT_BOTTOM, "rightbottom" }, { -1, NULL } /* sentinel */ }; /*************************************** ***************************************/ static void write_text( FLIMAGE_TEXT * t, FILE * fp ) { int r, g, b; char *p; /* output string. */ putc( LB, fp ); for ( p = t->str; p && *p; p++ ) { if ( *p == RB ) putc( '\\', fp ); putc( *p, fp ); } putc( RB, fp ); fprintf( fp, " %s %d %d %d %s %d %d", get_font_style( t->style ), t->size, t->x, t->y, fli_get_vn_name( align_vn, t->align ), t->angle, t->nobk ); FL_UNPACK( t->color, r, g, b ); fprintf( fp, " %d %d %d", r, g, b ); FL_UNPACK( t->bcolor, r, g, b ); fprintf( fp, " %d %d %d\n", r, g, b ); } /*************************************** ***************************************/ static int read_text( FLIMAGE_TEXT * t, FILE * fp ) { char buf[ 1024 ], fnt[ 64 ], style[ 64 ], align[ 64 ]; static char name[ 512 ]; int r, g, b, br, bg, bb; int n; char *p = buf + 1, *s = name, *ss = name + sizeof name - 1; if ( fgets( buf, sizeof buf - 1, fp ) ) buf[ sizeof buf - 1 ] = '\0'; else buf[ 0 ] = '\0'; for ( ; s < ss && *p && ( *p != ')' || *( p - 1 ) == '\\' ); p++ ) *s++ = *p; *s = '\0'; n = sscanf( p + 1, "%s %s %d %d %d %s %d %d %d %d %d %d %d %d", fnt, style, &t->size, &t->x, &t->y, align, &t->angle, &t->nobk, &r, &g, &b, &br, &bg, &bb ); if ( n == 14 ) { t->str = name; t->len = s - name; t->style = fli_get_vn_value( fonts_vn, fnt ); t->style |= fli_get_vn_value( fonts_vn, style ); t->align = fli_get_vn_value( align_vn, align ); t->color = FL_PACK( r, g, b ); t->bcolor = FL_PACK( br, bg, bb ); } return n == 14 ? 0 : -1; } /*************************************** ***************************************/ static int skip_line( FILE * fp ) { int c; if ( ( c = getc( fp ) ) == '#' ) { while ( ( c = getc( fp ) ) != '\n' && c != EOF ) /* empty */ ; } else ungetc( c, fp ); return c == '#' && c != EOF; } /*************************************** ***************************************/ #define TEXTVERSION 1 #define MARKERVERSION 1 int flimage_write_annotation( FL_IMAGE * im ) { FILE *fp; int i; FLIMAGE_MARKER *m; FLIMAGE_TEXT *t; if ( !im || im->type == FL_IMAGE_NONE ) return -1; fp = im->fpout; /* write markers first */ if ( im->nmarkers ) { fprintf( fp, "\n###markers %d %d\n", im->nmarkers, MARKERVERSION ); fprintf( fp, "# name x y w h fill angle thick style r g b r g b\n" ); m = im->marker; for ( i = 0; i < im->nmarkers; i++, m++ ) write_marker( m, fp ); } if ( im->ntext ) { fprintf( fp, "###text %d %d\n", im->ntext, TEXTVERSION ); fprintf( fp, "# (s) font style size x y align angle nobk " "r g b r g b\n" ); t = im->text; for ( i = 0; i < im->ntext; i++, t++ ) write_text( t, fp ); } return 0; } /*************************************** ***************************************/ int flimage_read_annotation( FL_IMAGE * im ) { FILE *fp; FLIMAGE_MARKER m; FLIMAGE_TEXT t; int c, done, v, nmarkers, i, ntext; char buf[ 1024 ]; if ( ! im || im->type == FL_IMAGE_NONE ) return -1; fp = im->fpin; /* Load the markers */ for ( done = 0; ! done; /* empty */ ) { while ( ( c = getc( fp ) ) != EOF && c != '#' ) /* empty */ ; done = c == EOF; if ( fgets( buf, sizeof buf - 1, fp ) ) buf[ sizeof buf - 1 ] = '\0'; else buf[ 0 ] = '\0'; if ( strstr( buf, "#marker" ) ) { sscanf( buf, "%*s %d %d", &nmarkers, &v ); if ( v > MARKERVERSION ) M_err( "ReadMarker", "wrong version" ); for ( i = 0; i < nmarkers; i++ ) { while ( skip_line( fp ) ) /* empty */ ; if ( read_marker( &m, fp ) >= 0 ) flimage_add_marker_struct( im, &m ); } } if ( strstr( buf, "#text" ) ) { sscanf( buf, "%*s %d %d", &ntext, &v ); if ( v > TEXTVERSION ) M_err( "ReadText", "wrong version" ); for ( i = 0; i < ntext; i++ ) { while ( skip_line( fp ) ) /* empty */ ; if ( read_text( &t, fp) >= 0 ) flimage_add_text_struct( im, &t ); } done = 1; } } return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_xwd.c0000644000175000017500000004646011247055071015434 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. * * XWD format support. Probably buggy as hell */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "ulib.h" #include "flimage.h" #include "flimage_int.h" #include #include typedef struct { XWDFileHeader header; char name[256]; int swap; unsigned int rbits, rshifts; unsigned int gbits, gshifts; unsigned int bbits, bshifts; } SPEC; #define XWDDEBUG 0 /*************************************** ***************************************/ #if XWDDEBUG==1 static void dumpheader( const char * where, XWDFileHeader * h ) { fprintf( stderr, "%s\n", where ); fprintf( stderr, "file_version = %ld\n", ( long ) h->file_version ); fprintf( stderr, "header_size = %ld\n", ( long ) h->header_size ); fprintf( stderr, "visual_class = %ld\n", ( long ) h->visual_class ); fprintf( stderr, "pixmap_depth = %ld\n", ( long ) h->pixmap_depth ); fprintf( stderr, "bits_per_pixel = %ld\n", ( long ) h->bits_per_pixel ); fprintf( stderr, "pixmap_width = %ld\n", ( long ) h->pixmap_width ); fprintf( stderr, "pixmap_height = %ld\n", ( long ) h->pixmap_height ); fprintf( stderr, "ncolors = %ld\n", ( long ) h->ncolors ); fprintf( stderr, "red_mask = 0x%lx\n", ( long ) h->red_mask ); fprintf( stderr, "green_mask = 0x%lx\n", ( long ) h->green_mask ); fprintf( stderr, "blue_mask = 0x%lx\n", ( long ) h->blue_mask ); } #endif typedef union { CARD32 l; CARD16 s; CARD8 c[ sizeof( CARD32 ) ]; } tLong; /*************************************** ***************************************/ static CARD32 swap32( CARD32 in ) { tLong t; CARD8 c; t.l = in; c = t.c[ 0 ]; t.c[ 0 ] = t.c[ 3 ]; t.c[ 3 ] = c; c = t.c[ 1 ]; t.c[ 1 ] = t.c[ 2 ]; t.c[ 2 ] = c; return t.l; } #define swap16( a ) ( ( ( ( a ) &0xff ) <<8 ) | ( ( ( a ) >> 8 ) & 0xff ) ) /*************************************** ***************************************/ static void swap_header( XWDFileHeader * h ) { h->file_version = swap32( h->file_version ); h->header_size = swap32( h->header_size ); h->visual_class = swap32( h->visual_class ); h->pixmap_depth = swap32( h->pixmap_depth ); h->pixmap_format = swap32( h->pixmap_format ); h->bits_per_pixel = swap32( h->bits_per_pixel ); h->pixmap_width = swap32( h->pixmap_width ); h->pixmap_height = swap32( h->pixmap_height ); h->bytes_per_line = swap32( h->bytes_per_line ); h->byte_order = swap32( h->byte_order ); h->ncolors = swap32( h->ncolors ); h->red_mask = swap32( h->red_mask ); h->green_mask = swap32( h->green_mask ); h->blue_mask = swap32( h->blue_mask ); h->bitmap_unit = swap32( h->bitmap_unit ); h->bitmap_pad = swap32( h->bitmap_pad ); } static int need_swap; /*************************************** * XWD does not have a signature, we'll have to guess ***************************************/ static int XWD_identify( FILE * fp ) { XWDFileHeader h; if ( fread( &h, 1, sizeof h, fp ) != sizeof h ) return 0; rewind( fp ); need_swap = ( h.file_version != XWD_FILE_VERSION ); if ( need_swap ) swap_header( &h ); if ( h.file_version != XWD_FILE_VERSION ) return -1; #if XWDDEBUG==1 dumpheader( "Identify", &h ); #endif return h.file_version == XWD_FILE_VERSION && h.visual_class <= 5 && h.pixmap_depth > 0 && h.pixmap_depth <= 32 && h.pixmap_format <= ZPixmap; } /*************************************** ***************************************/ static void generate_header_info( FL_IMAGE * im, XWDFileHeader * h ) { char buf[ 128 ]; if ( ! ( im->info = fl_malloc( 1024 ) ) ) return; sprintf( im->info, "file_version=%ld\nheader_size=%ld\n", ( long ) h->file_version, ( long ) h->header_size ); sprintf( buf, "visual_class=%d\nbits_per_pixel=%d\nncolors=%d", ( int ) h->visual_class, ( int ) h->bits_per_pixel, ( int ) h->ncolors ); strcat( im->info, buf ); sprintf( buf, "PixmapDepth=%d\nPixmapWidth=%d\nPixmapHeight=%d", ( int ) h->bits_per_pixel, ( int ) h->pixmap_width, ( int ) h->pixmap_height ); strcat( im->info, buf ); sprintf( buf, "red_mask=0x%x\n green_mask=0x%x\n blue_mask=0x%x\n", ( int ) h->red_mask, ( int ) h->green_mask, ( int ) h->blue_mask ); strcat( im->info, buf ); } /*************************************** ***************************************/ static int XWD_description( FL_IMAGE * im ) { SPEC *sp = fl_malloc(sizeof *sp ); XWDFileHeader *header = &sp->header; FILE *fp = im->fpin; int k; im->io_spec = sp; im->spec_size = sizeof *sp; if ( fread( header, 1, sizeof *header, fp ) != sizeof *header ) M_err( "ImageXWD", "failure to read from file" ); if ( ( sp->swap = need_swap ) ) swap_header( header ); fli_rgbmask_to_shifts( header->red_mask, &sp->rshifts, &sp->rbits ); fli_rgbmask_to_shifts( header->green_mask, &sp->gshifts, &sp->gbits ); fli_rgbmask_to_shifts( header->blue_mask, &sp->bshifts, &sp->bbits ); if ( sp->gbits > ( unsigned int ) FL_PCBITS ) { sp->rshifts += sp->rbits - FL_PCBITS; sp->gshifts += sp->gbits - FL_PCBITS; sp->bshifts += sp->bbits - FL_PCBITS; } /* print header info */ if ( im->setup->header_info ) generate_header_info( im, header ); #if XWDDEBUG dumpheader( "Description", header ); #endif if ( ( k = header->header_size - sizeof *header ) > 0 ) k = fread( sp->name, 1, k, fp ); if ( k >= 0 ) sp->name[ k ] = '\0'; /* image type */ if ( header->visual_class == StaticGray || header->visual_class == GrayScale ) { im->type = header->pixmap_depth == 1 ? FL_IMAGE_MONO : FL_IMAGE_GRAY; if ( header->bits_per_pixel > 8 ) { im->type = FL_IMAGE_GRAY16; im->gray_maxval = ( 1 << header->bits_per_pixel ) - 1; } } else if ( header->visual_class == TrueColor || header->visual_class == DirectColor ) im->type = FL_IMAGE_RGB; else { im->type = FL_IMAGE_CI; if ( header->ncolors == 0 ) M_err( "ImageXWD", "no colormap ?" ); } im->w = header->pixmap_width; im->h = header->pixmap_height; im->map_len = header->ncolors; return 0; } /*************************************** ***************************************/ static int XWD_read_pixels( FL_IMAGE * im ) { SPEC *sp = im->io_spec; XWDFileHeader *h = &sp->header; FILE *fp = im->fpin; unsigned short us; unsigned int u32, n, r, g, b, rn, gn, bn; unsigned char *uc; int x, y, i, err; int ( * get32 )( FILE * ), ( * get16 )( FILE * ); fseek( fp, sp->header.header_size, SEEK_SET ); im->completed = 0; im->visual_cue( im, "Loading XWD" ); if ( sp->gbits < FL_PCBITS ) { rn = FL_PCBITS - sp->rbits; gn = FL_PCBITS - sp->gbits; bn = FL_PCBITS - sp->bbits; } else rn = gn = bn = 0; if ( h->byte_order == MSBFirst ) { get32 = fli_fget4MSBF; get16 = fli_fget2MSBF; } else { get32 = fli_fget4LSBF; get16 = fli_fget2LSBF; } /* read the colormap */ if ( h->ncolors > 0 ) { XWDColor *xwdcolor = fl_malloc( h->ncolors * sizeof *xwdcolor ); if ( fread( xwdcolor, sizeof *xwdcolor, h->ncolors, fp ) == h->ncolors && h->visual_class != TrueColor && h->visual_class != DirectColor ) { for ( i = 0; i < ( int ) h->ncolors; i++ ) { if ( sp->swap ) { im->red_lut[ i ] = swap16( xwdcolor[ i ].red ) >> 8; im->green_lut[ i ] = swap16( xwdcolor[ i ].green ) >> 8; im->blue_lut[ i ] = swap16( xwdcolor[ i ].blue ) >> 8; } else { im->red_lut[ i ] = ( xwdcolor[ i ].red ) >> 8; im->green_lut[ i ] = ( xwdcolor[ i ].green ) >> 8; im->blue_lut[ i ] = ( xwdcolor[ i ].blue ) >> 8; } } } fl_free( xwdcolor ); } if ( feof( fp ) || ferror( fp ) ) { im->error_message( im, "premature EOF ?" ); return -1; } /* reading the pixels */ y = err = 0; switch ( h->bits_per_pixel ) { case 32 : for ( y = 0; !err && y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) { u32 = get32( fp ); im->red[ y ][ x ] = ( u32 & h->red_mask ) >> sp->rshifts; im->green[ y ][ x ] = ( u32 & h->green_mask ) >> sp->gshifts; im->blue[ y ][ x ] = ( u32 & h->blue_mask ) >> sp->bshifts; } for ( n = im->w * 4; n < h->bytes_per_line; n++ ) getc( fp ); err = feof( fp ) || ferror( fp ); } break; case 8 : if ( h->visual_class == TrueColor || h->visual_class == DirectColor ) { for ( err = 0, y = 0; !err && y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) { us = getc( fp ); r = ( us & h->red_mask ) >> sp->rshifts; g = ( us & h->green_mask ) >> sp->gshifts; b = ( us & h->blue_mask ) >> sp->bshifts; /* normalize. */ im->red[ y ][ x ] = ( ( r + 1 ) << rn ) - 1; im->green[ y ][ x ] = ( ( g + 1 ) << gn ) - 1; im->blue[ y ][ x ] = ( ( b + 1 ) << bn ) - 1; } for ( ; x < ( int ) h->bytes_per_line; x++ ) getc( fp ); err = feof( fp ) || ferror( fp ); } } else { for ( y = 0; !err && y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) im->ci[ y ][ x ] = getc( fp ); for ( ; x < (int)h->bytes_per_line; x++ ) getc( fp ); err = feof( fp ) || ferror( fp ); } } break; case 16 : if ( h->visual_class == TrueColor || h->visual_class == DirectColor ) { for ( err = 0, y = 0; ! err && y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) { us = get16( fp ); r = ( us & h->red_mask ) >> sp->rshifts; g = ( us & h->green_mask ) >> sp->gshifts; b = ( us & h->blue_mask ) >> sp->bshifts; /* normalize. */ im->red[ y ][ x ] = ( ( r + 1 ) << rn ) - 1; im->green[ y ][ x ] = ( ( g + 1 ) << gn ) - 1; im->blue[ y ][ x ] = ( ( b + 1 ) << bn ) - 1; } for ( x = im->w * 2; x < ( int ) h->bytes_per_line; x++ ) getc( fp ); err = feof( fp ) || ferror( fp ); } } else { for ( y = 0; !err && y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) im->ci[ y ][ x ] = get16( fp ); for ( n = im->w * 2; x < ( int ) h->bytes_per_line; x++ ) getc( fp ); err = feof( fp ) || ferror( fp ); } } break; case 1 : uc = fl_malloc( h->bytes_per_line ); for ( y = 0; y < im->h; y++ ) { if ( fread( uc, 1, h->bytes_per_line, fp ) != h->bytes_per_line ) { M_err( "LoadXWD", "failure to read from file" ); err = 1; break; } fl_unpack_bits( im->ci[y], uc, h->bytes_per_line ); } fl_free( uc ); break; default: M_err( "LoadXWD", "%d bpp not implemented\n", h->bits_per_pixel ); err = 1; break; } if ( ! err ) { im->completed = im->total; im->visual_cue( im, "Done Loading XWD" ); } return err ? ( y < im->h / 2 ? -1 : y ) : 0; } /*********** output routines ************************************/ /*************************************** ***************************************/ static int detect_endian( void ) { short a = 0x1234; unsigned char *uc = ( unsigned char * ) &a; return ( uc[ 0 ] == 0x12 && uc[ 1 ] == 0x34 ) ? MSBFirst : LSBFirst; } /*************************************** ***************************************/ static int XWD_write_image( FL_IMAGE * im ) { XWDFileHeader header, *h; FILE *fp = im->fpout; int x, y, n, pad; CARD32 *c32; int ( * write32 )( int, FILE * ), ( * write16 )( int, FILE * ); unsigned char *uc; static int machine_endian = -1; size_t dummy; if ( machine_endian < 0 ) machine_endian = detect_endian( ); /* some programs expect MSBF always. Force it */ machine_endian = MSBFirst; /* make the header */ h = &header; memset( h, 0, sizeof *h ); h->header_size = sizeof *h + strlen( im->outfile ) + 1; h->file_version = XWD_FILE_VERSION; h->pixmap_format = im->type == FL_IMAGE_MONO ? XYBitmap : ZPixmap; h->pixmap_width = im->w; h->pixmap_height = im->h; h->byte_order = machine_endian; h->bitmap_bit_order = h->byte_order; h->red_mask = FL_RMASK; h->green_mask = FL_GMASK; h->blue_mask = FL_BMASK; h->colormap_entries = h->ncolors = im->map_len; h->window_width = h->pixmap_width; h->window_height = h->pixmap_height; h->window_x = h->window_y = h->window_bdrwidth = 0; /* type specific stuff */ if ( FL_IsRGB( im ) ) { h->pixmap_depth = 24; h->bits_per_pixel = 32; h->bitmap_unit = 32; h->bitmap_pad = 32; h->visual_class = TrueColor; } else if ( im->type == FL_IMAGE_CI || im->type == FL_IMAGE_GRAY ) { h->pixmap_depth = 8; h->bits_per_pixel = 8; h->bitmap_unit = 8; h->bitmap_pad = 8; h->visual_class = FL_IsGray( im->type ) ? GrayScale : PseudoColor; } else if ( im->type == FL_IMAGE_GRAY16 ) { h->pixmap_depth = fl_value_to_bits( im->gray_maxval + 1 ); h->bits_per_pixel = 16; h->bitmap_unit = 16; h->bitmap_pad = 16; h->visual_class = GrayScale; } else if ( im->type == FL_IMAGE_MONO ) { h->pixmap_depth = 1; h->bits_per_pixel = 1; h->bitmap_unit = 8; h->bitmap_pad = 8; h->visual_class = StaticGray; } h->bits_per_rgb = h->pixmap_depth; h->bytes_per_line = ( im->w * h->bits_per_pixel + 7 ) / 8; if ( h->byte_order == MSBFirst ) { write32 = fli_fput4MSBF; write16 = fli_fput2MSBF; } else { write32 = fli_fput4LSBF; write16 = fli_fput2LSBF; } /* write the header */ c32 = ( CARD32 * ) h; for ( n = 0; ( size_t ) n < sizeof *h / sizeof h->file_version; n++, c32++ ) write32( *c32, fp ); dummy = fwrite( im->outfile, 1, strlen( im->outfile ) + 1, fp ); if ( h->ncolors ) { XWDColor xwdcolor; xwdcolor.flags = DoRed | DoGreen | DoBlue; for ( n = 0; n < ( int ) h->ncolors; n++ ) { xwdcolor.red = ( im->red_lut[ n ] << 8 ) | 0xff; xwdcolor.green = ( im->green_lut[ n ] << 8 ) | 0xff; xwdcolor.blue = ( im->blue_lut[ n ] << 8 ) | 0xff; xwdcolor.pixel = n; write32( xwdcolor.pixel, fp ); write16( xwdcolor.red, fp ); write16( xwdcolor.green, fp ); write16( xwdcolor.blue, fp ); putc( xwdcolor.flags, fp ); /* pad */ pad = sizeof xwdcolor - 11; for ( ; --pad >= 0; ) putc( 0, fp ); } } if ( im->type == FL_IMAGE_RGB ) { for ( y = 0; y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) write32( FL_PACK( im->red[ y ][ x ], im->green[ y ][ x ], im->blue[ y ][ x ] ), fp ); } } else if ( im->type == FL_IMAGE_CI || im->type == FL_IMAGE_GRAY ) { uc = fl_malloc( h->bytes_per_line ); for ( y = 0; y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) uc[ x ] = im->ci[ y ][ x ]; dummy = fwrite( uc, 1, h->bytes_per_line, fp ); } fl_free( uc ); } else if ( im->type == FL_IMAGE_GRAY16 ) { for ( y = 0; y < im->h; y++ ) for ( x = 0; x < im->w; x++ ) write16( im->gray[ y ][ x ], fp ); } else if ( im->type == FL_IMAGE_MONO ) { uc = fl_malloc( h->bytes_per_line ); for ( y = 0; y < im->h; y++ ) { fl_pack_bits( uc, im->ci[ y ], im->w ); dummy = fwrite( uc, 1, h->bytes_per_line, fp ); } fl_free( uc ); } else { im->error_message( im, "Unknown type" ); return -1; } return 0; } /*************************************** ***************************************/ void flimage_enable_xwd( void ) { flimage_add_format( "X Window Dump", "xwd", "xwd", FL_IMAGE_FLEX & ~FL_IMAGE_PACKED, XWD_identify, XWD_description, XWD_read_pixels, XWD_write_image ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_oquant.c0000644000175000017500000001212211247055071016125 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * A color quantizer based on octree algorithm. The algorithm * is implemented and copyright by Steve Lamont (spl@ucsd.edu) * Copyright (C) 1998, Steve Lamont and the National Center for Microscopy * and Imaging Research * * Contact Steve for the latest version of the quantization library. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include "quantize.h" /*************************************** ***************************************/ void fl_select_octree_quantizer( void ) { flimage_quantize_rgb = fl_octree_quantize_rgb; flimage_quantize_packed = fl_octree_quantize_packed; } /*************************************** ***************************************/ int fl_octree_quantize_rgb( unsigned char ** red, unsigned char ** green, unsigned char ** blue, int w, int h, int max_color, unsigned short ** ci, int * actual_color, int * red_lut, int * green_lut, int * blue_lut, FL_IMAGE * im ) { int i, j; unsigned int *rlut, *glut, *blut; QuantizeDatabaseP database = QuantizeInitialize( max_color, QuantizeStyleLeast ); if ( im ) { im->completed = 0; im->visual_cue( im, "Starting OctreeQuantizer ..." ); } for ( i = 0; i < h; i++ ) for ( j = 0; j < w; j++ ) QuantizeColor( database, red[ i ][ j ], green[ i ][ j ], blue[ i ][ j ] ); QuantizeCreateLUT( database, actual_color, &rlut, &glut, &blut); for ( i = 0; i < *actual_color; i++ ) { red_lut[ i ] = rlut[ i ]; green_lut[ i ] = glut[ i ]; blue_lut[ i ] = blut[ i ]; } free( rlut ); free( glut ); free( blut ); for ( i = 0; i < h; i++ ) for ( j = 0; j < w; j++ ) ci[ i ][ j ] = QuantizeFindIndex( database, red[ i ][ j ], green[ i ][ j ], blue[ i ][ j ] ); QuantizeDatabaseFree( database ); if ( im ) { im->completed = im->total; im->visual_cue( im, "Done OctreeQuantizer" ); } return 0; } /*************************************** ***************************************/ int fl_octree_quantize_packed( unsigned int ** packed, int w, int h, int max_color, unsigned short ** ci, int * actual_color, int * red_lut, int * green_lut, int * blue_lut, FL_IMAGE * im ) { int i, n = h * w; unsigned int *p; unsigned short *ind; unsigned int *rlut, *glut, *blut; QuantizeDatabaseP database = QuantizeInitialize( max_color, QuantizeStyleLeast ); if ( im ) { im->completed = 0; im->visual_cue( im, "Starting OctreeQuantizer ..." ); } for ( p = packed[ 0 ], i = 0; i < n; i++, p++ ) QuantizeColor( database, FL_GETR( *p ), FL_GETG( *p ), FL_GETB( *p ) ); QuantizeCreateLUT( database, actual_color, &rlut, &glut, &blut ); for ( i = 0; i < *actual_color; i++ ) { red_lut[ i ] = rlut[ i ]; green_lut[ i ] = glut[ i ]; blue_lut[ i ] = blut[ i ]; } free( rlut ); free( glut ); free( blut ); for ( ind = ci[ 0 ], p = packed[ 0 ], i = 0; i < n; i++, p++, ind++ ) *ind = QuantizeFindIndex( database, FL_GETR( *p ), FL_GETG( *p ), FL_GETB( *p ) ); QuantizeDatabaseFree( database ); if ( im ) { im->completed = im->total; im->visual_cue( im, "Done OctreeQuantizer" ); } return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_jquant.c0000644000175000017500000013031111247055071016121 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * Copyright (C) 1991-1996, Thomas G. Lane. * This file is part of the XForms library package. * * The 2-pass quantizer from the JPEG distribution by the * Independent JPEG group. Except for minor interface changes, the code * here is almost verbatim copy of the IJG's code, which * has the following copyright: */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*************************************** ***************************************/ void fl_select_mediancut_quantizer( void ) { flimage_quantize_rgb = fl_j2pass_quantize_rgb; flimage_quantize_packed = fl_j2pass_quantize_packed; } #define R_SCALE 2 /* scale R distances by this much */ #define G_SCALE 3 /* scale G distances by this much */ #define B_SCALE 1 /* and B by this much */ #define C0_SCALE R_SCALE #define C1_SCALE G_SCALE #define C2_SCALE B_SCALE #define BITS_IN_JSAMPLE FL_PCBITS #define MAXJSAMPLE ( ( 1<fserrors ) fl_free( sp->fserrors ); if ( sp->error_limiter ) fl_free( sp->error_limiter - MAXJSAMPLE ); sp->error_limiter = NULL; sp->fserrors = NULL; if ( sp->histogram ) { for ( i = 0; i < HIST_C0_ELEMS; i++ ) { if ( sp->histogram[ i ] ) fl_free( sp->histogram[ i ] ); sp->histogram[ i ] = NULL; } } fl_free( sp->histogram ); sp->histogram = NULL; fl_free( sp ); } /*************************************** ***************************************/ static SPEC * alloc_spec( int w, int h FL_UNUSED_ARG, int * rlut, int * glut, int * blut ) { int fs_size = ( w + 2 ) * ( 3 * sizeof( FSERROR ) ), i; SPEC *sp = fl_calloc( 1, sizeof *sp ); int err = ! sp; if ( ! err ) init_error_limit( sp ); err = err || ! ( sp->fserrors = fl_calloc( 1, fs_size ) ); err = err || ! ( sp->histogram = fl_calloc( 1, HIST_C0_ELEMS * sizeof( hist2d ) ) ); for ( i = 0; ! err && i < HIST_C0_ELEMS; i++ ) err = ! ( sp->histogram[ i ] = fl_calloc( 1, HIST_C1_ELEMS * HIST_C2_ELEMS * sizeof( histcell ) ) ); if ( err ) { cleanup_spec( sp ); sp = NULL; } else { sp->colormap[ 0 ] = rlut; sp->colormap[ 1 ] = glut; sp->colormap[ 2 ] = blut; } return sp; } /*************************************** ***************************************/ int fl_j2pass_quantize_rgb( unsigned char ** red, unsigned char ** green, unsigned char ** blue, int w, int h, int max_color, unsigned short ** ci, int * actual_color, int * red_lut, int * green_lut, int * blue_lut, FL_IMAGE * im ) { SPEC *sp = alloc_spec( w, h, red_lut, green_lut, blue_lut ); int i; if ( ! sp ) { *actual_color = 0; if ( im ) im->error_message( im, "Failed to allocate working memory" ); return -1; } if ( *actual_color > 256 ) *actual_color = 256; sp->im = im; /* get histogram */ prescan_quantize( sp, red, green, blue, w, h ); select_colors( sp, max_color ); /* re-init histogram for inverse lookup */ for ( i = 0; i < HIST_C0_ELEMS; i++ ) memset( sp->histogram[ i ], 0, HIST_C1_ELEMS * HIST_C2_ELEMS * sizeof( histcell ) ); sp->on_odd_row = 0; pass2_fs_dither( sp, red, green, blue, ci, w, h ); *actual_color = sp->actual_number_of_colors; cleanup_spec( sp ); if ( im ) { im->completed = im->h; im->visual_cue( im, "Quantization Done" ); } return 0; } /*************************************** ***************************************/ int fl_j2pass_quantize_packed( unsigned int ** packed, int w, int h, int max_color, unsigned short ** ci, int * actual_color, int * red_lut, int * green_lut, int * blue_lut, FL_IMAGE * im ) { SPEC *sp = alloc_spec( w, h, red_lut, green_lut, blue_lut ); unsigned char **red = NULL, **green = NULL, **blue = NULL; int i, err; if ( ! sp ) { if ( im ) im->error_message( im, "Quantize: can't allocate memory" ); *actual_color = 0; return -1; } sp->im = im; /* we can process the image one piece a time to avoid the heavy memory usage, but packed is not that common. For now, do it in one chunk */ err = ! ( red = fl_get_matrix( h, w, sizeof **red ) ) || ! ( green = fl_get_matrix( h, w, sizeof **green ) ) || ! ( blue = fl_get_matrix( h, w, sizeof **blue ) ); if ( err ) { const char *s = "Quantize: can't allocate memory"; if ( im ) im->error_message( im, s ); else fprintf( stderr, "%s\n", s ); fl_free_matrix( red ); fl_free_matrix( green ); fl_free_matrix( blue ); return -1; } for ( i = w * h; --i >= 0; ) FL_UNPACK( packed[ 0 ][ i ], red[ 0 ][ i ], green[ 0 ][ i ], blue[ 0 ][ i ]); /* get histogram */ prescan_quantize( sp, red, green, blue, w, h ); select_colors( sp, max_color ); /* re-init histogram for inverse lookup */ for ( i = 0; i < HIST_C0_ELEMS; i++ ) memset( sp->histogram[ i ], 0, HIST_C1_ELEMS * HIST_C2_ELEMS * sizeof( histcell ) ); sp->on_odd_row = 0; pass2_fs_dither( sp, red, green, blue, ci, w, h ); *actual_color = sp->actual_number_of_colors; fl_free_matrix( red ); fl_free_matrix( green ); fl_free_matrix( blue ); cleanup_spec( sp ); if ( im ) { im->completed = im->h; im->visual_cue( im, "Quantization Done" ); } return 0; } /* log2(histogram cells in update box) for each axis; this can be adjusted */ #define BOX_C0_LOG ( HIST_C0_BITS - 3 ) #define BOX_C1_LOG ( HIST_C1_BITS - 3 ) #define BOX_C2_LOG ( HIST_C2_BITS - 3 ) #define BOX_C0_ELEMS ( 1 << BOX_C0_LOG ) /* # of hist cells in update box */ #define BOX_C1_ELEMS ( 1 << BOX_C1_LOG ) #define BOX_C2_ELEMS ( 1 << BOX_C2_LOG ) #define BOX_C0_SHIFT ( C0_SHIFT + BOX_C0_LOG ) #define BOX_C1_SHIFT ( C1_SHIFT + BOX_C1_LOG ) #define BOX_C2_SHIFT ( C2_SHIFT + BOX_C2_LOG ) /*************************************** * Locate the colormap entries close enough to an update box to be candidates * for the nearest entry to some cell(s) in the update box. The update box * is specified by the center coordinates of its first cell. The number of * candidate colormap entries is returned, and their colormap indexes are * placed in colorlist[]. * This routine uses Heckbert's "locally sorted search" criterion to select * the colors that need further consideration. ***************************************/ static int find_nearby_colors( SPEC * sp, int minc0, int minc1, int minc2, JSAMPLE colorlist[ ] ) { int numcolors = sp->actual_number_of_colors; int maxc0, maxc1, maxc2; int centerc0, centerc1, centerc2; int i, x, ncolors; int minmaxdist, min_dist, max_dist, tdist; int mindist[ MAXNUMCOLORS ]; /* min distance to colormap entry i */ /* Compute true coordinates of update box's upper corner and center. * Actually we compute the coordinates of the center of the upper-corner * histogram cell, which are the upper bounds of the volume we care about. * Note that since ">>" rounds down, the "center" values may be closer to * min than to max; hence comparisons to them must be "<=", not "<". */ maxc0 = minc0 + ( ( 1 << BOX_C0_SHIFT ) - ( 1 << C0_SHIFT ) ); centerc0 = ( minc0 + maxc0 ) >> 1; maxc1 = minc1 + ( ( 1 << BOX_C1_SHIFT ) - ( 1 << C1_SHIFT ) ); centerc1 = ( minc1 + maxc1 ) >> 1; maxc2 = minc2 + ( ( 1 << BOX_C2_SHIFT ) - ( 1 << C2_SHIFT ) ); centerc2 = ( minc2 + maxc2 ) >> 1; /* For each color in colormap, find: 1. its minimum squared-distance to any point in the update box (zero if color is within update box) 2. its maximum squared-distance to any point in the update box. Both of these can be found by considering only the corners of the box. We save the minimum distance for each color in mindist[]; only the smallest maximum distance is of interest. */ minmaxdist = 0x7FFFFFFFL; for ( i = 0; i < numcolors; i++ ) { /* We compute the squared-c0-distance term, then add in the other two. */ x = sp->colormap[ 0 ][ i ]; if ( x < minc0 ) { tdist = ( x - minc0 ) * C0_SCALE; min_dist = tdist * tdist; tdist = ( x - maxc0 ) * C0_SCALE; max_dist = tdist * tdist; } else if ( x > maxc0 ) { tdist = ( x - maxc0 ) * C0_SCALE; min_dist = tdist * tdist; tdist = ( x - minc0 ) * C0_SCALE; max_dist = tdist * tdist; } else { /* within cell range so no contribution to min_dist */ min_dist = 0; if ( x <= centerc0 ) { tdist = ( x - maxc0 ) * C0_SCALE; max_dist = tdist * tdist; } else { tdist = ( x - minc0 ) * C0_SCALE; max_dist = tdist * tdist; } } x = sp->colormap[ 1 ][ i ]; if ( x < minc1 ) { tdist = ( x - minc1 ) * C1_SCALE; min_dist += tdist * tdist; tdist = ( x - maxc1 ) * C1_SCALE; max_dist += tdist * tdist; } else if ( x > maxc1 ) { tdist = ( x - maxc1 ) * C1_SCALE; min_dist += tdist * tdist; tdist = (x - minc1 ) * C1_SCALE; max_dist += tdist * tdist; } else { /* within cell range so no contribution to min_dist */ if ( x <= centerc1 ) { tdist = ( x - maxc1 ) * C1_SCALE; max_dist += tdist * tdist; } else { tdist = ( x - minc1 ) * C1_SCALE; max_dist += tdist * tdist; } } x = sp->colormap[ 2 ][ i ]; if ( x < minc2 ) { tdist = ( x - minc2 ) * C2_SCALE; min_dist += tdist * tdist; tdist = ( x - maxc2 ) * C2_SCALE; max_dist += tdist * tdist; } else if ( x > maxc2 ) { tdist = ( x - maxc2 ) * C2_SCALE; min_dist += tdist * tdist; tdist = ( x - minc2 ) * C2_SCALE; max_dist += tdist * tdist; } else { /* within cell range so no contribution to min_dist */ if ( x <= centerc2 ) { tdist = ( x - maxc2 ) * C2_SCALE; max_dist += tdist * tdist; } else { tdist = ( x - minc2 ) * C2_SCALE; max_dist += tdist * tdist; } } mindist[ i ] = min_dist; /* save away the results */ if ( max_dist < minmaxdist ) minmaxdist = max_dist; } /* Now we know that no cell in the update box is more than minmaxdist * away from some colormap entry. Therefore, only colors that are * within minmaxdist of some part of the box need be considered. */ ncolors = 0; for ( i = 0; i < numcolors; i++ ) if ( mindist[ i ] <= minmaxdist ) colorlist[ ncolors++ ] = ( JSAMPLE ) i; return ncolors; } /*************************************** * Find the closest colormap entry for each cell in the update box, * given the list of candidate colors prepared by find_nearby_colors. * Return the indexes of the closest entries in the bestcolor[] array. * This routine uses Thomas' incremental distance calculation method to * find the distance from a colormap entry to successive cells in the box. ***************************************/ static void find_best_colors( SPEC * sp, int minc0, int minc1, int minc2, int numcolors, JSAMPLE colorlist[ ], JSAMPLE bestcolor[ ] ) { int ic0, ic1, ic2; int i, icolor; int *bptr; /* pointer into bestdist[] array */ JSAMPLE *cptr; /* pointer into bestcolor[] array */ int dist0, dist1; /* initial distance values */ int dist2; /* current distance in inner loop */ int xx0, xx1; /* distance increments */ int xx2; int inc0, inc1, inc2; /* initial values for increments */ /* This array holds the distance to the nearest-so-far color for each cell */ int bestdist[ BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS ]; /* Initialize best-distance for each cell of the update box */ bptr = bestdist; for ( i = BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS - 1; i >= 0; i-- ) *bptr++ = 0x7FFFFFFFL; /* For each color selected by find_nearby_colors, * compute its distance to the center of each cell in the box. * If that's less than best-so-far, update best distance and color number. */ /* Nominal steps between cell centers ("x" in Thomas article) */ #define STEP_C0 ( ( 1 << C0_SHIFT ) * C0_SCALE ) #define STEP_C1 ( ( 1 << C1_SHIFT ) * C1_SCALE ) #define STEP_C2 ( ( 1 << C2_SHIFT ) * C2_SCALE ) for ( i = 0; i < numcolors; i++ ) { icolor = GETJSAMPLE( colorlist[ i ] ); /* Compute (square of) distance from minc0/c1/c2 to this color */ inc0 = ( minc0 - GETJSAMPLE( sp->colormap[ 0 ][ icolor] ) ) * C0_SCALE; dist0 = inc0 * inc0; inc1 = ( minc1 - GETJSAMPLE( sp->colormap[ 1 ][ icolor ] ) ) * C1_SCALE; dist0 += inc1 * inc1; inc2 = ( minc2 - GETJSAMPLE( sp->colormap[ 2 ][ icolor ] ) ) * C2_SCALE; dist0 += inc2 * inc2; /* Form the initial difference increments */ inc0 = inc0 * 2 * STEP_C0 + STEP_C0 * STEP_C0; inc1 = inc1 * 2 * STEP_C1 + STEP_C1 * STEP_C1; inc2 = inc2 * 2 * STEP_C2 + STEP_C2 * STEP_C2; /* Now loop over all cells in box, updating distance per Thomas method */ bptr = bestdist; cptr = bestcolor; xx0 = inc0; for ( ic0 = BOX_C0_ELEMS - 1; ic0 >= 0; ic0-- ) { dist1 = dist0; xx1 = inc1; for ( ic1 = BOX_C1_ELEMS - 1; ic1 >= 0; ic1-- ) { dist2 = dist1; xx2 = inc2; for ( ic2 = BOX_C2_ELEMS - 1; ic2 >= 0; ic2-- ) { if ( dist2 < *bptr ) { *bptr = dist2; *cptr = ( JSAMPLE ) icolor; } dist2 += xx2; xx2 += 2 * STEP_C2 * STEP_C2; bptr++; cptr++; } dist1 += xx1; xx1 += 2 * STEP_C1 * STEP_C1; } dist0 += xx0; xx0 += 2 * STEP_C0 * STEP_C0; } } } /*************************************** * Fill the inverse-colormap entries in the update box that contains * histogram cell c0/c1/c2. (Only that one cell MUST be filled, but * we can fill as many others as we wish.) ***************************************/ static void fill_inverse_cmap( SPEC * cquantize, int c0, int c1, int c2 ) { hist3d histogram = cquantize->histogram; int minc0, minc1, minc2; /* lower left corner of update box */ int ic0, ic1, ic2; JSAMPLE *cptr; /* pointer into bestcolor[] array */ histptr cachep; /* pointer into main cache array */ /* This array lists the candidate colormap indexes. */ JSAMPLE colorlist[ MAXNUMCOLORS ]; int numcolors; /* number of candidate colors */ /* This array holds the actually closest colormap index for each cell. */ JSAMPLE bestcolor[ BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS ]; /* Convert cell coordinates to update box ID */ c0 >>= BOX_C0_LOG; c1 >>= BOX_C1_LOG; c2 >>= BOX_C2_LOG; /* Compute true coordinates of update box's origin corner. * Actually we compute the coordinates of the center of the corner * histogram cell, which are the lower bounds of the volume we care about. */ minc0 = ( c0 << BOX_C0_SHIFT ) + ( ( 1 << C0_SHIFT ) >> 1 ); minc1 = ( c1 << BOX_C1_SHIFT ) + ( ( 1 << C1_SHIFT ) >> 1 ); minc2 = ( c2 << BOX_C2_SHIFT ) + ( ( 1 << C2_SHIFT ) >> 1 ); /* Determine which colormap entries are close enough to be candidates * for the nearest entry to some cell in the update box. */ numcolors = find_nearby_colors( cquantize, minc0, minc1, minc2, colorlist ); /* Determine the actually nearest colors. */ find_best_colors( cquantize, minc0, minc1, minc2, numcolors, colorlist, bestcolor ); /* Save the best color numbers (plus 1) in the main cache array */ c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ c1 <<= BOX_C1_LOG; c2 <<= BOX_C2_LOG; cptr = bestcolor; for ( ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++ ) { for ( ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++ ) { cachep = &histogram[ c0 + ic0 ][ c1 + ic1 ][ c2 ]; for ( ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++ ) *cachep++ = ( histcell ) ( GETJSAMPLE( *cptr++ ) + 1 ); } } } #define RIGHT_SHIFT( x, shft) ( ( x ) >> ( shft ) ) /*************************************** * This version performs Floyd-Steinberg dithering ***************************************/ static void pass2_fs_dither( SPEC * sp, unsigned char ** red, unsigned char ** green, unsigned char ** blue, unsigned short ** output_buf, int width, int num_rows ) { hist3d histogram = sp->histogram; LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ FSERRPTR errorptr; /* => fserrors[] at column before current */ unsigned short *outptr; /* => current output pixel */ histptr cachep; int dir; /* +1 or -1 depending on direction */ int dir3; /* 3*dir, for advancing inptr & errorptr */ int row; int col; int *error_limit = sp->error_limiter; int *colormap0 = sp->colormap[0]; int *colormap1 = sp->colormap[1]; int *colormap2 = sp->colormap[2]; unsigned char *r, *g, *b; if ( sp->im ) { sp->im->completed = -1; sp->im->visual_cue( sp->im, "Dithering ..." ); } for ( row = 0; row < num_rows; row++ ) { r = red[ row ]; g = green[ row ]; b = blue[ row ]; outptr = output_buf[ row ]; if ( sp->on_odd_row ) { /* work right to left in this row */ r += width - 1; g += width - 1; b += width - 1; outptr += width - 1; dir = -1; dir3 = -3; errorptr = sp->fserrors + (width + 1 ) * 3; /* => entry after last column */ sp->on_odd_row = 0; /* flip for next time */ } else { /* work left to right in this row */ dir = 1; dir3 = 3; errorptr = sp->fserrors; /* => entry before first real column */ sp->on_odd_row = 1; /* flip for next time */ } /* Preset error values: no error propagated to first pixel from left */ cur0 = cur1 = cur2 = 0; /* and no error propagated to row below yet */ belowerr0 = belowerr1 = belowerr2 = 0; bpreverr0 = bpreverr1 = bpreverr2 = 0; for ( col = 0; col < width; col++ ) { /* curN holds the error propagated from the previous pixel on the current line. Add the error propagated from the previous line * to form the complete error correction term for this pixel, and * round the error term (which is expressed * 16) to an integer. * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct * for either sign of the error value. * Note: errorptr points to *previous* column's array entry. */ cur0 = RIGHT_SHIFT( cur0 + errorptr[ dir3 + 0 ] + 8, 4 ); cur1 = RIGHT_SHIFT( cur1 + errorptr[ dir3 + 1 ] + 8, 4 ); cur2 = RIGHT_SHIFT( cur2 + errorptr[ dir3 + 2 ] + 8, 4 ); /* Limit the error using transfer function set by init_error_limit. See comments with init_error_limit for rationale. */ cur0 = error_limit[ cur0 ]; cur1 = error_limit[ cur1 ]; cur2 = error_limit[ cur2 ]; /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. The maximum error is +- MAXJSAMPLE (or less with error limiting); this sets the required size of the range_limit array. */ cur0 += *r; cur1 += *g; cur2 += *b; cur0 = FL_PCCLAMP( cur0 ); cur1 = FL_PCCLAMP( cur1 ); cur2 = FL_PCCLAMP( cur2 ); /* Index into the cache with adjusted pixel value */ cachep = &histogram[ cur0 >> C0_SHIFT ][ cur1 >> C1_SHIFT ][ cur2 >> C2_SHIFT ]; /* If we have not seen this color before, find nearest colormap */ /* entry and update the cache */ if ( *cachep == 0 ) fill_inverse_cmap( sp, cur0 >> C0_SHIFT, cur1 >> C1_SHIFT, cur2 >> C2_SHIFT ); /* Now emit the colormap index for this cell */ { int pixcode = *cachep - 1; *outptr = ( JSAMPLE ) pixcode; /* Compute representation error for this pixel */ cur0 -= colormap0[ pixcode ]; cur1 -= colormap1[ pixcode ]; cur2 -= colormap2[ pixcode ]; } /* Compute error fractions to be propagated to adjacent pixels. * Add these into the running sums, and simultaneously shift the * next-line error sums left by 1 column. */ { LOCFSERROR bnexterr, delta; bnexterr = cur0; /* Process component 0 */ delta = cur0 * 2; cur0 += delta; /* form error * 3 */ errorptr[ 0 ] = ( FSERROR ) ( bpreverr0 + cur0 ); cur0 += delta; /* form error * 5 */ bpreverr0 = belowerr0 + cur0; belowerr0 = bnexterr; cur0 += delta; /* form error * 7 */ bnexterr = cur1; /* Process component 1 */ delta = cur1 * 2; cur1 += delta; /* form error * 3 */ errorptr[ 1 ] = ( FSERROR ) ( bpreverr1 + cur1 ); cur1 += delta; /* form error * 5 */ bpreverr1 = belowerr1 + cur1; belowerr1 = bnexterr; cur1 += delta; /* form error * 7 */ bnexterr = cur2; /* Process component 2 */ delta = cur2 * 2; cur2 += delta; /* form error * 3 */ errorptr[ 2 ] = ( FSERROR ) ( bpreverr2 + cur2 ); cur2 += delta; /* form error * 5 */ bpreverr2 = belowerr2 + cur2; belowerr2 = bnexterr; cur2 += delta; /* form error * 7 */ } /* At this point curN contains the 7/16 error value to be propagated to the next pixel on the current line, and all the errors for the next line have been shifted over. We are therefore ready to move on. */ r += dir; g += dir; b += dir; outptr += dir; errorptr += dir3; /* advance errorptr to current column */ } /* Post-loop cleanup: we must unload the final error values into the final fserrors[] entry. Note we need not unload belowerrN because * it is for the dummy column before or after the actual array. */ errorptr[ 0 ] = ( FSERROR ) bpreverr0; /* unload prev errs into array */ errorptr[ 1 ] = ( FSERROR ) bpreverr1; errorptr[ 2 ] = ( FSERROR ) bpreverr2; } if( sp->im ) { sp->im->completed = sp->im->total = sp->im->h; sp->im->visual_cue( sp->im, "Dithering done" ); } } /*************************************** * Shrink the min/max bounds of a box to enclose only nonzero elements, * and recompute its volume and population ***************************************/ static void update_box( SPEC * sp, boxptr boxp ) { hist3d histogram = sp->histogram; histptr histp; int c0, c1, c2; int c0min, c0max, c1min, c1max, c2min, c2max; int dist0, dist1, dist2; long ccount; c0min = boxp->c0min; c0max = boxp->c0max; c1min = boxp->c1min; c1max = boxp->c1max; c2min = boxp->c2min; c2max = boxp->c2max; if ( c0max > c0min ) for ( c0 = c0min; c0 <= c0max; c0++ ) for ( c1 = c1min; c1 <= c1max; c1++) { histp = &histogram[ c0 ][ c1 ][ c2min ]; for ( c2 = c2min; c2 <= c2max; c2++ ) if ( *histp++ != 0 ) { boxp->c0min = c0min = c0; goto have_c0min; } } have_c0min: if ( c0max > c0min ) for ( c0 = c0max; c0 >= c0min; c0-- ) for ( c1 = c1min; c1 <= c1max; c1++ ) { histp = &histogram[ c0 ][ c1 ][ c2min ]; for ( c2 = c2min; c2 <= c2max; c2++ ) if ( *histp++ != 0 ) { boxp->c0max = c0max = c0; goto have_c0max; } } have_c0max: if ( c1max > c1min ) for ( c1 = c1min; c1 <= c1max; c1++ ) for ( c0 = c0min; c0 <= c0max; c0++ ) { histp = &histogram[ c0 ][ c1 ][ c2min ]; for ( c2 = c2min; c2 <= c2max; c2++ ) if ( *histp++ != 0 ) { boxp->c1min = c1min = c1; goto have_c1min; } } have_c1min: if ( c1max > c1min ) for ( c1 = c1max; c1 >= c1min; c1-- ) for ( c0 = c0min; c0 <= c0max; c0++ ) { histp = &histogram[ c0 ][ c1 ][ c2min ]; for ( c2 = c2min; c2 <= c2max; c2++ ) if ( *histp++ != 0 ) { boxp->c1max = c1max = c1; goto have_c1max; } } have_c1max: if ( c2max > c2min ) for ( c2 = c2min; c2 <= c2max; c2++ ) for ( c0 = c0min; c0 <= c0max; c0++ ) { histp = &histogram[ c0 ][ c1min ][ c2 ]; for ( c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS ) if ( *histp != 0 ) { boxp->c2min = c2min = c2; goto have_c2min; } } have_c2min: if ( c2max > c2min ) for ( c2 = c2max; c2 >= c2min; c2-- ) for ( c0 = c0min; c0 <= c0max; c0++ ) { histp = &histogram[ c0 ][ c1min ][ c2 ]; for ( c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS ) if ( *histp != 0 ) { boxp->c2max = c2max = c2; goto have_c2max; } } have_c2max: /* Update box volume. * We use 2-norm rather than real volume here; this biases the method * against making long narrow boxes, and it has the side benefit that * a box is splittable iff norm > 0. * Since the differences are expressed in histogram-cell units, * we have to shift back to JSAMPLE units to get consistent distances; * after which, we scale according to the selected distance scale factors. */ dist0 = ( ( c0max - c0min ) << C0_SHIFT ) * C0_SCALE; dist1 = ( ( c1max - c1min ) << C1_SHIFT ) * C1_SCALE; dist2 = ( ( c2max - c2min ) << C2_SHIFT ) * C2_SCALE; boxp->volume = dist0 * dist0 + dist1 * dist1 + dist2 * dist2; /* Now scan remaining volume of box and compute population */ ccount = 0; for ( c0 = c0min; c0 <= c0max; c0++ ) for ( c1 = c1min; c1 <= c1max; c1++ ) { histp = &histogram[ c0 ][ c1 ][ c2min ]; for ( c2 = c2min; c2 <= c2max; c2++, histp++ ) if ( *histp != 0 ) ccount++; } boxp->colorcount = ccount; } /*************************************** * Find the splittable box with the largest color population * Returns NULL if no splittable boxes remain ***************************************/ static boxptr find_biggest_color_pop( boxptr boxlist, int numboxes ) { boxptr boxp; int i; long maxc = 0; boxptr which = NULL; for ( i = 0, boxp = boxlist; i < numboxes; i++, boxp++ ) if ( boxp->colorcount > maxc && boxp->volume > 0 ) { which = boxp; maxc = boxp->colorcount; } return which; } /*************************************** * Find the splittable box with the largest (scaled) volume * Returns NULL if no splittable boxes remain ***************************************/ static boxptr find_biggest_volume( boxptr boxlist, int numboxes ) { boxptr boxp; int i; int maxv = 0; boxptr which = NULL; for ( i = 0, boxp = boxlist; i < numboxes; i++, boxp++ ) if ( boxp->volume > maxv ) { which = boxp; maxv = boxp->volume; } return which; } /*************************************** * Repeatedly select and split the largest box until we have enough boxes ***************************************/ static int median_cut( SPEC * sp, boxptr boxlist, int numboxes, int desired_colors ) { int n, lb; int c0, c1, c2, cmax; boxptr b1, b2; while ( numboxes < desired_colors ) { /* Select box to split. * Current algorithm: by population for first half, then by volume. */ if ( numboxes * 2 <= desired_colors ) b1 = find_biggest_color_pop( boxlist, numboxes ); else b1 = find_biggest_volume( boxlist, numboxes ); if ( b1 == NULL ) /* no splittable boxes left! */ break; b2 = &boxlist[ numboxes ]; /* where new box will go */ /* Copy the color bounds to the new box. */ b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; /* Choose which axis to split the box on. * Current algorithm: longest scaled axis. * See notes in update_box about scaling distances. */ c0 = ( ( b1->c0max - b1->c0min ) << C0_SHIFT ) * C0_SCALE; c1 = ( ( b1->c1max - b1->c1min ) << C1_SHIFT ) * C1_SCALE; c2 = ( ( b1->c2max - b1->c2min ) << C2_SHIFT ) * C2_SCALE; /* We want to break any ties in favor of green, then red, blue last. * This code does the right thing for R,G,B or B,G,R color orders only. */ #if RGB_RED == 0 cmax = c1; n = 1; if ( c0 > cmax ) { cmax = c0; n = 0; } if ( c2 > cmax ) n = 2; #else cmax = c1; n = 1; if ( c2 > cmax ) { cmax = c2; n = 2; } if ( c0 > cmax ) n = 0; #endif /* Choose split point along selected axis, and update box bounds. * Current algorithm: split at halfway point. * (Since the box has been shrunk to minimum volume, * any split will produce two nonempty subboxes.) * Note that lb value is max for lower box, so must be < old max. */ switch ( n ) { case 0 : lb = ( b1->c0max + b1->c0min ) / 2; b1->c0max = lb; b2->c0min = lb + 1; break; case 1 : lb = ( b1->c1max + b1->c1min ) / 2; b1->c1max = lb; b2->c1min = lb + 1; break; case 2 : lb = ( b1->c2max + b1->c2min ) / 2; b1->c2max = lb; b2->c2min = lb + 1; break; } /* Update stats for boxes */ update_box( sp, b1 ); update_box( sp, b2 ); numboxes++; } return numboxes; } /*************************************** * Compute representative color for a box, put it in colormap[icolor] ***************************************/ static void compute_color( SPEC * sp, boxptr boxp, int icolor ) { /* Current algorithm: mean weighted by pixels (not colors) */ /* Note it is important to get the rounding correct! */ hist3d histogram = sp->histogram; histptr histp; int c0, c1, c2; int c0min, c0max, c1min, c1max, c2min, c2max; long count; long total = 0; long c0total = 0; long c1total = 0; long c2total = 0; c0min = boxp->c0min; c0max = boxp->c0max; c1min = boxp->c1min; c1max = boxp->c1max; c2min = boxp->c2min; c2max = boxp->c2max; for ( c0 = c0min; c0 <= c0max; c0++ ) for ( c1 = c1min; c1 <= c1max; c1++ ) { histp = &histogram[ c0][ c1 ][ c2min ]; for ( c2 = c2min; c2 <= c2max; c2++ ) { if ( ( count = *histp++ ) != 0 ) { total += count; c0total += ( ( c0 << C0_SHIFT ) + ( ( 1 << C0_SHIFT ) >> 1 ) ) * count; c1total += ( ( c1 << C1_SHIFT ) + ( ( 1 << C1_SHIFT ) >> 1 ) ) * count; c2total += ( ( c2 << C2_SHIFT ) + ( ( 1 << C2_SHIFT ) >> 1 ) ) * count; } } } sp->colormap[ 0 ][ icolor ] = ( JSAMPLE ) ( ( c0total + ( total >> 1 ) ) / total ); sp->colormap[ 1 ][ icolor ] = ( JSAMPLE ) ( ( c1total + ( total >> 1 ) ) / total ); sp->colormap[ 2 ][ icolor ] = ( JSAMPLE ) ( ( c2total + ( total >> 1 ) ) / total ); } /*************************************** * Master routine for color selection ***************************************/ static void select_colors( SPEC * sp, int desired_colors ) { boxptr boxlist; int numboxes; int i; if ( sp->im ) sp->im->visual_cue( sp->im, "Selecting Colors ..." ); /* Allocate workspace for box list */ boxlist = fl_malloc( desired_colors * sizeof( box ) ); /* Initialize one box containing whole space */ numboxes = 1; boxlist[ 0 ].c0min = 0; boxlist[ 0 ].c0max = MAXJSAMPLE >> C0_SHIFT; boxlist[ 0 ].c1min = 0; boxlist[ 0 ].c1max = MAXJSAMPLE >> C1_SHIFT; boxlist[ 0 ].c2min = 0; boxlist[ 0 ].c2max = MAXJSAMPLE >> C2_SHIFT; /* Shrink it to actually-used volume and set its statistics */ update_box( sp, &boxlist[ 0 ] ); /* Perform median-cut to produce final box list */ numboxes = median_cut( sp, boxlist, numboxes, desired_colors ); /* Compute the representative color for each box, fill colormap */ for ( i = 0; i < numboxes; i++ ) compute_color( sp, boxlist+ i, i ); sp->actual_number_of_colors = numboxes; fl_free( boxlist ); } /*************************************** * get histogram ***************************************/ static void prescan_quantize( SPEC * sp, unsigned char ** r, unsigned char ** g, unsigned char ** b, int width, int num_rows ) { histptr histp; hist3d histogram = sp->histogram; int row, col; if ( sp->im ) { sp->im->completed = 0; sp->im->visual_cue( sp->im, "Getting Histogram ..." ); } for ( row = 0; row < num_rows; row++ ) { for ( col = width; --col >= 0; ) { /* get pixel value and index into the histogram */ histp = &histogram[ r[ row ][ col ] >> C0_SHIFT ] [ g[ row ][ col ] >> C1_SHIFT ] [ b[ row ][ col ] >> C2_SHIFT ]; /* increment, check for overflow and undo increment if so. */ if ( ++( *histp ) <= 0 ) ( *histp )--; } } } /* * Initialize the error-limiting transfer function (lookup table). * The raw F-S error computation can potentially compute error values of up to * +- MAXJSAMPLE. But we want the maximum correction applied to a pixel to be * much less, otherwise obviously wrong pixels will be created. (Typical * effects include weird fringes at color-area boundaries, isolated bright * pixels in a dark area, etc.) The standard advice for avoiding this problem * is to ensure that the "corners" of the color cube are allocated as output * colors; then repeated errors in the same direction cannot cause cascading * error buildup. However, that only prevents the error from getting * completely out of hand; Aaron Giles reports that error limiting improves * the results even with corner colors allocated. * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty * well, but the smoother transfer function used below is even better. Thanks * to Aaron Giles for this idea. */ /*************************************** * Allocate and fill in the error_limiter table ***************************************/ static void init_error_limit( SPEC *sp ) { int *table; int in, out; table = fl_malloc( ( MAXJSAMPLE * 2 + 1 ) * sizeof( int ) ); table += MAXJSAMPLE; /* so can index -MAXJSAMPLE .. +MAXJSAMPLE */ sp->error_limiter = table; #define STEPSIZE ( ( MAXJSAMPLE+1 ) / 16 ) /* Map errors 1:1 up to +- MAXJSAMPLE/16 */ for ( out = in = 0; in < STEPSIZE; in++, out++ ) { table[ in ] = out; table[ -in ] = -out; } /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ for ( ; in < STEPSIZE * 3; in++, out += ( in & 1 ) ? 0 : 1 ) { table[ in ] = out; table[ -in ] = -out; } /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */ for ( ; in <= MAXJSAMPLE; in++ ) { table[ in ] = out; table[ -in ] = -out; } #undef STEPSIZE } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/ps_draw.c0000644000175000017500000005606711321667070015134 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1997-2002 T.C. Zhao * All rights reserved. * * Some high-level drawing routines */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pflps.h" #if defined __GNUC__ #define FL_UNUSED_ARG __attribute__ ((unused)) #else #define FL_UNUSED_ARG #endif /* rectangle with rounded corners */ #define RS 16 /* * 0.0, 0.034074, 0.1339746, 0.292893, 0.5, 0.741181, 1.0 */ static float offset[ ] = { 0.0, 0.07612, 0.29289, 0.61732, 1.0 }; #define RN ( sizeof offset / sizeof *offset ) /*************************************** ***************************************/ static int compute_rounded_corners( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_POINT * point ) { FL_POINT *xp; size_t i, n; float rsx, rsy; rsx = rsy = 0.42 * FL_min( w, h ); if ( rsx > RS ) rsx = rsy = RS; for ( xp = point, n = i = 0; i < RN; i++, n++, xp++ ) { xp->x = FL_nint( x + offset[ RN - i - 1 ] * rsx ); xp->y = FL_nint( y + offset[ i ] * rsy ); } for ( i = 0; i < RN; i++, n++, xp++ ) { xp->x = FL_nint( x + offset[ i ] * rsx ); xp->y = FL_nint( y + h - 1.0 - offset[ RN - i - 1 ] * rsy ); } for ( i = 0; i < RN; i++, n++, xp++ ) { xp->x = FL_nint( x + w - 1.0 - offset[ RN - i - 1 ] * rsx ); xp->y = FL_nint( y + h - 1.0 - offset[ i ] * rsy ); } for ( i = 0; i < RN; i++, n++, xp++ ) { xp->x = FL_nint( x + w - 1.0 - offset[ i ] * rsx ); xp->y = FL_nint( y + offset[ RN - i - 1 ] * rsy ); } return n; } #define AddVertex( p, xp, yp ) \ do { \ p->x = xp; \ p->y = yp; \ p++; \ } while ( 0 ) /*************************************** ***************************************/ void flps_roundrectangle( int fill, int x, int y, int w, int h, FL_COLOR col ) { FL_POINT point[ 5 * RN ]; int n; n = compute_rounded_corners( x, y, w, h, point ); flps_poly( fill, point, n, col ); } #define flps_rbox flps_roundrectangle /************ End of basic drawing routines ********}******/ /***************************************************************** * Some high level drawing routines *************************************************************{***/ static void flps_roundedbox( int style, int x, int y, int w, int h, FL_COLOR col, int bw ) { FL_POINT point[ 5 * RN + 2 ]; int n, lw = FL_abs( bw ), lw2 = lw / 2; n = compute_rounded_corners( x + lw2, y + lw2, w - lw, h - lw, point ); flps_poly( 1, point, n, col ); flps_linewidth( lw ); if ( style == FL_ROUNDED3D_UPBOX ) { flps_lines( point, 2 * RN, FL_TOP_BCOL ); flps_lines( point + 2 * RN - 3, RN + 1, FL_TOP_BCOL ); flps_lines( point + 3 * RN - 4, RN + 2, FL_BOTTOM_BCOL ); point[ n ] = point[ 0 ]; flps_lines( point + n - 3, 4, FL_BOTTOM_BCOL ); } else { flps_lines( point, 2 * RN, FL_BOTTOM_BCOL ); flps_lines( point + 2 * RN - 3, RN + 1, FL_BOTTOM_BCOL ); flps_lines( point + 3 * RN - 4, RN + 2, FL_LEFT_BCOL ); point[ n ] = point[ 0 ]; flps_lines( point + n - 3, 4, FL_TOP_BCOL ); } flps_reset_linewidth(); } /*************************************** ***************************************/ static void flps_ovalbox( int style, int x, int y, int w, int h, FL_COLOR col, int bw ) { int lw = FL_abs( bw ), cr = lw / 2; int extra = 1 + ( lw > 3 ); int xx, yy, ww, hh; x += cr; y += cr; w -= 2 * cr; h -= 2 * cr; xx = x + extra; yy = y + extra; ww = w - 2 * extra; hh = h - 2 * extra; flps_pieslice( 1, x, y, w, h, 0, 3600, col ); /* this should be replaced by a loop. Faking it with line thickness looks bad when w != h */ if ( style == FL_OVAL3D_UPBOX ) { flps_linewidth( bw ); flps_pieslice( 0, x, y, w, h, 450, 2250, FL_TOP_BCOL ); flps_pieslice( 0, x, y, w, h, 0, 450, FL_BOTTOM_BCOL ); flps_pieslice( 0, x, y, w, h, 2250, 3600, FL_BOTTOM_BCOL ); } else if ( style == FL_OVAL3D_FRAMEBOX ) { flps_linewidth( 1 ); flps_pieslice( 0, x, y, w, h, 450, 2250, FL_BOTTOM_BCOL ); flps_pieslice( 0, xx, yy, ww, hh, 450, 2250, FL_LEFT_BCOL ); flps_pieslice( 0, xx, yy, ww, hh, 0, 450, FL_BOTTOM_BCOL ); flps_pieslice( 0, x, y, w, h, 0, 450, FL_LEFT_BCOL ); flps_pieslice( 0, xx, yy, ww, hh, 2250, 3600, FL_BOTTOM_BCOL ); flps_pieslice( 0, x, y, w, h, 2250, 3600, FL_LEFT_BCOL ); } else if ( style == FL_OVAL3D_EMBOSSEDBOX ) { flps_linewidth( 1 ); flps_pieslice( 0, x, y, w, h, 450, 2250, FL_LEFT_BCOL ); flps_pieslice( 0, xx, yy, ww, hh, 450, 2250, FL_BOTTOM_BCOL ); flps_pieslice( 0, xx, yy, ww, hh, 0, 450, FL_LEFT_BCOL ); flps_pieslice( 0, x, y, w, h, 0, 450, FL_BOTTOM_BCOL ); flps_pieslice( 0, xx, yy, ww, hh, 2250, 3600, FL_LEFT_BCOL ); flps_pieslice( 0, x, y, w, h, 2250, 3600, FL_BOTTOM_BCOL ); } else { flps_linewidth( bw ); flps_pieslice( 0, x, y, w, h, 450, 2250, FL_BOTTOM_BCOL ); flps_pieslice( 0, x, y, w, h, 0, 450, FL_TOP_BCOL ); flps_pieslice( 0, x, y, w, h, 2250, 3600, FL_TOP_BCOL ); } flps_reset_linewidth( ); } #define vv2( x1, y1, x2, y2 ) \ do { \ AddVertex( xp, x1, y1 ); \ AddVertex( xp, x2, y2 ); \ } while ( 0 ) #define vv3( x1, y1, x2, y2, x3, y3 ) \ do { \ vv2( x1, y1, x2, y2 ); \ AddVertex( xp, x3, y3); \ } while ( 0 ) /*************************************** ***************************************/ static void flps_foldertab_box( int style, int x, int y, int w, int h, FL_COLOR col, int bw ) { float ctr, right, top; FL_POINT vert[ 10 ], *xp; int border, i; float absbw = FL_abs( bw ); float C = 4; int savelw = fl_get_linewidth( ); if ( ! ( border = bw > 0 ) ) bw = bw; ctr = absbw / 2; x += ctr; y += ctr; w -= 2 * absbw; h -= 2 * absbw; right = x + w - 1; top = y + h - 1; xp = vert; switch ( style ) { case FL_TOPTAB_UPBOX : vv3( x, y, x, top - C, x + C, top ); vv2( x + C, top, right - C, top ); vv3( right - C, top, right, top - C, right, y ); flps_poly( 1, vert, 8, col ); flps_linewidth( absbw ); flps_lines( vert, 3, FL_LEFT_BCOL ); flps_lines( vert + 3, 2, FL_TOP_BCOL ); flps_lines( vert + 5, 3, FL_BOTTOM_BCOL ); flps_reset_linewidth( ); if ( border ) for ( i = 0; i < 8; i++ ) { if ( vert[ i ].x > x + w / 2 ) vert[ i ].x += ctr; else vert[ i ].x -= ctr + 1; if ( vert[ i ].y > y + h / 2 ) vert[ i ].y += ctr; } break; case FL_SELECTED_TOPTAB_UPBOX : vv3( x, y - absbw, x, top - C, x + C, top ); vv2( x + C, top, right - C, top ); vv3( right - C, top, right, top - C, right, y - absbw ); flps_poly( 1, vert, 8, col ); flps_linewidth( absbw ); flps_lines( vert, 3, FL_LEFT_BCOL ); flps_lines( vert + 3, 2, FL_TOP_BCOL ); flps_lines( vert + 5, 3, FL_BOTTOM_BCOL ); break; default: break; } flps_linewidth( savelw ); } #define ShrinkBox( x, y, w, h, d ) \ do { \ x += d; \ y += d; \ w -= 2 * d; \ h -= 2 * d; \ } while ( 0 ) /*************************************** ***************************************/ void flps_draw_tbox( int style, int x, int y, int w, int h, FL_COLOR col, int bw ) { FL_POINT point[ 8 ], *fp; int absbw = FL_abs( bw ); int halfbw = absbw / 2; int xc = x + w / 2, yc = y + h / 2; if ( flps->verbose ) fprintf( flps->fp, "%%TBOX %d: %d %d %d %d\n", style, x, y, w, h ); fp = point; switch ( style ) { case FLI_TRIANGLE_UPBOX8 : AddVertex( fp, xc, y + h - absbw ); AddVertex( fp, x + w - bw, y + absbw ); AddVertex( fp, x + bw, y + bw ); flps_poly( 1, point, 3, col ); flps_linewidth( absbw ); ShrinkBox( x, y, w, h, halfbw ); flps_line( x, y, xc, y + h - 1, FL_LEFT_BCOL ); flps_line( xc, y + h - 1, x + w - 1, y, FL_RIGHT_BCOL ); flps_line( x + w - 1, y, x, y, FL_BOTTOM_BCOL ); flps_reset_linewidth( ); break; case FLI_TRIANGLE_UPBOX2 : AddVertex( fp, xc, y + absbw ); AddVertex( fp, xc, y + h - absbw ); AddVertex( fp, x + w - absbw, y + h - absbw ); flps_poly( 1, point, 3, col ); flps_linewidth( absbw ); ShrinkBox( x, y, w, h, halfbw ); flps_line( xc, y, x, y + h - 1, FL_LEFT_BCOL ); flps_line( x, y + h - 1, x + w - 1, y + h - 1, FL_TOP_BCOL ); flps_line( x + w - 1, y + h - 1, xc, y, FL_RIGHT_BCOL ); flps_reset_linewidth( ); break; case FLI_TRIANGLE_UPBOX6 : AddVertex( fp, x + bw, y + h - bw ); AddVertex( fp, x + w - bw, yc ); AddVertex( fp, x + bw, y + bw ); flps_poly( 1, point, 3, col ); flps_linewidth( absbw ); ShrinkBox( x, y, w, h, halfbw ); flps_line( x, y + h - 1, x + w - 1, yc, FL_RIGHT_BCOL ); flps_line( x + w - 1, yc, x, y, FL_BOTTOM_BCOL ); flps_line( x, y, x, y + h - 1, FL_LEFT_BCOL ); flps_reset_linewidth( ); break; case FLI_TRIANGLE_UPBOX4 : AddVertex( fp, x + bw, yc ); AddVertex( fp, x + w - bw, y + h - bw ); AddVertex( fp, x + w - bw, y ); flps_poly( 1, point, 3, col ); flps_linewidth( absbw ); ShrinkBox( x, y, w, h, halfbw ); flps_line( x, yc, x + w - 1, y + h - 1, FL_TOP_BCOL ); flps_line( x + w - 1, y + h - 1, x + w - 1, y, FL_RIGHT_BCOL ); flps_line( x + w - 1, y, x, yc, FL_BOTTOM_BCOL ); flps_reset_linewidth( ); break; } } /*************************************** ***************************************/ void flps_draw_box( int style, int x, int y, int w, int h, FL_COLOR col, int bw_in ) { int border, B; FL_POINT xpoint[ 8 ], *xp; int bw = bw_in; if ( ! ( border = bw > 0 ) ) bw = -bw; B = border; xp = xpoint; if ( flps->verbose ) fprintf( flps->fp, "%%BOX %d: %d %d %d %d\n", style, x, y, w, h ); switch ( style ) { case FL_NO_BOX : break; case FL_UP_BOX : flps_rectf( x + bw, y + bw, w - 2 * bw, h - 2 * bw, col ); flps_rectf( x + B, y, w - 2 * B, bw + 1, FL_BOTTOM_BCOL ); flps_rectf( x + B, y + h - 1 - bw, w - 2 * B, bw + 1, FL_TOP_BCOL ); /* left */ AddVertex( xp, x + B, y + B ); AddVertex( xp, x + B, y + h - 1 - B ); AddVertex( xp, x + bw + B, y + h - 1 - bw - B ); AddVertex( xp, x + bw + B, y + bw + B ); flps_poly( 1, xpoint, 4, FL_LEFT_BCOL ); xp = xpoint; AddVertex( xp, x + w - 1, y ); AddVertex( xp, x + w - 1, y + h - 1 ); AddVertex( xp, x + w - 1 - bw, y + h - 1 - bw ); AddVertex( xp, x + w - 1 - bw, y + bw ); flps_poly( 1, xpoint, 4, FL_RIGHT_BCOL ); if ( border ) flps_rect( x, y, w, h, FL_BLACK ); break; case FL_DOWN_BOX : flps_rectf( x, y, w, h, col ); flps_rectf( x, y + h - bw, w, bw, FL_BOTTOM_BCOL ); flps_rectf( x, y, w, bw, FL_TOP_BCOL ); AddVertex( xp, x, y ); AddVertex( xp, x, y + h - 1 ); AddVertex( xp, x + bw - 1, y + h - bw ); AddVertex( xp, x + bw - 1, y + bw - 1 ); flps_poly( 1, xpoint, 4, FL_RIGHT_BCOL ); /* right */ xp = xpoint; AddVertex( xp, x + w - 1, y ); AddVertex( xp, x + w - 1, y + h - 1 ); AddVertex( xp, x + w - bw, y + h - bw ); AddVertex( xp, x + w - bw, y + bw - 1 ); flps_poly( 1, xpoint, 4, FL_LEFT_BCOL ); break; case FL_FRAME_BOX : flps_rectf( x, y, w, h, col ); flps_linewidth( 1 ); flps_rect( x + 1.4, y, w - 1.4, h - 1.4, FL_TOP_BCOL ); flps_reset_linewidth( ); flps_rect( x, y + 1.4, w - 1.4, h - 1.4, FL_BOTTOM_BCOL ); break; case FL_EMBOSSED_BOX : flps_rectf( x, y, w, h, col ); flps_linewidth( 1 ); flps_rect( x + 1.4, y, w - 1.4, h - 1.4, FL_BOTTOM_BCOL ); flps_reset_linewidth( ); flps_rect( x, y + 1.4, w - 1.4, h - 1.4, FL_TOP_BCOL ); break; case FL_FLAT_BOX : flps_rectf( x, y, w, h, col ); break; case FL_SHADOW_BOX : if ( w > 100 && h > 100 ) bw++; flps_rectf( x + bw, y + bw, w - bw, -bw, FL_BOTTOM_BCOL ); flps_rectf( x + w - 1, y, -bw, h - bw - 1, FL_BOTTOM_BCOL ); flps_rectf( x, y + bw, w - bw, h - bw, col ); flps_rect( x, y + bw, w - bw, h - bw, FL_BLACK ); break; case FL_BORDER_BOX : flps_rectf( x, y, w, h, col ); flps_rect( x, y, w, h, FL_BLACK ); break; case FL_RFLAT_BOX : flps_rbox( 1, x, y, w, h, col ); break; case FL_ROUNDED_BOX : flps_rbox( 1, x, y, w, h, col ); flps_rbox( 0, x, y, w, h, FL_BLACK ); break; case FL_ROUNDED3D_UPBOX : case FL_ROUNDED3D_DOWNBOX : flps_roundedbox( style, x, y, w, h, col, bw ); break; case FL_RSHADOW_BOX : flps_rbox( 1, x + bw, y - 1, w - bw + 1, h - bw, FL_BOTTOM_BCOL ); flps_rbox( 1, x, y + bw - 1, w - bw + 1, h - bw + 1, col ); flps_rbox( 0, x, y + bw - 1, w - bw + 1, h - bw + 1, FL_BLACK ); break; case FL_OVAL_BOX : flps_oval( 1, x, y, w, h, col ); flps_oval( 0, x, y, w, h, FL_BLACK ); break; case FL_OVAL3D_UPBOX : case FL_OVAL3D_DOWNBOX : case FL_OVAL3D_FRAMEBOX : case FL_OVAL3D_EMBOSSEDBOX : flps_ovalbox( style, x, y, w, h, col, bw ); break; case FL_TOPTAB_UPBOX : case FL_SELECTED_TOPTAB_UPBOX : case FL_BOTTOMTAB_UPBOX : case FL_SELECTED_BOTTOMTAB_UPBOX : flps_foldertab_box( style, x, y, w, h, col, bw_in ); break; default: fprintf( stderr, "Unknown Boxtype %d\n", style ); break; } } /*************************************** * Frame is drawn OUTSIDE of the bounding box ***************************************/ void flps_draw_frame( int style, int x, int y, int w, int h, FL_COLOR col FL_UNUSED_ARG, int bw ) { int border; int B; FL_POINT xpoint[ 10], *xp; if ( ! ( border = bw > 0 ) ) bw = -bw; B = border; xp = xpoint; if ( flps->verbose ) fprintf( flps->fp, "%%frame (%d %d %d %d)\n", x, y, w, h ); switch ( style ) { case FL_UP_FRAME: flps_rectf( x - bw - B, y + h - 1, w + 2 * bw, bw + 1 + B, FL_TOP_BCOL ); flps_rectf( x - bw - B, y - bw - B, w + 2 * bw, bw + 1 + B, FL_BOTTOM_BCOL ); /* left */ xp = xpoint; AddVertex( xp, x - bw - B, y - bw - B ); AddVertex( xp, x, y ); AddVertex( xp, x, y + h - 1 ); AddVertex( xp, x - bw - B, y + h + bw + B - 1 ); flps_poly( 1, xpoint, 4, FL_LEFT_BCOL ); /* right */ xp = xpoint; AddVertex( xp, x + w - 1 + bw + B, y - bw - B ); AddVertex( xp, x + w - 1 + bw + B, y + h + bw + B - 1 ); AddVertex( xp, x + w - 1, y + h - 1 ); AddVertex( xp, x + w - 1, y ); flps_poly( 1, xpoint, 4, FL_RIGHT_BCOL ); break; case FL_DOWN_FRAME : flps_rectf( x - bw - B, y + h - 1, w + 2 * bw, bw + 1 + B, FL_BOTTOM_BCOL ); flps_rectf( x - bw - B, y - bw - B, w + 2 * bw, bw + 1 + B, FL_TOP_BCOL ); /* left */ xp = xpoint; AddVertex( xp, x - bw - B, y - bw - B ); AddVertex( xp, x, y ); AddVertex( xp, x, y + h - 1 ); AddVertex( xp, x - bw - B, y + h + bw + B - 1 ); flps_poly( 1, xpoint, 4, FL_RIGHT_BCOL ); /* right */ xp = xpoint; AddVertex( xp, x + w - 1 + bw + B, y - bw - B ); AddVertex( xp, x + w - 1 + bw + B, y + h + bw + B - 1 ); AddVertex( xp, x + w - 1, y + h - 1 ); AddVertex( xp, x + w - 1, y ); flps_poly( 1, xpoint, 4, FL_LEFT_BCOL ); break; case FL_ENGRAVED_FRAME : B = bw > 2 ? ( bw - 2 ) : 1; B *= 0.5; flps_draw_frame( FL_DOWN_FRAME, x, y, w, h, 0, 1 ); flps_draw_frame( FL_UP_FRAME, x + B, y + B, w - 2 * B, h - 2 * B, 0, -1 ); break; } } /*************************************** ***************************************/ void flps_draw_checkbox( int type, int x, int y, int w, int h, FL_COLOR col, int bw ) { FL_POINT xpoint[ 6 ], *xp; FL_POINT allp[ 10 ]; /* generate all points */ xp = allp; AddVertex( xp, x + w / 2, y ); AddVertex( xp, x, y + h / 2 ); AddVertex( xp, x + w / 2, y + h ); AddVertex( xp, x + w, y + h / 2 ); AddVertex( xp, x + w / 2, y + bw ); AddVertex( xp, x + bw, y + h / 2 ); AddVertex( xp, x + w / 2, y + h - bw ); AddVertex( xp, x + w - bw, y + h / 2 ); /* draw overall box */ xp = allp + 4; flps_poly( 1, xp, 4, col ); xp = xpoint; switch ( type ) { case FL_DOWN_BOX : AddVertex( xp, allp[ 0 ].x, allp[ 0 ].y ); AddVertex( xp, allp[ 1 ].x, allp[ 1 ].y ); AddVertex( xp, allp[ 5 ].x, allp[ 5 ].y ); AddVertex( xp, allp[ 4 ].x, allp[ 4 ].y ); flps_poly( 1, xp = xpoint, 4, FL_LEFT_BCOL ); AddVertex( xp, allp[ 0 ].x, allp[ 0 ].y ); AddVertex( xp, allp[ 4 ].x, allp[ 4 ].y ); AddVertex( xp, allp[ 7 ].x, allp[ 7 ].y ); AddVertex( xp, allp[ 3 ].x, allp[ 3 ].y ); flps_poly( 1, xp = xpoint, 4, FL_TOP_BCOL ); /* right bottom */ AddVertex( xp, allp[ 6 ].x, allp[ 6 ].y ); AddVertex( xp, allp[ 2 ].x, allp[ 2 ].y ); AddVertex( xp, allp[ 3 ].x, allp[ 3 ].y ); AddVertex( xp, allp[ 7 ].x, allp[ 7 ].y ); flps_poly( 1, xp = xpoint, 4, FL_RIGHT_BCOL ); AddVertex( xp, allp[ 1 ].x, allp[ 1 ].y ); AddVertex( xp, allp[ 2 ].x, allp[ 2 ].y ); AddVertex( xp, allp[ 6 ].x, allp[ 6 ].y ); AddVertex( xp, allp[ 5 ].x, allp[ 5 ].y ); flps_poly( 1, xp = xpoint, 4, FL_BOTTOM_BCOL ); break; case FL_UP_BOX : AddVertex( xp, allp[ 0 ].x, allp[ 0 ].y ); AddVertex( xp, allp[ 1 ].x, allp[ 1 ].y ); AddVertex( xp, allp[ 5 ].x, allp[ 5 ].y ); AddVertex( xp, allp[ 4 ].x, allp[ 4 ].y ); flps_poly( 1, xp = xpoint, 4, FL_BOTTOM_BCOL ); AddVertex( xp, allp[ 0 ].x, allp[ 0 ].y ); AddVertex( xp, allp[ 4 ].x, allp[ 4 ].y ); AddVertex( xp, allp[ 7 ].x, allp[ 7 ].y ); AddVertex( xp, allp[ 3 ].x, allp[ 3 ].y ); flps_poly( 1, xp = xpoint, 4, FL_RIGHT_BCOL ); /* right bottom */ AddVertex( xp, allp[ 6 ].x, allp[ 6 ].y ); AddVertex( xp, allp[ 2 ].x, allp[ 2 ].y ); AddVertex( xp, allp[ 3 ].x, allp[ 3 ].y ); AddVertex( xp, allp[ 7 ].x, allp[ 7 ].y ); flps_poly( 1, xp = xpoint, 4, FL_LEFT_BCOL ); AddVertex( xp, allp[ 1 ].x, allp[ 1 ].y ); AddVertex( xp, allp[ 2 ].x, allp[ 2 ].y ); AddVertex( xp, allp[ 6 ].x, allp[ 6 ].y ); AddVertex( xp, allp[ 5 ].x, allp[ 5 ].y ); flps_poly( 1, xp = xpoint, 4, FL_TOP_BCOL ); break; } if ( flps->verbose ) fprintf( flps->fp, "%%BOX }\n" ); } /******* End of high-level drawing routines **********}******/ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_sgi.c0000644000175000017500000000475711247055071015417 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*************************************** ***************************************/ static int IRIS_identify( FILE * fp ) { char buf[ 2 ]; if ( fread( buf, 1, 2, fp ) != 2 ) return 0; return ( buf[ 0 ] == '\001' && buf[ 1 ] == '\332' ) || ( buf[ 0 ] == '\332' && buf[ 1 ] == '\001' ); } /*************************************** ***************************************/ static int IRIS_description( FL_IMAGE * im ) { static char *cmds[ ] = { "sgitopnm %s > %s", NULL }; return flimage_description_via_filter( im, cmds, "reading iris ...", 0 ); } /*************************************** ***************************************/ static int IRIS_load( FL_IMAGE * im FL_UNUSED_ARG ) { fprintf( stderr, "should never been here\n" ); return -1; } /*************************************** ***************************************/ static int IRIS_dump( FL_IMAGE * im ) { static char *cmds[ ] = { "pnmtosgi %s > %s", NULL }; static char *formats[ ] = { "ppm", "pgm", "pbm", NULL }; return flimage_write_via_filter( im, cmds, formats, 0 ); } /*************************************** ***************************************/ void flimage_enable_sgi( void ) { flimage_add_format( "SGI Iris", "iris", "rgb", FL_IMAGE_RGB | FL_IMAGE_GRAY | FL_IMAGE_MONO, IRIS_identify, IRIS_description, IRIS_load, IRIS_dump); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_warp.c0000644000175000017500000003525011247055071015576 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * General non-perspective linear image warping. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include /*************************************** * linear interpolation ***************************************/ static void interpol2d_short( unsigned short * out, float y, float x, unsigned short ** mat, int nrow, int ncol, unsigned int fill ) { float wx, wy, wx1; int s00, s01, s10, s11, ix, iy; if ( x <= -1.0 || y <= -1.0 || x >= ncol || y >= nrow ) { *out = fill; return; } /* we need to fake one row/column of samples outside of the image to make the boundary look nice */ ix = x < 0 ? -1 : x; iy = y < 0 ? -1 : y; /* here we use extra samples outside of the image */ s00 = ( ix >= 0 && iy >= 0) ? mat[ iy ][ ix ] : fill; s10 = ( ix < ncol - 1 && iy >= 0 ) ? mat[ iy ][ ix + 1 ] : fill; s01 = ( ix >= 0 && iy < nrow - 1 ) ? mat[ iy + 1 ][ ix ] : fill; s11 = ( ix < ncol - 1 && iy < nrow - 1 ) ? mat[ iy + 1 ][ ix + 1 ] : fill; /* weights */ wx = x - ix; wy = y - iy; wx1 = 1.0 - wx; *out = ( s00 * wx1 + s10 * wx ) * ( 1.0 - wy ) + ( s01 * wx1 + s11 * wx ) * wy + 0.1; return; } /*************************************** * linear interpolation ***************************************/ static void interpol2d_uc( int out[ 3 ], float y, float x, unsigned char ** r, unsigned char ** g, unsigned char ** b, int nrow, int ncol, int fill[ ] ) { int ix, iy; float wx, wy, wx1, wy1; int s00[ 3 ], s01[ 3 ], s10[ 3 ], s11[ 3 ]; if ( x <= -1.0f || y <= -1.0f || x >= ncol || y >= nrow ) { out[ 0 ] = fill[ 0 ]; out[ 1 ] = fill[ 1 ]; out[ 2 ] = fill[ 2 ]; return; } ix = x < 0.0 ? -1 : ( int ) x; iy = y < 0.0 ? -1 : ( int ) y; /* we need to fake one row/column of samples outside of the image to make the boundary look nice */ if ( ix >= 0 && iy >= 0 ) { s00[ 0 ] = r[ iy ][ ix ]; s00[ 1 ] = g[ iy ][ ix ]; s00[ 2 ] = b[ iy ][ ix ]; } else { s00[ 0 ] = fill[ 0 ]; s00[ 1 ] = fill[ 1 ]; s00[ 2 ] = fill[ 2 ]; } if ( ix < ncol - 1 && iy >= 0 ) { s10[ 0 ] = r[ iy ][ ix + 1 ]; s10[ 1 ] = g[ iy ][ ix + 1 ]; s10[ 2 ] = b[ iy ][ ix + 1 ]; } else { s10[ 0 ] = fill[ 0 ]; s10[ 1 ] = fill[ 1 ]; s10[ 2 ] = fill[ 2 ]; } if ( ix >= 0 && iy < nrow - 1 ) { s01[ 0 ] = r[ iy + 1 ][ ix ]; s01[ 1 ] = g[ iy + 1 ][ ix ]; s01[ 2 ] = b[ iy + 1 ][ ix ]; } else { s01[ 0 ] = fill[ 0 ]; s01[ 1 ] = fill[ 1 ]; s01[ 2 ] = fill[ 2 ]; } if ( ix < ncol - 1 && iy < nrow - 1 ) { s11[ 0 ] = r[ iy + 1 ][ ix + 1 ]; s11[ 1 ] = g[ iy + 1 ][ ix + 1 ]; s11[ 2 ] = b[ iy + 1 ][ ix + 1 ]; } else { s11[ 0 ] = fill[ 0 ]; s11[ 1 ] = fill[ 1 ]; s11[ 2 ] = fill[ 2 ]; } /* weights */ wx = x - ix; wy = y - iy; wx1 = 1.0 - wx; wy1 = 1.0 - wy; out[ 0 ] = ( s00[ 0 ] * wx1 + s10[ 0 ] * wx ) * wy1 + ( s01[ 0 ] * wx1 + s11[ 0 ] * wx ) * wy; out[ 1 ] = ( s00[ 1 ] * wx1 + s10[ 1 ] * wx ) * wy1 + ( s01[ 1 ] * wx1 + s11[ 1 ] * wx ) * wy; out[ 2 ] = ( s00[ 2 ] * wx1 + s10[ 2 ] * wx ) * wy1 + ( s01[ 2 ] * wx1 + s11[ 2 ] * wx ) * wy; if ( out[ 0 ] < 0 || out[ 0 ] > FL_PCMAX || out[ 1 ] < 0 || out[ 1 ] > FL_PCMAX || out[ 2 ] < 0 || out[ 2 ] > FL_PCMAX) { M_err( "interpol2D", "out of range" ); exit( 1 ); } return; } #define Free( a ) if( a ) fl_free( a ) /*************************************** ***************************************/ static int get_luts( float ** lutx0, float ** lutx1, float ** luty0, float ** luty1, float m[ ][ 2 ], int shift[ ], int w, int h ) { int i, err = 0; *lutx0 = *luty0 = *lutx1 = *luty1 = NULL; err = ! ( *lutx0 = fl_malloc( sizeof **lutx0 * ( w + 1 ) ) ) || ! ( *luty0 = fl_malloc( sizeof **luty0 * ( w + 1 ) ) ) || ! ( *lutx1 = fl_malloc( sizeof **lutx1 * ( h + 1 ) ) ) || ! ( *luty1 = fl_malloc( sizeof **luty1 * ( h + 1 ) ) ); if ( err ) { Free( *lutx0 ); Free( *luty0 ); Free( *lutx1 ); Free( *luty1 ); return -1; } for ( i = 0; i <= w; i++ ) { ( *lutx0 )[ i ] = m[ 0 ][ 0 ] * ( i - shift[ 0 ] ); ( *luty0 )[ i ] = m[ 1 ][ 0 ] * ( i - shift[ 0 ] ); } for ( i = 0; i <= h; i++ ) { ( *lutx1 )[ i ] = m[ 0 ][ 1 ] * ( i - shift[ 1 ] ); ( *luty1 )[ i ] = m[ 1 ][ 1 ] * ( i - shift[ 1 ] ); } return 0; } #define Outside( ic, ir, w, h ) \ ( ic < 0 || ic > ( w ) - 1 || ir < 0 || ir > ( h ) - 1 ) /*************************************** * the short array passed in could be grayscale or color index ***************************************/ static int transform_short( unsigned short ** in, unsigned short ** out, int w, int h, int nw, int nh, float m[ ][ 2 ], int shift[ ], unsigned int fill, int subp, FL_IMAGE * im) { float *lutx[ 2 ], *luty[ 2 ]; int r, c, ir, ic; float fir, fic; if ( get_luts( lutx, lutx + 1, luty, luty + 1, m, shift, nw, nh ) < 0 ) return -1; for ( r = 0; r < nh; r++, im->completed++ ) { if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, subp ? "GraySubP" : "Gray" ); if ( ! subp ) { for ( c = 0; c < nw; c++ ) { ic = lutx[ 0 ][ c ] + lutx[ 1 ][ r ] + 0.1; ir = luty[ 0 ][ c ] + luty[ 1 ][ r ] + 0.1; out[ r ][ c ] = Outside( ic, ir, w, h ) ? fill : in[ ir ][ ic ]; } } else { for ( c = 0; c < nw; c++ ) { fic = lutx[ 0 ][ c ] + lutx[ 1 ][ r ]; fir = luty[ 0 ][ c ] + luty[ 1 ][ r ]; interpol2d_short( &out[ r ][ c ], fir, fic, in, h, w, fill ); } } } fl_free( lutx[ 0 ] ); fl_free( lutx[ 1 ] ); fl_free( luty[ 0 ] ); fl_free( luty[ 1 ] ); return 1; } /*************************************** ***************************************/ static int transform_rgb( unsigned char ** or, unsigned char ** og, unsigned char ** ob, unsigned char ** nr, unsigned char ** ng, unsigned char ** nb, int w, int h, int nw, int nh, float m[ ][ 2 ], int shift[ ], unsigned int fill, int subp, FL_IMAGE * im ) { float *lutx[ 2 ], *luty[ 2 ]; int r, c, ir, ic, out[ 3 ]; float fir, fic; unsigned char fr = FL_GETR( fill ), fg = FL_GETG( fill ), fb = FL_GETB( fill ); int fillc[ 3 ]; if ( get_luts( lutx, lutx + 1, luty, luty + 1, m, shift, nw, nh ) < 0 ) return -1; fillc[ 0] = FL_GETR( fill ); fillc[ 1] = FL_GETG( fill ); fillc[ 2] = FL_GETB( fill ); for ( r = 0; r < nh; r++, im->completed++ ) { if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, subp ? "RGBSubP" : "RGB" ); if ( ! subp ) { for ( c = 0; c < nw; c++ ) { ic = lutx[ 0 ][ c ] + lutx[ 1 ][ r ] + 0.1; ir = luty[ 0 ][ c ] + luty[ 1 ][ r ] + 0.1; nr[ r ][ c ] = Outside( ic, ir, w, h ) ? fr : or[ ir ][ ic ]; ng[ r ][ c ] = Outside( ic, ir, w, h ) ? fg : og[ ir ][ ic ]; nb[ r ][ c ] = Outside( ic, ir, w, h ) ? fb : ob[ ir ][ ic ]; } } else { for ( c = 0; c < nw; c++ ) { fic = lutx[ 0][ c ] + lutx[ 1 ][ r ]; fir = luty[ 0][ c ] + luty[ 1 ][ r ]; interpol2d_uc( out, fir, fic, or, og, ob, h, w, fillc ); nr[ r ][ c ] = out[ 0 ]; ng[ r ][ c ] = out[ 1 ]; nb[ r ][ c ] = out[ 2 ]; } } } fl_free(lutx[ 0 ] ); fl_free(lutx[ 1 ] ); fl_free(luty[ 0 ] ); fl_free(luty[ 1 ] ); return 1; } /*************************************** ***************************************/ int flimage_warp( FL_IMAGE * im, float m[ ][ 2 ], int nw, int nh, int option ) { int subp = option & FLIMAGE_SUBPIXEL, err = 0, i; int center = ! ( ( option & FLIMAGE_NOCENTER ) == FLIMAGE_NOCENTER ); int neww, newh, shift[ 2 ]; unsigned short **us = NULL; unsigned char **r = NULL, **g = NULL, **b = NULL; unsigned int fill; float x[ 4 ], y[ 4 ], xmin, ymin, xmax, ymax, inv[ 2 ][ 2 ]; double det; if ( ! im || im->w <= 0 ) return -1; /* first check if the inverse of the warping matrix exists */ det = m[ 0 ][ 0 ] * m[ 1 ][ 1 ] - m[ 1 ][ 0 ] * m[ 0 ][ 1 ]; if ( FL_abs( det ) < 1.0e-6 ) { flimage_error( im, "Bad warp matrix" ); return -1; } inv[ 0 ][ 0 ] = m[ 1 ][ 1 ] / det; inv[ 1 ][ 0 ] = -m[ 1 ][ 0 ] / det; inv[ 0 ][ 1 ] = -m[ 0 ][ 1 ] / det; inv[ 1 ][ 1 ] = m[ 0 ][ 0 ] / det; if ( subp ) { if ( im->type == FL_IMAGE_CI ) flimage_convert( im, FL_IMAGE_RGB, 0 ); else if ( im->type == FL_IMAGE_MONO ) flimage_convert( im, FL_IMAGE_GRAY, 0 ); } fill = im->fill_color; /* figure out the shifts by getting the extremas at (0,0), (w,0), (w,h), (0.h) */ xmin = xmax = ymin = ymax = x[ 0 ] = y[ 0 ] = 0.0; x[ 1 ] = m[ 0 ][ 0 ] * im->w; y[ 1 ] = m[ 1 ][ 0 ] * im->w; x[ 2 ] = m[ 0 ][ 0 ] * im->w + m[ 0 ][ 1 ] * im->h; y[ 2 ] = m[ 1 ][ 0 ] * im->w + m[ 1 ][ 1 ] * im->h; x[ 3 ] = m[ 0 ][ 1 ] * im->h; y[ 3 ] = m[ 1 ][ 1 ] * im->h; for ( i = 1; i < 4; i++ ) { if ( xmin > x[ i ] ) xmin = x[ i ]; if ( xmax < x[ i ] ) xmax = x[ i ]; if ( ymin > y[ i ] ) ymin = y[ i ]; if ( ymax < y[ i ] ) ymax = y[ i ]; } shift[ 0 ] = -( int ) FL_nint( xmin ); shift[ 1 ] = -( int ) FL_nint( ymin ); neww = xmax - xmin + 0.5; newh = ymax - ymin + 0.5; if ( ! nw || ! nh ) { nw = neww; nh = newh; } if ( center ) { shift[ 0 ] += ( nw - neww ) / 2; shift[ 1 ] += ( nh - newh ) / 2; } flimage_invalidate_pixels( im ); /* try get memory */ if ( FL_IsCI( im->type ) || FL_IsGray( im->type ) ) { err = ! ( us = fl_get_matrix( nh, nw, sizeof **us ) ); } else { flimage_free_ci( im ); flimage_free_gray( im ); err = ! ( r = fl_get_matrix( nh, nw, sizeof **r ) ); err = err || ! ( g = fl_get_matrix( nh, nw, sizeof **g ) ); err = err || ! ( b = fl_get_matrix( nh, nw, sizeof **b ) ); } if ( err ) { im->error_message( im, "Transform: can't get memory" ); fl_free_matrix( us ); fl_free_matrix( r ); fl_free_matrix( g ); fl_free_matrix( b ); return -1; } /* now do the transform */ im->completed = 1; im->visual_cue( im, "Transforming" ); if ( FL_IsGray( im->type ) ) { fill = FL_RGB2GRAY( FL_GETR( fill ), FL_GETG( fill ), FL_GETB( fill ) ); if ( ! ( err = transform_short( im->gray, us, im->w, im->h, nw, nh, inv, shift, fill, subp, im) < 0 ) ) flimage_replace_image( im, nw, nh, us, 0, 0 ); } else if ( FL_IsCI( im->type ) ) { fill = flimage_get_closest_color_from_map( im, fill ); if (!(err = transform_short( im->ci, us, im->w, im->h, nw, nh, inv, shift, fill, 0, im ) < 0 ) ) flimage_replace_image( im, nw, nh, us, 0, 0 ); } else if ( im->type == FL_IMAGE_RGB ) { if ( ! ( err = transform_rgb( im->red, im->green, im->blue, r, g, b, im->w, im->h, nw, nh, inv, shift, fill, subp, im ) < 0 ) ) flimage_replace_image( im, nw, nh, r, g, b ); } else { M_err( "Transform", "InternalError. Bad type" ); return -1; } if ( err ) { im->error_message( im, "Transform failed" ); return -1; } else { im->completed = im->total; im->visual_cue( im, "Warp done" ); } return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_io_filter.c0000644000175000017500000001622511247055071016602 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 T.C. Zhao * All rights reserved. * * Use one of the builtin image reader and an external filter to * add new supported format. * * TODO: add signal handling to make sure the temp files are deleted. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include "private/flsnprintf.h" #include #include #include #include #ifdef FL_WIN32 #include #include #include #endif /*************************************** ***************************************/ static char * get_tmpf( char * obuf ) { static int k, seq; static char buf[ 15 ][ 256 ]; int fd = -1, tries = 0; char *name; k = ( k + 1 ) % 15; name = obuf ? obuf : buf[ k ]; do { if ( ( fd = mkstemp( name ) ) >= 0 ) /* empty */ ; else { fl_snprintf( buf[ k ], sizeof buf[ k ], "%s/.FL%03d_%d.tmp", "/tmp", seq++, ( int ) getpid( ) ); name = buf[ k ]; /* create the file now in exclusive mode (for security) */ fd = open( name, O_RDWR | O_CREAT | O_EXCL, S_IREAD | S_IWRITE ); } tries++; } while ( fd < 0 && tries < 30 ); if ( fd >= 0 ) { close( fd ); return name; } return 0; } /*************************************** ***************************************/ int flimage_description_via_filter( FL_IMAGE * im, char * const * cmds, const char * what, int verbose ) { char cmd[ 1024 ], *tmpf; char * const *q = cmds; int status = 0, n; if ( ! ( tmpf = get_tmpf( 0 ) ) ) { im->error_message( im, "can't get tmpfile!" ); return -1; } do { fl_snprintf( cmd, sizeof cmd - 12, *q, im->infile, tmpf ); if ( verbose ) fprintf( stderr, "executing %s\n", cmd ); else strcat( cmd, " 2>/dev/null" ); status = system( cmd ); } while ( status && *++q ); if ( status ) { M_err( "", "%s failed", cmd ); return -1; } /* first check if the converted image is something we can handle */ if ( ! ( n = flimage_is_supported( tmpf ) ) ) { im->error_message( im, "unknown filtered output" ); remove( tmpf ); return -1; } im->visual_cue( im, what ); /* now we're really ok */ fclose( im->fpin ); im->fpin = fopen( tmpf, "rb" ); strcpy( cmd, im->infile ); strcpy( im->infile, tmpf ); /* if verbose, delay the file deletion in case we want to look at it */ --n; if ( verbose ) fprintf( stderr, " reading %s via %s\n", ( ( FLIMAGE_IO * ) im->image_io )->short_name, flimage_io[ n ].short_name ); if ( strcmp( im->fmt_name, "gzip" ) == 0 ) im->fmt_name = flimage_io[ n ].short_name; im->image_io = flimage_io + n; im->type = flimage_io[ n ].type; flimage_io[ n ].identify( im->fpin ); /* advance file position */ status = flimage_io[ n ].read_description( im ); remove( tmpf ); strcpy( im->infile, cmd ); return status; } /********************************************************************** * write via external filters **********************************************************************/ /* Given several formats, say ppm, pgm, and pbm, check if the image * type is the same as one of the requested. If yes, return the IO struct * else return the first match. Therefore, * caller should place the formats in decreasing order of generality, * i.e., ppm, pgm, pbm, never pbm, pgm, ppm. */ static FLIMAGE_IO * best_format( FL_IMAGE * im, char * const formats[ ] ) { FLIMAGE_IO *io = flimage_io; char *const *fmts = formats; FLIMAGE_IO *first = 0, *best_sofar = 0; int found; for ( ; *fmts; fmts++ ) { for ( io = flimage_io, found = 0; ! found && io->formal_name; io++ ) found = strcasecmp( io->formal_name, *fmts ) == 0 || strcasecmp( io->short_name, *fmts ) == 0; if ( found ) { io--; best_sofar = ( im->type & io->type ) ? io : 0; if ( ! first ) first = best_sofar; } else fprintf( stderr, "bad format name: %s\n", *fmts ); } return best_sofar ? best_sofar : first; } /*************************************** ***************************************/ int flimage_write_via_filter( FL_IMAGE * im, char * const * cmds, /* shell commands */ char *const formats[ ], /* formats */ int verbose ) { char *tmpf; char ofile[ 256 ], cmd[ 1024 ]; char * const *shellcmd; FLIMAGE_IO *io; int err, status; /* check if we can handle the type */ if ( ! ( io = best_format( im, formats ) ) ) { fprintf( stderr, "can't find format handler\n" ); return -1; } if ( ! ( io->type & im->type ) ) flimage_convert( im, io->type, 256 ); tmpf = get_tmpf( 0 ); strcpy( ofile, im->outfile ); strcpy( im->outfile, tmpf ); if ( ! ( im->fpout = fopen( im->outfile, "wb" ) ) ) { fprintf( stderr, "can't open %s\n", tmpf ); remove( tmpf ); return -1; } /* skip the pre_write step */ err = io->write_image( im ) < 0; fclose( im->fpout ); if ( verbose ) fprintf( stderr, "Done writing %s (%s) \n", im->outfile, io->short_name ); /* now we have the intermediate image ready, generate the shell cmd */ for ( shellcmd = cmds, status = ! err; status && *shellcmd; shellcmd++ ) { fl_snprintf( cmd, sizeof cmd, *shellcmd, tmpf, ofile ); if ( ! verbose ) strcat( cmd, " 2>/dev/null" ); else fprintf( stderr, "executing %s\n", cmd ); status = system( cmd ); } remove( tmpf ); strcpy( im->outfile, ofile ); if ( status ) fprintf( stderr, "%s failed\n", cmd ); return status ? -1 : 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_proc.c0000644000175000017500000003061711247055071015572 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. * * simple image processing routines */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /******************************************************************** * general pixel transformation ********************************************************************/ int flimage_transform_pixels( FL_IMAGE * im, int * red, int * green, int * blue ) { int i, j; FL_PCTYPE *r, *g, *b; SubImage *sub; if ( ! im || im->w <= 0 ) return -1; flimage_convert( im, FL_IMAGE_RGB, 0 ); flimage_invalidate_pixels( im ); if ( ! ( sub = flimage_get_subimage( im, 1 ) ) ) return -1; im->total = sub->h; im->visual_cue( im,"Transforming" ); for ( i = 0; i < sub->h; i++ ) { r = ( ( FL_PCTYPE ** ) sub->mat[ 0 ] )[ i ]; g = ( ( FL_PCTYPE ** ) sub->mat[ 1 ] )[ i ]; b = ( ( FL_PCTYPE ** ) sub->mat[ 2 ] )[ i ]; if ( ! ( i & FLIMAGE_REPFREQ ) ) { im->completed = i; im->visual_cue( im,"Transforming" ); } for ( j = 0; j < sub->w; j++ ) { r[ j ] = red[ r[ j ] ]; g[ j ] = green[ g[ j ] ]; b[ j ] = blue[ b[ j ] ]; } } im->completed = sub->h; im->visual_cue( im,"Transforming" ); if ( im->subw ) { fl_free_matrix( sub->mat[ 0 ] ); fl_free_matrix( sub->mat[ 1 ] ); fl_free_matrix( sub->mat[ 2 ] ); } im->modified = 1; return 0; } /******************************************************************** * tint. ******************************************************************{*/ int flimage_tint( FL_IMAGE * im, unsigned int packed, double opacity ) { float r = FL_GETR( packed ) * opacity + 0.001; float g = FL_GETG( packed ) * opacity + 0.001; float b = FL_GETB( packed ) * opacity + 0.001; float trans = 1 - opacity, tmp; int i; if ( ! im || im->w <= 0 ) return -1; if ( flimage_get_linearlut( im ) < 0 ) return -1; for ( i = 0; i < im->map_len; i++ ) { tmp = i * trans; im->llut[ 0 ][ i ] = tmp + r; im->llut[ 1 ][ i ] = tmp + g; im->llut[ 2 ][ i ] = tmp + b; } return flimage_transform_pixels( im, im->llut[ 0 ], im->llut[ 1 ], im->llut[ 2 ]); } /* get a subimage of the image. if parameter make is true, we fake a matrix so processing is done in place */ #define MAX_RETBUF 6 /* hack to be limited re-entrent */ SubImage * flimage_get_subimage( FL_IMAGE * im, int make ) { static SubImage subimage[ MAX_RETBUF ]; static int buf; int err; SubImage *sub = subimage + buf; void * ( * submat )( void *, int, int, int, int, int, int, unsigned int ); submat = make ? fl_make_submatrix : fl_get_submatrix; im->subx = FL_clamp( im->subx, 0, im->w - 1 ); im->suby = FL_clamp( im->suby, 0, im->h - 1 ); sub->comp = FL_IsGray( im->type) ? 1 : 3; sub->mat[ 0 ] = sub->mat[ 1 ] = sub->mat[ 2 ] = NULL; if ( im->subw < 0 || im->subh < 0 ) im->subw = im->subh = 0; if ( im->subx + im->subw > im->w ) im->subw = im->subh = 0; if ( im->suby + im->subh > im->h ) im->subw = im->subh = 0; if ( im->subw == 0 ) { sub->w = im->w; sub->h = im->h; if ( sub->comp == 1 ) sub->mat[ 0 ] = im->gray; else { sub->mat[ 0 ] = im->red; sub->mat[ 1 ] = im->green; sub->mat[ 2 ] = im->blue; } } else { sub->w = im->subw; sub->h = im->subh; if ( sub->comp == 3 ) { err = ! ( sub->mat[ 0 ] = submat( im->red, im->h, im->w, im->suby, im->subx, im->subh, im->subw, sizeof **im->red ) ); err = err || ! ( sub->mat[ 1 ] = submat( im->green, im->h, im->w, im->suby, im->subx, im->subh, im->subw, sizeof **im->red ) ); err = err || ! ( sub->mat[ 2 ] = submat( im->blue, im->h, im->w, im->suby, im->subx, im->subh, im->subw, sizeof **im->blue ) ); } else err = ! ( sub->mat[ 0 ] = submat( im->gray, im->h, im->w, im->suby, im->subx, im->subh, im->subw, sizeof **im->gray ) ); if ( err ) { im->error_message( im, "Failed to get working memory" ); fl_free_matrix( sub->mat[ 0 ]); fl_free_matrix( sub->mat[ 1 ]); fl_free_matrix( sub->mat[ 2 ] ); return NULL; } } buf = ( buf + 1 ) % MAX_RETBUF; return sub; } /********************************************************************** * Simple matrix operations **********************************************************************/ /* grab a piece of a matrix without copying */ void * fl_make_submatrix( void * in, int rows, int cols, int r1, int c1, int rs, int cs, unsigned int esize ) { int i; unsigned int offset = c1 * esize; char **subm; char **mat = in; if (r1 < 0 || c1 < 0 || (r1 + rs - 1) >= rows || (c1 + cs - 1) >= cols) { M_err("MakeSubMatrix", "Bad arguments"); return 0; } if ( mat[ -1 ] != ( char * ) FL_GET_MATRIX && mat[ -1 ] != ( char * ) FL_MAKE_MATRIX ) { M_err( "MakeSubMatrix", "input is not a matrix" ); return NULL; } subm = fl_malloc( ( rs + 1 ) * sizeof(void *)); subm[ 0 ] = ( char * ) FL_MAKE_MATRIX; for ( i = 1; i <= rs; i++ ) subm[ i ] = mat[ r1 + i - 1 ] + offset; return subm + 1; } /* grab a piece of a matrix */ void * fl_get_submatrix( void * in, int rows, int cols, int r1, int c1, int rs, int cs, unsigned int esize ) { int i; unsigned int offset = c1 * esize, size = cs * esize; char **subm; char **mat = in; if ( r1 < 0 || c1 < 0 || r1 + rs - 1 >= rows || c1 + cs - 1 >= cols ) { M_err("GetSubMatrix", "Bad arguments"); return 0; } if ( mat[ -1 ] != ( char * ) FL_GET_MATRIX && mat[ -1 ] != ( char * ) FL_MAKE_MATRIX ) { M_err( "GetSubMatrix", "input is not a matrix" ); return NULL; } subm = fl_get_matrix( rows, cols, esize ); for ( i = 0; i < rs; i++ ) memcpy( subm[ i ], mat[ r1 + i ] + offset, size ); return subm; } /*********************************************************************** * Histogram equalization ***********************************************************************/ static int get_histogram(FL_IMAGE * im) { unsigned int *rhist, *ghist, *bhist, *grhist; unsigned int size = ( FL_PCMAX + 3 ) * sizeof **im->hist; int g, n; if ( ! im->hist[ 0 ] ) { im->hist[ 0 ] = fl_malloc( size ); im->hist[ 1 ] = fl_malloc( size ); im->hist[ 2 ] = fl_malloc( size ); im->hist[ 3 ] = fl_malloc( size ); } memset( rhist = im->hist[ 0 ], 0, size ); memset( ghist = im->hist[ 1 ], 0, size ); memset( bhist = im->hist[ 2 ], 0, size ); memset( grhist = im->hist[ 3 ], 0, size ); if ( im->type == FL_IMAGE_RGB ) for ( n = im->w * im->h; --n >= 0; ) { if ( ++rhist[ im->red[ 0 ][ n ] ] == 0 ) rhist[ im->red[ 0 ][ n ] ]--; if ( ++ghist[ im->green[ 0 ][ n ] ] == 0 ) ghist[ im->green[ 0 ][ n ] ]--; if ( ++bhist[ im->blue[ 0 ][ n ] ] == 0 ) bhist[ im->blue[ 0 ][ n ] ]--; g = FL_RGB2GRAY( im->red[ 0 ][ n ], im->green[ 0 ][ n ], im->blue[ 0 ][ n ] ); if ( ++grhist[ g ] == 0 ) grhist[ g ]--; } else if ( im->type == FL_IMAGE_GRAY ) for ( n = im->w * im->h; --n >= 0; ) { if ( ++grhist[ im->gray[ 0 ][ n ] ] == 0 ) grhist[ im->gray[ 0 ][ n ] ]--; } else if ( im->type == FL_IMAGE_CI ) { unsigned short *ci = im->ci[ 0 ]; for ( ci = im->ci[ 0 ] + im->w * im->h; --ci >= im->ci[ 0 ]; ) { if ( ++rhist[ im->red_lut[ *ci ] ] ) rhist[ im->red_lut[ *ci ] ]--; if ( ++ghist[ im->green_lut[ *ci ] ] ) ghist[ im->green_lut[ *ci ] ]--; if ( ++bhist[ im->blue_lut[ *ci ] ] ) bhist[ im->blue_lut[ *ci ] ]--; g = FL_RGB2GRAY( im->red_lut[ *ci ], im->green_lut[ *ci ], im->blue_lut[ *ci ] ); if ( ++grhist[ g ] == 0 ) grhist[ g ]--; } } else { im->error_message( im, "histogram: unhandled" ); return -1; } return 0; } int flimage_enhance( FL_IMAGE * im, int delta FL_UNUSED_ARG ) { long sum[ FL_PCMAX + 2 ]; int i, n; if (im->type == FL_IMAGE_CI) flimage_convert(im, FL_IMAGE_RGB, 0); else if (im->type == FL_IMAGE_MONO) flimage_convert(im, FL_IMAGE_GRAY, 0); get_histogram( im ); memset( sum, 0, sizeof sum ); sum[ 0 ] = im->hist[ 3 ][ 0 ]; for ( i = 1; i <= FL_PCMAX; i++ ) sum[ i ] = sum[ i - 1 ] + im->hist[ 3 ][ i ]; for ( i = 0; i <= FL_PCMAX; i++ ) sum[ i ] *= ( FL_PCMAX - 0.999f ) / ( im->w * im->h ); if (im->type == FL_IMAGE_RGB) for (n = im->w * im->h; --n >= 0;) { im->red[0][n] = sum[im->red[0][n]]; im->green[0][n] = sum[im->green[0][n]]; im->blue[0][n] = sum[im->blue[0][n]]; } else if (im->type == FL_IMAGE_GRAY) for (n = im->w * im->h; --n >= 0;) im->gray[0][n] = sum[im->gray[0][n]]; else fprintf(stderr, "image_enhance: unhandled"); im->modified = 1; return 0; } int flimage_get_closest_color_from_map( FL_IMAGE * im, unsigned int col ) { int r = FL_GETR( col ), g = FL_GETG( col ), b = FL_GETB( col ); int mindiff = 0x7fffffff, diff; int dr, dg, db, k, i; for ( k = i = 0; i < im->map_len; i++ ) { dr = r - im->red_lut[ i ]; dg = g - im->green_lut[ i ]; db = b - im->blue_lut[ i ]; diff = 3 * dr * dr + 4 * dg * dg + 2 * db * db; if (mindiff > diff) { mindiff = diff; k = i; } } return k; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_png.c0000644000175000017500000000507711247055071015415 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. * * TODO: png should be implemented in real code */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*************************************** ***************************************/ static int PNG_identify( FILE * fp ) { char buf[ 9 ]; static unsigned char sig[ 9 ] = { 137, 80, 78, 71, 13, 10, 26, 10 }; if ( fread( buf, 1, 8, fp ) != 8 ) return 0; return strncmp( ( char * ) sig, buf, 8 ) == 0; } /*************************************** ***************************************/ static int PNG_description( FL_IMAGE * im ) { int status; static char *cmds[] = { "pngtopnm %s > %s", NULL }; status = flimage_description_via_filter( im, cmds, "reading png ...", 1 ); return status; } /*************************************** ***************************************/ static int PNG_load( FL_IMAGE * im FL_UNUSED_ARG ) { fprintf( stderr, "should never been here\n" ); return -1; } /*************************************** ***************************************/ static int PNG_dump( FL_IMAGE * im ) { char *cmds[ ] = { "pnmtopng %s > %s", NULL }; char *formats[ ] = { "ppm", "pgm", "pbm", NULL }; return flimage_write_via_filter( im, cmds, formats, 1 ); } /*************************************** ***************************************/ void flimage_enable_png( void ) { flimage_add_format( "Portable Network Graphics", "png", "png", FL_IMAGE_RGB | FL_IMAGE_GRAY, PNG_identify, PNG_description, PNG_load, PNG_dump); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/Makefile.am0000644000175000017500000000171311236627742015360 0ustar jensjensinclude $(top_srcdir)/config/common.am # forms.h is a generated file INCLUDES = -DMAKING_FORMS -I../lib -I$(top_srcdir)/lib $(X_CFLAGS) include_HEADERS = flimage.h lib_LTLIBRARIES = libflimage.la libflimage_la_LDFLAGS = -no-undefined -Wl,--no-undefined -version-info @SO_VERSION@ libflimage_la_LIBADD = ../lib/libforms.la $(JPEG_LIB) $(X_LIBS) -lX11 libflimage_la_SOURCES = \ flimage.h \ flimage_int.h \ image.c \ image_bmp.c \ image_combine.c \ image_convolve.c \ image_crop.c \ image_disp.c \ image_fits.c \ image_genesis.c \ image_gif.c \ image_gzip.c \ image_io_filter.c \ image_jpeg.c \ image_jquant.c \ image_marker.c \ image_png.c \ image_pnm.c \ image_postscript.c \ image_proc.c \ image_replace.c \ image_rotate.c \ image_scale.c \ image_sgi.c \ image_text.c \ image_tiff.c \ image_type.c \ image_warp.c \ image_xbm.c \ image_xpm.c \ image_xwd.c \ postscript.c \ ps_core.c \ ps_draw.c \ ps_text.c \ rgb_db.c \ matrix.c xforms-1.0.93sp1/image/rgb_db.c0000644000175000017500000000461711247055071014705 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1997-2002 T.C. Zhao * All rights reserved. * * search the rgb.txt database for a specific color */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" /*************************************** * This function is retained for compatibility reasons only. * It returns 1 always. ***************************************/ int fl_init_RGBdatabase( const char * f FL_UNUSED_ARG ) { return 1; } /*************************************** * A new implementation from Rouben Rostamian * Changed to make it work with machines that a color depth of 32 bit * but only 24 planes. It's a bit slow because each time the two colors * are queried but I did have any better idea at the moment how to figure * out how many bits the red, green and blue members of the XColor * structure have in every possible case and this looked like the * safest method... JTT ***************************************/ int fl_lookup_RGBcolor( const char * colname, int * r, int * g, int * b ) { XColor xc; XColor w; if ( XParseColor( fl_display, fl_state[ fl_vmode ].colormap, "rgb:ffff/ffff/ffff", &w ) == 0 || XParseColor( fl_display, fl_state[ fl_vmode ].colormap, colname, &xc ) == 0 ) return -1; *r = ( ( xc.red << 8 ) - 1 ) / w.red; *g = ( ( xc.green << 8 ) - 1 ) / w.green; *b = ( ( xc.blue << 8 ) - 1 ) / w.blue; return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_text.c0000644000175000017500000001104011247055071015600 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * Handling image annotation (text) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "flimage.h" #include "flimage_int.h" #include static void display_text( FL_IMAGE * im ); /*************************************** ***************************************/ int flimage_add_text( FL_IMAGE * im, const char * str, int len, int style, int size, unsigned int tcol, unsigned int bcol, int tran, double tx, double ty, int rot ) { FLIMAGE_TEXT *text; if ( ! str || ! *str || ! len || ! size || ! im ) return -1; im->text = fl_realloc( im->text, ( im->ntext + 1 ) * sizeof *im->text ); if ( ! im->text ) { flimage_error( im, "AddText: malloc failed" ); return -1; } text = im->text + im->ntext; memset( text, 0, sizeof *text ); text->str = fl_strdup( str ); text->len = len; text->angle = rot; text->size = size; text->style = style; text->color = tcol; text->bcolor = bcol; text->nobk = tran; text->x = im->xdist_offset + tx * im->xdist_scale; text->y = im->ydist_offset + ty * im->ydist_scale; im->free_text = flimage_delete_all_text; im->display_text = display_text; return ++im->ntext; } /*************************************** ***************************************/ int flimage_add_text_struct( FL_IMAGE * im, const FLIMAGE_TEXT * txt ) { FLIMAGE_TEXT *text; if ( ! txt || ! im || ! txt->str ) return -1; if ( txt->len <= 0 ) { flimage_error( im, "AddTextStruct: bad text length (%d)", txt->len ); return -1; } im->text = fl_realloc( im->text, ( im->ntext + 1 ) * sizeof *im->text ); if ( ! im->text) return -1; text = im->text + im->ntext; memcpy( text, txt, sizeof *text ); text->str = fl_malloc( txt->len + 1 ); memcpy( text->str, txt->str, txt->len ); text->str[ txt->len ] = '\0'; im->free_text = flimage_delete_all_text; im->display_text = display_text; return ++im->ntext; } /*************************************** ***************************************/ void flimage_delete_all_text( FL_IMAGE * im ) { int i; if ( ! im || ! im->ntext || ! im->text ) return; for ( i = 0; i < im->ntext; i++ ) fl_free( im->text[ i ].str ); fl_free( im->text ); im->ntext = 0; im->text = 0; } /*************************************** ***************************************/ static void display_text( FL_IMAGE * im ) { FLIMAGE_TEXT *t, *tend; FLI_TARGET target; if ( im->dont_display_text || im->ntext == 0 ) return; if ( ! im->textgc ) im->textgc = XCreateGC( im->xdisplay, im->win, 0, 0 ); memcpy( &target, fli_internal_init( ), sizeof target ); target.display = im->xdisplay; target.win = im->win; target.isRGBColor = 1; target.textgc = im->textgc; target.gc = im->gc; fli_switch_target( &target ); for ( t = im->text, tend = t + im->ntext; t < tend; t++ ) fli_draw_text_inside (t->align, t->x + im->wxd - im->sxd -1, t->y + im->wyd - im->syd -1, 2, 2, t->str, t->style, t->size, t->color, t->bcolor, ! t->nobk ); fli_restore_target( ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/flimage.h0000644000175000017500000006503511370060136015073 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /* Image related routines */ #ifndef FL_IMAGE_H #define FL_IMAGE_H #if defined(__cplusplus) extern "C" { #endif #ifndef FL_EXPORT #define FL_EXPORT extern #endif #define fl_safe_free( p ) do { \ if ( p ) \ { \ fl_free( p ); \ p = NULL; \ } \ } while( 0 ) #define FL_RGB2GRAY( r, g, b ) \ ( ( unsigned int )( ( 78 * ( r ) + 150 * ( g ) + 28 * ( b ) ) >> 8 ) ) enum { FL_IMAGE_NONE, FL_IMAGE_MONO = 1, /* b&w. 1bit. 0=white 1=black */ FL_IMAGE_GRAY = 2, /* 8 bit gray image */ FL_IMAGE_CI = 4, /* colormmaped image */ FL_IMAGE_RGB = 8, /* RGBA image. 8bit each */ FL_IMAGE_PACKED = 16, /* RGBA packed into an int */ FL_IMAGE_GRAY16 = 32, /* 12bit gray scale image */ FL_IMAGE_RGB16 = 64, /* 36bits color image */ FL_IMAGE_FLEX = 1023, /* all formats */ /* aliases */ FLIMAGE_NONE = FL_IMAGE_NONE, FLIMAGE_MONO = FL_IMAGE_MONO, FLIMAGE_GRAY = FL_IMAGE_GRAY, FLIMAGE_CI = FL_IMAGE_CI, FLIMAGE_RGB = FL_IMAGE_RGB, FLIMAGE_PACKED = FL_IMAGE_PACKED, FLIMAGE_GRAY16 = FL_IMAGE_GRAY16, FLIMAGE_RGB16 = FL_IMAGE_RGB16, FLIMAGE_FLEX = FL_IMAGE_FLEX }; #ifndef FL_PCBITS typedef unsigned char FL_PCTYPE; /* primary color type */ #define FL_PCBITS 8 /* primary color bits */ #define FL_PCMAX ( ( 1 << FL_PCBITS ) - 1 ) #define FL_PCCLAMP( a ) ( ( a ) > ( FL_PCMAX ) ? \ ( FL_PCMAX ) : ( ( a ) < 0 ? 0 : ( a ) ) ) typedef unsigned int FL_PACKED4; #define FL_PACKED FL_PACKED4 #define FL_RMASK 0x000000ff #define FL_RSHIFT 0 #define FL_GMASK 0x0000ff00 #define FL_GSHIFT 8 #define FL_BMASK 0x00ff0000 #define FL_BSHIFT 16 #define FL_AMASK 0xff000000 #define FL_ASHIFT 24 /* If PCBITS is not 8, we need to apply the RGBmask */ #define FL_GETR( packed ) ( ( packed ) & FL_RMASK ) #define FL_GETG( packed ) ( ( ( packed ) >> FL_GSHIFT ) & FL_PCMAX ) #define FL_GETB( packed ) ( ( ( packed ) >> FL_BSHIFT ) & FL_PCMAX ) #define FL_GETA( packed ) ( ( ( packed ) >> FL_ASHIFT ) & FL_PCMAX ) #define FL_PACK3( r, g, b ) \ ( ( ( r ) << FL_RSHIFT ) | ( ( g ) << FL_GSHIFT ) | ( ( b ) << FL_BSHIFT ) ) #define FL_PACK FL_PACK3 #define FL_PACK4( r, g, b, a) \ ( FL_PACK3( r, g, b ) | ( ( a ) << FL_ASHIFT ) ) #define FL_UNPACK( p, r, g, b ) \ do { r = FL_GETR( p ); \ g = FL_GETG( p ); \ b = FL_GETB( p ); \ } while ( 0 ) #define FL_UNPACK3 FL_UNPACK #define FL_UNPACK4( p, r, g, b, a ) \ do { FL_UNPACK3( p, r, g, b ); \ a = FL_GETA( p ); \ } while ( 0 ) #endif #define FL_LUTBITS 12 /* max colormap bits. 4096 entries */ #define FL_IsRGB( im ) ( ( im )->type == FL_IMAGE_RGB ) #define FL_IsPacked( im ) ( ( im )->type == FL_IMAGE_PACKED ) enum { FLIMAGE_AUTOCOLOR = 0x7fffffff, FLIMAGE_BADCOLOR = FLIMAGE_AUTOCOLOR }; typedef Window FL_WINDOW; /* unsigned long */ typedef struct flimage_text_ { char * str; /* the string itself */ int len; /* string length */ int x, /* starting location of text (wrt image) */ y; unsigned int color; /* color of the text */ unsigned int bcolor; /* background color of the text */ int nobk; /* no background */ int size, /* font size & style */ style; int angle; /* in 1/10th of a degrees */ int align; /* alignment wrt to (x,y) */ } FLIMAGE_TEXT; typedef struct flimage_marker_ { const char * name; /* marker name */ int w, /* size */ h ; int x, /* location */ y; unsigned int color; /* color of the marker */ unsigned int bcolor; /* aux. color of the marker */ int angle; /* in 1/10th of a degree */ int fill; int thickness; /* line thickness */ int style; /* line style */ /* the following is filled by the library */ void * display; void * gc; FL_WINDOW win; const char * psdraw; } FLIMAGE_MARKER; #define FLIMAGE_REPFREQ 0x1f /* report every 32 lines */ #ifndef FL_RGB2PIXEL typedef struct { unsigned int rshift, rmask, rbits; unsigned int gshift, gmask, gbits; unsigned int bshift, bmask, bbits; int bits_per_rgb; int colormap_size; } FL_RGB2PIXEL_; #define FL_RGB2PIXEL FL_RGB2PIXEL_ #endif typedef struct flimage_setup_ *FLIMAGESETUP; typedef struct flimage_ { int type; /* image type */ int w, h; /* image size */ void * app_data; /* for application at setup time */ void * u_vdata; /* for application */ long u_ldata; /* for application */ unsigned char ** red; unsigned char ** green; unsigned char ** blue; unsigned char ** alpha; unsigned char ** rgba[ 4 ]; /* alias */ unsigned short ** ci; unsigned short ** gray; FL_PACKED4 ** packed; unsigned short ** red16; /* not currently supported */ unsigned short ** green16; /* not currently supported */ unsigned short ** blue16; /* not currently supported */ unsigned short ** alpha16; /* not currently supported */ unsigned char ** ci8; /* not currently supported */ int * red_lut; /* red lookup tables */ int * green_lut; /* green lookup tables */ int * blue_lut; /* blue lookup tables */ int * alpha_lut; /* alpha lookup tables */ int * lut[ 4 ]; /* alias */ int map_len; /* lut length */ int colors; /* actual colors used in displaying */ int gray_maxval; /* indicate the range of gray16 */ int ci_maxval; /* max value of ci. not used, use map_len */ int rgb_maxval; /* max value for rgb16 image */ int level, wwidth; unsigned short * wlut; /* lut for window levelling */ int wlut_len; int app_background; /* transparent color: in RGB */ char * comments; int comments_len; int available_type; struct flimage_ * next; int sx, /* display subimage origin */ sy; int sw, /* display subimage width */ sh; int wx, /* display location relative to win */ wy; int modified; int ( * display )( struct flimage_ *, FL_WINDOW ); int double_buffer; int sxd, syd, swd, shd; int wxd, wyd; const char * fmt_name; /* format name (ppm,jpg etc) */ /* annotation stuff */ FLIMAGE_TEXT * text; int ntext, max_text; int dont_display_text; void ( * display_text )( struct flimage_ * ); void ( * free_text )( struct flimage_ * ); FLIMAGE_MARKER * marker; int nmarkers, max_markers; int dont_display_marker; void ( * display_markers )( struct flimage_ * ); void ( * free_markers )( struct flimage_ * ); /* physicalValue = poffset + pixelValue * pscale */ double pmin, /* physical data range */ pmax; double poffset; double pscale; /* pixel grid distance */ double xdist_offset; double xdist_scale; double ydist_offset; double ydist_scale; char * infile; char * outfile; long foffset; int original_type; /* hooks for application to have a chance to set some options. if pre_write returns -1, the output will be canceled */ int ( * pre_write )( struct flimage_ * ); int ( * post_write )( struct flimage_ * ); /* image processing stuff */ int subx, /* subimage origin */ suby; int subw, /* subimage size */ subh; int sub_shape; /* shape of the subimage */ unsigned int fill_color; /* fill color */ int force_convert; int * llut[ 3 ]; /* linear lut */ int llut_len; unsigned int * hist[ 4 ]; /* application handlers */ int total, completed; int ( * visual_cue )( struct flimage_*, const char * ); void ( * error_message )( struct flimage_*, const char * ); int error_code; /* not currently used */ int display_type; /* just before handing it to X */ unsigned short ** pixels; void * image_spec; /* additional image info */ void * xdisplay; /* the X connection */ int tran_rgb; /* RGB color that should be transparent */ int tran_index; /* index that should be transparent */ int matr, matc; /* multi-frame images */ int more; int current_frame; int total_frames; int ( * next_frame )( struct flimage_ * ); int ( * prev_frame )( struct flimage_ * ); int ( * random_frame )( struct flimage_ *, int ); int ( * rewind_frame )( struct flimage_ * ); void ( * cleanup )( struct flimage_ * ); int stop_looping; /* the following are for internal use */ FILE * fpin; FILE * fpout; void * image_io; void * io_spec; /* io operation helper */ int spec_size; int depth; /* the depth we actually use */ int vclass; void * visual; unsigned long xcolormap; FL_RGB2PIXEL rgb2p; void * ximage; FL_WINDOW win; void * gc; int sdepth; /* depth the server says */ void * textgc; void * markergc; void * extra_io_info; unsigned long pixmap; int pixmap_w, pixmap_h, pixmap_depth; int isPixmap; FLIMAGESETUP setup; char * info; } FL_IMAGE; /* some configuration stuff */ typedef struct flimage_setup_ { void * app_data; int ( * visual_cue )( FL_IMAGE *, const char *); void ( * error_message )( FL_IMAGE *, const char *); int ( * display )( FL_IMAGE *, unsigned long ); const char * rgbfile; int do_not_clear; void * xdisplay; int max_frames; int delay; int no_auto_extension; int report_frequency; int double_buffer; /* internal use */ unsigned long trailblazer; int header_info; } FLIMAGE_SETUP; FL_EXPORT void flimage_setup( FLIMAGE_SETUP * ); /* Possible errors from the library. Not currently (v0.89) used */ enum { FLIMAGE_ERR_NONE = 0, FLIMAGE_ERR_ALLOC = -50, /* allocation error */ FLIMAGE_ERR_INVALID, /* invalid image */ FLIMAGE_ERR_ARGUMENT, /* bad argument/request */ FLIMAGE_ERR_FILE, /* io error */ FLIMAGE_ERR_INTERNAL, /* bugs */ FLIMAGE_ERR_UNKNOWN }; typedef int ( * FLIMAGE_Identify )( FILE * ); typedef int ( * FLIMAGE_Description )( FL_IMAGE * ); typedef int ( * FLIMAGE_Read_Pixels )( FL_IMAGE * ); typedef int ( * FLIMAGE_Write_Image )( FL_IMAGE * ); /* Basic IO routines */ FL_EXPORT FL_IMAGE * flimage_load( const char * file ); FL_EXPORT FL_IMAGE * flimage_read( FL_IMAGE * im ); FL_EXPORT int flimage_dump( FL_IMAGE *, const char *, const char * ); FL_EXPORT int flimage_close( FL_IMAGE * ); FL_EXPORT FL_IMAGE * flimage_alloc( void ); FL_EXPORT int flimage_getmem( FL_IMAGE * ); FL_EXPORT int flimage_is_supported( const char * ); FL_EXPORT int flimage_description_via_filter( FL_IMAGE *, char *const *, const char *, int ); FL_EXPORT int flimage_write_via_filter( FL_IMAGE *, char * const *, char * const *, int ); FL_EXPORT FL_IMAGE * flimage_alloc( void ); FL_EXPORT void flimage_free( FL_IMAGE * ); FL_EXPORT int flimage_display( FL_IMAGE *, Window ); FL_EXPORT int flimage_sdisplay( FL_IMAGE *, Window ); FL_EXPORT int flimage_convert( FL_IMAGE *, int, int ); FL_EXPORT const char * flimage_type_name( int type ); FL_EXPORT int flimage_add_text( FL_IMAGE *, const char *, int, int, int, unsigned int, unsigned int, int, double, double, int ); FL_EXPORT int flimage_add_text_struct( FL_IMAGE *, const FLIMAGE_TEXT * ); FL_EXPORT void flimage_delete_all_text( FL_IMAGE * ); FL_EXPORT int flimage_add_marker( FL_IMAGE *, const char *, double, double, double, double, int, int, int, unsigned int, unsigned int ); FL_EXPORT int flimage_add_marker_struct( FL_IMAGE *, const FLIMAGE_MARKER * ); FL_EXPORT int flimage_define_marker( const char *, void ( * )( FLIMAGE_MARKER * ), const char * ); FL_EXPORT void flimage_delete_all_markers( FL_IMAGE * ); FL_EXPORT int flimage_render_annotation( FL_IMAGE *, FL_WINDOW ); FL_EXPORT void flimage_error( FL_IMAGE *, const char *, ... ); /* Built-in format supports */ FL_EXPORT void flimage_enable_pnm( void ); FL_EXPORT int flimage_set_fits_bits( int ); /* Output options */ typedef struct { int quality; int smoothing; } FLIMAGE_JPEG_OPTION; FL_EXPORT void flimage_jpeg_output_options( FLIMAGE_JPEG_OPTION * ); FL_EXPORT void flimage_pnm_output_options( int ); FL_EXPORT void flimage_gif_output_options( int ); FL_EXPORT FLPS_CONTROL * flimage_ps_options( void ); #define flimage_jpeg_options flimage_jpeg_output_options #define flimage_pnm_options flimage_pnm_output_options #define flimage_gif_options flimage_gif_output_options enum { FLIMAGE_WRITABLE = FL_WRITE, FLIMAGE_READABLE = FL_READ }; typedef struct { const char * formal_name; const char * short_name; const char * extension; int type; int read_write; int annotation; } FLIMAGE_FORMAT_INFO; FL_EXPORT int flimage_get_number_of_formats( void ); FL_EXPORT const FLIMAGE_FORMAT_INFO * flimage_get_format_info( int ); FL_EXPORT void * fl_get_matrix( int, int, unsigned int ); FL_EXPORT void * fl_make_matrix( int, int, unsigned int, void * ); FL_EXPORT void fl_free_matrix( void * ); /* This function is retained for compatibility reasons only. It returns 1 always. */ FL_EXPORT int fl_init_RGBdatabase( const char * ); FL_EXPORT int fl_lookup_RGBcolor( const char *, int *, int *, int * ); FL_EXPORT int flimage_add_format( const char *, const char *, const char *, int, FLIMAGE_Identify, FLIMAGE_Description, FLIMAGE_Read_Pixels, FLIMAGE_Write_Image ); FL_EXPORT void flimage_set_annotation_support( int, int ); FL_EXPORT int flimage_getcolormap( FL_IMAGE * ); FL_EXPORT void fl_select_mediancut_quantizer( void ); /* Simple image processing routines */ #define FLIMAGE_SHARPEN ( ( int** )( -1 ) ) #define FLIMAGE_SMOOTH ( ( int** )( -2 ) ) #define FL_SMOOTH FLIMAGE_SMOOTH #define FL_SHARPEN FLIMAGE_SHARPEN enum { FLIMAGE_NOSUBPIXEL = 0, /* scale with no subpixel sampling */ FLIMAGE_SUBPIXEL = 1, /* scale with subpixel sampling */ FLIMAGE_CENTER = 2, /* center warped image. default */ FLIMAGE_RIGHT = 8, /* flush right the warped image */ FLIMAGE_ASPECT = 32, /* fit the size */ FLIMAGE_NOCENTER = FL_ALIGN_LEFT_TOP }; FL_EXPORT int flimage_convolve( FL_IMAGE *, int **, int, int ); FL_EXPORT int flimage_convolvea( FL_IMAGE *, int *, int, int ); FL_EXPORT int flimage_tint( FL_IMAGE *, unsigned int, double ); FL_EXPORT int flimage_rotate( FL_IMAGE *, int, int ); FL_EXPORT int flimage_flip( FL_IMAGE *, int ); FL_EXPORT int flimage_scale( FL_IMAGE *, int, int, int ); FL_EXPORT int flimage_warp( FL_IMAGE *, float [ ][ 2 ], int, int, int ); FL_EXPORT int flimage_autocrop( FL_IMAGE *, unsigned int ); FL_EXPORT int flimage_get_autocrop( FL_IMAGE *, unsigned int, int *, int *, int *, int * ); FL_EXPORT int flimage_crop( FL_IMAGE *, int, int, int, int ); FL_EXPORT int flimage_replace_pixel( FL_IMAGE *, unsigned int, unsigned int ); FL_EXPORT int flimage_transform_pixels( FL_IMAGE *, int *, int *, int * ); FL_EXPORT int flimage_windowlevel( FL_IMAGE *, int, int ); FL_EXPORT int flimage_enhance( FL_IMAGE *, int ); FL_EXPORT int flimage_from_pixmap( FL_IMAGE *, Pixmap ); FL_EXPORT Pixmap flimage_to_pixmap( FL_IMAGE *, FL_WINDOW ); FL_EXPORT FL_IMAGE * flimage_dup( FL_IMAGE * ); /* Miscellaneous prototypes */ FL_EXPORT void * fl_get_submatrix( void *, int, int, int, int, int, int, unsigned int ); FL_EXPORT int fl_j2pass_quantize_packed( unsigned int **, int, int, int, unsigned short **, int *, int *, int *, int *, FL_IMAGE * ); FL_EXPORT int fl_j2pass_quantize_rgb( unsigned char **, unsigned char **, unsigned char **, int, int, int, unsigned short **, int *, int *, int *, int *, FL_IMAGE * ); FL_EXPORT void * fl_make_submatrix( void *, int, int, int, int, int, int, unsigned int ); FL_EXPORT int fl_object_ps_dump( FL_OBJECT *, const char * ); FL_EXPORT void fl_pack_bits( unsigned char *, unsigned short *, int ); FL_EXPORT void fl_unpack_bits( unsigned short *, unsigned char *, int ); FL_EXPORT unsigned int fl_value_to_bits( unsigned int ); FL_EXPORT void flimage_add_comments( FL_IMAGE *, const char *, int ); FL_EXPORT unsigned long flimage_color_to_pixel( FL_IMAGE *, int, int, int, int * ); FL_EXPORT FL_IMAGE * flimage_combine( FL_IMAGE *, FL_IMAGE *, double ); FL_EXPORT int flimage_define_marker( const char *, void ( * )( FLIMAGE_MARKER * ), const char * ); FL_EXPORT void flimage_display_markers( FL_IMAGE * ); FL_EXPORT FL_IMAGE *flimage_dup_( FL_IMAGE *, int ); FL_EXPORT void flimage_enable_bmp( void ); FL_EXPORT void flimage_enable_fits( void ); FL_EXPORT void flimage_enable_genesis( void ); FL_EXPORT void flimage_enable_gif( void ); FL_EXPORT void flimage_enable_gzip( void ); FL_EXPORT void flimage_enable_jpeg( void ); FL_EXPORT void flimage_enable_png( void ); FL_EXPORT void flimage_enable_ps( void ); FL_EXPORT void flimage_enable_sgi( void ); FL_EXPORT void flimage_enable_tiff( void ); FL_EXPORT void flimage_enable_xbm( void ); FL_EXPORT void flimage_enable_xpm( void ); FL_EXPORT void flimage_enable_xwd( void ); FL_EXPORT void flimage_free_ci( FL_IMAGE * ); FL_EXPORT void flimage_free_gray( FL_IMAGE * ); FL_EXPORT void flimage_free_linearlut( FL_IMAGE * ); FL_EXPORT void flimage_free_rgb( FL_IMAGE * ); FL_EXPORT void flimage_freemem( FL_IMAGE * ); FL_EXPORT int flimage_get_closest_color_from_map( FL_IMAGE *, unsigned int ); FL_EXPORT int flimage_get_linearlut( FL_IMAGE * ); FL_EXPORT void flimage_invalidate_pixels( FL_IMAGE * ); FL_EXPORT FL_IMAGE *flimage_open( const char * ); FL_EXPORT int flimage_read_annotation( FL_IMAGE * ); FL_EXPORT void flimage_replace_image( FL_IMAGE *, int, int, void *, void *, void * ); FL_EXPORT int flimage_swapbuffer( FL_IMAGE * ); FL_EXPORT int flimage_to_ximage( FL_IMAGE *, FL_WINDOW, XWindowAttributes * ); FL_EXPORT int flimage_write_annotation( FL_IMAGE * ); FL_EXPORT void flps_apply_gamma( float ); FL_EXPORT void flps_arc( int, int, int, int, int, int, FL_COLOR ); FL_EXPORT void flps_circ( int, int, int, int, FL_COLOR ); FL_EXPORT void flps_color( FL_COLOR col ); FL_EXPORT void flps_draw_box( int, int, int, int, int, FL_COLOR, int ); FL_EXPORT void flps_draw_checkbox( int, int, int, int, int, FL_COLOR, int ); FL_EXPORT void flps_draw_frame( int, int, int, int, int, FL_COLOR, int ); FL_EXPORT int flps_draw_symbol( const char *, int, int, int, int, FL_COLOR ); FL_EXPORT void flps_draw_tbox( int, int, int, int, int, FL_COLOR, int ); FL_EXPORT void flps_draw_text( int, int, int, int, int, FL_COLOR, int, int, const char * ); FL_EXPORT void flps_draw_text_beside( int, int, int, int, int, FL_COLOR, int, int, const char * ); FL_EXPORT void flps_emit_header( const char *, int, int, int, int, int ); FL_EXPORT void flps_emit_prolog( void ); FL_EXPORT int flps_get_gray255( FL_COLOR ); FL_EXPORT int flps_get_linestyle( void ); FL_EXPORT int flps_get_linewidth( void ); FL_EXPORT FL_COLOR flps_get_namedcolor( const char * ); FL_EXPORT FLPS_CONTROL * flps_init( void ); FL_EXPORT void flps_invalidate_color_cache( void ); FL_EXPORT void flps_invalidate_font_cache( void ); FL_EXPORT void flps_invalidate_linewidth_cache( void ); FL_EXPORT void flps_invalidate_symbol_cache( void ); FL_EXPORT void flps_line( int, int, int, int, FL_COLOR ); FL_EXPORT void flps_lines( FL_POINT *, int, FL_COLOR ); FL_EXPORT void flps_linestyle( int ); FL_EXPORT void flps_linewidth( int ); FL_EXPORT void flps_log( const char * ); FL_EXPORT void flps_output( const char *, ... ); FL_EXPORT void flps_oval( int, int, int, int, int, FL_COLOR ); FL_EXPORT void flps_pieslice( int, int, int, int, int, int, int, FL_COLOR ); FL_EXPORT void flps_poly( int, FL_POINT *, int, FL_COLOR ); FL_EXPORT void flps_rectangle( int, int, int, int, int, FL_COLOR ); FL_EXPORT void flps_reset_cache( void ); FL_EXPORT void flps_reset_linewidth( void ); FL_EXPORT void flps_restore_flps( void ); FL_EXPORT void flps_rgbcolor( int, int, int ); FL_EXPORT void flps_roundrectangle( int, int, int, int, int, FL_COLOR ); FL_EXPORT void flps_set_clipping( int, int, int, int ); FL_EXPORT void flps_set_font( int, int ); FL_EXPORT void flps_unset_clipping( void ); #ifdef MAKING_FORMS #include "flimage_int.h" #endif #if defined(__cplusplus) } #endif #endif /* ! defined FL_IMAGE_H */ xforms-1.0.93sp1/image/image_convolve.c0000644000175000017500000003046111247055071016457 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 T.C. Zhao * All rights reserved. * * General colvolution routines for RGB and gray (both 8bit and 16bit) * images. 3x3 and 5x5 kernels are manually unrolled. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*********************************************************************** * Convolution *******************************************************************{***/ #define VectorP3( k, b, i ) ( k[ 0 ] * b[ i - 1 ] \ + k[ 1 ] * b[ i ] \ + k[ 2 ] * b[ i + 1 ] ) #define VectorP5( k, b, i ) ( k[ 0 ] * b[ i - 2 ] \ + k[ 1 ] * b[ i - 1 ] \ + k[ 2 ] * b[ i ] \ + k[ 3 ] * b[ i + 1 ] \ + k[ 4 ] * b[ i + 2 ] ) #define conv3x3( cm, m, r, c ) ( VectorP3( cm[ 0 ], m[ r - 1 ], c ) \ + VectorP3( cm[ 1 ], m[ r + 0 ], c ) \ + VectorP3( cm[ 2 ], m[ r + 1 ], c ) ) #define conv5x5( kernel, pc, row, col ) \ ( VectorP5( kernel[ 0 ], pc[ row - 2 ], col ) \ + VectorP5( kernel[ 1 ], pc[ row - 1 ], col ) \ + VectorP5( kernel[ 2 ], pc[ row + 0 ], col ) \ + VectorP5( kernel[ 3 ], pc[ row + 1 ], col ) \ + VectorP5( kernel[ 4 ], pc[ row + 2 ], col ) ) /*************************************** ***************************************/ static int uc_conv5x5( int ** kernel, unsigned char ** pc, int r, int c ) { return conv5x5( kernel, pc, r, c ); } /*************************************** ***************************************/ static int us_conv5x5( int ** kernel, unsigned short ** s, int r, int c ) { return conv5x5( kernel, s, r, c ); } static void init_kernels(void); /* normalize with weight the clamp */ #define NormAndClamp( pc, w, max ) \ do { \ if ( pc < 0 ) \ pc = 0; \ else if ( ( pc /=w ) > ( max ) ) \ pc = ( max ); \ } while ( 0 ) /*************************************** ***************************************/ static void rgb_convolve( unsigned char ** red, unsigned char ** green, unsigned char ** blue, int h, int w, int ** kernel, int krow, int kcol, int weight, FL_IMAGE * im, const char * what ) { int newr, newg, newb, row, col; int k_halfh = krow / 2, k_halfw = kcol / 2; for ( h -= k_halfw, w -= k_halfw, row = 1; row < h; row++ ) { if ( krow == 3 && kcol == 3 ) { for ( col = k_halfw; col < w; col++ ) { newr = conv3x3( kernel, red, row, col ); newg = conv3x3( kernel, green, row, col ); newb = conv3x3( kernel, blue, row, col ); NormAndClamp( newr, weight, FL_PCMAX ); NormAndClamp( newg, weight, FL_PCMAX ); NormAndClamp( newb, weight, FL_PCMAX ); red[ row ][ col ] = newr; green[ row ][ col ] = newg; blue[ row ][ col ] = newb; } } else if ( krow == 5 && kcol == 5 ) { for ( col = k_halfw; col < w; col++ ) { newr = uc_conv5x5( kernel, red, row, col ); newg = uc_conv5x5( kernel, green, row, col ); newb = uc_conv5x5( kernel, blue, row, col ); NormAndClamp( newr, weight, FL_PCMAX ); NormAndClamp( newg, weight, FL_PCMAX ); NormAndClamp( newb, weight, FL_PCMAX ); red[ row ][ col ] = newr; green[ row ][ col ] = newg; blue[ row ][ col ] = newb; } } else { int i, j, ccol, ii, jj; for ( col = k_halfw; col < w; col++ ) { newr = newg = newb = 0; ccol = col - k_halfw; for ( i = 0; i < krow; i++ ) { ii = row - k_halfh + i; for ( jj = ccol, j = 0; j < kcol; jj++, j++ ) { newr += kernel[ i ][ j ] * red[ ii ][ jj ]; newg += kernel[ i ][ j ] * green[ ii ][ jj ]; newb += kernel[ i ][ j ] * blue[ ii ][ jj ]; } } NormAndClamp( newr, weight, FL_PCMAX ); NormAndClamp( newg, weight, FL_PCMAX ); NormAndClamp( newb, weight, FL_PCMAX ); red[ row ][ col ] = newr; green[ row ][ col ] = newg; blue[ row ][ col ] = newg; } } if ( ! ( ++im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, what ); } } /*************************************** ***************************************/ static void gray_convolve( unsigned short ** gray, int h, int w, int ** kernel, int krow, int kcol, int weight, FL_IMAGE * im, const char * what ) { int newr, row, col; int k_halfh = krow / 2, k_halfw = kcol / 2; for ( h -= k_halfw, w -= k_halfw, row = 1; row < h; row++ ) { if ( krow == 3 && kcol == 3 ) { for (col = k_halfw; col < w; col++ ) { newr = conv3x3( kernel, gray, row, col ); NormAndClamp( newr, weight, FL_PCMAX ); gray[ row ][ col ] = newr; } } else if ( krow == 5 && kcol == 5 ) { for ( col = k_halfw; col < w; col++ ) { newr = us_conv5x5( kernel, gray, row, col ); NormAndClamp( newr, weight, im->gray_maxval ); gray[ row ] [col ] = newr; } } else { int i, j, ccol, ii, jj; for ( col = k_halfw; col < w; col++ ) { ccol = col - k_halfw; for ( newr = 0, i = 0; i < krow; i++ ) { ii = row - k_halfh + i; for ( jj = ccol, j = 0; j < kcol; jj++, j++ ) newr += kernel[ i ][ j ] * gray[ ii ][ jj ]; } NormAndClamp( newr, weight, FL_PCMAX ); gray[ row ][ col ] = newr; } } if ( ! ( ++im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, what ); } } static int **sharpen_kernel; static int **smooth_kernel; /*************************************** ***************************************/ int flimage_convolve( FL_IMAGE * im, int ** kernel, int krow, int kcol ) { int weight, i; const char * what = "convolving"; char buf[ 128 ]; SubImage *sub; if ( !im || im->w <= 0 || im->type == FL_IMAGE_NONE ) { M_err( "Convolve", "bad image" ); return -1; } /* check subimage settings */ if ( im->subw ) { if ( im->subw < kcol || im->subh < krow ) { im->error_message( im, "Convolve: subimage size less than kernel" ); return -1; } } if ( ! sharpen_kernel ) init_kernels( ); if ( kernel == FL_SHARPEN ) { kernel = sharpen_kernel; krow = kcol = 3; what = "sharpening"; } else if ( kernel == FL_SMOOTH ) { kernel = smooth_kernel; krow = kcol = 3; what = "smoothing"; } if ( ! ( krow & 1 ) || ! ( kcol & 1 ) ) M_err( "Convolve", "even or zero kernel size (row=%d col=%d)!", krow, kcol ); for ( weight = i = 0; i < kcol * krow; i++ ) weight += kernel[ 0 ][ i ]; if ( weight <= 0 ) { im->error_message( im, "bad kernel weight" ); return -1; } /* always convert to RGB or GRAY */ if ( ! FL_IsGray( im->type ) ) flimage_convert( im, FL_IMAGE_RGB, 0 ); if ( ! ( sub = flimage_get_subimage( im, 1 ) ) ) return -1; im->completed = 0; im->visual_cue( im, what ); if ( FL_IsGray( im->type ) ) gray_convolve( sub->mat[ 0 ], sub->h, sub->w, kernel, krow, kcol, weight, im, what ); else rgb_convolve( sub->mat[ 0 ], sub->mat[ 1 ], sub->mat[ 2 ], sub->h, sub->w, kernel, krow, kcol, weight, im, what ); im->completed = im->total; sprintf( buf, "%s done", what ); im->visual_cue( im, buf ); if (im->subw) { fl_free_matrix( sub->mat[ 0 ] ); fl_free_matrix( sub->mat[ 1 ] ); fl_free_matrix( sub->mat[ 2 ] ); } im->modified = 1; return 0; } /*************************************** * almost the same as convolve except the kernel is a proper C array * kernel[krow][kcol] ***************************************/ int flimage_convolvea( FL_IMAGE * im, int * kernel, int krow, int kcol ) { int **kk, status; if ( ! ( krow & 1 ) || ! ( kcol & 1 ) ) M_err( "Convolve", "even or zero kernel size (row=%d col=%d)!", krow, kcol ); kk = fl_make_matrix( krow, kcol, sizeof( int ), kernel ); status = flimage_convolve( im, kk, krow,kcol ); fl_free_matrix( kk ); return status; } /********************************************************************** * some built-in kernels **********************************************************************/ static void init_kernels( void ) { sharpen_kernel = fl_get_matrix( 3, 3, sizeof( **sharpen_kernel ) ); smooth_kernel = fl_get_matrix( 3, 3, sizeof( **smooth_kernel ) ); sharpen_kernel[ 0 ][ 0 ] = -1; sharpen_kernel[ 0 ][ 1 ] = -2; sharpen_kernel[ 0 ][ 2 ] = -1; sharpen_kernel[ 1 ][ 0 ] = -2; sharpen_kernel[ 1 ][ 1 ] = 28; sharpen_kernel[ 1 ][ 2 ] = -2; sharpen_kernel[ 2 ][ 0 ] = -1; sharpen_kernel[ 2 ][ 1 ] = -2; sharpen_kernel[ 2 ][ 2 ] = -1; /* smoothing a bit stronger than sharpening */ smooth_kernel[ 0 ][ 0 ] = 1; smooth_kernel[ 0 ][ 1 ] = 2; smooth_kernel[ 0 ][ 2 ] = 1; smooth_kernel[ 1 ][ 0 ] = 2; smooth_kernel[ 1 ][ 1 ] = 7; smooth_kernel[ 1 ][ 2 ] = 2; smooth_kernel[ 2 ][ 0 ] = 1; smooth_kernel[ 2 ][ 1 ] = 2; smooth_kernel[ 2 ][ 2 ] = 1; } /*}********************************************************************* */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_type.c0000644000175000017500000004137511247055071015613 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 By T.C. Zhao * All rights reserved. * * image type conversions */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*********************************************************************** * convert image types ***********************************************************************/ /*********************************************************************** * to rgba image *********************************************************************{*/ /*************************************** ***************************************/ static int packed_to_rgba( FL_IMAGE * im ) { FL_PACKED *packed = im->packed[ 0 ]; unsigned char *r, *g, *b, *a; int i, npix; r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; a = im->alpha[ 0 ]; for ( i = 0, npix = im->w * im->h; i < npix; i++ ) FL_UNPACK4( packed[ i ], r[ i ], g[ i ], b[ i ], a[ i ] ); return 0; } /*************************************** ***************************************/ static int gray_to_rgba( FL_IMAGE * im ) { unsigned short *gray = im->gray[ 0 ]; unsigned char *r, *g, *b; int i, npix; r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; for ( i = 0, npix = im->w * im->h; i < npix; i++ ) r[ i ] = g[ i ] = b[ i ] = gray[ i ]; return 0; } /*************************************** ***************************************/ static int gray16_to_rgba( FL_IMAGE * im ) { unsigned short *gray = im->gray[ 0 ]; unsigned char *r, *g, *b; float scale = ( FL_PCMAX + 0.001 ) / im->gray_maxval; int i, npix; r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; for ( i = 0, npix = im->w * im->h; i < npix; i++ ) r[ i ] = g[ i ] = b[ i ] = gray[ i ] * scale; return 0; } /*************************************** ***************************************/ static int ci_to_rgba( FL_IMAGE * im ) { unsigned short *ci = im->ci[ 0 ]; unsigned char *r, *g, *b; int k, i; r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; for ( i = im->w * im->h; --i >= 0; ) { k = ci[ i ]; r[ i ] = im->red_lut[ k ]; g[ i ] = im->green_lut[ k ]; b[ i ] = im->blue_lut[ k ]; } return 0; } /*}********************************************************************* * to grayscale *********************************************************************{*/ /*************************************** ***************************************/ static int packed_to_gray( FL_IMAGE * im ) { FL_PACKED *packed = im->packed[ 0 ]; int i, total = im->w * im->h; unsigned short *gray; gray = im->ci[ 0 ]; for ( i = 0; i < total; i++ ) gray[ i ] = FL_RGB2GRAY( FL_GETR( packed[ i ] ), FL_GETG( packed[ i ] ), FL_GETB( packed[ i ] ) ); return 0; } /*************************************** ***************************************/ static int rgba_to_gray( FL_IMAGE * im ) { int i, total; unsigned char *r, *g, *b; unsigned short *gray; gray = im->gray[ 0 ]; r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; for ( i = 0, total = im->w * im->h; i < total; i++ ) gray[ i ] = FL_RGB2GRAY( r[ i ], g[ i ], b[ i ] ); return 0; } /*************************************** ***************************************/ static int ci_to_gray( FL_IMAGE * im ) { unsigned short *ci = im->ci[ 0 ]; unsigned short *gray = im->gray[ 0 ]; int i; for ( i = im->w * im->h; --i >= 0; ) gray[i] = FL_RGB2GRAY( im->red_lut[ ci[ i ] ], im->green_lut[ ci[ i ] ], im->blue_lut[ ci[ i ] ] ); return 0; } /*}********************************************************************* * Pack an image *********************************************************************{*/ /*************************************** ***************************************/ static int rgba_to_packed( FL_IMAGE * im ) { int npix, i; FL_PACKED *p; unsigned char *r, *g, *b, *a; r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; a = im->alpha[ 0 ]; p = im->packed[ 0 ]; for ( i = 0, npix = im->w * im->h; i < npix; i++ ) p[ i ] = FL_PACK4( r[ i ], g[ i ], b[ i ], a[ i ] ); return 0; } /*************************************** ***************************************/ static int ci_to_packed( FL_IMAGE * im ) { int i; FL_PACKED *p; unsigned short *ci; p = im->packed[ 0 ]; ci = im->ci[ 0 ]; for ( i = im->w * im->h; --i >= 0; ) p[ i ] = FL_PACK4( im->red_lut[ ci[ i ] ], im->green_lut[ ci[ i ] ], im->blue_lut[ ci[ i ] ], 0 ); return 0; } /*}******************************************************************* * convert to color index *********************************************************************/ /*************************************** ***************************************/ static int rgb_to_ci( FL_IMAGE * im ) { return flimage_quantize_rgb( im->red, im->green, im->blue, im->w, im->h, im->map_len, im->ci, &im->map_len, im->red_lut, im->green_lut, im->blue_lut, im ); } /*************************************** ***************************************/ static int packed_to_ci( FL_IMAGE * im ) { return flimage_quantize_packed( im->packed, im->w, im->h, im->map_len, im->ci, &im->map_len, im->red_lut, im->green_lut, im->blue_lut, im ); } /*************************************** ***************************************/ static int gray_to_ci( FL_IMAGE * im ) { int i; float fact = ( FL_PCMAX + 0.001 ) / ( im->map_len - 1.0 ); float scale = ( im->map_len - 1.0 ) / 254.999; for ( i = 0; i < im->map_len; i++ ) im->red_lut[ i ] = im->green_lut[ i ] = im->blue_lut[ i ] = i * fact; if ( im->map_len != 256 ) for ( i = im->w * im->h; --i >= 0; ) im->ci[ 0 ][ i ] = im->gray[ 0 ][ i ] * scale; else for ( i = im->w * im->h; --i >= 0; ) im->ci[ 0 ][ i ] = im->gray[ 0 ][ i ]; return 0; } /*************************************** ***************************************/ static void scale_gray16( unsigned short * g16, unsigned short * g, int maxval, int len ) { float scale = ( FL_PCMAX + 0.001 ) / maxval; while ( --len >= 0 ) g[ len ] = g16[ len ] * scale; } /*************************************** ***************************************/ static int gray16_to_gray( FL_IMAGE * im ) { scale_gray16( im->gray[ 0 ], im->gray[ 0 ], im->gray_maxval, im->w * im->h ); return 0; } /*************************************** ***************************************/ static int gray_to_gray16( FL_IMAGE * im ) { im->type = FL_IMAGE_GRAY16; im->gray_maxval = 255; return 0; } /*************************************** ***************************************/ static int gray16_to_ci( FL_IMAGE * im ) { int i; float fact = ( FL_PCMAX + 0.001 ) / ( im->map_len - 1.0 ); for ( i = 0; i < im->map_len; i++ ) im->red_lut[ i ] = im->green_lut[ i ] = im->blue_lut[ i ] = i * fact; scale_gray16( im->gray[ 0 ], im->ci[ 0 ], im->gray_maxval, im->w * im->h ); return 0; } /*}********************************************************************* * Convert an image to B&W (half-toning) **********************************************************************/ enum { FS_DITHER, ORDERED8, DITHER_THRESHOLD }; static int dither_method = FS_DITHER; static int dither_threshold = ( 1 << FL_PCBITS ) / 2; /*************************************** * do floyd-steinberg dithering ***************************************/ static int fs_dither( unsigned short ** mat, int h, int w, unsigned short ** mm ) { unsigned short *m, *ras; int **tmp, *curr, *next = NULL; int i, j, n, err, dither2, lut[ 1 << FL_PCBITS ]; static int x[ 4 ] = { 0, 15, 240, 255 }; static int y[ 4 ] = { 0, 5, 250, 255 }; /* to preserve the errors on the edge, has to get one more row */ tmp = fl_get_matrix( h + 1, w, sizeof **tmp ); fl_spline_int_interpolate( x, y, 4, 1, lut ); for ( ras = mat[ 0 ], curr = tmp[ 0 ], n = h * w; --n >= 0; ras++, curr++ ) *curr = lut[ *ras ]; /* because we have the raster in a consecutive array, we got the edge * errors right for free */ dither2 = ( 1 << FL_PCBITS ) - 1; for ( i = 0; i < h; i++ ) { curr = tmp[ i ]; /* can't have it run to h 'cause nextrow[j+1] will be wrong */ if ( i < h - 1 ) next = tmp[ i + 1 ]; for ( m = mm[ i ], j = 0; j < w; j++, m++ ) { /* the value of *m depends on how the colormap is assigned */ err = curr[ j ] - ( ( *m = curr[ j ] <= dither_threshold ) ? 0 : dither2 ); curr[ j + 1 ] += ( err * 7 ) / 16; next[ j - 1 ] += ( err * 3 ) / 16; next[ j ] += ( err * 5 ) / 16; next[ j + 1 ] += err / 16; } } fl_free_matrix( tmp ); return 0; } /*************************************** ***************************************/ static int gray_to_mono( FL_IMAGE * im ) { unsigned short **outm = fl_get_matrix( im->h, im->w, sizeof **outm ); unsigned short *in, *out, *end; int status = 0; if ( dither_threshold <= 0 ) dither_threshold = ( 1 << FL_PCBITS ) / 2; if ( dither_method == FS_DITHER ) status = fs_dither( im->gray, im->h, im->w, outm ); else if ( dither_method == DITHER_THRESHOLD ) { in = im->gray[ 0 ]; for ( out = outm[ 0 ], end = in + im->w * im->h; in < end; ) *out++ = *in++ >= dither_threshold; } if ( status >= 0 ) { fl_free_matrix( im->ci ); im->ci = outm; im->map_len = 2; flimage_getcolormap( im ); im->red_lut[ 0 ] = im->green_lut[ 0 ] = im->blue_lut[ 0 ] = FL_PCMAX; im->red_lut[ 1 ] = im->green_lut[ 1 ] = im->blue_lut[ 1 ] = 0; } return status; } /*************************************** * need to keep the original resolution ***************************************/ static int gray16_to_mono( FL_IMAGE * im ) { int status; unsigned short **gray, **save = im->gray; if ( ! ( gray = fl_get_matrix( im->h, im->w, sizeof **gray ) ) ) return -1; scale_gray16( save[ 0 ], gray[ 0 ], im->gray_maxval, im->w * im->h ); im->gray = gray; status = gray_to_mono( im ); fl_free_matrix( gray ); im->gray = save; return status; } /*************************************** ***************************************/ static int rgba_to_mono( FL_IMAGE * im ) { int otype = im->type; im->type = FL_IMAGE_GRAY; flimage_getmem( im ); rgba_to_gray( im ); im->type = otype; gray_to_mono( im ); return 0; } /*************************************** ***************************************/ static int packed_to_mono( FL_IMAGE * im ) { int otype = im->type; im->type = FL_IMAGE_GRAY; flimage_getmem( im ); packed_to_gray( im ); im->type = otype; gray_to_mono( im ); return 0; } /*************************************** ***************************************/ static int ci_to_mono( FL_IMAGE * im ) { int otype = im->type; im->type = FL_IMAGE_GRAY; flimage_getmem( im ); ci_to_gray( im ); im->type = otype; gray_to_mono( im ); return 0; } /*********************************************************************** * gloabl interface to type change **********************************************************************/ typedef struct { int from, to; int ( * cnvt )( FL_IMAGE * ); } Cnvt; /*************************************** ***************************************/ static int noop( FL_IMAGE * im FL_UNUSED_ARG ) { return 0; } static Cnvt cnvt[ ] = { /* to gray */ { FL_IMAGE_PACKED, FL_IMAGE_GRAY, packed_to_gray }, { FL_IMAGE_RGB, FL_IMAGE_GRAY, rgba_to_gray }, { FL_IMAGE_CI, FL_IMAGE_GRAY, ci_to_gray }, { FL_IMAGE_MONO, FL_IMAGE_GRAY, ci_to_gray }, { FL_IMAGE_GRAY16, FL_IMAGE_GRAY, gray16_to_gray }, { FL_IMAGE_GRAY, FL_IMAGE_GRAY16, gray_to_gray16 }, /* to rgb */ { FL_IMAGE_PACKED, FL_IMAGE_RGB, packed_to_rgba }, { FL_IMAGE_GRAY, FL_IMAGE_RGB, gray_to_rgba }, { FL_IMAGE_GRAY16, FL_IMAGE_RGB, gray16_to_rgba }, { FL_IMAGE_CI, FL_IMAGE_RGB, ci_to_rgba }, { FL_IMAGE_MONO, FL_IMAGE_RGB, ci_to_rgba }, /* to packed */ { FL_IMAGE_RGB, FL_IMAGE_PACKED, rgba_to_packed }, { FL_IMAGE_CI, FL_IMAGE_PACKED, ci_to_packed }, { FL_IMAGE_MONO, FL_IMAGE_PACKED, ci_to_packed }, /* to ci */ { FL_IMAGE_RGB, FL_IMAGE_CI, rgb_to_ci }, { FL_IMAGE_PACKED, FL_IMAGE_CI, packed_to_ci }, { FL_IMAGE_GRAY16, FL_IMAGE_CI, gray16_to_ci }, { FL_IMAGE_GRAY, FL_IMAGE_CI, gray_to_ci }, { FL_IMAGE_GRAY, FL_IMAGE_CI, gray_to_ci }, { FL_IMAGE_MONO, FL_IMAGE_CI, noop }, /* to mono */ { FL_IMAGE_RGB, FL_IMAGE_MONO, rgba_to_mono }, { FL_IMAGE_PACKED, FL_IMAGE_MONO, packed_to_mono }, { FL_IMAGE_GRAY, FL_IMAGE_MONO, gray_to_mono }, { FL_IMAGE_GRAY16, FL_IMAGE_MONO, gray16_to_mono }, { FL_IMAGE_CI, FL_IMAGE_MONO, ci_to_mono }, /* sentinel */ { FL_IMAGE_NONE, FL_IMAGE_NONE, 0 } }; /*************************************** ***************************************/ int flimage_convert( FL_IMAGE * image, int newtype, int ncolors ) { int found, status, otype; Cnvt *p = cnvt; if ( ! image || image->w <= 0 || image->type == FL_IMAGE_NONE ) return -1; if ( image->type == newtype ) return 0; if ( image->type == FL_IMAGE_MONO ) ncolors = 2; otype = image->type; if ( image->available_type & newtype && ! image->force_convert ) { /* If CI, we also need to verify the map_len is the same */ if ( newtype != FL_IMAGE_CI || image->map_len == ncolors ) { image->type = newtype; image->modified = 1; return 0; } } for ( p = cnvt, found = 0; p->from != FL_IMAGE_NONE && !found; p++ ) found = p->from == image->type && p->to == newtype; if ( ! found ) { fprintf( stderr, "requested conversion (%d to %d) not defined\n", image->type, newtype ); return -1; } if ( newtype == FL_IMAGE_CI ) { image->map_len = ncolors <= 1 ? 256 : ncolors; flimage_getcolormap( image ); } image->type = newtype; if ( flimage_getmem( image ) < 0 ) { image->error_message( image, "Convert: can't get memory" ); return -1; } if ( ( status = ( --p )->cnvt( image ) ) >= 0 ) { image->available_type |= otype; image->modified = 1; } else { image->type = p->from; image->error_message( image, "conversion failed" ); } image->force_convert = 0; return status; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_gif.c0000644000175000017500000007715611247055071015405 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. * * BUGS: delay & input not handled * * "The Graphics Interchange Format(c) is the Copyright property of * CompuServ Incorporated. GIF(sm) is a Service Mark property of * CompuServ Incorporated. * * Signature * screen descriptor * global map * image descriptor --- 1 * raster --- 2 * terminator * * 1 & 2 can be repeated. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #define IMAGESEP 0x2C /* ',' */ /*************************************** ***************************************/ static int GIF_identify( FILE * fp ) { char buf[ 7 ]; if ( fread( buf, 1, 6, fp ) != 6 ) return 0; rewind( fp ); return buf[ 0 ] == 'G' && buf[ 1 ] == 'I' && buf[ 2 ] == 'F' && buf[ 5 ] == 'a'; } static int read_descriptor_block( FL_IMAGE * im ); static int skip_extension( FILE * fp, FL_IMAGE * ); static void read_map( FL_IMAGE * ); /* plain text extension */ typedef struct { char str[ 512 ]; int x, y; int cw, ch; int tw, th; int tran; int bc, tc; } GIFTEXT; /* graphics control extension */ typedef struct { int tran; int delay; int input; int tran_col; } GIFGCNTL; #define MAXGIFTEXT 5 typedef struct { int interlace; int lsx, lsy; int bkcolor; int aspect; int cur_total; int globalmap; GIFGCNTL gc; int ctext; GIFTEXT giftext[ MAXGIFTEXT ]; } SPEC; static int GIF_next( FL_IMAGE * ); /*************************************** ***************************************/ static int GIF_description( FL_IMAGE * im ) { unsigned char buf[ 15 ]; FILE *fp = im->fpin; SPEC *sp = fl_calloc( 1, sizeof *sp ); im->io_spec = sp; im->spec_size = sizeof *sp; im->next_frame = GIF_next; sp->gc.tran = 0; /* identify should've already checked signature. */ if ( fread( buf, 1, 6, fp ) != 6 || fread( buf, 1, 7, fp ) != 7 ) { flimage_error( im, "%s: error while reading gif file", im->infile ); return -1; } sp->lsx = buf[ 0 ] + ( buf[ 1 ] << 8 ); sp->lsy = buf[ 2 ] + ( buf[ 3 ] << 8 ); sp->globalmap = buf[ 4 ] & 0x80; im->map_len = 1 << ( 1 + ( buf[ 4 ] & 0x07 ) ); flimage_getcolormap( im ); sp->bkcolor = buf[ 5 ]; sp->aspect = buf[ 6 ] ? ( int ) ( 1000.0 * ( buf[ 6 ] + 15 ) / 64.0 ) : 1000; /* err= buf[4] & 0x08; */ if ( sp->globalmap ) read_map( im ); return read_descriptor_block( im ); } /*************************************** ***************************************/ static void read_map( FL_IMAGE * im ) { int i; for ( i = 0; i < im->map_len; i++ ) { im->red_lut[ i ] = getc( im->fpin ); im->green_lut[ i ] = getc( im->fpin ); im->blue_lut[ i ] = getc( im->fpin ); } } /*************************************** ***************************************/ static void write_map( FL_IMAGE * im, int n ) { int i; for ( i = 0; i < im->map_len; i++ ) { putc( im->red_lut[ i ], im->fpout ); putc( im->green_lut[ i ], im->fpout ); putc( im->blue_lut[ i ], im->fpout ); } for ( ; i < n; i++ ) { putc( 0, im->fpout ); putc( 0, im->fpout ); putc( 0, im->fpout ); } } /*************************************** ***************************************/ static void generate_header_info( FL_IMAGE *im ) { SPEC *sp = im->io_spec; char buf[ 128 ]; if ( ! im->info && ! ( im->info = fl_malloc( 1024 ) ) ) return; sprintf( im->info, "Size=(%d x %d)\n", im->w, im->h ); sprintf( buf,"Colors=%d\nGlobalmap=%d\n", im->map_len, sp->globalmap ); strcat( im->info,buf ); sprintf( buf,"Aspect=%d\nInterlace=%d\n", sp->aspect, sp->interlace ); strcat( im->info, buf ); sprintf( buf,"Offset=(%d %d)\n", im->wx, im->wy ); strcat( im->info, buf ); } /*************************************** ***************************************/ static int read_descriptor_block( FL_IMAGE * im ) { int local_map, inbyte; FILE *fp = im->fpin; SPEC *sp = im->io_spec; /* Read the extension if any, and do nothing about it until get the image separator */ if ( skip_extension( fp, im ) != IMAGESEP ) { flimage_error( im, "%s: no separator or BadBlockMarker", im->infile ); return -1; } /* offset relative to lsx and lsy */ im->wx = fli_fget2LSBF( fp ); im->wy = fli_fget2LSBF( fp ); /* True image size */ im->w = fli_fget2LSBF( fp ); im->h = fli_fget2LSBF( fp ); if ( sp->lsx < im->w || sp->lsy < im->h ) { M_info( "", "Bad screen description. LX=%d W=%d LY=%d H=%d", sp->lsx, im->w, sp->lsy, im->h ); sp->lsx = im->w; sp->lsy = im->h; } inbyte = getc( fp ); sp->interlace = ( inbyte & 0x40 ) != 0; local_map = ( inbyte & 0x80 ); if ( ! sp->globalmap && !local_map ) { M_err( "GIFDescriptor", "%s: No ColorMap", im->infile ); /* return -1; *//* might want to continue */ } /* If local map, replace the global map */ if ( local_map ) { local_map = ( inbyte & 0x07 ) + 1; im->map_len = 1 << local_map; flimage_getcolormap( im ); read_map( im ); } /* Handle transparency */ if ( sp->gc.tran && sp->gc.tran_col < im->map_len ) im->tran_index = sp->gc.tran_col; if ( im->setup->header_info ) generate_header_info( im ); return 0; } #define Badfread( a, b, c, d ) ( fread( a, b, c, d ) != ( c ) ) #define Badfwrite( a, b, c, d ) ( fwrite( a, b, c, d ) != ( c ) ) /*************************************** ***************************************/ static void convert_gif_text( FL_IMAGE * im ) { SPEC *sp = im->io_spec; GIFTEXT *p = sp->giftext, *ps = p + sp->ctext; unsigned int tcol, bcol; int x, y; int fsize; while ( p < ps ) { int tc = p->tc, bc = p->bc; if ( ! p->str[ 0 ] ) continue; /* gif text size is given in pixels, convert to point. 1pixel = 0.75pt for a typical screen */ if ( ( fsize = ( int ) ( FL_min( p->cw, p->ch ) * 0.75 ) ) < 6 ) fsize = 6; else if ( fsize > 24 ) fsize = 24; /* convert text position to image based */ x = p->x - im->wx; y = p->y - im->wy; tcol = FL_PACK3( im->red_lut[ tc ], im->green_lut[ tc ], im->blue_lut[ tc ] ); bcol = FL_PACK3( im->red_lut[ bc ], im->green_lut[ bc ], im->blue_lut[ bc ] ); flimage_add_text( im, p->str, strlen( p->str ), 0, fsize, tcol, bcol, ! p->tran, x, y, 0 ); p++; } } /******************* local functions ******************/ static int readextension( FILE *, FL_IMAGE * ); static int next_lineno( int, int, int ); static int process_lzw_code( FL_IMAGE *, int ); static void outputline( FL_IMAGE *, unsigned char * ); /****************** decoder variables ******************/ static const unsigned int gif_codemask[ ] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff }; /*************************************** * ouptut line simply copies one scanline at a time to the master * image structure, taking into account the possibility of * interlacing ***************************************/ static void outputline( FL_IMAGE * im, unsigned char * line ) { unsigned short *po; unsigned char *pi = line; SPEC *sp = im->io_spec; static int lines; int k; if ( sp->cur_total == 0 ) /* first entry */ lines = 0; /* figure out the real row number if interlace */ k = next_lineno( lines, im->h, sp->interlace ); sp->cur_total += im->w; /* stop to avoid buffer overrun if k is bad */ if ( k >= im->h ) return; for ( po = im->ci[ k ], line += im->w; pi < line; ) *po++ = *pi++; im->completed = ++lines; if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "Reading GIF" ); } /*************************************** * Get a single data block ***************************************/ static int getblock( FILE * fp, char * buf ) { int count; if ( ( count = getc( fp ) ) != EOF && count != 0 ) count = fread( buf, 1, count, fp ); return count; } #define EXTENSION 0x21 /* '!' introducer */ #define GIFEXT_PT 0x01 /* plain text */ #define GIFEXT_APP 0xFF /* application */ #define GIFEXT_GC 0xF9 /* graphics control */ #define GIFEXT_COM 0xFE /* comment */ #define TRAILER 0x3b /*************************************** * As long as we are not doing the extension, print it out to stderr ***************************************/ static int readextension( FILE * fp, FL_IMAGE * im ) { SPEC *sp = im->io_spec; int count = 0, label; char buf[ 258 ]; const char *f = "GIF_ext"; GIFTEXT *t = sp->giftext + sp->ctext; label = getc( fp ); switch ( label ) { case GIFEXT_PT : /* plain text extension */ M_info( 0, "%s: PlainText Extension", im->infile ); if ( getc( fp ) != 12 ) { flimage_error( im, "%s: bad PlainText extension", im->infile ); return EOF; } t->x = fli_fget2LSBF( fp ); /* left wrt left edge of ls */ t->y = fli_fget2LSBF( fp ); t->tw = fli_fget2LSBF( fp ); /* total width */ t->th = fli_fget2LSBF( fp ); /* total width */ t->cw = fgetc( fp ); /* cell width */ t->ch = fgetc( fp ); /* cell height */ t->tc = fgetc( fp ); /* text color */ t->bc = fgetc( fp ); /* bk color */ t->tran = sp->gc.tran; t->str[ 0 ] = '\0'; while ( ( count = getblock( fp, buf ) ) != 0 && count != EOF ) { buf[ count ] = '\0'; M_info( 0, buf ); if ( strlen( t->str ) + count > sizeof t->str ) count = sizeof t->str - strlen( t->str ) - 1; strncat( t->str, buf, count ); } sp->ctext++; break; case GIFEXT_COM : /* a comment extension */ M_info( 0, "%s:Comment Extension", im->infile ); while ( ( count = getblock( fp, buf ) ) != 0 && count != EOF ) { buf[ count ] = '\0'; flimage_add_comments( im, buf, count ); } break; case GIFEXT_GC : /* graphics control */ M_info( 0, "%s:GraphicsControl extension", im->infile ); while ( ( count = getblock( fp, buf ) ) != 0 && count != EOF ) { sp->gc.tran = buf[ 0 ] & 1; sp->gc.input = buf[ 0 ] & 2; sp->gc.delay = 10 * ( buf[ 0 ] + ( buf[ 1 ] << 8 ) ); if ( sp->gc.tran ) sp->gc.tran_col = buf[ 3 ]; } break; case GIFEXT_APP : /* application extension */ M_info( 0, "%s:ApplicationExtension", im->infile ); if ( getc( fp ) != 11 ) /* block length */ M_warn( "GifExt", "wrong block length" ); if ( fread( buf, 1, 8, fp ) != 8 ) return EOF; buf[ 8 ] = '\0'; M_info( 0, buf ); if ( fread( buf, 1, 3, fp ) != 3 ) return EOF; while ( ( count = getblock( fp, buf ) ) != 0 && count != EOF ) { buf[ count ] = '\0'; M_info( 0, buf ); } break; default : M_err( f, "%s: Bogus extension byte 0x%02x", im->infile, label ); break; } return count; } /*************************************** ***************************************/ static int skip_extension( FILE * fp, FL_IMAGE * im ) { int pchar, err = 0; while ( ! err && ( pchar = getc( fp ) ) != EOF && pchar != IMAGESEP ) { switch ( pchar ) { case '\0' : case TRAILER : break; case EXTENSION : err = readextension( fp, im ); break; default : M_warn( "GIFextension", "%s: Bogus byte 0x%02x", im->infile, pchar ); return EOF; } } return err ? EOF : pchar; } #define LZW_INIT 9000 static int bpp, ClearCode, EOFCode, CodeSize; #include static unsigned char * lhead, *lbuf, *stackp; /* local buffers */ /*************************************** ***************************************/ static int GIF_load( FL_IMAGE * im ) { int bits = 0, err, count, code = -1; unsigned int datum = 0; unsigned char *ch, buf[ 257 ]; SPEC *sp = im->io_spec; const char *func = "GIFReadPix"; FILE *fp = im->fpin; sp->ctext = 0; CodeSize = getc( fp ); if ( CodeSize > 8 || CodeSize < 2 ) { flimage_error( im, "Load: Bad CodeSize %d(%s)", CodeSize, im->infile ); return -1; } /* initialize the decompressor */ err = sp->cur_total = 0; process_lzw_code( im, LZW_INIT ); while ( ! err && ( count = getc( fp ) ) != EOF && count > 0 ) { err = Badfread( buf, 1, ( size_t )count, fp ); for ( ch = buf; count-- > 0; ch++ ) { datum += *ch << bits; bits += 8; while ( bits >= CodeSize && ! err ) { code = datum & gif_codemask[ CodeSize ]; datum >>= CodeSize; bits -= CodeSize; err = code == EOFCode || process_lzw_code( im, code ); } } /* EOFcode is not exactly an errr */ if ( err && code == EOFCode ) err = 0; if ( code != EOFCode && sp->cur_total > (long) im->w * im->h ) { flimage_error( im, "%s: Raster full before EOI", im->infile ); err = 1; } } if ( ! err ) { if ( ( code = getc( fp ) ) == EXTENSION ) { ungetc( code, fp ); while ( ( code = skip_extension( fp, im ) ) != EOF && code != IMAGESEP ) /* empty */ ; } if ( code == IMAGESEP ) { im->more = 1; ungetc( IMAGESEP, fp ); } else if ( code != EOF && fread( buf, 1, 50, fp ) && getc( fp ) != EOF ) { M_info( func, "%s: Garbage(> 50bytes) at end", im->infile ); } } count = sp->cur_total / im->w; /* final check: get pixels that are decoded but yet to be output */ if ( count < im->h ) { int leftover; leftover = lbuf - lhead; M_warn( func, "total %ld should be %d", sp->cur_total + leftover, im->w * im->h ); if ( leftover ) outputline( im, lhead ); } /* if more than 1/4 image is read, return positive value so that driver will try to display it. */ convert_gif_text( im ); return count >= im->h / 4 ? count : -1; } /*************************************** * process_lzw_code - Process a compression code. "clear" resets the * code table. Otherwise make a new code table entry, and output the * bytes associated with the code. * * Based on gifpaste by Kipp Hickman @ Silicon Graphics ***************************************/ #define OUTPIX( c ) ( *lbuf++ = ( c ) ) #define MC_SIZE 4097 /*************************************** * if we've got more than one scanline, output ***************************************/ static void flush_buffer( FL_IMAGE * im ) { int i; int incode; incode = lbuf - lhead; if ( incode >= im->w ) { lbuf = lhead; while ( incode >= im->w ) { outputline( im, lbuf ); incode -= im->w; lbuf += im->w; } /* copy the left over */ for ( i = 0; i < incode; i++ ) lhead[ i ] = *lbuf++; lbuf = lhead + incode; } } /*************************************** ***************************************/ static int process_lzw_code( FL_IMAGE * im, int code ) { int incode; static unsigned char firstchar; static unsigned char stack[ MC_SIZE ]; static int avail, oldcode; static unsigned char suffix[ MC_SIZE ]; static unsigned short prefix[ MC_SIZE ]; if ( code == LZW_INIT ) { lbuf = lhead = fl_realloc( lhead, im->w + 1 + 4096 ); bpp = CodeSize; ClearCode = 1 << bpp; EOFCode = ClearCode + 1; CodeSize = bpp + 1; for ( incode = ClearCode; --incode >= 0; ) { *( suffix + incode ) = incode; *( prefix + incode ) = 0; } avail = ClearCode + 2; oldcode = -1; stackp = stack; return lbuf ? 0 : -1; } if ( code == ClearCode ) { CodeSize = bpp + 1; avail = ClearCode + 2; oldcode = -1; return 0; } /* this is possible only if the image file is corrupt */ if ( code > avail || code < 0 ) { flimage_error( im, "GIFLZW(%s): Bad code 0x%04x", im->infile, code ); return -1; } if ( oldcode == -1 ) { OUTPIX( suffix[ code ] ); firstchar = oldcode = code; /* Clive Stubbings. * There is the posibility of an image with just alternate * single code bytes and resets. I know thats really dumb, * but I found one and it took a long time to work out why * it crashed... * So flush the buffer before it overuns. */ flush_buffer( im ); return 0; } incode = code; if ( code == avail ) { /* the first code is always < avail */ *stackp++ = firstchar; code = oldcode; } while ( code > ClearCode ) { *stackp++ = suffix[ code ]; code = prefix[ code ]; } if ( avail >= 4096 ) { flimage_error( im, "GIFLZW(%s): BadBlock--TableFull", im->infile ); return -1; } *stackp++ = firstchar = suffix[ code ]; prefix[ avail ] = oldcode; suffix[ avail ] = firstchar; avail++; if ( ( avail & gif_codemask[ CodeSize ] ) == 0 && avail < 4096 ) CodeSize++; oldcode = incode; do { OUTPIX( *--stackp ); } while ( stackp > stack ); /* if we've got more than one scanline, output */ flush_buffer( im ); return 0; } /*************************************** ***************************************/ static int GIF_next( FL_IMAGE * im ) { int ow = im->w, oh = im->h; int ret; read_descriptor_block( im ); /* It would seem from the doc that it is possible new image could be larger than last one */ if ( ow != im->w || oh != im->h ) flimage_getmem( im ); #if 0 del_text( ); #endif im->more = 0; /* gif_load will do turn it on if more */ im->modified = 1; ret = GIF_load( im ); return ret; } /******************* END of DECODER ****************************}*****/ /*************************************** * Given GIF sequence no. i, starting from 0, figure out the image * sequence number. If interlaced, the sequence will be independent * of i, sort of a bug, but for this application, it is perfectly ok. ***************************************/ static int next_lineno( int i, int h, int interlace ) { static const int steps[ 5 ] = { 8, 8, 4, 2, 0 }; static const int start[ 5 ] = { 0, 4, 2, 1, 0 }; static int pass, sofar, current; int line; /* init for each image */ if ( i == 0 ) pass = sofar = current = 0; line = i; /* unless interlace */ if ( interlace ) { line = current; if ( ( current += steps[pass] ) >= h ) current = start[ ++pass ]; } sofar++; return line; } /******************************************************************** * GIF encoding routine. * Original code ********************************************************************/ /************************************************************ * Write image to a disk file in GIF format. ************************************************************/ /* current char, cchar, must be of signed type, and code and prefix must be * at least 12 bits long. */ typedef struct strspace_ { struct strspace_ * next; /* link */ int code; /* emit code */ int cchar; /* current char */ } Strtab; typedef struct { int prefix, cchar, code; } WorkStr; #define MAXTABL 4097 static Strtab *strtab[ MAXTABL ], strspace[ MAXTABL ]; /************************************************************** * Check if current string is already in the string table **************************************************************/ static int in_table( WorkStr * cstr ) { Strtab *p = strtab[ cstr->prefix ]; for ( ; p && p->cchar != cstr->cchar; p = p->next ) /* empty */ ; return p ? p->code : -1; } #define USE_TAB_FUNC /* * A macro and function are supplied to insert a string into the * string table. */ #ifdef USE_TAB_FUNC /*************************************** ***************************************/ static void addto_table( WorkStr * cstr, int code ) { Strtab *p = &strspace[ code ]; p->code = code; p->cchar = cstr->cchar; p->next = strtab[ cstr->prefix ]; strtab[ cstr->prefix ] = p; } #else #define addto_table(cstr, ccode ) \ do { \ Strtab *p = &strspace[ ccode ]; \ p->code = ccode; \ p->cchar = cstr->cchar; \ p->next = strtab[ cstr->prefix ]; \ strtab[ cstr->prefix ] = p; \ } while( 0 ) #endif static void output_lzw_code( unsigned int, FILE * ); static void init_table( int, FILE * ); #if 0 static unsigned short * get_scan_line( FL_IMAGE *, int ); #endif static int interlace; /*************************************** ***************************************/ void flimage_gif_output_options( int inter ) { interlace = inter; } /*************************************** * for now, only write max 255 chars ***************************************/ static void write_gif_comments( FILE * fp, const char * str ) { char s[ 256 ]; const char *p = str; int len, k = strlen( str ); for ( len = 0; p < str + k; p += len ) { size_t dummy; strncpy( s, p, 255 ); s[ 255 ] = '\0'; len = strlen( s ); putc( EXTENSION, fp ); fputc( GIFEXT_COM, fp ); putc( len, fp ); dummy = fwrite( s, 1, len, fp ); putc( 0, fp ); } } /*************************************** ***************************************/ static int write_descriptor( FL_IMAGE * im ) { unsigned char buf[ 10 ]; FILE *ffp = im->fpout; if ( im->app_background >= 0 ) { int tran = flimage_get_closest_color_from_map( im, im->app_background ); size_t dummy; buf[ 0 ] = GIFEXT_GC; buf[ 1 ] = 4; /* count */ buf[ 2 ] = 0x1; buf[ 3 ] = 0; buf[ 4 ] = 0; buf[ 5 ] = tran; buf[ 6 ] = 0; /* end of block */ putc( EXTENSION, ffp ); dummy = fwrite( buf, 1, 7, ffp ); } /* image descriptions */ buf[ 0 ] = IMAGESEP; buf[ 1 ] = buf[ 2 ] = buf[ 3 ] = buf[ 4 ] = 0; /* offsets */ if ( Badfwrite( buf, 1, 5, ffp ) ) return -1; /* raster dimensions */ fli_fput2LSBF( im->w, ffp ); fli_fput2LSBF( im->h, ffp ); /* local_gifmap, interlace, etc. only set interlace if requested */ putc( interlace ? 0x40 : 0, ffp ); return 0; } /*************************************** * write the image description ***************************************/ static int write_desc( FL_IMAGE * im, FILE * ffp ) { int packed; /* get bits per pixel first */ bpp = 0; while ( im->map_len > 1 << bpp ) bpp++; if ( bpp < 1 || bpp > 8 ) { M_err( "GIF_dump", "%s: Bad bpp=%d", im->outfile, bpp ); bpp = 1; } if ( Badfwrite("GIF89a", 1, 6, ffp ) ) { M_err( "GIF_dump", im->outfile ); return -1; } /* always write the same logical screen/image size */ fli_fput2LSBF( im->w, ffp ); fli_fput2LSBF( im->h, ffp ); packed = 0x80 /* always output global map */ + ( ( bpp - 1 ) << 4 ) /* cr. does not mean much */ + ( bpp - 1 ); /* bits_per_pixel-1 */ putc( packed, ffp ); putc( 0, ffp ); putc( 0, ffp ); /* bk color and aspect ratio */ /* global color map. Entries must be 2^N */ write_map( im, 1 << bpp ); if ( im->comments ) write_gif_comments( ffp, im->comments ); return 0; } /******************************************************************* * The encoder *******************************************************************/ /*************************************** ***************************************/ static int write_pixels( FL_IMAGE * im ) { int j, code, ccode; unsigned short *scan, *ss; WorkStr *cstr; int colors; WorkStr workstring; FILE *fp = im->fpout; /* IMPORTANT: number of colors handed to this routine might not be 2^n, need to make it so to fool the encoder (colors-1 need to be full bits) */ colors = 1 << bpp; /* min bpp by definition is no smaller than 2 */ if ( bpp < 2 ) bpp = 2; /* initial codesize */ putc( bpp, fp ); ClearCode = 1 << bpp; /* set clear and end codes */ EOFCode = ClearCode + 1; CodeSize = bpp + 1; /* start encoding */ init_table( colors, fp ); /* initialize the LZW tables */ cstr = &workstring; ccode = EOFCode + 1; cstr->prefix = -1; /* start raster stream. Old way of doing things, that is as soon as we get 4095, a clearcode is emitted. */ for ( j = 0; j < im->h; j++ ) { scan = im->ci[ next_lineno( j, im->h, interlace ) ]; for ( ss = scan + im->w; scan < ss; scan++ ) { cstr->cchar = *scan & ( colors - 1 ); if ( cstr->prefix >= 0 ) { if ( ( code = in_table( cstr ) ) >= 0 ) cstr->prefix = code; else { addto_table( cstr, ccode ); output_lzw_code( cstr->prefix, fp ); cstr->prefix = cstr->cchar; if ( ccode >= 1 << CodeSize ) CodeSize++; ccode++; if ( ccode >= 4096 ) { output_lzw_code( cstr->prefix, fp ); init_table( colors, fp ); ccode = EOFCode + 1; cstr->prefix = -1; } } } else { /* root entry */ cstr->prefix = cstr->code = cstr->cchar; } } } output_lzw_code( cstr->prefix, fp ); output_lzw_code( EOFCode, fp ); putc( 0, fp ); /* end block */ return fflush( fp ); } /*************************************** ***************************************/ static int GIF_write( FL_IMAGE * sim ) { int err = 0; FL_IMAGE *im; if ( write_desc( sim, sim->fpout ) < 0 ) return -1; for ( err = 0, im = sim; !err && im; im = im->next ) { im->fpout = sim->fpout; err = write_descriptor( im ) < 0 || write_pixels( im ) < 0; if ( im != sim ) im->fpout = 0; } putc( ';', sim->fpout ); /* end stream */ fflush( sim->fpout ); return err ? -1 : 0; } /*************************************** ***************************************/ static void init_table( int rootlen, FILE * fp ) { int i; Strtab *sp = strspace; output_lzw_code( ClearCode, fp ); CodeSize = bpp + 1; for ( i = 0; i < rootlen; i++, sp++ ) { sp->next = 0; sp->code = i; sp->cchar = -1; strtab[ i ] = sp; } for ( ; i < MAXTABL; i++, sp++ ) strtab[ i ] = sp->next = 0; } /******************************************************************* * Packing and output an LZW code(bpp+1 to 12 bits long). * * Note: accum must be at least 19 bits long. accum and bits must be * re-initialized when EOFCode is written out. *******************************************************************/ static void output_lzw_code( unsigned int code, FILE * fp ) { static unsigned int bytes, bits; static unsigned char bbuf[ 255 + 3 ]; static unsigned long accum; unsigned char *ch; accum &= gif_codemask[ bits ]; accum |= code << bits; bits += CodeSize; ch = bbuf + bytes; bytes += bits >> 3; while ( bits >= 8 ) { bits -= 8; *ch++ = ( unsigned char ) ( accum & 255 ); accum >>= 8; } if ( bytes >= 254 || ( int ) code == EOFCode ) { size_t dummy; if ( ( int ) code == EOFCode && bits ) { *ch = ( unsigned char ) ( accum & 255 ); bytes++; bits = accum = 0; } putc(bytes, fp); dummy = fwrite( bbuf, 1, bytes, fp ); bytes = 0; } } /*************************************** ***************************************/ void flimage_enable_gif( void ) { flimage_add_format( "CompuServ GIF", "gif", "gif", FL_IMAGE_CI, GIF_identify, GIF_description, GIF_load, GIF_write); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_scale.c0000644000175000017500000002003411247055071015706 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 T.C. Zhao * All rights reserved. * * Scale an image with or without subpixel sampling. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*************************************** * Scale an image without subpixel sampling. Parameter im is strictly * for reporting purposes ***************************************/ static int image_zoom( void * om[ ], void * nm[ ], int h, int w, int nh, int nw, int comp, FL_IMAGE * im FL_UNUSED_ARG ) { int *lut = fl_malloc( ( nw + 1 ) * sizeof *lut ); unsigned short **ngray = nm[ 0 ], **ogray = om[ 0 ]; unsigned char **npc[ 3 ], **opc[ 3 ]; int i, j, iy, ix; if ( ! lut ) return -1; for ( i = 0; i < nw; i++ ) lut[ i ] = ( i * ( w - 1 ) ) / ( nw - 1 ); for ( i = 0; i < 3; i++ ) { npc[ i ] = nm[ i ]; opc[ i ] = om[ i ]; } for ( i = 0; i < nh; i++ ) { iy = ( i * ( h - 1 ) ) / ( nh - 1 ); if ( comp == 1 ) { for ( j = 0; j < nw; j++ ) ngray[ i ][ j ] = ogray[ iy ][ lut[ j ] ]; } else { for ( j = 0; j < nw; j++ ) { ix = lut[ j ]; npc[ 0 ][ i ][ j ] = opc[ 0 ][ iy ][ ix ]; npc[ 1 ][ i ][ j ] = opc[ 1 ][ iy ][ ix ]; npc[ 2 ][ i ][ j ] = opc[ 2 ][ iy ][ ix ]; } } } fl_free( lut ); return 0; } /*************************************** * Box averaging. parameter im is strictly for reporting ***************************************/ static int image_scale( void * om[ ], void * nm[ ], int h, int w, int nh, int nw, int comp, FL_IMAGE * im ) { float xt = ( float ) w / nw; float yt = ( float ) h / nh; float s[ 3 ], area, delta; float width, height; float x1, x2, y1, y2; int x, y, i, j; unsigned char **npc[ 3 ], **opc[ 3 ]; unsigned short **ogray = om[ 0 ], **ngray = nm[ 0 ]; for ( i = 0; i < 3; i++ ) { npc[ i ] = nm[ i ]; opc[ i ] = om[ i ]; } for ( y1 = 0.0f, j = 0; j < nh; j++, y1 += yt, im->completed++ ) { if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "Scaling " ); y2 = y1 + yt; if ( y2 > h ) y2 = h; for ( x1 = 0.0f, i = 0; i < nw; i++, x1 += xt ) { s[ 0 ] = s[ 1 ] = s[ 2 ] = area = 0.0; x2 = x1 + xt; if ( x2 > w ) x2 = w; for ( y = ( int ) y1; y < y2; y++ ) { if ( y < y1 ) height = y + 1.0 - y1; else if ( y + 1.0 > y2 ) height = y2 - y; else height = 1.0; for ( x = ( int ) x1; x < x2; x++) { if ( x < x1 ) width = x + 1.0 - x1; else if ( x + 1.0 > x2 ) width = x2 - x; else width = 1.0; area += ( delta = width * height ); if ( comp == 1 ) s[ 0 ] += delta * ogray[ y ][ x ]; else { s[ 0 ] += delta * opc[ 0 ][ y ][ x ]; s[ 1 ] += delta * opc[ 1 ][ y ][ x ]; s[ 2 ] += delta * opc[ 2 ][ y ][ x ]; } } } if ( comp == 1 ) ngray[ j ][ i ] = s[ 0 ] / area; else { npc[ 0 ][ j ][ i ] = s[ 0 ] / area; npc[ 1 ][ j ][ i ] = s[ 1 ] / area; npc[ 2 ][ j ][ i ] = s[ 2 ] / area; } } } return 0; } /*************************************** ***************************************/ int flimage_scale( FL_IMAGE * im, int nw, int nh, int option ) { void *om[ 3 ], *nm[ 3 ] = { 0, 0, 0 }; int err = 0, comp; if ( ! im || im->w <= 0 || im->type == FL_IMAGE_NONE ) return -1; /* Check if null op */ if ( im->w == nw && im->h == nh ) return 0; /* Convert to RGB only if subpixel and not gray */ if ( option & FLIMAGE_SUBPIXEL ) { if ( im->type == FL_IMAGE_CI ) err = flimage_convert( im, FL_IMAGE_RGB, 0 ) < 0; else if ( im->type == FL_IMAGE_MONO ) err = flimage_convert( im, FL_IMAGE_GRAY, 0 ) < 0; if ( err ) { im->error_message( im, "scale: conversion to RGB/Gray failed" ); return -1; } } /* Free all irrelevant pixels */ flimage_invalidate_pixels( im ); if ( im->type == FL_IMAGE_RGB ) { om[ 0 ] = im->red; om[ 1 ] = im->green; om[ 2 ] = im->blue; /* For size fitting, we don't need allocate pixels here */ if ( ! ( option & FLIMAGE_ASPECT ) ) { err = err || ! ( nm[ 0 ] = fl_get_matrix( nh, nw, sizeof **im->red ) ) || ! ( nm[ 1 ] = fl_get_matrix( nh, nw, sizeof **im->red ) ) || ! ( nm[ 2 ] = fl_get_matrix( nh, nw, sizeof **im->red ) ); } comp = 3; } else { om[ 0 ] = FL_IsGray( im->type ) ? im->gray : im->ci; err = err || ! ( nm[ 0 ] = fl_get_matrix( nh, nw, sizeof **im->gray ) ); om[ 1 ] = nm[ 1 ] = om[ 2 ] = nm[ 2 ] = 0; comp = 1; } if ( err ) { im->error_message( im, "Scale: malloc failed" ); fl_free_matrix( nm[ 0 ]); fl_free_matrix( nm[ 1 ]); fl_free_matrix( nm[ 2 ]); im->modified = 1; return -1; } im->completed = 0; im->visual_cue( im, "Scaling" ); if ( option & FLIMAGE_ASPECT ) { static float m[ 2 ][ 2 ]; m[ 0 ][ 0 ] = ( float ) nw / im->w; m[ 1 ][ 1 ] = ( float ) nh / im->h; m[ 0 ][ 0 ] = m[ 1 ][ 1 ] = FL_min( m[ 0 ][ 0 ], m[ 1 ][ 1 ] ); fl_free_matrix( nm[ 0 ] ); err = flimage_warp( im, m, nw, nh, option ); im->completed = im->h; im->visual_cue( im, "Scaling Done" ); return err; } else if ( option & FLIMAGE_SUBPIXEL ) err = image_scale( om, nm, im->h, im->w, nh, nw, comp, im ) < 0; else err = image_zoom( om, nm, im->h, im->w, nh, nw, comp, im ) < 0; if ( ! err ) { flimage_replace_image( im, nw, nh, nm[ 0 ], nm[ 1 ], nm[ 2 ] ); im->completed = im->h; im->visual_cue( im, "Scaling Done" ); } else { im->visual_cue( im, "Scaling failed" ); im->error_message( im, "Scaling failed" ); } return err ? -1 : 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/ps_text.c0000644000175000017500000002576511321667266015173 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1997-2002 by T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pflps.h" #include extern char *fl_ul_magic_char; /* * Text stuff. Default fonts follows the XFORM built-in */ static const char *fnts[ FL_MAXFONTS ] = { "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique", "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", /* xforms users charter */ "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", "Symbol" }; /*************************************** ***************************************/ void flps_invalidate_font_cache( void ) { flps->cur_style = flps->cur_size = -1; } /*************************************** ***************************************/ void flps_set_font( int style, int size ) { if ( style >= FL_SHADOW_STYLE ) style %= FL_SHADOW_STYLE; if ( style == flps->cur_style && size == flps->cur_size ) return; if ( flps->scale_text ) size = 0.5 * ( flps->final_xscale + flps->final_yscale ); flps_output( "%d point /%s SetFont\n", size, fnts[ style ] ); flps_output( "/H %d point def\n", size ); flps->cur_style = style; flps->cur_size = size; } #define has_desc( s ) ( strchr( s, 'g' ) \ || strchr( s, 'j' ) \ || strchr( s, 'q' ) \ || strchr( s, 'y' ) \ || strchr( s, 'p' ) ) #define is_desc( c ) ( c == 'g' \ || c == 'j' \ || c == 'q' \ || c == 'y' \ || c == 'p' ) /*************************************** ***************************************/ static void do_underline( const char * s, int n ) { flps_output( "/len (%s) SW pop def\n", s ); if ( n == -1 ) { flps_output( "/ty CP exch pop %d sub def ", 1 + has_desc( s ) * 2 ); flps_output( "/tx CP pop len sub def " ); flps_output( "tx ty M len tx add ty LT S\n" ); } else { char *t = fl_strdup( s ); t[ n ] = '\0'; flps_output( "/ul (%c) SW pop def\n", s[ n ] ); flps_output( "/ty CP exch pop %d sub def ", 1 + is_desc( s [ n ] ) * 2 ); flps_output( "/tx CP pop len sub (%s) SW pop add def\n", t ); flps_output( "tx ty M ul tx add ty LT S\n" ); fl_free( t ); } } #define Quote( c ) ( c == '(' || c == ')' || c == '%') /*************************************** ***************************************/ static char * ps_quote( char * str ) { static char buf[ 1024 ]; char *s, *q = buf; for ( s = str; *s; s++ ) { if ( Quote( *s ) ) *q++ = '\\'; *q++ = *s; } *q = '\0'; return buf; } /*************************************** * This routine is always called by other routines. Once we get here, * the text would always remain within the box specified by * {x,y,w,h}. ***************************************/ static void flps_drw_text( int align, float x, float y, float w, float h, FL_COLOR c, int style, int size, const char * sstr ) { int ulpos = -1, lnumb; int i; char *lines[ 512 ]; char *str; char newlabel[ 255 ], *p; float bw = 2; int halign, valign; int is_vert; flps_color( c ); flps_set_font( style, size ); str = fl_strdup( sstr ); lines[ 0 ] = str; if ( ( is_vert = align & FL_ALIGN_VERT ) ) { align &= ~ FL_ALIGN_VERT; flps_output( "gsave %.1f %.1f translate 90 rotate\n", x, y ); x = y = 0; } /* this is a hack to get arbitary rotation for image_postscript */ if ( flps->rotation ) { flps_output( "gsave %.1f %.1f translate %g rotate\n", x, y, flps->rotation * 0.1 ); x = y = 0; } /* split (multi-line)string into lines */ for ( i = 0, lnumb = 1; str[ i ] != '\0'; i++ ) { if ( str[ i ] == '\n') { str[ i ] = '\0'; lines[ lnumb ] = str + i + 1; lnumb++; } } fli_get_hv_align( align, &halign, &valign ); /* figure out where the starting point is */ switch ( halign ) { case FL_ALIGN_CENTER : flps_output( "/x %.1f def ", x + 0.5 * w ); break; case FL_ALIGN_LEFT : flps_output( "/x %.1f def ", bw + x ); break; case FL_ALIGN_RIGHT : flps_output( "/x %.1f def ", x + w - 1 - bw ); break; } switch ( valign ) { case FL_ALIGN_TOP : flps_output( "/y %.1f H sub def\n", y + h - bw ); break; case FL_ALIGN_BOTTOM : flps_output( "/y %.1f %.1f H mul add def\n", y + bw, lnumb - 0.9 ); break; case FL_ALIGN_CENTER : flps_output( "/y %.1f %.1f H mul add def\n", y + 0.5 * h, 0.5 * lnumb - 0.9 ); break; } for ( i = 0; i < lnumb; i++ ) { /* check if have underline request */ if ( ( p = strchr( lines[ i ], *fl_ul_magic_char ) ) ) { char *q; ulpos = p - lines[ i ]; q = newlabel; p = lines[ i ]; for ( ; *p; p++ ) if ( *p != *fl_ul_magic_char ) *q++ = *p; *q = 0; lines[ i ] = newlabel; } flps_output( "x y M " ); switch ( halign ) { case FL_ALIGN_CENTER : flps_output( "(%s) Cshow\n", ps_quote( lines[ i ] ) ); break; case FL_ALIGN_LEFT : flps_output( "(%s) Lshow\n", ps_quote( lines[ i ] ) ); break; case FL_ALIGN_RIGHT : flps_output( "(%s) Rshow\n", ps_quote( lines[ i ] ) ); break; } if ( ulpos >= 0 ) do_underline( lines[ i ], ulpos - 1 ); ulpos = -1; if ( i != lnumb - 1 ) flps_output( "/y y H sub def\n" ); } fl_free( str ); if ( is_vert || flps->rotation ) flps_output( "grestore\n" ); } #define D( x, y, c ) flps_drw_text( align, x, y, w, h, c, style, size, str ) /*************************************** ***************************************/ void flps_draw_text( int align, int x, int y, int w, int h, FL_COLOR col, int style, int size, const char * istr ) { int special = FL_INVALID_STYLE; const char *str = istr; if ( ! str || ! *str ) return; if ( *str == '@' && str[ 1 ] != '@' ) { if ( w < 3 || h < 3 ) { w = h = size + 4; x -= w / 2; y -= h / 2; } flps_draw_symbol( str, x, y, w, h, col ); return; } str += str[ 1 ] == '@'; if ( special_style( style ) ) { special = ( style / FL_SHADOW_STYLE ) * FL_SHADOW_STYLE; style %= FL_SHADOW_STYLE; } if ( special == FL_SHADOW_STYLE ) D( x + 2, y - 2, FL_BOTTOM_BCOL ); else if ( special == FL_ENGRAVED_STYLE ) { D( x - 1, y, FL_RIGHT_BCOL ); D( x, y + 1, FL_RIGHT_BCOL ); D( x - 1, y + 1, FL_RIGHT_BCOL ); D( x + 1, y, FL_LEFT_BCOL ); D( x, y - 1, FL_LEFT_BCOL ); D( x + 1, y - 1, FL_LEFT_BCOL ); } else if ( special == FL_EMBOSSED_STYLE ) { D( x - 1, y, FL_TOP_BCOL ); D( x, y + 1, FL_TOP_BCOL ); D( x - 1, y + 1, FL_TOP_BCOL ); D( x + 1, y, FL_RIGHT_BCOL ); D( x, y - 1, FL_RIGHT_BCOL ); D( x + 1, y - 1, FL_RIGHT_BCOL ); } flps_drw_text( align, x, y, w, h, col, style, size, str ); } /*************************************** ***************************************/ void flps_draw_text_beside( int align, int x, int y, int w, int h, FL_COLOR col, int style, int size, const char * str ) { if ( ! str || ! *str ) return; align &= ~ FL_ALIGN_INSIDE; if ( align == FL_ALIGN_LEFT ) flps_draw_text( FL_ALIGN_RIGHT, x - h, y, h, h, col, style, size, str ); else if ( align == FL_ALIGN_RIGHT ) flps_draw_text( FL_ALIGN_LEFT, x + w, y, h, h, col, style, size, str ); else if ( align == FL_ALIGN_TOP ) flps_draw_text( FL_ALIGN_BOTTOM, x, y + h, w, h, col, style, size, str ); else if ( align == FL_ALIGN_BOTTOM ) flps_draw_text( FL_ALIGN_TOP, x, y - h, w, h, col, style, size, str ); else if ( align == FL_ALIGN_LEFT_BOTTOM ) flps_draw_text( FL_ALIGN_LEFT_TOP, x, y - h, w, h, col, style, size, str ); else if ( align == FL_ALIGN_RIGHT_BOTTOM ) flps_draw_text( FL_ALIGN_RIGHT_TOP, x, y - h, w, h, col, style, size, str ); else if ( align == FL_ALIGN_LEFT_TOP ) flps_draw_text( FL_ALIGN_LEFT_BOTTOM, x, y + h, w, h, col, style, size, str ); else if ( align == FL_ALIGN_RIGHT_TOP ) flps_draw_text( FL_ALIGN_RIGHT_BOTTOM, x, y + h, w, h, col, style, size, str ); else if ( align == FL_ALIGN_CENTER ) flps_draw_text( FL_ALIGN_CENTER, x, y, w, h, col, style, size, str ); else flps_draw_text( FL_ALIGN_TOP, x, y - h, w, h, col, style, size, str ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_xbm.c0000644000175000017500000001213611247055071015411 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include /*************************************** ***************************************/ static int XBM_identify( FILE * fp ) { int n = 3; char buf[ 128 ]; while ( --n >= 0 && fgets( buf, sizeof buf - 1, fp ) ) { if ( strstr( buf, "#define" ) && strstr( buf, "_width " ) ) { rewind( fp ); return 1; } } return -1; } /*************************************** ***************************************/ static int XBM_description( FL_IMAGE * im ) { char tmpstr[ 256 ]; int w = -1, h = -1, no_size = 1, c; while ( no_size && fgets( tmpstr, sizeof tmpstr, im->fpin ) ) { if ( sscanf( tmpstr, "#define %*s %d", &c ) == 1 ) { if ( strstr( tmpstr, "_width" ) ) w = c; else if ( strstr( tmpstr, "_height" ) ) h = c; no_size = w < 1 || h < 1; } } if ( no_size ) { im->error_message( im, "can't get xbm size" ); return -1; } im->w = w; im->h = h; im->map_len = 2; /* skip until we get brace */ while ( ( h = getc( im->fpin ) ) != EOF && h != '{' ) /* } VI */ /* empty */ ; return h == EOF ? EOF : 0; } /*************************************** ***************************************/ static int XBM_load( FL_IMAGE * im ) { int c, ct, i, j, err; unsigned short *bits; /* populate the colormap */ im->red_lut[ 0 ] = im->green_lut[ 0 ] = im->blue_lut[ 0 ] = FL_PCMAX; im->red_lut[ 1 ] = im->green_lut[ 1 ] = im->blue_lut[ 1 ] = 0; for ( j = err = c = 0; j < im->h && !err; j++ ) { bits = im->ci[ j ]; im->completed = j + 1; for (i = ct = 0; i < im->w && !err; i++, ct = ( ct + 1 ) & 7, c >>= 1 ) { if ( ! ct ) err = ( c = fli_readhexint( im->fpin ) ) < 0; *bits++ = c & 1; } } if ( err ) { im->error_message( im, "Junk in hex stream" ); } return j > im->h / 2 ? j : -1; } /*************************************** ***************************************/ static int XBM_write( FL_IMAGE * im ) { char tmpstr[ 256 ], *p; unsigned short *bits; int nbits, k, len, i, j; FILE *fp = im->fpout; strncpy( tmpstr, im->outfile, sizeof tmpstr - 25 ); if ( ( p = strchr( tmpstr, '.' ) )) *p = '\0'; if ( isdigit( ( int ) tmpstr[ 0 ] ) ) tmpstr[ 0 ] = 'a'; fprintf( fp, "#define %s_width %d\n#define %s_height %d\n", tmpstr, im->w, tmpstr, im->h ); fprintf( fp, "static char %s_bits[] = {\n ", tmpstr ); for ( j = 0, len = 1; j < im->h; j++ ) { bits = im->ci[ j]; im->completed = j; for ( i = nbits = k = 0; i < im->w; i++, bits++ ) { k = k >> 1; if ( *bits ) k |= 0x80; if ( ++nbits == 8 ) { fprintf( fp, "0x%02x", k &= 0xf ); if ( j != im->h - 1 || i != im->w - 1 ) putc( ',', fp ); if ( ( len += 5 ) > 70 ) { fprintf( fp, "\n " ); len = 1; } nbits = k = 0; } } /* check for possible padding */ if ( nbits ) { k >>= 8 - nbits; fprintf( fp, "0x%02x", k &= 0xff ); if ( j != im->h - 1 ) putc( ',', fp ); if ( ( len += 5 ) > 70 ) { fprintf( fp, "\n " ); len = 1; } } } fputs( "};\n", fp ); return fflush( fp ); } /*************************************** ***************************************/ void flimage_enable_xbm( void ) { flimage_add_format( "X11 Bitmap", "xbm", "xbm", FL_IMAGE_MONO, XBM_identify, XBM_description, XBM_load, XBM_write ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_rotate.c0000644000175000017500000002337511247055071016130 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. * * Image rotation */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include #include #ifndef M_PI #define M_PI 3.1415926 #endif static void *rotate_matrix( void *, int, int, int, size_t ); /*************************************** * rotation angle is one-tenth of a degree ***************************************/ int flimage_rotate( FL_IMAGE * im, int deg, int subp ) { int nw, nh; float mat[ 2 ][ 2 ]; void *r, *g = 0, *b = 0; /* normalize the angle to within (0,360) */ while ( deg < 0 ) deg += 3600; while ( deg >= 3600 ) deg -= 3600; if ( deg == 0 || deg == 3600 ) return 0; /* handle special cases TODO */ if ( deg % 900 == 0 ) { deg /= 10; if ( im->type == FL_IMAGE_RGB ) { r = rotate_matrix( im->red, im->h, im->w, deg, sizeof **im->red ); g = rotate_matrix( im->green, im->h, im->w, deg, sizeof **im->green ); b = rotate_matrix( im->blue, im->h, im->w, deg, sizeof **im->blue ); } else if ( im->type == FL_IMAGE_GRAY ) r = rotate_matrix( im->gray, im->h, im->w, deg, sizeof **im->gray ); else if ( im->type == FL_IMAGE_CI ) r = rotate_matrix( im->ci, im->h, im->w, deg, sizeof **im->ci ); else { M_err( "flimage_rotate", "InternalError: unsupported image " "type\n" ); return -1; } if ( deg % 180 == 0 ) { nw = im->w; nh = im->h; } else { nw = im->h; nh = im->w; } if ( ! r ) return -1; flimage_replace_image( im, nw, nh, r, g, b ); return 0; } /* three shear is slightly faster , but with general transform, * we save a lot of code */ mat[ 0 ][ 0 ] = mat[ 1 ][ 1 ] = cos( deg * M_PI / 1800.0 ); mat[ 0 ][ 1 ] = sin( deg * M_PI / 1800.0 ); mat[ 1 ][ 0 ] = -mat[ 0 ][ 1 ]; nw = nh = 0; if ( flimage_warp(im, mat, nw, nh, subp) >= 0 ) { im->completed = im->h; im->visual_cue( im, "Rotation Done" ); return 0; } else return -1; } static int flip_matrix( void *, int, int, int, int ); /*************************************** ***************************************/ int flimage_flip( FL_IMAGE * im, int axis ) { int err = 0; if ( im->type == FL_IMAGE_RGB ) err = flip_matrix( im->red, im->h, im->w, 1, axis ) < 0 || flip_matrix( im->green, im->h, im->w, 1, axis ) < 0 || flip_matrix( im->blue, im->h, im->w, 1, axis ) < 0; else if (FL_IsGray(im->type)) err = flip_matrix( im->gray, im->h, im->w, 2, axis ) < 0; else err = flip_matrix( im->ci, im->h, im->w, 2, axis ) < 0; if ( ! err ) im->modified = 1; return err ? -1 : 0; } /* low level matrix stuff */ #define flip_col( type, matrix, rows, cols ) \ do { \ type **mm = matrix, \ *t, \ *h, \ tmp; \ int j; \ for ( j = 0; j < rows; j++ ) \ for( t = ( h = mm[ j ] ) + cols - 1; t > h; t--, h++ ) \ { \ tmp = *h; \ *h = *t; \ *t = tmp; \ } \ } while ( 0 ) /*************************************** * flip a matrix. Mirror about the x or y ***************************************/ static int flip_matrix( void * matrix, int rows, int cols, int esize, int what ) { if ( what == 'c' || what == 'x' ) /* flip columns */ { if ( esize == 2 ) flip_col( unsigned short, matrix, rows, cols ); else flip_col( unsigned char, matrix, rows, cols ); } else { int i, is = rows / 2; size_t size = esize * cols; unsigned char *tmp, **mm = matrix; if ( ! ( tmp = fl_malloc( size ) ) ) return -1; /* if we only flip the pointers, this will be faster, but then, the 1-d property is violated */ for ( i = 0; i < is; i++ ) { memcpy( tmp, mm[ i ], size ); memcpy( mm[ i ], mm[ rows - 1 - i ], size ); memcpy( mm[ rows - 1 - i ], tmp, size ); } fl_free( tmp ); } return 0; } /* special angles: +-90, +-180 */ /*************************************************************** * rotate a matrix by 90, or -90 or multiples of it * Rotate 180 can be implented as two 90 rotations, but current * code is faster. * * NOTE: input dimension is the diemsnion of the matrix to be * rotated. caller must take care of the rotated dimensions **************************************************************/ /* Rotate 90 degrees */ #define DO_M90( type, out, in ) \ do { \ type *p= ( ( type ** ) out )[ 0 ], \ **o= in; \ int i, \ j; \ for ( j = 0; j < col; j++ ) \ { \ for ( i = row - 1; i >= 0; i-- ) \ *p++ = o[ i ][ j ]; \ } \ } while ( 0 ) /* Rotate -90 degrees */ #define DO_90( type, out, in ) \ do { \ type *p= ( ( type ** ) out )[ 0 ], \ **o= in; \ int i, \ j; \ for ( j = col - 1; j >= 0; j-- ) \ { \ for ( i = 0; i < row; i++ ) \ *p++ = o[ i ][ j ]; \ } \ } while ( 0 ) #define DO_180( ty, out, in ) \ do { \ ty *p= ( ( ty ** ) out )[ 0 ], \ *o= ( ( ty ** ) in )[ 0 ]; \ ty *os; \ for ( os= o + col * row-1 ; os > o; *p++ = *os-- ) \ /* empty */ ; \ } while( 0 ) /*************************************** ***************************************/ static void * rotate_matrix( void * m, int row, int col, int deg, size_t e ) { int nrow = row, ncol = col; void *mm; /* Coerce angle to be +/- 360 */ deg %= 360; /* Now coerce it into +/- 180. */ if ( abs( deg ) > 180 ) { if ( deg < 0 ) deg += 360; else deg -= 360; } if ( deg == 90 || deg == -90 ) { nrow = col; ncol = row; } if ( ! ( mm = fl_get_matrix( nrow, ncol, e ) ) ) return 0; if ( deg == 90 ) { if ( e == 2 ) DO_90( unsigned short, mm, m ); else DO_90( unsigned char, mm, m ); } else if ( deg == -90 ) { if ( e == 2 ) DO_M90( unsigned short, mm, m ); else DO_M90( unsigned char, mm, m ); } else if ( deg == 180 || deg == -180 ) { if ( e == 2 ) DO_180( unsigned short, mm, m ); else DO_180( unsigned char, mm, m ); } else { M_err( "RotateMatrix", "InternalError: bad special angle\n" ); return 0; } return mm; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_bmp.c0000644000175000017500000004313211247055071015401 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993,1998-2002 T.C. Zhao * All rights reserved. * * MS Windows/OS2 bmp file support */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include #include #include #define BMPDEBUG 0 typedef struct { long fsize; /* total file size */ long offset; int infosize; /* supposedly 40 bytes */ int bpp; /* bits per pixel */ int w, h; /* width & height in pixels */ int col_used; /* actual colors used */ int col_important; int planes; int encode; /* compression method */ long isize; /* (compressed) image size */ int xres, yres; /* pix per meter */ int bpl; /* bytes per line */ int pad; /* line pad */ } SPEC; static int load_24bit_bmp( FL_IMAGE *, SPEC * ); static int load_8bit_bmp( FL_IMAGE *, SPEC * ); static int load_4bit_bmp( FL_IMAGE *, SPEC * ); static int load_1bit_bmp( FL_IMAGE *, SPEC * ); /*************************************** ***************************************/ static int BMP_identify( FILE * fp ) { char buf[ 2 ]; size_t c; c = fread( buf, 1, 2, fp ); rewind( fp ); return c == 2 && buf[ 0 ] == 'B' && buf[ 1 ] == 'M'; } /*************************************** ***************************************/ #if BMPDEBUG static void dump_header( const char * where, SPEC * sp ) { fprintf( stderr, "%s\noffset=%ld infosize=%d\n", where, sp->offset, sp->infosize ); fprintf( stderr, "bpl=%d ", sp->bpl ); fprintf( stderr, "w=%d h=%d bpp=%d col_used=%d important=%d\n", sp->w, sp->h, sp->bpp, sp->col_used, sp->col_important ); } #endif enum { E_RGB, E_RLE8, E_RLE4 }; #define bad_bpp( b ) ( b != 1 && b != 4 && b != 8 && b != 24 ) /*************************************** ***************************************/ static void generate_header_info( FL_IMAGE * im ) { SPEC *sp = im->io_spec; static const char *encoding[ ] = { "RGB", "RLE8", "RLE4" }; char buf[ 128 ]; if ( ! ( im->info = fl_malloc( 512 ) ) ) return; sprintf( im->info,"Size=(%d x %d)\n", im->w, im->h ); sprintf( buf, "BitsPerPixel=%d\nBytesPerLine=%d\n", sp->bpp, sp->bpl ); strcat( im->info,buf ); if ( sp->bpp != 24 ) { sprintf( buf,"ColorUsed=%d\n", sp->col_used ); strcat( im->info,buf ); } sprintf( buf,"Encoding=%s", encoding[ sp->encode ] ); strcat( im->info,buf ); } /*************************************** ***************************************/ static int BMP_description( FL_IMAGE * im ) { SPEC *sp = fl_calloc( 1, sizeof *sp ); char buf[ 40 ]; int i; if ( fread( buf, 1, 2, im->fpin ) != 2 ) { im->error_message( im, "error while readin bmp file" ); fl_free( sp ); return -1; } sp->fsize = fli_fget4LSBF( im->fpin ); if ( fread( buf, 1, 4, im->fpin ) != 4 ) { im->error_message( im, "error while reading bmp file" ); fl_free( sp ); return -1; } sp->offset = fli_fget4LSBF( im->fpin ); sp->infosize = fli_fget4LSBF( im->fpin ); if ( sp->infosize != 40 && sp->infosize != 64 ) { im->error_message( im, "unsupported old obsolete bmp file" ); fl_free( sp ); return -1; } im->io_spec = sp; sp->w = fli_fget4LSBF( im->fpin ); sp->h = fli_fget4LSBF( im->fpin ); sp->planes = fli_fget2LSBF( im->fpin ); sp->bpp = fli_fget2LSBF( im->fpin ); sp->encode = fli_fget4LSBF( im->fpin ); sp->isize = fli_fget4LSBF( im->fpin ); sp->xres = fli_fget4LSBF( im->fpin ); sp->yres = fli_fget4LSBF(im->fpin); sp->col_used = fli_fget4LSBF( im->fpin ); sp->col_important = fli_fget4LSBF( im->fpin ); if ( bad_bpp( sp->bpp ) ) { flimage_error( im, "%s: bad bpp (%d)", im->infile, sp->bpp ); fl_free( im->io_spec ); im->io_spec = 0; return -1; } if ( sp->infosize != 40 ) { int skip = sp->infosize - 40; if ( skip < 0 || fread( buf, 1, skip, im->fpin ) != ( size_t ) skip ) { flimage_error( im, "%s: error while reading bmp file", im->infile ); fl_free( im->io_spec ); im->io_spec = 0; return -1; } } im->w = sp->w; im->h = sp->h; /* read colormap */ if ( sp->bpp != 24 ) { if ( ( im->map_len = sp->col_used ) <= 0 ) im->map_len = 1 << sp->bpp; flimage_getcolormap( im ); for ( i = 0; i < im->map_len; i++ ) { im->blue_lut[ i ] = getc( im->fpin ); im->green_lut[ i ] = getc( im->fpin ); im->red_lut[ i ] = getc( im->fpin ); im->alpha_lut[ i ] = getc( im->fpin ); } } sp->bpl = ( sp->w * sp->bpp + 7 ) / 8; sp->pad = ( ( sp->bpl + 3 ) / 4 ) * 4 - sp->bpl; /* pad to 4 bytes */ if ( sp->bpp == 24 ) im->type = FL_IMAGE_RGB; else if ( sp->bpp == 1 ) im->type = FL_IMAGE_MONO; else im->type = FL_IMAGE_CI; #if BMPDEBUG dump_header( "after read", sp ); #endif if ( im->setup->header_info ) generate_header_info( im ); return 1; } /*************************************** ***************************************/ static int BMP_read_pixels( FL_IMAGE * im ) { int status; SPEC *sp = im->io_spec; fseek( im->fpin, sp->offset, SEEK_SET ); im->completed = 0; if ( sp->bpp == 24 ) status = load_24bit_bmp( im, sp ); else if ( sp->bpp == 8 ) status = load_8bit_bmp( im, sp ); else if ( sp->bpp == 4 ) status = load_4bit_bmp( im, sp ); else status = load_1bit_bmp( im, sp ); return status; } /*************************************** ***************************************/ static int load_24bit_bmp( FL_IMAGE * im, SPEC * sp ) { FILE *fp = im->fpin; int i, j; unsigned char *red, *green, *blue; for ( i = im->h - 1; ! feof( fp ) && i >= 0; i--, im->completed++ ) { red = im->red[ i ]; green = im->green[ i ]; blue = im->blue[ i ]; for ( j = 0; j < im->w; j++ ) { blue[ j ] = getc( fp ); green[ j ] = getc( fp ); red[ j ] = getc( fp ); } for ( j = 0; j < sp->pad; j++ ) getc( fp ); if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "Reading 24bit BMP" ); } return ( i < im->h / 2 ) ? 1 : -1; } /*************************************** ***************************************/ static int load_8bit_bmp( FL_IMAGE * im, SPEC * sp ) { FILE *fp = im->fpin; int i, j, k, len, pix; unsigned short *ci; if ( sp->encode == E_RGB ) { for ( i = im->h - 1; i >= 0 && ! feof( fp ); i--, im->completed++ ) { ci = im->ci[ i ]; for ( j = 0; j < im->w + sp->pad; j++ ) { /* check for EOF so we can display partial files */ if ( ( pix = getc( fp ) ) != EOF && j < im->w ) *ci++ = pix; } if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "Reading 8bit BMP" ); } } else { ci = im->ci[ im->h - 1 ]; for ( i = im->h - 1; i >= 0 && ! feof( fp ); ) { len = getc( fp ); pix = getc( fp ); if ( len ) { while ( --len >= 0 ) *ci++ = pix; } else { if ( pix == 0 ) ci = im->ci[ --i ]; else if ( pix == 1 ) goto done; else if ( pix == 2 ) { /* the document is unclear. don't know what does down mean */ ci += getc( fp ); i += ( pix = getc( fp ) ); ci -= pix * im->w; } else { for ( k = 0; k < pix; k++ ) *ci++ = getc( fp ); if ( k & 1 ) getc( fp ); } } if ( ! ( ( im->completed = im->h - i - 1 ) & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "Reading 8bit encoded BMP" ); } } done: return i < ( 2 * im->h / 3 ) ? 1 : -1; } /*************************************** ***************************************/ static int load_4bit_bmp( FL_IMAGE * im, SPEC * sp ) { FILE *fp = im->fpin; int i = -1, j, c, k, len, pix; unsigned short *ci, *cis = 0; if ( sp->encode == E_RGB ) { for ( i = im->h - 1; i >= 0 && ! feof( fp ); i--, im->completed++ ) { ci = im->ci[ i ]; cis = ci + im->w; for ( j = 0; j < sp->bpl; j++ ) { c = getc( fp ); *ci++ = ( c >> 4 ) & 0x0f; if ( ci < cis ) *ci++ = c & 0x0f; } for ( ; j < sp->bpl + sp->pad; j++ ) getc( fp ); if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "Reading 4bit BMP" ); } } else { for ( i = im->h - 1; i >= 0 && ! feof( fp ); ) { ci = im->ci[ i ]; len = getc( fp ); pix = getc( fp ); if ( len ) { /* len is the number of pixels, not bytes */ for ( k = 0; k < len; k++ ) *ci++ = ( ( k & 1 ) ? pix : ( pix >> 4 ) ) & 0x0f; } else { if ( pix == 0 ) ci = im->ci[ --i] ; else if ( pix == 1 ) goto done; else if ( pix == 2 ) { ci += getc( fp ); i += ( pix = getc( fp ) ); ci -= pix * im->w; } else { for ( k = 0, len = pix; k < len; k++ ) { if ( ( k & 1 ) == 0 ) pix = getc( fp ); *ci++ = ( ( k & 1 ) ? pix : ( pix >> 4 ) ) & 0x0f; } /* take care of padding, 2bytes boundary */ pix = len % 4; if ( pix && pix != 3 ) getc( fp ); } } if ( ! ( ( im->completed = im->h - 1 - i ) & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "Reading 4bit encoded BMP" ); } } done: return ( i < ( 2 * im->h / 3 ) ) ? 1 : -1; } /*************************************** ***************************************/ static int load_1bit_bmp( FL_IMAGE * im, SPEC * sp ) { int i, totalbpl = sp->bpl + sp->pad; unsigned char *buf = fl_malloc( totalbpl ); if( ! buf ) { im->error_message( im, "malloc() failed" ); return -1; } for ( i = im->h; --i >= 0 && ! feof( im->fpin ); ) { if ( fread( buf, 1, totalbpl, im->fpin ) != ( size_t ) totalbpl ) { fl_free( buf ); im->error_message( im, "malloc() failed" ); return -1; } fl_unpack_bits( im->ci[ i ], buf, im->w ); } fl_free( buf ); return i < im->h / 2 ? 1 : -1; } /* write routine */ #define IS_RGB( im ) ( im->type == FL_IMAGE_RGB ) #define IS_BW( im ) ( im->type == FL_IMAGE_MONO ) #define IS_8bit( im ) ( im->map_len > 16 ) /*************************************** ***************************************/ static int write_bmp_header( FL_IMAGE * im, SPEC * sp ) { FILE *fp = im->fpout; int mapsize, i; sp->w = im->w; sp->h = im->h; sp->bpp = ( IS_RGB( im ) ? 24 : ( IS_BW( im ) ? 1 : 8 ) ); /* make exception for 16 colors or less */ if ( im->type == FL_IMAGE_CI && im->map_len <= 16 ) sp->bpp = im->map_len <= 2 ? 1 : 4; /* if grayscale, we can make it into a CI */ if ( im->type == FL_IMAGE_GRAY ) sp->bpp = 8; /* bytes per line */ sp->bpl = ( im->w * sp->bpp + 7 ) / 8; sp->pad = ( ( sp->bpl + 3 ) / 4 ) * 4 - sp->bpl; sp->infosize = 40; mapsize = 4 * ( sp->bpp != 24 ? ( 1 << sp->bpp ) : 0 ); sp->fsize = 14 + sp->infosize + mapsize + im->h * ( im->w + sp->pad ); sp->offset = 14 + sp->infosize + mapsize; sp->col_used = sp->col_important = sp->bpp != 24 ? im->map_len : 0; if ( sp->bpp == 1 ) sp->col_used = sp->col_important = 2; #if BMPDEBUG dump_header( "before write", sp ); #endif /* start writing */ fputc( 'B', fp ); fputc( 'M', fp ); fli_fput4LSBF( sp->fsize, fp ); fli_fput4LSBF( 0, fp ); fli_fput4LSBF( sp->offset, fp ); fli_fput4LSBF( sp->infosize, fp ); fli_fput4LSBF( sp->w, fp ); fli_fput4LSBF( sp->h, fp ); fli_fput2LSBF( 1, fp ); fli_fput2LSBF( sp->bpp, fp ); fli_fput4LSBF( E_RGB, fp ); fli_fput4LSBF( 0, fp ); /* encoded size */ fli_fput4LSBF( 96 * 36, fp ); fli_fput4LSBF( 96 * 36, fp ); fli_fput4LSBF( sp->col_used, fp ); /* actual colors */ fli_fput4LSBF( sp->col_important, fp ); /* important colors */ if ( sp->bpp != 24 ) { char junk[ ] = { 0, 0, 0, 0 }; for ( i = 0; i < im->map_len; i++ ) { putc( im->blue_lut[ i ], fp ); putc( im->green_lut[ i ], fp ); putc( im->red_lut[ i ], fp ); putc( 0, fp ); } for ( ; i < 1 << sp->bpp; i++ ) { size_t dummy; dummy = fwrite( junk, 1, 4, fp ); } } return 0; } /*************************************** ***************************************/ static int BMP_write_image( FL_IMAGE * im ) { SPEC *sp = fl_calloc( 1, sizeof *sp ); FILE *fp = im->fpout; int i, j; write_bmp_header( im, sp ); if ( sp->bpp == 24 ) { unsigned char *r, *g, *b; for ( i = im->h; --i >= 0 ; ) { r = im->red[ i ]; g = im->green[ i ]; b = im->blue[ i ]; for ( j = 0; j < im->w; j++, r++, g++, b++ ) { putc( *b, fp ); putc( *g, fp ); putc( *r, fp ); } for ( j = 0; j < sp->pad; j++ ) putc( 0, fp ); } } else if ( sp->bpp == 8 ) { unsigned short *p8, **ras = FL_IMAGE_CI ? im->ci:im->gray; for ( i = im->h; --i >= 0; ) { p8 = ras[ i ]; for ( j = 0; j < im->w; j++, p8++ ) putc( *p8, fp ); for ( j = 0; j < sp->pad; j++ ) putc( 0, fp ); } } else if ( sp->bpp == 4 ) { unsigned short *ci, *cis; unsigned char uc; for ( i = im->h; --i >= 0; ) { cis = ( ci = im->ci[ i ] ) + im->w; for ( j = 0; j < sp->bpl; j++ ) { uc = *ci++; uc <<= 4; if ( ci < cis ) uc |= *ci++; putc( uc, fp ); } for ( j = 0; j < sp->pad; j++ ) putc( 0, fp ); } } else if ( sp->bpp == 1 ) { int totalbpl = sp->bpl + sp->pad; unsigned char *tmpbuf = fl_malloc( totalbpl ); if ( ! tmpbuf ) { im->error_message( im, "malloc() failed" ); return -1; } for ( i = im->h; --i >= 0; ) { size_t dummy; fl_pack_bits( tmpbuf, im->ci[ i ], im->w ); dummy = fwrite( tmpbuf, 1, totalbpl, fp ); } fl_free( tmpbuf ); } fl_free( sp ); return 0; } /*************************************** ***************************************/ void flimage_enable_bmp( void ) { flimage_add_format( "Windows/OS2 BMP file", "bmp", "bmp", FL_IMAGE_FLEX & ~FL_IMAGE_GRAY16, BMP_identify, BMP_description, BMP_read_pixels, BMP_write_image ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_jpeg.c0000644000175000017500000002770211250741277015561 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 T.C. Zhao * All rights reserved. * * JFIF file IO support. * Based mostly on Independent JPEG Groups' example code. * * Except for a couple of output control parameters, there are no * static variables. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /* jpeglib.h includes jconfig.h which has a old-style definition of * HAVE_STDLIB_H. This breaks compilation with compilers like IBM's * xlc. */ #ifdef HAVE_STDLIB_H #undef HAVE_STDLIB_H #endif #include "jpeglib.h" #include "jerror.h" #include /* For some reason, jpeg 6.1 does not work well */ #if JPEG_LIB_VERSION < 62 #error does not work well with jpeg lib v6.a #endif /* options supported by jpeg reader/writer */ static int do_quantization = 0; static int quality_factor = 75; static int smoothing_factor = 0; /*************************************** ***************************************/ void flimage_jpeg_output_options( FLIMAGE_JPEG_OPTION * op ) { quality_factor = op->quality; smoothing_factor = op->smoothing; } static unsigned int jpeg_getc( j_decompress_ptr cinfo ); /*************************************** ***************************************/ static int JPEG_identify( FILE * fp ) { unsigned char buf[ 129 ]; size_t i; i = fread( buf, 1, sizeof buf - 1, fp ); rewind( fp ); buf[ i ] = '\0'; /* Clive Stubbings. * Test for a JPEG SOI code (0xff, 0xd8) followed by the start of * APP0 segement (0xff). * A 'raw' JPEG will not have the JFIF (JPEG file interchange format) * header but is still readable */ if ( buf[ 0 ] == 0xff && buf[ 1 ] == 0xd8 && buf[ 2 ] == 0xff ) return 1; for ( i = 0; i < sizeof buf - 3 && buf[ i ] != 'J'; i++ ) /* empty */ ; return ! strncmp( ( char * ) buf + i, "JFIF", 4 ); } /* cinfo->client_data member only exists in V6B, have to stuff image into error handler. Yuck! */ typedef struct { struct jpeg_error_mgr pub; jmp_buf jmp_buffer; struct jpeg_decompress_struct dinfo; struct jpeg_compress_struct cinfo; FL_IMAGE *image; } SPEC; /*************************************** ***************************************/ static void error_exit( j_common_ptr cinfo ) { SPEC *spec = ( SPEC * ) cinfo->err; static char buf[ 1024 ]; cinfo->err->format_message( cinfo, buf ); spec->image->error_message( spec->image, buf ); longjmp( spec->jmp_buffer, 1 ); } /*************************************** ***************************************/ static boolean gather_comments( j_decompress_ptr cinfo ) { SPEC *spec = ( SPEC * ) cinfo->err; FL_IMAGE *image = spec->image; int length, ch; char *s; length = jpeg_getc( cinfo ) << 8; length += jpeg_getc( cinfo ) - 2; image->comments = fl_realloc( image->comments, length + 1 ); image->comments[ length ] = '\0'; image->comments_len = length; for ( s = image->comments; --length >= 0; ) { ch = jpeg_getc( cinfo ); *s++ = ch; } return FL_TRUE; } /*************************************** ***************************************/ static boolean gather_text( j_decompress_ptr cinfo ) { SPEC *spec = ( SPEC * ) cinfo->err; FL_IMAGE *image = spec->image; int length, ch; char *s; length = jpeg_getc( cinfo ) << 8; length += jpeg_getc( cinfo ) - 2; if ( image->comments ) image->comments = fl_realloc( image->comments, length + 1 ); else image->comments = fl_malloc( length + 1 ); image->comments[ length ] = '\0'; image->comments_len = length; for ( s = image->comments; --length >= 0; ) { ch = jpeg_getc( cinfo ); *s++ = ch; } if ( image->comments[ image->comments_len - 1 ] == '\n' ) image->comments[ image->comments_len - 1 ] = ' '; return FL_TRUE; } /*************************************** ***************************************/ static int JPEG_description( FL_IMAGE * im ) { SPEC *spec = fl_malloc( sizeof *spec ); struct jpeg_decompress_struct *cinfo; cinfo = &spec->dinfo; cinfo->err = jpeg_std_error( &spec->pub ); spec->pub.error_exit = error_exit; spec->image = im; im->io_spec = spec; jpeg_create_decompress( cinfo ); jpeg_set_marker_processor( cinfo, JPEG_COM, gather_comments ); jpeg_set_marker_processor( cinfo, JPEG_APP0 + 12, gather_text ); jpeg_stdio_src( cinfo, im->fpin ); jpeg_read_header( cinfo, FL_TRUE ); /* decompressison options such as quantization here */ if (do_quantization) { cinfo->desired_number_of_colors = 215; cinfo->quantize_colors = FL_TRUE; cinfo->enable_2pass_quant = FL_TRUE; cinfo->two_pass_quantize = FL_TRUE; cinfo->dither_mode = JDITHER_FS; } jpeg_start_decompress( cinfo ); im->w = cinfo->output_width; im->h = cinfo->output_height; im->map_len = cinfo->desired_number_of_colors; if ( cinfo->out_color_space == JCS_GRAYSCALE ) im->type = FL_IMAGE_GRAY; else if ( cinfo->out_color_space == JCS_RGB ) im->type = cinfo->output_components == 3 ? FL_IMAGE_RGB : FL_IMAGE_CI; else { im->error_message( im, "unhandled colorspace" ); return -1; } im->original_type = im->type; return 0; } /*************************************** ***************************************/ static int JPEG_read_pixels( FL_IMAGE * im ) { SPEC *spec = im->io_spec; struct jpeg_decompress_struct *cinfo = &spec->dinfo; int i, j, stride, err; JSAMPARRAY buf; unsigned short *gray, *ci; if ( setjmp( spec->jmp_buffer ) ) { jpeg_destroy_decompress( cinfo ); /* keep what we'be got */ return ( im->completed > im->w / 2 ) ? 1 : -1; } err = 0; stride = cinfo->output_width * cinfo->output_components; buf = cinfo->mem->alloc_sarray( ( j_common_ptr ) cinfo, JPOOL_IMAGE, stride, 1 /* cinfo->rec_outbuf_height */ ); while ( cinfo->output_scanline < cinfo->output_height && ! err ) { jpeg_read_scanlines( cinfo, buf, 1 /* cinfo->rec_out_height */ ); if ( ! ( cinfo->output_scanline & FLIMAGE_REPFREQ ) ) { im->completed = cinfo->output_scanline; im->visual_cue( im, "Reading JPEG" ); } if ( im->type == FL_IMAGE_RGB ) { for ( i = j = 0; i < ( int ) cinfo->output_width; i++, j += 3 ) { im->red[ cinfo->output_scanline - 1 ][ i ] = buf[ 0 ][ j ]; im->green[ cinfo->output_scanline - 1 ][ i ] = buf[ 0 ][ j + 1 ]; im->blue[ cinfo->output_scanline - 1 ][ i ] = buf[ 0 ][ j + 2 ]; } } else if ( im->type == FL_IMAGE_CI ) { im->map_len = cinfo->actual_number_of_colors; for ( i = 0; i < cinfo->actual_number_of_colors; i++ ) { im->red_lut[ i ] = cinfo->colormap[ 0 ][ i ]; im->green_lut[ i ] = cinfo->colormap[ 1 ][ i ]; im->blue_lut[ i ] = cinfo->colormap[ 2 ][ i ]; } ci = im->ci[ cinfo->output_scanline - 1 ]; for ( i = 0; i < ( int ) cinfo->output_width; i++ ) ci[ i ] = buf[ 0 ][ i ]; } else if ( im->type == FL_IMAGE_GRAY ) { gray = im->gray[ cinfo->output_scanline - 1 ]; for ( i = j = 0; i < im->w; i++ ) gray[ i ] = buf[ 0 ][ i ]; } else { flimage_error( im, "%s: unknown color space", im->infile ); err = 1; } } jpeg_finish_decompress( cinfo ); jpeg_destroy_decompress( cinfo ); return im->completed > im->h / 3 ? 1 : -1; } /*************************************** ***************************************/ static int JPEG_write( FL_IMAGE * im ) { SPEC *spec = fl_calloc( 1, sizeof *spec ); struct jpeg_compress_struct *cinfo; /* JSAMPROW rowptr[ 1 ]; */ JSAMPARRAY rowptr; unsigned char *buf; int i; cinfo = &spec->cinfo; cinfo->err = jpeg_std_error( &spec->pub ); spec->pub.error_exit = error_exit; if ( setjmp( spec->jmp_buffer ) ) { jpeg_destroy_compress( cinfo ); fl_free( spec ); return -1; } jpeg_create_compress( cinfo ); jpeg_stdio_dest( cinfo, im->fpout ); cinfo->image_width = im->w; cinfo->image_height = im->h; if ( im->type == FL_IMAGE_RGB ) { cinfo->input_components = 3; cinfo->in_color_space = JCS_RGB; } else if ( im->type == FL_IMAGE_GRAY ) { cinfo->input_components = 1; cinfo->in_color_space = JCS_GRAYSCALE; } jpeg_set_defaults( cinfo ); jpeg_set_quality( cinfo, quality_factor, FL_TRUE ); cinfo->smoothing_factor = smoothing_factor; jpeg_start_compress( cinfo, FL_TRUE ); if ( im->comments ) jpeg_write_marker( cinfo, JPEG_COM, (void *) im->comments, im->comments_len ); rowptr = cinfo->mem->alloc_sarray( ( j_common_ptr ) cinfo, JPOOL_IMAGE, cinfo->input_components * im->w, 1 ); while ( cinfo->next_scanline < cinfo->image_height ) { if ( ! ( cinfo->next_scanline & FLIMAGE_REPFREQ ) ) { im->completed = cinfo->next_scanline; im->visual_cue( im, "Writing JPEG " ); } for ( buf = rowptr[ 0 ], i = 0; i < im->w; i++ ) { if ( cinfo->input_components == 3 ) { *buf++ = im->red[ cinfo->next_scanline ][ i ]; *buf++ = im->green[ cinfo->next_scanline ][ i ]; *buf++ = im->blue[ cinfo->next_scanline ][ i ]; } else *buf++ = ( unsigned char ) im->gray[ cinfo->next_scanline ][ i ]; } jpeg_write_scanlines( cinfo, rowptr, 1 ); } jpeg_finish_compress( cinfo ); fflush( im->fpout ); jpeg_destroy_compress( cinfo ); fl_free( spec ); return 1; } /*************************************** ***************************************/ static unsigned int jpeg_getc( j_decompress_ptr cinfo ) { struct jpeg_source_mgr *datasrc = cinfo->src; if (datasrc->bytes_in_buffer == 0) { if (!datasrc->fill_input_buffer(cinfo)) ERREXIT(cinfo, JERR_CANT_SUSPEND); } datasrc->bytes_in_buffer--; return GETJOCTET(*datasrc->next_input_byte++); } /*************************************** ***************************************/ void flimage_enable_jpeg( void ) { flimage_add_format( "JPEG/JFIF format", "jpeg", "jpg", FL_IMAGE_RGB | FL_IMAGE_GRAY, JPEG_identify, JPEG_description, JPEG_read_pixels, JPEG_write ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_replace.c0000644000175000017500000000613011247055071016233 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * replace a specific pixel */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*************************************** * replace all color target with color repl ***************************************/ int flimage_replace_pixel( FL_IMAGE * im, unsigned int target, unsigned int repl ) { int n, r1, g1, b1, r2, g2, b2; int tmp; if ( ! im || im->w <= 0 ) return -1; FL_UNPACK( target, r1, g1, b1 ); FL_UNPACK( repl, r2, g2, b2 ); flimage_invalidate_pixels( im ); if ( im->type == FL_IMAGE_RGB ) { unsigned char *red = im->red[ 0 ]; unsigned char *green = im->green[ 0 ]; unsigned char *blue = im->blue[ 0 ]; for ( n = im->w * im->h; --n >= 0; ) { tmp = FL_PACK( red[ n ], green[ n ], blue[ n ] ); if ( tmp == ( int ) target ) { red[ n ] = r2; green[ n ] = g2; blue[ n ] = b2; } } } else if ( im->type == FL_IMAGE_PACKED ) { unsigned int *packed = im->packed[ 0 ]; for ( n = im->w * im->h; --n >= 0; ) { if ( packed[ n ] == target ) packed[ n ] = repl; } } else if ( FL_IsGray( im->type ) ) { unsigned short *gray = im->gray[ 0 ]; unsigned short gray1 = FL_RGB2GRAY( r1, g1, b1 ); unsigned short gray2 = FL_RGB2GRAY( r2, g2, b2 ); for ( n = im->w * im->h; --n >= 0; ) if ( gray[n] == gray1 ) gray[ n ] = gray2; } else if ( FL_IsCI( im->type ) ) { unsigned short *ci = im->ci[ 0 ]; unsigned short c1 = flimage_get_closest_color_from_map( im, target ); unsigned short c2 = flimage_get_closest_color_from_map( im, repl ); for ( n = im->w * im->h; --n >= 0; ) if ( ci[ n ] == c1 ) ci[ n ] = c2; } else { M_err( "ReplaceColor", "InternalError: bad type %d", im->type ); return -1; } im->modified = 1; return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_genesis.c0000644000175000017500000000705111247055071016260 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 By T.C. Zhao * All rights reserved. * * but genesis format. Eventually dicom will * be supported */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #define IMG_MAGIC 0x494d4746 typedef struct { int magic; int hdr_len; int width; int height; int depth; int compress; int windoww; int windowl; } SPEC; /*************************************** ***************************************/ static int GENESIS_identify( FILE * fp ) { char buf[ 4 ]; size_t c; c = fread( buf, 1, 4, fp ); rewind( fp ); return c == 4 && strncmp( buf, "IMGF", 4 ) == 0; } /*************************************** ***************************************/ static int GENESIS_description( FL_IMAGE * im ) { SPEC *sp = fl_calloc( 1, sizeof *sp ); FILE *fp = im->fpin; im->io_spec = sp; im->spec_size = sizeof *sp; rewind( fp ); sp->magic = fli_fget4MSBF( fp ); sp->hdr_len = fli_fget4MSBF( fp ); sp->width = fli_fget4MSBF( fp ); sp->height = fli_fget4MSBF( fp ); sp->depth = fli_fget4MSBF( fp ); sp->compress = fli_fget4MSBF( fp ); sp->windoww = fli_fget4MSBF( fp ); sp->windowl = fli_fget4MSBF( fp ); if ( sp->depth < 8 || sp->compress != 1 ) return -1; im->type = sp->depth == 8 ? FL_IMAGE_GRAY : FL_IMAGE_GRAY16; im->gray_maxval = ( 1 << sp->depth ) - 1; im->w = sp->width; im->h = sp->height; return 0; } /*************************************** * convert MSBF ***************************************/ static void convert_msbf( unsigned short * pixels, int npixels ) { unsigned short *p = pixels, *ps = p + npixels; unsigned char *c = ( unsigned char * ) p; for ( ; p < ps; p++, c += 2 ) *p = ( c[ 0 ] << 8 ) | c[ 1 ]; } /*************************************** ***************************************/ static int GENESIS_load( FL_IMAGE * im ) { FILE *fp = im->fpin; SPEC *sp = im->io_spec; fseek( fp, sp->hdr_len, SEEK_SET ); if ( fread( im->gray[ 0 ], sp->depth / 8, im->w * im->h, fp ) != ( size_t ) im->w * im->h ) convert_msbf( im->gray[ 0 ], im->w * im->h ); return 0; } /*************************************** ***************************************/ void flimage_enable_genesis( void ) { flimage_add_format( "GE Genesis", "genesis", "ge", FL_IMAGE_GRAY16 | FL_IMAGE_GRAY, GENESIS_identify, GENESIS_description, GENESIS_load, 0 ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/.cvsignore0000644000175000017500000000006211171560225015306 0ustar jensjenslibflimage* Makefile Makefile.in .deps .libs *.lo xforms-1.0.93sp1/image/image_gzip.c0000644000175000017500000000472011247055071015574 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * handle gzip/compress */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*************************************** ***************************************/ static int GZIP_identify( FILE * fp ) { char buf[ 2 ]; if ( fread( buf, 1, 2, fp ) != 2 ) return 0; return buf[ 0 ] == '\037' && ( buf[ 1 ] == '\213' || buf[ 1 ] == '\235' ); } /*************************************** ***************************************/ static int GZIP_description( FL_IMAGE * im ) { static char *cmds[ ] = { "gzip -dc %s > %s", NULL }; return flimage_description_via_filter( im, cmds, "reading gzip ...", 0 ); } /*************************************** ***************************************/ static int GZIP_load( FL_IMAGE * im FL_UNUSED_ARG ) { fprintf( stderr, "should never been here\n" ); return -1; } /*************************************** ***************************************/ static int GZIP_dump( FL_IMAGE * im ) { static char *cmds[ ] = {"gzip %s > %s", NULL }; static char *formats[ ] = { "ppm", "pgm", "pbm", NULL }; return flimage_write_via_filter( im, cmds, formats, 0 ); } /*************************************** ***************************************/ void flimage_enable_gzip( void ) { flimage_add_format( "GZIP format", "gzip", "gz", FL_IMAGE_FLEX, GZIP_identify, GZIP_description, GZIP_load, GZIP_dump ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/postscript.c0000644000175000017500000006541211321672724015703 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Supports xyplot PostScript dump. Almost a verbatim copy of * xyplot.c */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pxyplot.h" #include "private/pflps.h" #include static void ps_draw_xyplot( FL_OBJECT * ob ); /*************************************** ***************************************/ static int auto_orientation( float pw, float ph, float obw, float obh ) { int plm, pbm, llm, lbm; plm = ( pw - obw ) / 2; pbm = ( ph - obh ) / 2; llm = ( pw - obh ) / 2; lbm = ( ph - obw ) / 2; return ( FL_abs( lbm - llm ) < FL_abs( pbm - plm ) ) ? FLPS_LANDSCAPE : FLPS_PORTRAIT; } /*************************************** * find scale factor, in percentage point ***************************************/ static int auto_scale( float pw, float ph, float obw, float obh ) { float margin = 0.4 * 72; /* about 1cm */ float gscalex, gscaley; int i = 100; pw -= 2 * margin; ph -= 2 * margin; if ( ( flps->orientation == FLPS_PORTRAIT && ( pw < obw || ph < obh ) ) || ( flps->orientation == FLPS_LANDSCAPE && ( pw < obh || ph < obw ) ) ) { if ( flps->orientation == FLPS_PORTRAIT ) { gscalex = ( pw - 2.0 ) / obw; gscaley = ( ph - 2.0 ) / obh; } else { gscalex = ( pw - 2.0 ) / obh; gscaley = ( ph - 2.0 ) / obw; } i = 100.0 * ( ( gscalex < gscaley ) ? gscalex : gscaley ); } return i; } /*************************************** ***************************************/ static char * strip_newline( char * str ) { static char s[ 64 ]; char *c; strncpy( s, str, 63 ); s[ 63 ] = '\0'; for ( ; ( c = strchr( s, '\n' ) ); ) *c = ' '; return s; } /*************************************** ***************************************/ int fl_object_ps_dump( FL_OBJECT * ob, const char * fname ) { float bxi, /* bounding box */ byi, bxf, byf; float objw, objh, pw, ph; float fgscale; int gscale = 100; int orientation; if ( ! flps ) { flps = ( FLPSInfo * ) flps_init( ); if (ob->objclass == FL_XYPLOT) flps->ps_color = FLPS_BW;; } /* try to open the file */ if ( ! fname || ! *fname ) fname = fl_show_fselector( "Output Filename", "", "*ps", "" ); /* cancel */ if ( ! fname ) return 0; if ( ! *fname ) { M_err( "PS_dump", "null filename" ); return -1; } if ( strcmp( fname, "-" ) == 0 ) flps->fp = stdout; else flps->fp = fopen( fname, "w" ); if ( ! flps->fp ) { M_err( "PS_dump", "can't open %s", fname ); return -1; } /* we need to do this to get repeated call right */ flps_reset_cache( ); /* fill in some defaults */ if ( flps->drawbox < 0 ) flps->drawbox = 0; #if 0 fl_freeze_all_forms( ); fl_set_cursor( ob->form->window, XC_watch ); fl_update_display( 0 ); #endif flps->s2px = 72.0 / flps->xdpi; flps->s2py = 72.0 / flps->ydpi; flps->final_xscale = flps->xscale * flps->s2px; flps->final_yscale = flps->yscale * flps->s2py; /* bounding box always in point */ pw = flps->paper_w * 72; ph = flps->paper_h * 72; objw = ob->w * flps->final_xscale; objh = ob->h * flps->final_yscale; /* handle auto orientation */ if ( ( orientation = flps->orientation ) == FLPS_AUTO ) orientation = auto_orientation( pw, ph, objw, objh ); flps->landscape = orientation == FLPS_LANDSCAPE; if ( flps->auto_fit ) gscale = auto_scale( pw, ph, objw, objh ); fgscale = gscale * 0.01; flps->final_xscale *= fgscale; flps->final_yscale *= fgscale; if ( flps->landscape ) { bxi = ( pw - objh * fgscale ) * 0.5; byi = ( ph - objw * fgscale ) * 0.5; bxf = bxi + objh * fgscale; byf = byi + objw * fgscale; } else { bxi = ( pw - objw * fgscale ) * 0.5; byi = ( ph - objh * fgscale ) * 0.5; bxf = bxi + objw * fgscale; byf = byi + objh * fgscale; } flps_emit_header( strip_newline( ob->label ), 1, bxi, byi, bxf, byf ); flps_emit_prolog( ); if ( flps->landscape ) { /* from now on, we are in pixel unit */ flps_output( "gsave %.1f %.1f translate 90 rotate\n", bxi + objh, byi ); flps_output( "%.1f %.1f translate\n", -ob->x * flps->final_yscale, -ob->y * flps->final_xscale ); } else flps_output( "gsave %.1f %.1f translate\n", bxi - ob->x * flps->final_xscale, byi - ob->y * flps->final_yscale ); flps_output( "SX SY scale\n " ); switch ( ob->objclass ) { case FL_XYPLOT : ps_draw_xyplot( ob ); break; default : M_err( "PS_dump", "unsupported object class: %d", ob->objclass ); break; } fputs( "grestore\nshowpage\n", flps->fp ); fclose( flps->fp ); #if 0 fl_reset_cursor( ob->form->window ); fl_unfreeze_all_forms( ); #endif return 0; } static void flps_draw_text_point(int, int, int, FL_COLOR, int, int, char * ); #define PCOL( c ) ( ( flps->ps_color == FLPS_BW && ! flps->drawbox ) ? \ FL_BLACK : c ) #define SPEC FLI_XYPLOT_SPEC static int ym1, ym2; static float ay, by; #define FLIP( ys ) ( ym1 + ( sp->yf - ys ) ) #define FMIN 1.e-25 /*************************************** ***************************************/ static void mapw2s( FLI_XYPLOT_SPEC * sp, FL_POINT * p, int n1, int n2, float * x, float * y ) { int i; float ax = sp->ax, bx = sp->bx; float lbase, t; ay = ( sp->yf - sp->yi) / (sp->yscmax - sp->yscmin ); by = ym1 - ay * sp->yscmin; if ( sp->xscale == FL_LOG ) { lbase = 1.0 / sp->lxbase; for ( i = n1; i < n2; i++ ) { t = x[ i ] > 0 ? x[ i ] : FMIN; p[ i - n1 ].x = ax * log10( t ) * lbase + bx + 0.4; } } else { for ( i = n1; i < n2; i++ ) p[ i - n1 ].x = ax * x[ i ] + bx + 0.4; } if ( sp->yscale == FL_LOG ) { lbase = 1.0 / sp->lybase; for ( i = n1; i < n2; i++ ) { t = y[ i ] > 0 ? y[ i ] : FMIN; p[ i - n1 ].y = ay * log10( t ) * lbase + by + 0.4; } } else { for ( i = n1; i < n2; i++ ) p[ i - n1 ].y = ay * y[ i ] + by + 0.4; } } /*************************************** ***************************************/ static void add_border( FL_OBJECT * ob, FL_COLOR c ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( sp->xtic > 0 && sp->ytic > 0 ) flps_rect( sp->xi, ym1, sp->xf - sp->xi + 1, ym2 - ym1 + 1, c ); else if ( sp->xtic > 0 ) flps_line( sp->xi, ym1, sp->xf, ym1, c ); else if ( sp->ytic > 0 ) flps_line( sp->xi, ym1, sp->xi, ym2, c ); } /*************************************** ***************************************/ static void w2s( FL_OBJECT * ob, float wx, float wy, float * sx, float * sy ) { FLI_XYPLOT_SPEC *sp = ob->spec; *sx = wx * sp->ax + sp->bx; *sy = wy * ay + by; } /*************************************** ***************************************/ static void draw_inset( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int i; float tx, ty; for ( i = 0; i < sp->maxoverlay; i++ ) { if ( sp->text[ i ] ) { w2s( ob, sp->xt[ i ], sp->yt[ i ], &tx, &ty ); flps_draw_text_point( sp->talign[ i ], tx, ty, PCOL( sp->tcol[ i ] ), sp->lstyle, sp->lsize, sp->text[ i ] ); } } } #define XRound( s ) \ ( ( s )->xtic > 0 && ! ( s )->axtic[ 0 ] && ( s )->xmajor > 1 ) #define YRound( s ) \ ( ( s )->ytic > 0 && ! ( s )->aytic[ 0 ] && ( s )->ymajor > 1 ) /*************************************** ***************************************/ static void add_xtics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float tic = sp->xtic; int xr, ticl = 6, yi, yf, i; char buf[ 80 ], *label, *p; if ( tic <= 0 ) return; yi = ym1; yf = yi - ticl / 2; for ( i = 0; i < sp->num_xminor; i++ ) { xr = sp->xtic_minor[ i ]; flps_line( xr, yi, xr, yf, ob->col2 ); } yi = ym1; yf = yi - ticl; for ( i = 0; i < sp->num_xmajor; i++ ) { xr = sp->xtic_major[ i ]; flps_line( xr, yi, xr, yf, ob->col2 ); if ( ! sp->axtic[ 0 ] ) fli_xyplot_nice_label( tic, sp->xminor, sp->xmajor_val[ i ], label = buf ); else { if ( ( p = strchr( sp->axtic[ i ], '@' ) ) ) { label = strcpy( buf, sp->axtic[ i ] ); label[ p - sp->axtic[ i ] ] = '\0'; } else label = sp->axtic[ i ]; } flps_draw_text( FL_ALIGN_TOP, xr, ym1 - ticl + 1, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } } /*************************************** ***************************************/ static void add_logxtics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float xw; int xr, ticl = 6, yi, yf, i; char label[ 80 ]; if ( sp->xtic < 0 ) return; yi = ym1; yf = yi - ticl / 2; for ( i = 0; i < sp->num_xminor; i++ ) { xr = sp->xtic_minor[ i ]; flps_line( xr, yi, xr, yf, ob->col2 ); } yi = ym1; yf = ym1 - ticl; for ( i = 0; i < sp->num_xmajor; i++ ) { xr = sp->xtic_major[ i ]; flps_line( xr, yi, xr, yf, ob->col2 ); xw = sp->xmajor_val[ i ]; if ( sp->xbase == 10.0 ) { sprintf( label, "%g", pow( 10.0, sp->xmajor_val[ i ] ) ); flps_draw_text( FL_ALIGN_TOP, xr, yf + 1, 1, 1, ob->col2, sp->lstyle, sp->lsize, label); } else { int len1, len2, ll; ll = sprintf( label, "%g", sp->xbase ); flps_draw_text( FL_ALIGN_TOP, xr - 3, yf - 1, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); len1 = fl_get_string_width( sp->lstyle, sp->lsize, label, ll ); ll = sprintf( label, "%d", ( int ) ceil( xw ) ); len2 = fl_get_string_width( sp->lstyle, sp->lsize - 2, label, ll ); flps_draw_text( FL_ALIGN_TOP, xr - 3 + len1 / 2 + len2 / 2, yf + 3, 0, 0, ob->col2, sp->lstyle, sp->lsize - 2, label ); } } } /*************************************** ***************************************/ static void add_ytics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float tic = sp->ytic; int yr, ticl = 6, i; char buf[ 80 ], *label, *p; if ( sp->ytic <= 0 ) return; for ( i = 0; i < sp->num_yminor; i++ ) { yr = FLIP( sp->ytic_minor[ i ] ); flps_line( sp->xi, yr, sp->xi - ticl / 2, yr, ob->col2 ); } for ( i = 0; i < sp->num_ymajor; i++ ) { yr = FLIP( sp->ytic_major[ i ] ); flps_line( sp->xi - ticl, yr, sp->xi, yr, ob->col2 ); if ( ! sp->aytic[ 0 ] ) fli_xyplot_nice_label( tic, sp->yminor, sp->ymajor_val[ i ], label = buf ); else { if ( ( p = strchr( sp->aytic[ i ], '@' ) ) ) { label = strcpy( buf, sp->aytic[ i ] ); label[ p - sp->aytic[ i ] ] = '\0'; } else label = sp->aytic[ i - 1 ]; } flps_draw_text( FL_ALIGN_RIGHT, sp->xi - ticl + 1, yr, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } } /*************************************** ***************************************/ static void add_logytics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float yw; int yr, ticl = 6, i; char label[ 80 ]; if ( sp->ytic <= 0 ) return; for ( i = 0; i < sp->num_yminor; i++ ) { yr = FLIP( sp->ytic_minor[ i ] ); flps_line( sp->xi, yr, sp->xi - ticl / 2, yr, ob->col2 ); } for ( i = 0; i < sp->num_ymajor; i++ ) { yr = FLIP( sp->ytic_major[ i ] ); flps_line( sp->xi - ticl, yr, sp->xi, yr, ob->col2 ); yw = sp->ymajor_val[ i ]; if ( sp->ybase == 10.0 ) { sprintf( label, "%g", pow( sp->ybase, yw ) ); flps_draw_text( FL_ALIGN_RIGHT, sp->xi - ticl, yr, 1, 1, ob->col2, sp->lstyle, sp->lsize, label ); } else { int len, ll; ll = sprintf( label, "%d", ( int ) ceil( yw ) ); flps_draw_text( FL_ALIGN_RIGHT, sp->xi - ticl, yr + 3, 0, 0, ob->col2, sp->lstyle, sp->lsize - 2, label ); len = fl_get_string_width( sp->lstyle, sp->lsize - 2, label, ll ); sprintf( label, "%g", sp->ybase ); flps_draw_text( FL_ALIGN_RIGHT, sp->xi - ticl - len, yr, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } } } /*************************************** ***************************************/ static void draw_square( FL_POINT * p, int n, int w, int h ) { int w2 = w / 2, h2 = h / 2; FL_POINT *ps = p + n; for ( ; p < ps; p++ ) flps_rectangle( 0, p->x - w2, p->y - h2, w, h, FL_NoColor ); } /*************************************** ***************************************/ static void draw_circle( FL_POINT * p, int n, int w, int h ) { FL_POINT *ps = p + n; int r = ( w + h ) / 4; for ( ; p < ps; p++ ) flps_circ( 0, p->x, p->y, r, FL_NoColor ); /* nocolor mean current */ } /*************************************** ***************************************/ static void draw_point( FL_POINT * p, int n, int w, int h ) { int w2 = w / 2, h2 = h / 2; FL_POINT *ps = p + n; for ( ; p < ps; p++ ) { flps_line( p->x, p->y - h2, p->x, p->y + h2, FL_NoColor ); flps_line( p->x - w2, p->y, p->x + w2, p->y, FL_NoColor ); flps_line( p->x - w2, p->y - h2, p->x + w2, p->y + h2, FL_NoColor ); flps_line( p->x + w2, p->y - h2, p->x - w2, p->y + h2, FL_NoColor ); } } /*************************************** ***************************************/ static void add_xgrid( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int xr, i; int savels = flps_get_linestyle( ); flps_linestyle( sp->grid_linestyle ); for ( i = 0; sp->xgrid == FL_GRID_MINOR && i < sp->num_xminor; i++ ) { xr = sp->xtic_minor[ i ]; flps_line( xr, ym1, xr, ym2, ob->col2 ); } for ( i = 0; i < sp->num_xmajor; i++ ) { xr = sp->xtic_major[ i ]; flps_line( xr, ym1, xr, ym2, ob->col2 ); } flps_linestyle( savels ); } /*************************************** ***************************************/ static void add_ygrid( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int yr, i, xi, xf; int savels = flps_get_linestyle( ); xi = sp->xi + 1; xf = sp->xf - 1; flps_linestyle( sp->grid_linestyle ); for ( i = 0; sp->ygrid == FL_GRID_MINOR && i < sp->num_yminor; i++ ) { yr = FLIP( sp->ytic_minor[ i ] ); flps_line( xi, yr, xf, yr, ob->col2 ); } for ( i = 0; i < sp->num_ymajor; i++ ) { yr = FLIP( sp->ytic_major[ i ] ); flps_line( xi, yr, xf, yr, ob->col2 ); } flps_linestyle( savels ); } /*************************************** * Draw xyplot in PostScript device. The driver sets things * up so the coordinate system is in pixels and the origin * of the coordinate system is at form's origin * * This is an almost verbatim copy of the X xyplot drawing ***************************************/ static void ps_draw_xyplot( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float *x, *y; FL_POINT *xp; int i, nplot, noline = 0, n1, n2, nxp, newn; void ( * drawsymbol )( FL_POINT *, int, int, int ); int savels = flps_get_linestyle( ); int savelw = flps_get_linewidth( ); int key_xs, key_ys; int dblbuffer; FL_COLOR col, savecol2; if ( ! ob->visible || ! ob->form->visible ) { M_err( "PSDrawXYPlot", "object must be visible" ); return; } flps_linewidth( 1 ); /* for BW output, always black ink */ savecol2 = ob->col2; ob->col2 = PCOL( ob->col2 ); /* bounding box and object label */ if ( flps->drawbox ) flps_draw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); flps_draw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, PCOL(ob->lcol), ob->lstyle, ob->lsize, ob->label ); /* if we're in double buffer mode, need to shift the plot. */ dblbuffer = sp->bym - sp->by >= 1.0 || sp->bxm - sp->bx >= 1.0; if ( dblbuffer ) fprintf( flps->fp, "%d -%d translate\n", sp->objx, sp->objy ); /* ym1 and ym2 are the y-bounds in PostScript system, i.e., ym1y + ( ob->y + ob->h - 1 - sp->yf ); ym2 = ( ob->y + ob->h - 1 ) - ( sp->yi - ob->y ); add_border( ob, ob->col2 ); flps_set_clipping( sp->xi, ym1, sp->xf - sp->xi + 1, ym2 - ym1 + 1 ); if ( sp->xgrid != FL_GRID_NONE && sp->xtic > 0 ) add_xgrid( ob ); if ( sp->ygrid != FL_GRID_NONE && sp->ytic > 0 ) add_ygrid( ob ); /* too lazy to figure out the transformation to map X to PS. brute force */ { FL_POINT tmpp; float keyx = sp->key_x, keyy = sp->key_y; mapw2s( sp, &tmpp, 0, 1, &keyx, &keyy ); sp->key_xs = tmpp.x; sp->key_ys = tmpp.y; } flps_rectangle( 0, sp->key_xs - sp->key_maxw - 1, sp->key_ys - sp->key_maxh - 1, sp->key_maxw, sp->key_maxh, PCOL( sp->col[ 0 ] ) ); key_xs = sp->key_xs - sp->key_maxw + 1; key_ys = sp->key_ys - sp->key_ascend + sp->key_descend + ( sp->lsize > 12 ); for ( nplot = 0; nplot <= sp->maxoverlay; nplot++ ) { if ( sp->n[ nplot ] == 0 ) continue; fli_xyplot_compute_data_bounds( ob, &n1, &n2, nplot ); noline = 0; drawsymbol = NULL; col = PCOL( sp->col[ nplot ] ); flps_color( col ); /* for PostScript, we don't want 0, too thin */ flps_linewidth( sp->thickness[ nplot ] ? sp->thickness[ nplot ] : 1 ); if ( sp->interpolate[ nplot ] > 1 && n2 - n1 > 3 && ( newn = fli_xyplot_interpolate( ob, nplot, n1, n2 ) ) >= 0 ) { x = sp->wx; y = sp->wy; xp = sp->xpi; mapw2s( sp, xp, 0, newn, x, y ); nxp = sp->nxpi = newn; mapw2s( sp, sp->xp, n1, n2, sp->x[ nplot ], sp->y[ nplot ] ); sp->nxp = n2 - n1; } else { x = sp->x[ nplot ]; y = sp->y[ nplot ]; xp = sp->xp; mapw2s( sp, xp, n1, n2, x, y ); nxp = sp->nxp = n2 - n1; } switch ( sp->type[ nplot ] ) { case FL_SQUARE_XYPLOT : case FL_ACTIVE_XYPLOT : drawsymbol = draw_square; break; case FL_CIRCLE_XYPLOT : drawsymbol = draw_circle; break; case FL_POINTS_XYPLOT : noline = 1; /* fall through */ case FL_LINEPOINTS_XYPLOT : drawsymbol = draw_point; break; case FL_DOTTED_XYPLOT : flps_linestyle( FL_DOT ); break; case FL_DOTDASHED_XYPLOT : flps_linestyle( FL_DOTDASH ); break; case FL_DASHED_XYPLOT : flps_linestyle( FL_DASH ); break; case FL_LONGDASHED_XYPLOT : flps_linestyle( FL_LONGDASH ); break; case FL_FILL_XYPLOT : xp[ -1 ].x = xp[ 0 ].x; xp[ -1 ].y = ym1; xp[ nxp ].x = xp[ nxp - 1 ].x; xp[ nxp ].y = ym1; flps_poly( 1, xp - 1, nxp + 2, col ); noline = 1; break; case FL_IMPULSE_XYPLOT : noline = 1; for ( i = 0; i < sp->n[ nplot ]; i++ ) flps_line( sp->xp[ i ].x, ym1, sp->xp[ i ].x, sp->xp[ i ].y, col ); break; case FL_EMPTY_XYPLOT : noline = 1; break; case FL_NORMAL_XYPLOT : default: noline = 0; break; } if ( ! noline ) flps_lines( xp, nxp, col ); if ( drawsymbol ) { xp = sp->xp; /* always use original point for symbol */ nxp = sp->nxp; drawsymbol( xp, nxp, sp->ssize, sp->ssize ); } /* do keys */ if ( sp->key[ nplot ] ) { flps_linewidth( 0 ); if ( ! noline ) flps_line( key_xs, key_ys, key_xs + 20, key_ys, col ); if ( sp->type[ nplot ] == FL_IMPULSE_XYPLOT ) { flps_line( key_xs + 3, key_ys + 2, key_xs + 3, key_ys - 3, col ); flps_line( key_xs + 7, key_ys + 2, key_xs + 7, key_ys - 3, col ); flps_line( key_xs + 11, key_ys + 2, key_xs + 11, key_ys - 3, col ); flps_line( key_xs + 15, key_ys + 2, key_xs + 15, key_ys - 3, col ); } else if ( sp->type[ nplot ] == FL_FILL_XYPLOT ) flps_rectangle( 1, key_xs + 1, key_ys - 3, 19, 6, col ); if ( drawsymbol ) { FL_POINT p[ 3 ]; p[ 0 ].x = key_xs + 3; p[ 1 ].x = key_xs + 10; p[ 2 ].x = key_xs + 17; p[ 0 ].y = p[ 1 ].y = p[ 2 ].y = key_ys; drawsymbol( p, 3, 4, 4 ); } flps_draw_text( FL_ALIGN_LEFT, key_xs + 20, key_ys, 0, 0, col, sp->key_lstyle, sp->key_lsize, sp->key[ nplot ] ); key_ys -= sp->key_ascend + sp->key_descend; } flps_linestyle( savels ); flps_linestyle( savelw ); } flps_unset_clipping( ); flps_draw_text( FL_ALIGN_BOTTOM, ( sp->xi + sp->xf ) / 2, ym2 + 1, 1, 1, ob->col2, sp->lstyle, sp->lsize, sp->title ); ( sp->xscale == FL_LOG ? add_logxtics : add_xtics )( ob ); ( sp->xscale == FL_LOG ? add_logytics : add_ytics )( ob ); draw_inset( ob ); /* xlabel and y label */ flps_draw_text( FL_ALIGN_BOTTOM, ( sp->xi + sp->xf ) / 2, ob->y + FL_abs(ob->bw) + ( dblbuffer ? sp->objy : 0 ), 1, 1, ob->col2, sp->lstyle, sp->lsize, sp->xlabel ); flps_draw_text( FL_ALIGN_CENTER | FL_ALIGN_VERT, sp->xi - sp->maxytic - fl_get_char_height( sp->lstyle, sp->lsize, 0, 0 ) / 2, ( ym1 + ym2 ) / 2, 1, 1, ob->col2, sp->lstyle, sp->lsize, sp->ylabel ); ob->col2 = savecol2; } /*************************************** * Draw a string with alignment given relative to a point. * Figure out the bounding box etc so symbols can be drawn ***************************************/ static void flps_draw_text_point( int lalign, int x, int y, FL_COLOR col, int lstyle, int lsize, char * str ) { int align = lalign & ~ FL_ALIGN_INSIDE; int bbox = 1.4 * lsize + 6; int xx = x, yy = y; switch ( align ) { case FL_ALIGN_CENTER : xx = x - bbox / 2; yy = y - bbox / 2; break; case FL_ALIGN_TOP : xx = x - bbox / 2; break; case FL_ALIGN_BOTTOM : xx = x - bbox / 2; yy = y - bbox; break; case FL_ALIGN_LEFT : yy = y - bbox / 2; break; case FL_ALIGN_RIGHT : xx = x - bbox; yy = y - bbox / 2; break; case FL_ALIGN_LEFT_TOP : xx = x - bbox; align = FL_ALIGN_RIGHT_TOP; break; case FL_ALIGN_RIGHT_TOP : align = FL_ALIGN_LEFT_TOP; break; case FL_ALIGN_RIGHT_BOTTOM : yy = y - bbox; align = FL_ALIGN_LEFT_BOTTOM; break; case FL_ALIGN_LEFT_BOTTOM : align = FL_ALIGN_RIGHT_BOTTOM; yy = y - bbox; xx = x - bbox; break; } flps_draw_text_beside( align, xx, yy, bbox, bbox, col, lstyle, lsize, str ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_marker.c0000644000175000017500000004155011253661405016107 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * Handling misc. geometric markers * * TODO: consolidate symbol and markers. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "flimage.h" #include "flimage_int.h" #include #include #ifndef M_PI #define M_PI 3.1415926f #endif #define Min( a, b ) ( ( a ) < ( b ) ? ( a ) : ( b ) ) typedef void ( * Draw )( FLIMAGE_MARKER * ); static void draw_delta( FLIMAGE_MARKER * ); static void draw_arrow( FLIMAGE_MARKER * ); static void draw_thinarrow( FLIMAGE_MARKER * ); static void draw_cross( FLIMAGE_MARKER * ); static void draw_rect( FLIMAGE_MARKER * ); static void draw_oval( FLIMAGE_MARKER * ); static void draw_line( FLIMAGE_MARKER * ); static void draw_star( FLIMAGE_MARKER * ); typedef struct { const char * name; Draw draw_marker; const char * psdraw; } MARKER; /* M(moveto) LT(lineto) S(stroke) F(fill) LW(setlinewidth) C(closepath) */ static char ps_cross[ ] = "-1 0 1 0 L 0 -1 0 1 L"; static char ps_rect[ ] = "-1 1 -1 -1 L 1 1 LT 1 -1 LT C"; static char ps_delta[ ] = " -1 -1 0 1 L 1 -1 LT C"; static char ps_oval[ ] = " 0 0 1 0 360 arc"; static char ps_line[ ] = "0 1 0 -1 L"; static char ps_star[ ] = "0 1 0.2245 0.309 L -0.2245 0.309 LT -0.9511 0.309 LT\n" "-0.3633 -0.118 LT -0.5878 -0.809 LT 0 -0.382 LT 0.5878 -0.809 LT\n" "0.3633 -0.1180 LT 0.9511 0.309 LT 0.2245 0.309 LT C "; static char ps_arrow[ ] = "1 0 M 0.3 0.7 LT 0.3 0.3 LT -1 0.3 LT " "-1 -0.3 LT 0.3 -0.3 LT 0.3 -0.7 LT C"; static char ps_thinarrow[ ] = "1 0 M 0.6 0.4 LT 0.6 0.1 LT -1 0.1 LT " "-1 -0.1 LT 0.6 -0.1 LT 0.6 -0.4 LT C"; #define MaxMarkers 32 static MARKER markers[ MaxMarkers ] = { { "oval", draw_oval, ps_oval }, { "cross", draw_cross, ps_cross }, { "delta", draw_delta, ps_delta }, { "rect", draw_rect, ps_rect }, { "arrow", draw_arrow, ps_arrow }, { "thinarrow", draw_thinarrow, ps_thinarrow }, { "line", draw_line, ps_line }, { "star", draw_star, ps_star }, /* sentinel */ { NULL, NULL, NULL } }; /*************************************** ***************************************/ static MARKER * get_marker( const char *name ) { MARKER *m; for ( m = markers; m->name; m++ ) if ( ! strcmp( name, m->name ) ) return m; return 0; } /*************************************** ***************************************/ int flimage_define_marker( const char * name, void ( * draw )( FLIMAGE_MARKER * ), const char * psdraw ) { MARKER *m, *me; if ( ! name || ! *name || ! psdraw ) return -1; if ( ( m = get_marker( name ) ) ) { m->draw_marker = draw; m->psdraw = fl_strdup( psdraw ); return 0; } /* a new marker */ for ( m = markers, me = m + MaxMarkers - 1; m < me; m++ ) { if ( ! m->name ) { m->name = fl_strdup( name ); m->draw_marker = draw; m->psdraw = fl_strdup( psdraw ); break; } } return m->name ? 0 : -1; } /*************************************** ***************************************/ int flimage_add_marker( FL_IMAGE * im, const char * name, double x, double y, double w, double h, int style, int fill, int rot, unsigned int col, unsigned int bcol ) { int nm = im->nmarkers; FLIMAGE_MARKER *imarker; MARKER *m; if ( ! im ) { M_err( "AddMarker", "Bad image" ); return -1; } if ( ! name || ! *name || ! ( m = get_marker( name ) ) ) { flimage_error( im, "unknown marker: %s", name ); return -1; } im->marker = fl_realloc( im->marker, ( nm + 1 ) * sizeof *im->marker ); if ( ! im->marker ) return -1; while ( rot > 3600 ) rot -= 3600; while ( rot < 0 ) rot += 3600; imarker = im->marker + im->nmarkers; memset( imarker, 0, sizeof *imarker ); imarker->name = m->name; imarker->psdraw = m->psdraw; imarker->fill = fill != 0; imarker->angle = rot; imarker->color = col; imarker->bcolor = bcol; imarker->style = ( style >= 0 && style <= FL_LONGDASH ) ? style : FL_SOLID; imarker->x = im->xdist_offset + x * im->xdist_scale; imarker->y = im->ydist_offset + y * im->ydist_scale; imarker->w = w * im->xdist_scale; imarker->h = h * im->ydist_scale; im->free_markers = flimage_delete_all_markers; im->display_markers = flimage_display_markers; return ++im->nmarkers; } /*************************************** ***************************************/ int flimage_add_marker_struct( FL_IMAGE * im, const FLIMAGE_MARKER * min ) { int nm = im->nmarkers; FLIMAGE_MARKER *imarker; MARKER *m; if ( ! im || ! min ) return -1; if ( ! min->name || ! ( m = get_marker( min->name ) ) ) { M_err( "AddMarker", "bad marker name: %s", min->name ); return -1; } if ( im->marker ) im->marker = fl_realloc( im->marker, sizeof *im->marker * ( nm + 1 ) ); else im->marker = fl_malloc( sizeof *im->marker * ( nm + 1 ) ); if ( ! im->marker ) return -1; imarker = im->marker + nm; memcpy( imarker, min, sizeof *im->marker ); imarker->name = m->name; imarker->psdraw = m->psdraw; im->free_markers = flimage_delete_all_markers; im->display_markers = flimage_display_markers; return ++im->nmarkers; } /*************************************** ***************************************/ void flimage_delete_all_markers( FL_IMAGE * im ) { if ( ! im ) return; if ( im->marker ) fl_free( im->marker ); im->marker = 0; im->nmarkers = 0; } /*************************************** ***************************************/ void flimage_display_markers( FL_IMAGE * im ) { int r, g, b, newpix; unsigned long pixel; FLIMAGE_MARKER *m, *mend; MARKER *active; if ( im->dont_display_marker ) return; if ( ! im->markergc ) im->markergc = XCreateGC( im->xdisplay, im->win, 0, 0 ); for ( m = im->marker, mend = m + im->nmarkers; m < mend; m++ ) { active = get_marker( m->name ); if ( active && active->draw_marker ) { FL_UNPACK( m->color, r, g, b ); pixel = flimage_color_to_pixel( im, r, g, b, &newpix ); m->gc = im->markergc; m->win = im->win; m->display = im->xdisplay; m->x += im->wxd - im->sxd; m->y += im->wyd - im->syd; XSetForeground( m->display, m->gc, pixel ); fli_xlinestyle( m->display, m->gc, m->style ); active->draw_marker( m ); m->x -= im->wxd - im->sxd; m->y -= im->wyd - im->syd; if ( newpix ) XFreeColors( m->display, im->xcolormap, &pixel, 1, 0 ); } } } /********************************************************************** * Local support routines. Debatible if we should make use of symbol stuff *********************************************************************/ /*************************************** * rotate the coordinates by angle, with the rotation axis at (xo,yo) ***************************************/ static void rotate( FL_POINT * p, int n, int angle, int xo, int yo ) { static int last_angle; static double sina = 0, cosa = 1; int i, tx, ty; if ( angle == 0 || angle == 3600 ) return; if ( last_angle != angle ) { last_angle = angle; sina = sin( angle * M_PI / 1800.0 ); cosa = cos( angle * M_PI / 1800.0 ); } for ( i = 0; i < n; i++ ) { tx = p[ i ].x - xo; ty = p[ i ].y - yo; p[ i ].x = xo + tx * cosa + ty * sina + 0.5; p[ i ].y = yo - tx * sina + ty * cosa + 0.5; } } typedef struct { float x, y; } FL_FPOINT; static void rotatef( FL_FPOINT * p, int n, int angle, int xo, int yo) { static int last_angle; static double sina, cosa; int i, tx, ty; if ( angle == 0 || angle == 3600 ) return; if ( last_angle != angle ) { last_angle = angle; sina = sin( angle * M_PI / 1800.0 ); cosa = cos( angle * M_PI / 1800.0 ); } for ( i = 0; i < n; i++ ) { tx = p[ i ].x - xo; ty = p[ i ].y - yo; p[ i ].x = xo + tx * cosa + ty * sina; p[ i ].y = yo - tx * sina + ty * cosa; } } /*************************************** ***************************************/ static void scalef( FL_FPOINT * p, FL_FPOINT * pout, int n, int xscale, int yscale ) { int i; for ( i = 0; i < n; i++ ) { pout[ i ].x = p[ i ].x * xscale; pout[ i ].y = p[ i ].y * yscale; } } #define fill_point( p, sx, sy ) ( p.x = sx, p.y = sy ) /*************************************** ***************************************/ static void draw_cross( FLIMAGE_MARKER * m ) { int w = m->w / 2, h = m->h / 2; int xo = m->x, yo = m->y; FL_POINT p[ 4 ]; fill_point( p[ 0 ], xo - w, yo ); fill_point( p[ 1 ], xo + w, yo ); fill_point( p[ 2 ], xo, yo - h ); fill_point( p[ 3 ], xo, yo + h ); rotate( p, 4, m->angle, xo, yo ); XDrawLine( m->display, m->win, m->gc, p[ 0 ].x, p[ 0 ].y, p[ 1 ].x, p[ 1 ].y ); XDrawLine( m->display, m->win, m->gc, p[ 2 ].x, p[ 2 ].y, p[ 3 ].x, p[ 3 ].y ); } #define SEG 60 /*************************************** ***************************************/ static void draw_oval( FLIMAGE_MARKER * m ) { int xo = m->x, yo = m->y; int w = m->w / 2, h = m->h / 2; if ( m->angle % 3600 == 0 || w == h ) { ( m->fill ? XFillArc : XDrawArc ) ( m->display, m->win, m->gc, m->x - w, m->y - h, m->w, m->h, 0, 360 * 64 ); } else { static int mode = CoordModeOrigin; static FL_FPOINT fp[ SEG ], pp[ SEG ]; static int first = 1; int i; FL_POINT p[ SEG + 1 ]; if ( first ) { double t; for ( t = 0, i = 0; i < SEG; i++, t += 360.0 / ( SEG + 1 ) ) { fp[ i ].x = cos( t * M_PI / 180.0 ); fp[ i ].y = sin( t * M_PI / 180.0 ); } first = 0; } scalef( fp, pp, SEG, w, h ); rotatef( pp, SEG, m->angle, 0, 0 ); for ( i = 0; i < SEG; i++ ) { p[ i ].x = xo + pp[i].x + 0.5; p[ i ].y = yo - pp[i].y + 0.5; } fill_point( p[ SEG ], p[ 0 ].x, p[ 0 ].y ); if ( ! m->fill ) XDrawLines( m->display, m->win, m->gc, p, SEG + 1, mode ); else XFillPolygon( m->display, m->win, m->gc, p, SEG, Nonconvex, mode ); } } /*************************************** ***************************************/ static void draw_rect( FLIMAGE_MARKER * m ) { static int mode = CoordModeOrigin; int w = m->w / 2, h = m->h / 2; int xo = m->x, yo = m->y; FL_POINT p[ 5 ]; fill_point( p[ 0 ], xo - w, yo + h ); fill_point( p[ 1 ], xo + w, yo + h ); fill_point( p[ 2 ], xo + w, yo - h ); fill_point( p[ 3 ], xo - w, yo - h ); rotate( p, 4, m->angle, xo, yo ); fill_point( p[ 4 ], p[ 0 ].x, p[ 0 ].y ); if ( ! m->fill ) XDrawLines( m->display, m->win, m->gc, p, 5, mode ); else XFillPolygon( m->display, m->win, m->gc, p, 4, Convex, mode ); } /*************************************** ***************************************/ static float arrow_xhead, arrow_yhead, arrow_rod; static void drw_arrow( FLIMAGE_MARKER * m ) { static int mode = CoordModeOrigin; int w = m->w / 2, h = m->h / 2; int xo = m->x, yo = m->y; int xhead = 2 + ( int ) ( w * arrow_xhead ); int yhead = 2 + ( int ) ( h * arrow_yhead ); int rod = ( int ) ( h * arrow_rod ); FL_POINT p[ 8 ]; xhead = yhead = Min( xhead, yhead ); fill_point( p[ 0 ], xo - w, yo + rod ); fill_point( p[ 1 ], xo + w - xhead, yo + rod ); fill_point( p[ 2 ], xo + w - xhead, yo + yhead ); fill_point( p[ 3 ], xo + w, yo ); fill_point( p[ 4 ], xo + w - xhead, yo - yhead ); fill_point( p[ 5 ], xo + w - xhead, yo - rod ); fill_point( p[ 6 ], xo - w, yo - rod ); rotate( p, 7, m->angle, xo, yo ); fill_point( p[ 7 ], p[ 0 ].x, p[ 0 ].y ); if ( ! m->fill ) XDrawLines( m->display, m->win, m->gc, p, 8, mode ); else XFillPolygon( m->display, m->win, m->gc, p, 7, Nonconvex, mode ); } /*************************************** ***************************************/ static void draw_arrow( FLIMAGE_MARKER * m ) { arrow_xhead = arrow_yhead = 0.52; arrow_rod = 0.3; drw_arrow( m ); } /*************************************** ***************************************/ static void draw_thinarrow( FLIMAGE_MARKER * m ) { arrow_xhead = arrow_yhead = 0.26; arrow_rod = 0.15; drw_arrow( m ); } /*************************************** ***************************************/ static void draw_line( FLIMAGE_MARKER * m ) { int w = m->w / 2; int xo = m->x, yo = m->y; FL_POINT p[ 2 ]; fill_point( p[ 0 ], xo - w, yo ); fill_point( p[ 1 ], xo + w, yo ); rotate( p, 2, m->angle, xo, yo ); XDrawLine( m->display, m->win, m->gc, p[ 0 ].x, p[ 0 ].y, p[ 1 ].x, p[ 1 ].y); } /*************************************** ***************************************/ static void draw_delta( FLIMAGE_MARKER * m ) { static int mode = CoordModeOrigin; int w = m->w / 2, h = m->h / 2; int xo = m->x, yo = m->y; FL_POINT p[ 4 ]; fill_point( p[ 0 ], xo - w, yo + h ); fill_point( p[ 1 ], xo + w, yo + h ); fill_point( p[ 2 ], xo , yo - h ); rotate( p, 3, m->angle, xo, yo ); fill_point( p[ 3 ], p[ 0 ].x, p[ 0 ].y ); if ( ! m->fill ) XDrawLines( m->display, m->win, m->gc, p, 4, mode ); else XFillPolygon( m->display, m->win, m->gc, p, 3, Convex, mode ); } /*************************************** ***************************************/ static void draw_star( FLIMAGE_MARKER * m ) { static int mode = CoordModeOrigin; int w = m->w / 2, h = m->h / 2; int xo = m->x, yo = m->y; FL_POINT p[ 11 ]; static FL_FPOINT fp[ 10 ], pp[ 10 ]; static int first = 1; int i; /* generate a unit star */ if ( first ) { float t, l = sin( 18.0 * M_PI / 180.0 ) / sin( 54.0 * M_PI / 180.0 ); for ( i = 0, t = 54.0; i < 10; i += 2, t += 72.0 ) { fp[ i ].x = l * cos( t * M_PI / 180.0 ); fp[ i ].y = l * sin( t * M_PI / 180.0 ); } for ( i = 1, t = 90.0; i < 10; i += 2, t += 72.0 ) { fp[ i ].x = cos( t * M_PI / 180.0 ); fp[ i ].y = sin( t * M_PI / 180.0 ); } first = 0; } scalef( fp, pp, 10, w, h ); rotatef( pp, 10, m->angle, 0, 0 ); for ( i = 0; i < 10; i++ ) { p[ i ].x = xo + pp[i].x + 0.5; p[ i ].y = yo - pp[i].y + 0.5; } fill_point( p[ 10 ], p[ 0 ].x, p[ 0 ].y ); if ( ! m->fill ) XDrawLines( m->display, m->win, m->gc, p, 11, mode ); else XFillPolygon( m->display, m->win, m->gc, p, 10, Nonconvex, mode ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_xpm.c0000644000175000017500000002720111247055071015426 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. * * Read and write XPM3 files. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" #include #include #define XPM_DEBUG 0 typedef struct { int r, g, b, a; char key[ 4 ]; /* char keys. max 3 */ } XPMMap; #define NMAPS 4 /* don't handle SMAP */ enum { CMAP, GMAP, G4MAP, MMAP }; typedef struct { XPMMap map[ NMAPS ][ FLIMAGE_MAXLUT ]; /* only deal with c and g map */ int char_per_pix; int available_maps[ NMAPS ]; } SPEC; static char * get_xpm_pixel_name( char str[ ] ); /*************************************** ***************************************/ static int XPM_identify( FILE * fp ) { char buf[ 128 ]; int sig, i; /* demand the signature be present in the first 3 lines */ for ( i = sig = 0; i < 3 && ! sig && fgets( buf, 127, fp ); i++ ) { buf[ 127 ] = '\0'; sig = strstr( buf, "XPM" ) && strstr( buf, "/*" ); } return sig ? 1 : -1; } /*************************************** ***************************************/ static int XPM_description( FL_IMAGE * im ) { int c, ncol; SPEC *sp = fl_calloc( 1, sizeof *sp ); FILE *fp = im->fpin; im->io_spec = sp; while ( ( c = getc( fp ) ) && c != '"' ) /* empty */ ; if ( fscanf( fp, "%d %d %d %d", &im->w, &im->h, &ncol, &sp->char_per_pix ) != 4 ) { im->error_message( im, "Can't get xpm description" ); return -1; } if ( sp->char_per_pix <= 0 || ncol <= 0 ) { im->error_message( im, "bad xpm description" ); return -1; } if ( sp->char_per_pix > 3 || ncol > 256 ) { im->error_message( im, "can't handle this xpm" ); return -1; } while ( getc( fp ) != '\n' ) /* empty */ ; im->type = FL_IMAGE_CI; im->map_len = ncol; return 0; } /*************************************** ***************************************/ static int XPM_load( FL_IMAGE * im ) { SPEC *sp = im->io_spec; FILE *fp = im->fpin; char *buf, key[ 32 ], val[ 32 ], ckey[ 8 ], *head, *p; int i, done, icol, n, match, r, g, b, x, y, buflen, mapi, len; XPMMap *map; buflen = ( im->w + 5 ) * sp->char_per_pix; /* If comments longer than 256 chars on a single line, this may not work right */ if ( buflen < 256 ) buflen = 256; buf = fl_malloc( buflen ); /* Read the colormap */ for ( icol = 0; icol < im->map_len; icol++ ) { while ( fgets( buf, buflen, fp ) && strncmp( buf, "/*", 2 ) == 0 ) { while ( strstr( buf, "*/" ) == NULL ) if ( fgets( buf, buflen, fp ) == NULL ) { fl_free( buf ); flimage_error( im, "Failure to read xpm file" ); return -1; } } if ( ( head = strchr( buf, '"' ) ) == 0 ) { fl_free( buf ); flimage_error( im, "Bad ColorLine: %s", buf ); return -1; } head++; /* The colormap line is char [mapkey color]* */ strncpy( key, head, sp->char_per_pix ); key[ sp->char_per_pix ] = '\0'; head += sp->char_per_pix + 1; done = 0; while ( ! done ) { if ( ( done = sscanf( head, " %s %s %n", ckey, val, &n ) < 2 ) ) break; head += n; /* Find the color code. We do not handle s currently */ if ( ckey[ 0 ] == 'c' ) mapi = CMAP; else if ( ckey[ 0 ] == 'g' && ckey[ 1 ] == '\0' ) mapi = GMAP; else if ( ckey[ 0 ] == 'g' && ckey[ 1 ] == '4' ) mapi = G4MAP; else if ( ckey[ 0 ] == 'm' ) mapi = MMAP; else mapi = -1; /* Ignore the unhandled colormap types */ if ( mapi >= 0 ) { map = sp->map[ mapi ]; sp->available_maps[ mapi ] = 1; #if 1 for ( len = strlen( val ), p = val + len - 1; p > val && ( *p == ',' || *p == '"' ); p-- ) *p = '\0'; #endif strcpy( map[ icol ].key, key ); if ( fl_lookup_RGBcolor( val, &r, &g, &b ) != -1 ) { map[ icol ].r = r; map[ icol ].g = g; map[ icol ].b = b; } else map[ icol ].r = map[ icol ].g = map[ icol ].b = -1; } } } if ( sp->available_maps[ CMAP ] ) map = sp->map[ CMAP ]; else if ( sp->available_maps[ GMAP ] ) map = sp->map[ GMAP ]; else if ( sp->available_maps[ G4MAP ]) map = sp->map[ G4MAP ]; else if ( sp->available_maps[ MMAP ] ) map = sp->map[ MMAP ]; else { im->error_message( im, "Can't handle XPM colormap" ); fl_free( buf ); return -1; } /* Copy local colormap to FLIMAGE colormap */ for ( i = 0; i < im->map_len; i++ ) { if ( map[ i ].r < 0 || map[ i ].g < 0 ) { map[ i ].r = 1; map[ i ].g = 2; map[ i ].b = 3; map[ i ].a = 0; im->tran_index = i; im->tran_rgb = FL_PACK4( map[ i ].r, map[ i ].g, map[ i ].b, map[ i ].a ); } im->red_lut[ i ] = map[ i ].r; im->green_lut[ i ] = map[ i ].g; im->blue_lut[ i ] = map[ i ].b; } #if XPM_DEBUG fprintf( stderr, "MAP: %d entries\n", im->map_len ); for ( i = 0; i < im->map_len; i++ ) fprintf( stderr, "i=%d key=%s r=%3d g=%3d b=%3d\n", i, map[ i ].key, map[ i ].r, map[ i ].g, map[ i ].b ); #endif /* read pixels */ for ( y = 0; y < im->h; y++, im->completed++ ) { if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "xpm" ); while ( fgets( buf, buflen, fp ) && strncmp( buf, "/*", 2 ) == 0 ) /* empty */ ; if ( ! ( head = strchr( buf, '"' ) ) ) { fprintf( stderr, "something is wrong: %s\n", buf ); exit( 1 ); } for ( x = 0; x < im->w; x++ ) { for ( i = 0; i < sp->char_per_pix; i++ ) key[ i ] = *++head; key[ sp->char_per_pix ] = '\0'; for ( match = i = 0; ! match && i < im->map_len; i++ ) if ( ( match = ( key[ 0 ] == map[ i ].key[ 0 ] && key[ 1 ] == map[ i ].key[ 1 ] && strcmp( key, map[ i ].key ) == 0 ) ) ) im->ci[ y ][ x ] = i; if ( ! match ) { im->error_message( im, "Bad pixel" ); im->ci[ y ][ x ] = 0; } } } fl_free( buf ); return 0; } /* this is enough for about 2000 colors */ static char token[ ] = ".+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN$%&!"; /*************************************** * only write colormaped images ***************************************/ static int XPM_dump( FL_IMAGE * im ) { int cpp, i, j, k, x, y, buflen; FILE *fp = im->fpout; int len = strlen( token ), packed, gray; char name[ 512 ], *p, *buf; XPMMap map[ 256 ]; unsigned short *ci; /* get a correct pixel name */ p = get_xpm_pixel_name( strcpy( name, im->outfile ) ); cpp = 1 + ( im->map_len > len ); fprintf( fp, "/* XPM */\nstatic char *%s[] = {\n", p ); fprintf( fp, "\"%d %d %d %d\",\n", im->w, im->h, im->map_len, cpp ); /* generate tokens on the fly (len*(len-1) possibilities */ for ( i = k = 0; k < im->map_len && i < len; i++ ) { for ( j = i + 1; k < im->map_len && j < len; j++, k++ ) { map[ k ].key[ 0] = token[ j ]; map[ k ].key[ 1] = token[ i ]; map[ k ].key[ cpp ] = '\0'; } } for ( i = 0; i < im->map_len; i++ ) { map[ i ].r = im->red_lut[ i ]; map[ i ].g = im->green_lut[ i ]; map[ i ].b = im->blue_lut[ i ]; packed = FL_PACK( map[ i ].r, map[ i ].g, map[ i ].b ); gray = 100 * FL_RGB2GRAY(map[ i ].r, map[ i ].g, map[ i ].g ) / 255.0 + 0.5; if ( packed == im->tran_rgb || i == im->tran_index ) { strcpy( map[ i ].key, cpp == 1 ? " " : " " ); fprintf( fp, "\"%s c None g None \", \n", map[ i ].key ); } else { fprintf( fp, "\"%s c #%02x%02x%02x g grey%d \",\n", map[ i ].key, map[ i ].r, map[ i ].g, map[ i ].b, gray ); } } /* now pixels */ buf = fl_malloc( cpp * ( im->w + 5 ) * sizeof *buf ); for ( buflen = y = 0; y < im->h; y++, im->completed++ ) { if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) im->visual_cue( im, "writing xpm" ); buf[ 0 ] = '"'; buf[ buflen = 1 ] = '\0'; ci = im->ci[ y ]; /* we never write cpp > 2 */ if ( cpp == 1 ) { for ( x = 0; x < im->w; x++ ) buf[ buflen++ ] = map[ ci[ x ] ].key[ 0 ]; } else { for ( x = 0; x < im->w; x++ ) { buf[ buflen++ ] = map[ ci[ x ] ].key[ 0 ]; buf[ buflen++ ] = map[ ci[ x ] ].key[ 1 ]; } } buf[ buflen ] = '\0'; if ( i < im->h - 1 ) fprintf( fp, "%s\",\n", buf ); else fprintf( fp, "%s\"\n", buf ); } /* { */ fprintf( fp, "};\n" ); fl_free( buf ); return 0; } /*************************************** ***************************************/ static char * get_xpm_pixel_name( char * str ) { char *name, *q, *p; if ( ! ( name = strrchr( str, '/' ) ) ) name = str; /* get rid of extension */ if ( ( q = strchr( name, '.' ) ) ) *q = '\0'; /* make sure it's a legal C name */ if ( ! isalpha( ( int ) *name ) ) *name = 'A'; for ( p = name + 1; *p; p++ ) if ( ! isalnum( ( int ) *p ) && *p != '_' ) *p = '_'; return name; } /*************************************** ***************************************/ void flimage_enable_xpm( void ) { flimage_add_format( "XPM format", "xpm", "xpm", FL_IMAGE_CI, XPM_identify, XPM_description, XPM_load, XPM_dump ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/Makefile.in0000644000175000017500000005325011377311602015363 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/config/common.am subdir = image ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libflimage_la_DEPENDENCIES = ../lib/libforms.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libflimage_la_OBJECTS = image.lo image_bmp.lo image_combine.lo \ image_convolve.lo image_crop.lo image_disp.lo image_fits.lo \ image_genesis.lo image_gif.lo image_gzip.lo image_io_filter.lo \ image_jpeg.lo image_jquant.lo image_marker.lo image_png.lo \ image_pnm.lo image_postscript.lo image_proc.lo \ image_replace.lo image_rotate.lo image_scale.lo image_sgi.lo \ image_text.lo image_tiff.lo image_type.lo image_warp.lo \ image_xbm.lo image_xpm.lo image_xwd.lo postscript.lo \ ps_core.lo ps_draw.lo ps_text.lo rgb_db.lo matrix.lo libflimage_la_OBJECTS = $(am_libflimage_la_OBJECTS) libflimage_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libflimage_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libflimage_la_SOURCES) DIST_SOURCES = $(libflimage_la_SOURCES) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D # forms.h is a generated file INCLUDES = -DMAKING_FORMS -I../lib -I$(top_srcdir)/lib $(X_CFLAGS) include_HEADERS = flimage.h lib_LTLIBRARIES = libflimage.la libflimage_la_LDFLAGS = -no-undefined -Wl,--no-undefined -version-info @SO_VERSION@ libflimage_la_LIBADD = ../lib/libforms.la $(JPEG_LIB) $(X_LIBS) -lX11 libflimage_la_SOURCES = \ flimage.h \ flimage_int.h \ image.c \ image_bmp.c \ image_combine.c \ image_convolve.c \ image_crop.c \ image_disp.c \ image_fits.c \ image_genesis.c \ image_gif.c \ image_gzip.c \ image_io_filter.c \ image_jpeg.c \ image_jquant.c \ image_marker.c \ image_png.c \ image_pnm.c \ image_postscript.c \ image_proc.c \ image_replace.c \ image_rotate.c \ image_scale.c \ image_sgi.c \ image_text.c \ image_tiff.c \ image_type.c \ image_warp.c \ image_xbm.c \ image_xpm.c \ image_xwd.c \ postscript.c \ ps_core.c \ ps_draw.c \ ps_text.c \ rgb_db.c \ matrix.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign image/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign image/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libflimage.la: $(libflimage_la_OBJECTS) $(libflimage_la_DEPENDENCIES) $(libflimage_la_LINK) -rpath $(libdir) $(libflimage_la_OBJECTS) $(libflimage_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_bmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_combine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_convolve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_crop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_disp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_fits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_genesis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_gif.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_gzip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_io_filter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_jpeg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_jquant.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_marker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_png.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_pnm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_postscript.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_proc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_replace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_rotate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_scale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_sgi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_tiff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_warp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_xbm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_xpm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_xwd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postscript.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ps_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ps_draw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ps_text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb_db.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES # 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: xforms-1.0.93sp1/image/image_combine.c0000644000175000017500000000606211247055071016240 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * combine two images in the following way * IM = IM1 * alpha + IM2 * (1-alpha) */ /*** UNFINISHED and UNTESTED */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" FL_IMAGE * flimage_combine( FL_IMAGE * im1, FL_IMAGE * im2, double alpha ) { FL_IMAGE *ret; int i, w, h, x, y; if ( ! im1 || im1->w <= 0 || ! im2 || im2->w <= 0 ) return 0; if ( ! ( ret = flimage_alloc( ) ) ) { flimage_error( im1, "can't allocate resulting image" ); return 0; } ret->w = im1->w; ret->h = im1->h; ret->type = FLIMAGE_RGB; flimage_get_linearlut( ret ); /* Convert to RGB */ flimage_convert( im1, FLIMAGE_RGB, 0 ); flimage_convert( im2, FLIMAGE_RGB, 0 ); /* Populate the lut */ for ( i = 0; i <= FL_PCMAX; i++ ) { ret->llut[ 0 ][ i ] = i * alpha + 0.5; ret->llut[ 1 ][ i ] = i - ret->llut[ 0 ][ i ]; } w = FL_min( im1->w, im2->w ); h = FL_min( im1->h, im2->h ); for ( y = 0; y < h; y++) { for ( x = 0; x < w; x++) { ret->red[ y ][ x ] = ret->llut[ 0 ][ im1->red[ y ][ x ] ] + ret->llut[ 1 ][ im2->red[ y ][ x ] ]; ret->green[ y ][ x ] = ret->llut[ 0 ][ im1->green[ y ][ x ] ] + ret->llut[ 1 ][ im2->green[ y ][ x ] ]; ret->blue[ y ][ x ] = ret->llut[ 0 ][ im1->blue[ y ][ x ] ] + ret->llut[ 1 ][ im2->blue[ y ][ x ] ]; } for ( ; x < im1->w; x++ ) { ret->red[ y ][ x ] = im1->red[ y ][ x ]; ret->green[ y ][ x ] = im1->green[ y ][ x ]; ret->blue[ y ][ x ] = im1->blue[ y ][ x ]; } } for ( ; y < im1->h; y++ ) for ( x = 0; x < im1->w; x++ ) { ret->red[ y ][ x ] = im1->red[ y ][ x ]; ret->green[ y ][ x ] = im1->green[ y ][ x ]; ret->blue[ y ][ x ] = im1->blue[ y ][ x ]; } return ret; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_tiff.c0000644000175000017500000010413011247055071015547 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 2000-2002 By T.C. Zhao * * TIFF file reader/writer for some tiff files. It is not possible to * develop a tiff reader to handle all possible valid tiffs. * * could use some optimization */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "ulib.h" #include "flimage.h" #include "flimage_int.h" #if defined __sun__ && ! defined SYSV int fgetc( FILE *stream ); int fputc( int c, FILE *stream ); #endif #define TIFF_DEBUG 0 static int get_image_info_from_ifd( FL_IMAGE * im ); typedef int ( * ReadIT )( FILE * ); typedef int ( * WriteIT )( int, FILE * ); typedef struct { int tag_value; char * tag_name; int type; int * value; int count; int offset; char * svalue; } TIFFTag; static TIFFTag *find_tag( int ); typedef struct { int endian; int ifd_offset; /* next ifd location. 0 indicates end */ int spp; /* samples per pixel */ int bps[ 4 ]; /* bits per sample */ int curr_pos; /* current writing location */ int next_pos; /* next writing location */ int ( * read2bytes ) ( FILE * ); int ( * read4bytes ) ( FILE * ); int ( * write2bytes ) ( int, FILE * ); int ( * write4bytes ) ( int, FILE * ); FL_IMAGE *image; ReadIT readit[ 15 ]; WriteIT writeit[ 15 ]; int strip_size; /* strip size in bytes */ int rowsPerStrip; /* preferred */ int nstrips; int *stripOffsets; int *stripByteCount; int offset_offset; int bytecount_offset; int max_tags; } SPEC; static void initialize_tiff_io( SPEC *, int ); /*************************************** ***************************************/ static int TIFF_identify( FILE * fp ) { char c[ 4 ]; size_t i; i = fread( c, 1, 4, fp ); rewind( fp ); return i == 4 && ( ( c[ 0 ] == 'I' && c[ 1 ] == 'I' ) || ( c[ 0 ] == 'M' && c[ 1 ] == 'M' ) ); } static int read_tiff_ifd( FILE * fp, SPEC * sp ); /*************************************** ***************************************/ static int TIFF_description( FL_IMAGE * im ) { FILE *fp = im->fpin; SPEC *sp = fl_malloc( sizeof *sp ); char buf[ 4 ]; im->io_spec = sp; im->spec_size = sizeof *sp; sp->image = im; if ( fread( buf, 1, 4, fp ) != 4 ) { flimage_error( im, "Failure to read TIFF file" ); fl_free( sp ); im->io_spec = NULL; im->spec_size = 0; return -1; } sp->endian = buf[ 0 ] == 'M' ? MSBFirst : LSBFirst; initialize_tiff_io( sp, sp->endian ); sp->ifd_offset = sp->read4bytes( fp ); if ( ! sp->ifd_offset ) { flimage_error( im, "Invalid TIFF: no IFD" ); fl_free( sp ); im->io_spec = NULL; im->spec_size = 0; return -1; } read_tiff_ifd( fp, sp ); if ( get_image_info_from_ifd( im ) < 0 ) { fl_free( sp ); im->io_spec = NULL; im->spec_size = 0; return -1; } return 0; } static int read_pixels( FL_IMAGE * im ); static int TIFF_next( FL_IMAGE * ); static int load_tiff_colormap( FL_IMAGE * ); /*************************************** ***************************************/ static int TIFF_readpixels( FL_IMAGE * im ) { SPEC *sp = im->io_spec; load_tiff_colormap( im ); if ( sp->ifd_offset ) im->next_frame = TIFF_next; else im->next_frame = 0; im->more = sp->ifd_offset != 0; return read_pixels(im); } /*************************************** ***************************************/ static int TIFF_next( FL_IMAGE * im ) { SPEC *sp = im->io_spec; read_tiff_ifd( im->fpin, sp ); if ( get_image_info_from_ifd( im ) < 0 ) { flimage_error( im, "Can't get image info" ); M_err( "Next", "Can't get image info" ); return -1; } flimage_getmem( im ); return TIFF_readpixels( im ); } static int write_ifd( FL_IMAGE *, SPEC * ); static int write_pixels( FL_IMAGE *, SPEC * ); /*************************************** ***************************************/ static int machine_endian( void ) { static unsigned short a = 0x1234; static unsigned char *c = ( unsigned char * ) &a; return c[ 0 ] == 0x12 ? MSBFirst : LSBFirst; } #define MaxStripSize 32767 /* max strip size */ /*************************************** ***************************************/ static int TIFF_write( FL_IMAGE * image ) { FILE *fp = image->fpout; FL_IMAGE *im = image; int err, t; SPEC *sp; size_t dummy; /* we do not touch im->io_spec. Use this local copy */ sp = fl_calloc( 1, sizeof *sp ); t = ( im->w * im->h ) / ( im->type == FL_IMAGE_MONO ? 8 : 1 ); /* We always write StripByteCount at offset. Need to make sure we'll have more than one strips */ if ( t <= MaxStripSize ) sp->strip_size = ( t + 1 ) / 2; else sp->strip_size = MaxStripSize; sp->endian = machine_endian( ); initialize_tiff_io( sp, sp->endian ); dummy = fwrite( sp->endian == LSBFirst ? "II" : "MM", 1, 2, fp ); sp->write2bytes( 42, fp ); sp->next_pos = 4; sp->max_tags = 15; sp->write4bytes( sp->next_pos += 4, fp ); /* ifd location */ for ( err = 0; ! err && im; im = im->next ) { sp->curr_pos = sp->next_pos; sp->next_pos += sp->max_tags * 12; im->fpout = image->fpout; fseek( fp, sp->curr_pos, SEEK_SET ); err = write_ifd( im, sp ) < 0 || write_pixels( im, sp ) < 0; /* update the IFD location */ fseek( fp, sp->ifd_offset, SEEK_SET ); sp->write4bytes( im->next ? sp->next_pos : 0, fp ); } fl_free( sp->stripByteCount ); fl_free( sp->stripOffsets ); fl_free( sp ); return 0; } /*************************************** ***************************************/ void flimage_enable_tiff(void) { flimage_add_format( "Tag Image File Format", "tiff", "tif", FL_IMAGE_FLEX, TIFF_identify, TIFF_description, TIFF_readpixels, TIFF_write); } /************************************************************************* * TIFF tags *************************************************************************/ static int junkBuffer; #define NV(a,t) {a,#a,t,&junkBuffer,0,0,0} #define SubFileType 254 #define ReduceImage 1 #define Page 2 #define Mask 4 #define ImageWidth 256 #define ImageHeight 257 #define BitsPerSample 258 #define Compression 259 #define Uncompressed 1 #define LZW 5 #define JPEG 6 #define PackBits 32773 #define PhotometricI 262 #define PhotoBW0White 0 #define PhotoBW0Black 1 #define PhotoRGB 2 #define PhotoPalette 3 #define PhotoTransMask 4 #define PhotoCMYK 5 #define PhotoYCbCr 6 #define DocumentName 269 #define Description 270 #define StripOffsets 273 #define Orientation 274 #define TopLeft 1 #define TopRight 2 #define RightTop 6 #define SamplesPerPixel 277 #define RowsPerStrip 278 #define StripByteCount 279 #define MinSampleValue 280 #define MaxSampleValue 281 #define PlannarConfig 284 #define RGBRGB 1 #define RRGGBB 2 #define GrayResponse 291 #define ColorResponse 301 #define ColorMap 320 /* tiff support types */ enum { kUByte = 1, ASCII = 2, kUShort = 3, kULong = 4, RATIONAL = 5, SBYTE = 6, kShort = 8, kLong = 9, SRATIONAL = 10, kFloat = 11, kDouble = 12 }; /* type is used for writing only */ TIFFTag interestedTags[ ] = { NV( ImageWidth, kUShort ), NV( ImageHeight, kUShort ), NV( BitsPerSample, kUShort ), NV( Compression, kUShort ), NV( SamplesPerPixel, kUShort ), NV( PhotometricI, kUShort ), NV( DocumentName, ASCII ), NV( Description, ASCII ), NV( StripOffsets, kULong ), NV( Orientation, kUShort ), NV( RowsPerStrip, kULong ), NV( StripByteCount, kULong ), NV( MinSampleValue, kUShort ), NV( MaxSampleValue, kUShort ), NV( PlannarConfig, kUShort ), NV( GrayResponse, kUShort ), NV( ColorResponse, kUShort ), NV( ColorMap, kUShort ), /* sentinel */ NV( 0, kShort ) }; static TIFFTag * /*************************************** ***************************************/ find_tag( int val ) { TIFFTag *tag; /* if tags are more than about 20, binary search may be better */ for ( tag = interestedTags; tag->tag_value && tag->tag_value != val; tag++ ) /* empty */ ; return tag->tag_value ? tag : 0; /* &stag; */ } /*************************************** * convert tag value to image value ***************************************/ static int get_image_info_from_ifd( FL_IMAGE * im ) { TIFFTag *tag; SPEC *sp = im->io_spec; int i; if ( ! ( tag = find_tag( ImageWidth ) ) ) { flimage_error( im, "Bad ImageWidth tag" ); return -1; } im->w = tag->value[ 0 ]; if ( ! ( tag = find_tag( ImageHeight ) ) ) { flimage_error( im, "Bad ImageLength tag" ); return -1; } im->h = tag->value[ 0 ]; if ( im->w <= 0 || im->h <= 0 ) { fprintf( stderr, "bad image dimension: %d %d\n", im->w, im->h ); return -1; } if ( ! ( sp->spp = find_tag( SamplesPerPixel )->value[ 0 ] ) ) sp->spp = 1; tag = find_tag( BitsPerSample ); for ( i = 0; i < sp->spp; i++ ) { if ( ( sp->bps[ i ] = tag->value[ i ] ) <= 0 ) { flimage_error( im, "bad bps: %d\n", sp->bps[ i ] ); return -1; } } tag = find_tag( PhotometricI ); switch ( tag->value[ 0 ] ) { case PhotoBW0White : case PhotoBW0Black : im->type = sp->bps[ 0 ] == 1 ? FL_IMAGE_MONO : ( sp->bps[ 0 ] <= 8 ? FL_IMAGE_GRAY : FL_IMAGE_GRAY16 ); break; case PhotoRGB : im->type = FL_IMAGE_RGB; break; case PhotoPalette : im->type = FL_IMAGE_CI; if ( ( im->map_len = find_tag( ColorMap )->count / 3 ) <= 0 ) { flimage_error( im, "Colormap is missing for PhotoPalette" ); return -1; } break; default: flimage_error( im, "Unhandled photometricI %d\n", 0 ); break; } if ( im->type == FL_IMAGE_GRAY16 && ( tag = find_tag( MaxSampleValue ) ) ) im->gray_maxval = tag->value[ 0 ]; else im->gray_maxval = ( 1 << sp->bps[ 0 ] ) - 1; return 0; } static int typeSize[ 13 ]; /*************************************** * this need to be called everytime to avoid re-entrant problems ***************************************/ static void initialize_tiff_io( SPEC * sp, int endian ) { if ( ! typeSize[ kUByte ] ) { /* initialize the typeSize */ typeSize[ kUByte ] = typeSize[ SBYTE ] = 1; typeSize[ ASCII ] = 1; typeSize[ kShort ] = typeSize[ kUShort ] = 2; typeSize[ kLong ] = typeSize[ kULong ] = 4; typeSize[ RATIONAL ] = typeSize[ SRATIONAL ] = 8; typeSize[ kFloat ] = 4; typeSize[ kDouble ] = 8; } /* initialize the functions that reads various types */ sp->readit[ kUByte ] = sp->readit[SBYTE] = fgetc; sp->writeit[ kUByte ] = sp->writeit[SBYTE] = fputc; sp->readit[ ASCII ] = fgetc; sp->writeit[ ASCII ] = fputc; sp->readit[ kShort ] = endian == MSBFirst ? fli_fget2MSBF : fli_fget2LSBF; sp->readit[ kUShort ] = endian == MSBFirst ? fli_fget2MSBF : fli_fget2LSBF; sp->writeit[ kUShort ] = endian == MSBFirst ? fli_fput2MSBF : fli_fput2LSBF; sp->writeit[ kShort ] = endian == MSBFirst ? fli_fput2MSBF : fli_fput2LSBF; sp->readit[ kULong ] = endian == MSBFirst ? fli_fget4MSBF : fli_fget4LSBF; sp->readit[ kLong ] = endian == MSBFirst ? fli_fget4MSBF : fli_fget4LSBF; sp->writeit[ kULong ] = endian == MSBFirst ? fli_fput4MSBF : fli_fput4LSBF; sp->writeit[ kLong ] = endian == MSBFirst ? fli_fput4MSBF : fli_fput4LSBF; sp->read2bytes = sp->readit[ kShort ]; sp->read4bytes = sp->readit[ kLong ]; sp->write2bytes = sp->writeit[ kShort ]; sp->write4bytes = sp->writeit[ kLong ]; } /*************************************** ***************************************/ static void read_tag( FILE * fp, long offset, SPEC * sp ) { int tag_val, count, type, nbyte, i; TIFFTag *tag; fseek( fp, offset, SEEK_SET ); tag_val = sp->read2bytes( fp ); if ( ! ( tag = find_tag( tag_val ) ) ) { #if TIFF_DEBUG fprintf( stderr, "Unsupported tag 0x%x(%d)\n", tag_val, tag_val ); #endif return; } tag->type = type = sp->read2bytes( fp ); tag->count = count = sp->read4bytes( fp ); if ( type < 0 || type > kDouble || ( nbyte = count * typeSize[ type ] ) <= 0 ) { flimage_error( sp->image, "BadType (%d) or count (%d)\n", type, count ); M_err( "ReadTag", "BadType (%d) or count (%d)\n", type, count ); return; } if ( tag->value && tag->value != &junkBuffer ) fl_free( tag->value ); if ( ! ( tag->value = fl_malloc( sizeof *tag->value * tag->count ) ) ) { flimage_error( sp->image, "Can't allocate %d tag value buffer", tag->count ); return; } if ( nbyte > 4 ) { tag->offset = sp->read4bytes( fp ); tag->value[ 0 ] = tag->offset; fseek( fp, tag->offset, SEEK_SET ); } /* we read the colormap seperately */ if ( tag->tag_value != ColorMap ) { for ( i = 0; i < count; i++) tag->value[ i ] = ( sp->readit[ type ] )( fp ); } } /*************************************** ***************************************/ static int read_tiff_ifd( FILE * fp, SPEC * sp ) { int num_tags, offset, i; TIFFTag *tag; fseek( fp, sp->ifd_offset, SEEK_SET ); num_tags = sp->read2bytes( fp ); for ( offset = sp->ifd_offset + 2, i = 0; i < num_tags; i++ ) { read_tag( fp, offset, sp ); offset += 12; } fseek( fp, sp->ifd_offset + num_tags * 12 + 2, SEEK_SET ); sp->ifd_offset = sp->read4bytes( fp ); /* validate the tags (sort of) */ if ( ! ( tag = find_tag( BitsPerSample ) )->count ) return -1; if ( tag->value[ 0 ] != 1 && tag->value[ 0 ] != 2 && tag->value[ 0 ] != 4 && tag->value[ 0 ] != 8 && tag->value[ 0 ] != 16 ) { M_err( "ReadIFD", "Unsupported bitsPerSample %d", tag->value[ 0 ] ); return -1; } #if TIFF_DEBUG for ( tag = interestedTags; tag->tag_value; tag++ ) { if ( tag->count ) fprintf( stderr, "%s\t count=%2d\t val=%d\n", tag->tag_name, tag->count, tag->value ? tag->value[ 0 ] : 0 ); } fprintf( stderr, "nextIFD at %d\n", sp->ifd_offset ); #endif return 0; } /*************************************** * parameter endian is the endian the input data is in ***************************************/ static unsigned short * convert2( unsigned short * sbuf, int nbytes, int endian ) { int nshort = nbytes / 2, i, j; unsigned char *buf = ( unsigned char * ) sbuf; if ( nbytes & 1 ) { fprintf( stderr, "Error: Bad ByteCount %d\n", nbytes ); return sbuf; } if ( endian == machine_endian( ) ) return sbuf; if ( endian == MSBFirst ) { for ( i = j = 0; i < nshort; i++, j += 2 ) sbuf[ i ] = ( buf[ j ] << 8 ) | buf[ j + 1 ]; } else { for ( i = j = 0; i < nshort; i++, j += 2 ) sbuf[ i ] = buf[ j ] | ( buf[ j + 1 ] << 8 ); } return sbuf; } /*************************************** ***************************************/ static int read_pixels( FL_IMAGE * im ) { SPEC *sp = im->io_spec; int nstrips, val, err, i, j, strip, row, bytecount; TIFFTag *tag, *bytecountTag, *rowsPerStripTag; unsigned char *tmpbuffer, *tmp; int compress, rps, bpl; unsigned short *sbuf; FILE *fp = im->fpin; rowsPerStripTag = find_tag( RowsPerStrip ); if ( ( val = rowsPerStripTag->value[ 0 ] ) <= 0 ) { flimage_error( im, "Bad RowsPerStrip tag" ); return -1; } if ( ( compress = find_tag( Compression )->value[ 0 ] ) && compress != Uncompressed ) { flimage_error( im, "can't handled compressed TIF" ); return -1; } nstrips = ( im->h + val - 1 ) / val; bytecountTag = find_tag( StripByteCount ); if ( nstrips != bytecountTag->count ) { flimage_error( im, "Inconsistent in number of strips" ); return -1; } bpl = ( im->w * sp->spp * find_tag( BitsPerSample )->value[ 0 ] + 7 ) / 8; rps = rowsPerStripTag->value[ 0 ]; tag = find_tag( StripOffsets ); if ( ! ( tmpbuffer = fl_malloc( bytecountTag->value[ 0 ] + 4 ) ) ) { flimage_error( im, "Can't allocate strip buffer (%d bytes)", bytecountTag->value[ 0 ] ); return -1; } for ( row = strip = err = 0; !err && strip < nstrips; strip++ ) { #if TIFF_DEBUG fprintf( stderr, "strip%d at %d\n", strip, tag->value[ strip ] ); #endif fseek( fp, tag->value[strip], SEEK_SET ); bytecount = bytecountTag->value[ strip ]; if ( ( err = ( fread( tmpbuffer, 1, bytecount, fp ) == 0 ) ) ) M_err( "ReadStrip", "Error reading ByteCount" ); /* TODO: de-compress the tmpbuffer */ tmp = tmpbuffer; if ( sp->spp == 1 ) { if ( sp->bps[ 0 ] == 8 ) { unsigned short **ctmp = FL_IsCI( im->type ) ? im->ci : im->gray; for ( i = 0; row < im->h && i < rps; i++, row++ ) { for ( j = 0; j < im->w; j++ ) ctmp[ row ][ j ] = tmp[ j ]; tmp += im->w; } } else if ( sp->bps[ 0 ] > 8 ) { unsigned short **ctmp = FL_IsCI( im->type ) ? im->ci : im->gray; /* TIFF SPEC did not define 16 bps, and seems libtiff always uses MSB. */ sbuf = convert2( ( void * ) tmp, bytecount, MSBFirst /* sp->endian */ ); for ( i = 0; row < im->h && i < rps; i++, row++ ) { memcpy( ctmp[ row ], sbuf, bpl ); sbuf += im->w; } } else if ( sp->bps[ 0 ] == 4 ) { for ( i = 0; row < im->h && i < rps; i++, row++, tmp += bpl ) { for ( j = 0; j < im->w - 1; tmp++ ) { im->ci[ row ][ j++ ] = ( *tmp >> 4 ) & 0x0f; im->ci[ row ][ j++ ] = *tmp & 0x0f; } im->ci[ row ][ j++ ] = ( *tmp >> 4 ) & 0x0f; if ( j < im->w ) im->ci[ row ][ j ] = *tmp & 0x0f; } } else if ( sp->bps[0] == 1 ) { for ( i = 0; row < im->h && i < rps; i++, row++, tmp += bpl ) fl_unpack_bits( im->ci[ row ], tmp, im->w ); } else { M_err( "ReadStrip", "Unhandled bpp=%d\n", sp->bps[ 0 ] ); return -1; } } else if ( sp->spp == 3 || sp->spp == 4 ) { int config = find_tag( PlannarConfig )->value[ 0 ]; if ( sp->bps[ 0 ] == 8 ) { if ( config == RGBRGB ) { for ( i = 0; row < im->h && i < rps; i++, row++ ) { for ( j = 0; j < im->w; j++, tmp += sp->spp ) { im->red[ row ][ j ] = *tmp; im->green[ row ][ j ] = *( tmp + 1 ); im->blue[ row ][ j ] = *( tmp + 2 ); } } } else if ( config == RRGGBB ) { for ( i = 0; row < im->h && i < rps; i++, row++ ) { for ( j = 0; j < im->w; j++, tmp++ ) im->red[ row ][ j ] = *tmp; for ( j = 0; j < im->w; j++, tmp++ ) ; im->green[ row ][ j ] = *tmp; for ( j = 0; j < im->w; j++, tmp++ ) im->blue[ row ][ j ] = *tmp; } } else { M_err( "ReadRGB", "Unknown PlannarConfig %d", config ); return -1; } } else { flimage_error( im, "Unsupported bps=%d", sp->bps[ 0 ] ); return -1; } } else { flimage_error( im, "spp=%d unsupported", sp->spp ); return -1; } } fl_free( tmpbuffer ); if ( find_tag(BitsPerSample)->value[ 0 ] == 1 ) { int b = find_tag( PhotometricI )->value[0] != PhotoBW0Black; im->red_lut[ b ] = im->green_lut[ b ] = im->blue_lut[ b ] = 0; im->red_lut[ ! b ] = im->green_lut[ ! b ] = im->blue_lut[ ! b ] = FL_PCMAX; } /* TODO: post-processing gamma, color/gray response etc */ if ( err ) flimage_error( im, "ErrorReading" ); return err ? -1 : 0; } /*************************************** ***************************************/ static int load_tiff_colormap( FL_IMAGE * im ) { FILE *fp = im->fpin; TIFFTag *tag = find_tag( ColorMap ); SPEC *sp = im->io_spec; int i; if ( ! tag->count ) return 0; if ( im->map_len != tag->count / 3 ) { flimage_error( im, "Bad Colormap" ); return -1; } if ( im->map_len > 0 ) { fseek( fp, tag->offset, SEEK_SET ); for ( i = 0; i < im->map_len; i++ ) im->red_lut[ i ] = sp->readit[ kUShort ]( fp ) >> 8; for ( i = 0; i < im->map_len; i++ ) im->green_lut[ i ] = sp->readit[ kUShort ]( fp ) >> 8; for ( i = 0; i < im->map_len; i++ ) im->blue_lut[ i ] = sp->readit[ kUShort ]( fp ) >> 8; } return 0; } /*************************************** ***************************************/ static void write_tiff_colormap( FL_IMAGE * im, SPEC * sp, int len ) { FILE *fp = im->fpout; int i; sp->write2bytes( ColorMap, fp ); sp->write2bytes( kUShort, fp ); sp->write4bytes( len * 3, fp ); sp->write4bytes( sp->next_pos, fp ); fseek( fp, sp->next_pos, SEEK_SET ); /* red */ for ( i = 0; i < im->map_len; i++ ) sp->write2bytes( im->red_lut[ i ] << 8 | 0xff, fp ); for ( ; i < len; i++ ) sp->write2bytes( 0, fp ); /* green */ for ( i = 0; i < im->map_len; i++ ) sp->write2bytes( im->green_lut[ i ] << 8 | 0xff, fp ); for ( ; i < len; i++ ) sp->write2bytes( 0, fp ); /* blue */ for ( i = 0; i < im->map_len; i++ ) sp->write2bytes( im->blue_lut[ i ] << 8 | 0xff, fp ); for ( ; i < len; i++ ) sp->write2bytes( 0, fp ); } /*************************************** ***************************************/ static void write_tag( FILE * fp, SPEC * sp, int tag_val, int count, int * value, int * n ) { TIFFTag *tag; int i; tag = find_tag( tag_val ); sp->write2bytes( tag_val, fp ); sp->write2bytes( tag->type, fp ); sp->write4bytes( count, fp ); if ( typeSize[ tag->type ] * count > 4 ) { sp->write4bytes( sp->next_pos, fp ); fseek( fp, sp->next_pos, SEEK_SET ); if ( tag->type == ASCII || tag->type == SBYTE || tag->type == kUByte ) { char *p = ( char * ) value; for ( i = 0; i < count; i++ ) sp->writeit[ tag->type ]( p[ i ], fp ); } else for ( i = 0; i < count; i++ ) sp->writeit[ tag->type ]( value[ i ], fp ); sp->next_pos += count * typeSize[ tag->type ]; } else for ( i = 0; i < count; i++ ) sp->writeit[ tag->type ]( value[ i ], fp ); ( *n )++; /* tag is always 12bytes long */ fseek( fp, sp->curr_pos += 12, SEEK_SET ); } /*************************************** ***************************************/ static int write_ifd( FL_IMAGE * im, SPEC * sp ) { FILE *fp = im->fpout; int num_tags, itag, nstrips, bpl; int compression = Uncompressed, photometric; int plannarConfig = RGBRGB, orientation = TopLeft; char doc[ 256 ], *p; static const char *desc = "TIFF by XForms V1.0.91"; int minval = -1, maxval = -1; num_tags = 13; sp->spp = 1; /* strip path info */ if ( ! *strcpy( doc, ( p = strrchr( im->outfile, '/' ) ) ? p + 1 : im->outfile ) ) num_tags--; if ( im->type == FL_IMAGE_CI ) { num_tags++; sp->bps[ 0 ] = 8; photometric = PhotoPalette; } else if ( im->type == FL_IMAGE_MONO ) { sp->bps[ 0 ] = 1; photometric = im->red_lut[ 0 ] > im->red_lut[ 1 ] ? PhotoBW0White : PhotoBW0Black; } else if ( im->type == FL_IMAGE_GRAY || im->type == FL_IMAGE_GRAY16 ) { num_tags += im->type == FL_IMAGE_GRAY ? 0 : 2; sp->bps[ 0 ] = im->type == FL_IMAGE_GRAY ? 8 : 16; minval = 0; maxval = im->gray_maxval; photometric = PhotoBW0Black; } else if ( im->type == FL_IMAGE_RGB ) { sp->bps[ 0 ] = sp->bps[ 1 ] = sp->bps[ 2 ] = 8; sp->spp = 3; photometric = PhotoRGB; } bpl = ( im->w * sp->spp * sp->bps[ 0 ] + 7 ) / 8; sp->rowsPerStrip = sp->strip_size / bpl; nstrips = ( im->h + sp->rowsPerStrip - 1 ) / sp->rowsPerStrip; if ( sp->nstrips < nstrips ) { sp->stripOffsets = fl_calloc( sizeof( int ), nstrips ); sp->stripByteCount = fl_calloc( sizeof( int ), nstrips ); } sp->nstrips = nstrips; /* write the tags */ if ( num_tags > sp->max_tags ) { M_err( "WriteTIFFIFD", "InternalError: run out of tag space" ); return -1; } sp->write2bytes( num_tags, fp ); sp->curr_pos += 2; itag = 0; write_tag( fp, sp, ImageWidth, 1, &im->w, &itag ); write_tag( fp, sp, ImageHeight, 1, &im->h, &itag ); write_tag( fp, sp, BitsPerSample, sp->spp, sp->bps, &itag ); write_tag( fp, sp, Compression, 1, &compression, &itag ); write_tag( fp, sp, PhotometricI, 1, &photometric, &itag ); if ( doc[ 0 ] ) write_tag( fp, sp, DocumentName, strlen( doc ), ( int * ) doc, &itag ); write_tag( fp, sp, Description, strlen(desc), (int *) desc, &itag ); sp->offset_offset = sp->next_pos; write_tag( fp, sp, StripOffsets, nstrips, sp->stripOffsets, &itag ); write_tag( fp, sp, Orientation, 1, &orientation, &itag ); write_tag( fp, sp, SamplesPerPixel, 1, &sp->spp, &itag ); write_tag( fp, sp, RowsPerStrip, 1, &sp->rowsPerStrip, &itag ); sp->bytecount_offset = sp->next_pos; write_tag( fp, sp, StripByteCount, nstrips, sp->stripByteCount, &itag ); if ( im->type == FL_IMAGE_GRAY16 ) { write_tag( fp, sp, MinSampleValue, 1, &minval, &itag ); write_tag( fp, sp, MaxSampleValue, 1, &maxval, &itag ); } write_tag( fp, sp, PlannarConfig, 1, &plannarConfig, &itag ); if ( im->type == FL_IMAGE_CI ) { itag++; /* we always write 8bit palette image */ write_tiff_colormap( im, sp, 256 ); sp->next_pos += 256 * 3 * typeSize[ kShort ]; fseek( fp, sp->curr_pos += 12, SEEK_SET ); } if ( itag != num_tags ) { M_err( "WriteTIFFIFD", "wrong number of tags. wrote %d expect %d", itag, num_tags ); return -1; } /* we do not know where next IFD is at, but need to reserve space */ sp->ifd_offset = sp->curr_pos; sp->write4bytes( 0, fp ); sp->curr_pos += sp->curr_pos; return ( feof( fp ) || ferror( fp ) ) ? -1 : 0; } /*************************************** ***************************************/ static int write_pixels( FL_IMAGE * im, SPEC * sp ) { FILE *fp = im->fpout; int row, i, j, k, err, eof, strip; int bytesPerRow; unsigned char *tmpbuf; fseek( fp, 0, SEEK_END ); eof = ftell( fp ); bytesPerRow = ( im->w * sp->spp * sp->bps[ 0 ] + 7 ) / 8; for ( i = 0; i < sp->nstrips; i++ ) { sp->stripByteCount[ i ] = sp->rowsPerStrip * bytesPerRow; sp->stripOffsets[ i ] = eof + i * sp->stripByteCount[ i ]; } /* fix up the last strip, otherwise we need to pad the output */ sp->stripByteCount[ sp->nstrips - 1 ] = bytesPerRow * ( im->h - sp->rowsPerStrip * ( sp->nstrips - 1 ) ); fseek( fp, sp->offset_offset, SEEK_SET ); for ( i = 0; i < sp->nstrips; i++ ) sp->write4bytes( sp->stripOffsets[ i ], fp ); /* if compression, we won't know the bytecount until after writing */ fseek( fp, sp->bytecount_offset, SEEK_SET ); for ( i = 0; i < sp->nstrips; i++ ) sp->write4bytes( sp->stripByteCount[i], fp ); if ( ! ( tmpbuf = fl_malloc( bytesPerRow + 4 ) ) ) { flimage_error( im, "Can't allocate buffer (%d bytes)", bytesPerRow ); return -1; } for ( row = strip = err = 0; !err && strip < sp->nstrips; strip++ ) { fseek( fp, sp->stripOffsets[ strip ], SEEK_SET ); if ( im->type == FL_IMAGE_CI ) { for ( j = 0; row < im->h && j < sp->rowsPerStrip; j++, row++ ) { for ( k = 0; k < im->w; k++ ) tmpbuf[ k ] = im->ci[ row ][ k]; err = fwrite( tmpbuf, 1, bytesPerRow, fp ) != ( size_t ) bytesPerRow; } } else if ( im->type == FL_IMAGE_GRAY ) { for ( j = 0; row < im->h && j < sp->rowsPerStrip; j++, row++ ) { for ( k = 0; k < im->w; k++ ) tmpbuf[ k ] = im->gray[ row ][ k ]; err = fwrite( tmpbuf, 1, bytesPerRow, fp ) != ( size_t ) bytesPerRow; } } else if ( im->type == FL_IMAGE_GRAY16 ) { for ( j = 0; row < im->h && j < sp->rowsPerStrip; j++, row++ ) { /* tiff spec 6.0 did not define 16 bits samples. libtiff seems to use MSB always for this. We do the same */ for ( k = 0; k < im->w; k++ ) fli_fput2MSBF( im->gray[row][k], fp ); /* sp->write2bytes(im->gray[row][k], fp); */ } } else if ( im->type == FL_IMAGE_MONO ) { for ( j = 0; row < im->h && j < sp->rowsPerStrip; j++, row++ ) { fl_pack_bits( tmpbuf, im->ci[row], im->w ); err = fwrite( tmpbuf, 1, bytesPerRow, fp ) != ( size_t ) bytesPerRow; } } else if ( im->type == FL_IMAGE_RGB ) { /* always write RGBRGB */ for ( j = 0; row < im->h && j < sp->rowsPerStrip; j++, row++ ) { for ( k = 0; k < im->w; k++ ) { tmpbuf[ 0 ] = im->red[ row ][ k ]; tmpbuf[ 1 ] = im->green[ row ][ k ]; tmpbuf[ 2 ] = im->blue[ row ][ k ]; err = fwrite( tmpbuf, 1, 3, fp ) != 3; } } } else { flimage_error( im, "unhandled type: %s", flimage_type_name( im->type ) ); return -1; } } fl_free( tmpbuf ); fseek( fp, 0, SEEK_END ); sp->next_pos = ftell( fp ); return err ? -1 : 0; } /*************************************** ***************************************/ #if 0 static int PackBitsDecode( char * input, char * output, int inlen, int outlen ) { int b, n; for ( n = 0; n < outlen; ) { b = *input; if ( b >= 128 ) b -= 256; if ( b == -128 ) ; if (b < 0) { b = -b + 1; input++; } } } #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/matrix.c0000644000175000017500000000476311247055071014774 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "flimage_int.h" /*************************************** ***************************************/ void * fl_get_matrix( int nrows, int ncols, unsigned int esize ) { char **mat; int i; if ( ! ( mat = fl_malloc( ( nrows + 1 ) * sizeof *mat ) ) ) return NULL; mat[ 0 ] = ( void * ) FL_GET_MATRIX; if ( ! ( mat[ 1 ] = fl_calloc( nrows * ncols, esize ) ) ) { fl_free( mat ); return NULL; } for ( i = 2; i <= nrows; i++ ) mat[ i ] = mat[ i - 1 ] + ncols * esize; return mat + 1; } /*************************************** * given a piece of memory, make a matrix out of it ***************************************/ void * fl_make_matrix( int nrows, int ncols, unsigned int esize, void * mem ) { char **mat = fl_malloc( ( nrows + 1 ) * sizeof *mat ); int i; if ( ! mat ) return NULL; mat[ 0 ] = ( char * ) FL_MAKE_MATRIX; for ( mat[ 1 ] = mem, i = 2; i <= nrows; i++ ) mat[ i ] = mat[ i - 1 ] + ncols * esize; return mat + 1; } /*************************************** ***************************************/ void fl_free_matrix( void *p ) { char **matrix = p; if ( ! p ) return; if ( matrix[ -1 ] && matrix[ 0 ] ) { if ( matrix[ -1 ] == ( char * ) FL_GET_MATRIX ) fl_free( matrix[ 0 ] ); fl_free( matrix - 1 ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_disp.c0000644000175000017500000014124411247055071015565 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * Image display. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "flimage.h" #include "flimage_int.h" #define IMAGEDEBUG 0 #define TRACE 0 static int count_repeats_and_shared( unsigned long *, int ); static int fl_display_ci( FL_IMAGE * im, Window win ); static int fl_display_gray( FL_IMAGE * im, Window win ); static int fl_display_rgb( FL_IMAGE * im, Window win ); static int fl_display_packed( FL_IMAGE * im, Window win ); static int do_quantization( FL_IMAGE *, Colormap, int, unsigned short ** ); /*************************************** * Try to allocate all colors ***************************************/ static unsigned long * get_colors( Colormap colormap, int * red_lut, int * green_lut, int * blue_lut, int map_len, int * allocated ) { XColor xc; unsigned long *newpixels = 0; int npixels, i; *allocated = 0; if ( map_len <= 0 ) { M_err( "get_colors", "bad map length %d\n", map_len ); return 0; } if ( ! ( newpixels = fl_malloc( map_len * sizeof *newpixels ) ) ) { M_err( "get_colors", "malloc failed while getting colors" ); return 0; } xc.flags = DoRed | DoGreen | DoBlue; for ( npixels = i = 0; i < map_len; i++ ) { xc.red = ( red_lut[ i ] << 8 ) | 0xff; xc.green = ( green_lut[ i ] << 8 ) | 0xff; xc.blue = ( blue_lut[ i ] << 8 ) | 0xff; if ( XAllocColor( fl_display, colormap, &xc ) ) newpixels[ npixels++ ] = xc.pixel; } *allocated = npixels; return newpixels; } /*************************************** * Allocate colors. If not enough color, use substitutions ***************************************/ static void get_all_colors( FL_IMAGE * im, unsigned long newpix[ ], int * npix, XColor xc[ ] ) { int i, max_colors = 1 << im->depth, n; for ( i = n = *npix = 0; i < im->map_len; i++ ) { xc[ i ].flags = DoRed | DoGreen | DoBlue; xc[ i ].red = ( im->red_lut[ i ] << 8 ) | 0xff; xc[ i ].green = ( im->green_lut[ i ] << 8 ) | 0xff; xc[ i ].blue = ( im->blue_lut[ i ] << 8 ) | 0xff; if ( XAllocColor( im->xdisplay, im->xcolormap, xc + i ) ) newpix[ n++ ] = xc[ i ].pixel; else xc[ i ].pixel = FL_NoColor; /* bad pixel marker */ } *npix = n; if ( n < im->map_len ) { XColor *mapentry = fl_malloc( max_colors * sizeof *mapentry ); if ( ! mapentry ) { M_err( "get_all_colors", "malloc failure(%d entries)", max_colors ); return; } for ( i = 0; i < max_colors; i++ ) mapentry[ i ].pixel = i; XQueryColors( im->xdisplay, im->xcolormap, mapentry, max_colors ); for ( i = 0; i < im->map_len; i++ ) if ( xc[ i ].pixel == FL_NoColor ) fli_find_closest_color( xc[ i ].red >> 8, xc[ i ].green >> 8, xc[ i ].blue >> 8, mapentry, max_colors, &xc[ i ].pixel ); fl_free( mapentry ); } } #define RGB2PIXEL_8_OR_LESS( im, r, g, b, s, out ) \ do { \ unsigned int trr, tgg, tbb; \ trr = ( r ) >> ( 8 - ( s )->rbits ); \ tgg = ( g ) >> ( 8 - ( s )->gbits ); \ tbb = ( b ) >> ( 8 - ( s )->bbits ); \ out = ( ( trr << ( s )->rshift ) & ( s )->rmask ) \ | ( ( tgg << ( s )->gshift ) & ( s )->gmask ) \ | ( ( tbb << ( s )->bshift ) & ( s )->bmask ); \ if ( im->sdepth == 32 && im->depth == 24 ) \ out |= 0xff000000; \ } while ( 0 ) /*************************************** ***************************************/ static unsigned int rgb2pixel_8bits_or_less( FL_IMAGE * im, unsigned int r, unsigned int g, unsigned int b, FL_RGB2PIXEL * s ) { unsigned int ret; RGB2PIXEL_8_OR_LESS( im, r, g, b, s, ret ); return ret; } #define RGB2PIXEL_8_OR_MORE( im, r, g, b, s, out) \ do { \ unsigned int trr, tgg, tbb; \ trr = ( r ) << ( ( s )->rbits - 8 ); \ tgg = ( g ) << ( ( s )->gbits - 8 ); \ tbb= ( b ) << ( ( s )->bbits - 8 ); \ out = ( ( trr << ( s )->rshift ) & ( s )->rmask ) \ | ( ( tgg << ( s )->gshift ) & ( s )->gmask ) \ | ( ( tbb << ( s )->bshift ) & ( s )->bmask ); \ if ( im->sdepth == 32 && im->depth == 24 ) \ out |= 0xff000000; \ } while ( 0 ) /*************************************** ***************************************/ static unsigned int rgb2pixel_more_than_8bits( FL_IMAGE * im, unsigned int r, unsigned int g, unsigned int b, FL_RGB2PIXEL * s ) { unsigned int ret; RGB2PIXEL_8_OR_MORE( im, r, g, b, s, ret ); return ret; } static unsigned int ( * rgb2pixel )( FL_IMAGE *, unsigned int, unsigned int, unsigned int, FL_RGB2PIXEL * ) = rgb2pixel_8bits_or_less; /*************************************** ***************************************/ static int machine_endian( void ) { static unsigned short a = 0x1234; static unsigned char *c = ( unsigned char * ) &a; return c[ 0 ] == 0x12 ? MSBFirst : LSBFirst; } #define SWAP_CHAR( a, b ) \ do { \ unsigned char tmp_char = a; \ a = b; \ b = tmp_char; \ } while ( 0 ) /*************************************** * display colormapped image: always 8bit color LUT. * ASSUMPTIONS: sizeof(int) == 32bits ***************************************/ static int fl_display_ci( FL_IMAGE * im, Window win FL_UNUSED_ARG ) { Colormap xcolormap; unsigned long *xmapped = NULL; unsigned char *xpixels = NULL, *xpixtmp; unsigned short **ci, *ipixels; unsigned long newpixels[ FLIMAGE_MAXLUT ]; XColor xc[ FLIMAGE_MAXLUT ]; int npixels = 0; int i, j, pad, total = im->w * im->h; XImage *ximage = 0; ci = im->pixels ? im->pixels : im->ci; ipixels = ci[ 0 ]; xcolormap = im->xcolormap; pad = im->depth <= 8 ? 8 : ( im->depth <= 16 ? 16 : 32 ); ximage = XCreateImage( im->xdisplay, im->visual, im->sdepth, ZPixmap, 0, 0, im->w, im->h, pad, 0 ); if ( ximage ) { xpixels = fl_malloc( im->h * ximage->bytes_per_line * sizeof *xpixels ); if ( ! xpixels ) XFree( ximage ); } if ( ! ximage || ! xpixels ) { im->error_message( im, "fl_display_ci: Can't allocate memory" ); return -1; } ximage->data = ( char * ) xpixels; #if IMAGEDEBUG M_err( "fl_display_ci", "w=%d bytes_per_line=%d bits_per_pixel=%d", im->w, ximage->bytes_per_line, ximage->bits_per_pixel ); #endif if ( im->vclass == DirectColor || im->vclass == TrueColor ) { if ( ! ( xmapped = fl_malloc( im->map_len * sizeof *xmapped ) ) ) { XFree( ximage ); fl_free( xpixels ); M_err("fl_display_ci", "malloc failed"); return -1; } #if IMAGEDEBUG fprintf( stderr, "rbits: %d gbits: %d bbits: %d\n", im->rgb2p.rbits, im->rgb2p.gbits, im->rgb2p.bbits ); fprintf( stderr, "rshift: %d gshift: %d bshift: %d\n"a, im->rgb2p.rshift, im->rgb2p.gshift, im->rgb2p.bshift ); #endif for ( i = 0; i < im->map_len; i++ ) { xmapped[ i ] = rgb2pixel( im, im->red_lut[ i ], im->green_lut[ i ], im->blue_lut[ i ], &im->rgb2p ); if ( i == im->tran_index && im->depth == 24 && im->sdepth == 32 ) xmapped[ i ] &= ~ 0xff000000; } if ( machine_endian( ) != ximage->byte_order ) { unsigned char *rgba = ( unsigned char * ) xmapped; if ( ximage->bits_per_pixel == 32 ) { for ( i = 0; i < im->map_len; i++, rgba += 4 ) { SWAP_CHAR( rgba[ 0 ], rgba[ 3 ] ); SWAP_CHAR( rgba[ 1 ], rgba[ 2 ] ); } } else if ( ximage->bits_per_pixel == 16 ) for ( i = 0; i < im->map_len; i++, rgba += 2 ) SWAP_CHAR( rgba[ 0 ], rgba[ 1 ] ); } if ( ximage->bits_per_pixel == 32 ) { unsigned int *ltmp = ( unsigned int * ) xpixels; for ( i = 0; i < total; i++ ) *ltmp++ = xmapped[ ipixels[ i ] ]; } else if ( ximage->bits_per_pixel == 16) { unsigned short *stmp = ( unsigned short * ) xpixels; for ( i = 0; i < total; i++ ) *stmp++ = ( unsigned short ) xmapped[ ipixels[ i ] ]; } else if ( ximage->bits_per_pixel == 8 ) { unsigned char *ctmp = xpixels; for ( i = 0; i < total; i++ ) *ctmp++ = ( unsigned char ) xmapped[ ipixels[ i ] ]; } else if ( ximage->bits_per_pixel == 24 ) { unsigned char *tt = xpixels, *tmp3; unsigned int xcol; for ( j = 0; j < im->h; j++, tt += ximage->bytes_per_line ) for ( i = 0, tmp3 = tt; i < im->w; i++ ) { xcol = xmapped[ci[ j ][ i ] ]; if ( ximage->byte_order == MSBFirst ) { *tmp3++ = ( xcol >> 16 ) & 0xff; *tmp3++ = ( xcol >> 8 ) & 0xff; *tmp3++ = ( xcol ) & 0xff; } else { *tmp3++ = ( xcol ) & 0xff; *tmp3++ = ( xcol >> 8 ) & 0xff; *tmp3++ = ( xcol >> 16 ) & 0xff; } } } else { im->error_message( im, "fl_display_ci: unhandled non-byte-aligned " "pixel" ); return -1; } } else if ( im->vclass == GrayScale || im->vclass == StaticGray ) { int gray; npixels = 0; #if IMAGEDEBUG M_err( "fl_display_ci", "Grayscale: maplen=%d", im->map_len ); #endif for ( i = 0; i < im->map_len; i++ ) { xc[ i ].flags = DoRed | DoGreen | DoBlue; gray = FL_RGB2GRAY( im->red_lut[ i ], im->green_lut[ i ], im->blue_lut[ i ]); xc[ i ].red = xc[ i ].green = xc[ i ].blue = ( gray << 8 ) | 0xff; } get_all_colors( im, newpixels, &npixels, xc ); im->colors = npixels; #if TRACE M_err( "fl_display_ci", "Done colormap" ); #endif if ( ximage->bits_per_pixel == 1 ) { int bit, k; for ( i = 0; i < im->h; i++ ) { xpixtmp = xpixels + ( i * ximage->bytes_per_line ); for ( k = bit = j = 0; j < im->w; j++ ) { k = ( k << 1 ) | xc[ ci[ i ][ j ] ].pixel; if ( ++bit == 8 ) { *xpixtmp++ = k; k = bit = 0; } } if ( bit ) { k <<= ( 8 - bit ); *xpixtmp++ = k; } } } else if ( ximage->bits_per_pixel == 8 ) { #if TRACE M_err( "fl_display_ci", "Converting %d pixels", im->w * im->h ); #endif for ( i = 0, total = im->w * im->h; i < total; i++ ) xpixels[ i ] = ( unsigned char ) xc[ ipixels[ i ] ].pixel; } else M_err( "fl_display_ci", "unhandled bits_per_pixel=%d depth=%d", ximage->bits_per_pixel, im->depth ); } else if ( im->vclass == StaticColor || im->vclass == PseudoColor ) { /* Get all needed colors, use substituion if necessary */ get_all_colors( im, newpixels, &npixels, xc ); im->colors = npixels; if ( ximage->bits_per_pixel == 8 ) for ( i = 0; i < total; i++ ) xpixels[ i ] = ( unsigned char ) xc[ ipixels[ i ] ].pixel; else M_err( "fl_display_ci", "unhandled bits_per_pixel=%d depth=%d", ximage->bits_per_pixel, im->depth ); } else M_err( "fl_display_ci", "unhandled visual class" ); #if TRACE M_err( "fl_display_ci", "about to XPutImage" ); #endif if ( ximage && ximage->data ) im->ximage = ximage; else fprintf( stderr, "no image\n" ); if ( npixels ) XFreeColors( im->xdisplay, xcolormap, newpixels, npixels, 0 ); if ( xmapped ) fl_free( xmapped ); #if TRACE M_err( "fl_display_ci", "Leaving" ); #endif return 0; } /*************************************** * do window levelling ***************************************/ static void window_levelling( FL_IMAGE * im ) { int upper, lower, tmp, i; int npix = im->w * im->h; unsigned short *pix = im->pixels[ 0 ]; /* display image */ unsigned short *ci = im->gray[ 0 ]; /* original image */ unsigned short *wlut = im->wlut; float fact; lower = im->level - im->wwidth / 2; upper = im->level + im->wwidth / 2; if ( im->wwidth <= 0 ) { lower = 0; upper = im->gray_maxval; } if ( lower < 0 ) lower = 0; fact = ( im->map_len - 0.999f ) / ( upper - lower ); for ( i = 0; i <= im->gray_maxval; i++ ) { tmp = i < lower ? lower : ( i > upper ? upper : i ); wlut[ i ] = ( unsigned short ) ( ( tmp - lower ) * fact ); } for ( i = 0; i < npix; i++ ) pix[ i ] = wlut[ ci[ i ] ]; } /*************************************** ***************************************/ static int fl_display_gray( FL_IMAGE * im, Window win ) { int i, npix = im->w * im->h; float fact, scale; float graymax; /* what the display can display */ unsigned short *pix; unsigned short *ci = im->gray[ 0 ]; #if TRACE M_err( "DisplayGray", "Entering" ); #endif /* To avoid scaling of the original data, we create display type */ if ( ! ( im->pixels = fl_get_matrix( im->h, im->w, sizeof **im->pixels ) ) ) { M_err( "DisplayGray", "can't get memory" ); return -1; } pix = im->pixels[ 0 ]; im->display_type = FL_IMAGE_CI; /* graymax takes care of 12bit gray displays */ if ( im->vclass == DirectColor || im->vclass == TrueColor ) { if ( im->rgb2p.bbits > FL_PCBITS ) im->map_len = 1 << im->rgb2p.bbits; else im->map_len = 1 << FL_PCBITS; } else { im->map_len = 1 << im->depth; if ( im->map_len > 250 ) im->map_len -= 20; else if ( im->map_len == 0 ) im->map_len = FLIMAGE_MAXLUT; } flimage_getcolormap( im ); if ( im->rgb2p.bbits > FL_PCBITS ) graymax = ( float )( ( 1 << im->rgb2p.bbits ) - 1 ); else graymax = 255.0; /* (1 << FL_PCBITS) - 1; */ fact = ( graymax + 0.001 ) / ( im->map_len - 1 ); scale = ( im->map_len - 1 ) / ( graymax - 0.001 ); for ( i = 0; i < im->map_len; i++ ) im->red_lut[ i ] = im->green_lut[ i ] = im->blue_lut[ i ] = ( int )( i * fact ); if ( im->type == FL_IMAGE_GRAY16 ) window_levelling( im ); else { /* 8bit grayscale */ if ( im->map_len != 256 ) { unsigned short *wlut = im->wlut; for ( i = 0; i < 256; i++ ) wlut[ i ] = ( unsigned short ) ( i * scale ); for ( i = 0; i < npix; i++ ) pix[i] = wlut[ ci[ i ] ]; } else memcpy( pix, ci, npix * sizeof *ci ); } fl_display_ci( im, win ); #if TRACE M_err( "DisplayGray", "Leaving" ); #endif return 0; } #define RGBTOPIXEL( type ) \ do { \ type *ltmp = ( type * ) xpixels; \ if ( im->rgb2p.rbits > 8 ) \ for ( i = 0; i < total; ltmp++, i++ ) \ { \ RGB2PIXEL_8_OR_MORE( im, red[ i ],green[ i ],blue[ i ], \ &im->rgb2p, *ltmp ); \ if ( im->depth == 24 && im->sdepth == 32 \ && i == im->tran_index ) \ *ltmp &= ~ 0xff000000; \ } \ else \ for ( i = 0; i < total; ltmp++, i++ ) \ { \ RGB2PIXEL_8_OR_LESS( im, red[ i ],green[ i ],blue[ i ], \ &im->rgb2p, *ltmp ); \ if ( im->depth == 24 && im->sdepth == 32 \ && i == im->tran_index ) \ *ltmp &= ~ 0xff000000; \ } \ } while ( 0 ) /*************************************** ***************************************/ static int fl_display_rgb( FL_IMAGE * im, Window win FL_UNUSED_ARG ) { unsigned char *xpixels; int i, j, pad, total = im->w * im->h; XImage *ximage = 0; unsigned char *red = im->red[ 0 ], *green = im->green[ 0 ], *blue = im->blue[ 0 ]; int w = im->w, h = im->h; if ( im->vclass == DirectColor || im->vclass == TrueColor ) { /* Use minimum possible padding */ pad = im->depth <= 8 ? 8 : ( im->depth <= 16 ? 16 : 32 ); ximage = XCreateImage( im->xdisplay, im->visual, im->sdepth, ZPixmap, 0, 0, w, h, pad, 0 ); if ( ximage->bits_per_pixel % 8 ) { im->error_message( im, "can't handle non-byte aligned pixel" ); return -1; } #if IMAGEDEBUG fprintf( stderr, "XBytesPerLine: %d BitsPerPixel=%d\n", ximage->bytes_per_line, ximage->bits_per_pixel ); #endif xpixels = fl_malloc( h * ximage->bytes_per_line * sizeof *xpixels ); if ( ! xpixels ) { flimage_error( im, "malloc() failed" ); return -1; } ximage->data = ( char * ) xpixels; if ( ximage->bits_per_pixel == 32 ) { RGBTOPIXEL( unsigned int ); if ( machine_endian( ) != ximage->byte_order ) { unsigned char *rgba = ( unsigned char * ) ximage->data; for ( i = 0; i < total; i++, rgba += 4 ) { SWAP_CHAR(rgba[ 0 ], rgba[ 3 ]); SWAP_CHAR(rgba[ 1 ], rgba[ 2 ]); } } } else if ( ximage->bits_per_pixel == 16 ) { RGBTOPIXEL( unsigned short ); if ( machine_endian( ) != ximage->byte_order ) { unsigned char *rgba = ( unsigned char * ) ximage->data; for ( i = 0; i < total; i++, rgba += 2 ) SWAP_CHAR( rgba[ 0 ], rgba[ 1 ] ); } } else if ( ximage->bits_per_pixel == 8 ) { RGBTOPIXEL( unsigned char ); } else if ( ximage->bits_per_pixel == 24 ) { unsigned char *tt = ( unsigned char * ) xpixels, *tmp3; unsigned int xcol; for ( j = 0; j < im->h; j++, tt += ximage->bytes_per_line ) { if ( ximage->byte_order == MSBFirst ) for ( i = 0, tmp3 = tt; i < im->w; i++ ) { xcol = rgb2pixel( im, red[ i ], green[ i ], blue[ i ], &im->rgb2p ); *tmp3++ = ( xcol >> 16 ) & 0xff; *tmp3++ = ( xcol >> 8 ) & 0xff; *tmp3++ = ( xcol ) & 0xff; } else for ( i = 0, tmp3 = tt; i < im->w; i++ ) { xcol = rgb2pixel( im, red[ i ], green[ i ], blue[ i ], &im->rgb2p ); *tmp3++ = ( xcol ) & 0xff; *tmp3++ = ( xcol >> 8 ) & 0xff; *tmp3++ = ( xcol >> 16 ) & 0xff; } } } im->ximage = ximage; } else if ( im->vclass == GrayScale || im->vclass == StaticGray ) { M_err( "fl_display_rgb", "RGB with grayscale display" ); return -1; } else if ( im->vclass == PseudoColor || im->vclass == StaticColor ) { M_err( "fl_display_rgb", "Internal error" ); return -1; } else { fprintf( stderr, "ImageDisp: internal color\n" ); return -1; } return 0; } /*************************************** ***************************************/ static int fl_display_packed( FL_IMAGE * im, Window win ) { flimage_convert( im, FL_IMAGE_RGB, 0 ); return fl_display_rgb( im, win ); } /*************************************** * Here we already got the proper XImage. Actually it would be * much faster if we create a Pixmap from the XImage. TODO ***************************************/ static void displayXImage( FL_IMAGE * im ) { XImage *ximage = im->ximage; Colormap xcolormap = im->xcolormap; unsigned long newpixels[ FLIMAGE_MAXLUT ]; XColor xc[ FLIMAGE_MAXLUT ]; int npix = 0; if ( im->vclass != TrueColor && im->vclass != DirectColor ) get_all_colors( im, newpixels, &npix, xc ); XPutImage( im->xdisplay, im->win, im->gc, ximage, im->sxd, im->syd, im->wxd, im->wyd, im->swd, im->shd ); if ( npix ) XFreeColors( im->xdisplay, xcolormap, newpixels, npix, 0 ); } /*************************************** * Convert an RGB triple to a pixel ***************************************/ unsigned long flimage_color_to_pixel( FL_IMAGE * im, int r, int g, int b, int * newpix ) { XColor xc; static Colormap lastcolormap; static XColor *xcolor; int i, max_col; unsigned long pixel = 0; *newpix = 0; if ( im->vclass == TrueColor || im->vclass == DirectColor ) return rgb2pixel( im, r, g, b, &im->rgb2p ); else { xc.flags = DoRed | DoGreen | DoBlue; xc.red = ( r << 8 ) | 0xff; xc.green = ( g << 8 ) | 0xff; xc.blue = ( b << 8 ) | 0xff; if ( ( *newpix = XAllocColor( im->xdisplay, im->xcolormap, &xc ) ) ) return xc.pixel; /* Search for a closest match */ max_col = FL_min( 256, 1 << im->depth ); if ( ! xcolor ) xcolor = fl_malloc( 256 * sizeof *xcolor ); /* Not theoretically correct as colormap may have changed * since the last time we asked for colors. Take a chance for * performace. */ if ( lastcolormap != im->xcolormap ) { for ( i = 0; i < max_col; i++ ) xcolor[ i ].pixel = i; XQueryColors( im->xdisplay, im->xcolormap, xcolor, max_col ); lastcolormap = im->xcolormap; } fli_find_closest_color( r, g, b, xcolor, max_col, &pixel ); } return pixel; } /*************************************** ***************************************/ int flimage_swapbuffer( FL_IMAGE * im ) { int sw = im->sw ? im->sw : im->w, sh = im->sh ? im->sh : im->h; XCopyArea(im->xdisplay, im->pixmap, im->win, im->gc, im->sx, im->sy, sw, sh, im->wx, im->wy); return 0; } /*************************************** ***************************************/ static void create_backbuffer( FL_IMAGE * im, FL_WINDOW win, int depth ) { if ( depth != im->pixmap_depth || im->w > im->pixmap_w || im->pixmap_w > 1200 || im->h > im->pixmap_h || im->pixmap_h > 1200 ) { if ( im->pixmap ) XFreePixmap( im->xdisplay, im->pixmap ); im->pixmap = XCreatePixmap( im->xdisplay, win, im->w, im->h, depth ); im->pixmap_w = im->w; im->pixmap_h = im->h; im->pixmap_depth = depth; im->modified = 1; } } /*************************************** * This function handles display caused by Expose event. If we * somehow can get hold of the Expose event, we may only need * to re-display part of the image ***************************************/ static void handle_redraw( FL_IMAGE * im, FL_WINDOW win ) { if ( im->double_buffer && im->pixmap ) { im->win = im->pixmap; im->display_markers( im ); im->display_text( im ); im->win = win; flimage_swapbuffer( im ); } else { im->win = win; displayXImage( im ); im->display_markers( im ); im->display_text( im ); } } /*************************************** ***************************************/ static void adapt_image_to_window( FL_IMAGE * im, XWindowAttributes * xwa ) { FL_RGB2PIXEL *rgb2p = &im->rgb2p; rgb2p->bits_per_rgb = xwa->visual->bits_per_rgb; rgb2p->colormap_size = xwa->visual->map_entries; #if IMAGEDEBUG fprintf( stderr, "bits_per_rgb=%d mapsize=%d\n", im->rgb2p.bits_per_rgb, im->rgb2p.colormap_size ); #endif rgb2p->rmask = xwa->visual->red_mask; rgb2p->gmask = xwa->visual->green_mask; rgb2p->bmask = xwa->visual->blue_mask; im->depth = im->sdepth = xwa->depth; im->vclass = xwa->visual->class; im->visual = xwa->visual; im->xcolormap = xwa->colormap; fli_rgbmask_to_shifts( rgb2p->rmask, &rgb2p->rshift, &rgb2p->rbits ); fli_rgbmask_to_shifts( rgb2p->gmask, &rgb2p->gshift, &rgb2p->gbits ); fli_rgbmask_to_shifts( rgb2p->bmask, &rgb2p->bshift, &rgb2p->bbits ); } #define Compatible( x, im ) \ ( ( x ).depth == im->depth \ && ( x ).visual->class == im->vclass \ && ( x ).visual->red_mask == im->rgb2p.rmask \ && ( x ).visual->green_mask == im->rgb2p.gmask ) /*************************************** * Convert an FL_IMAGE into an XImage. The converted ximage is * im->ximage if successful ***************************************/ int flimage_to_ximage( FL_IMAGE * im, FL_WINDOW win, XWindowAttributes * xwa ) { unsigned long bk = 0; int type, ret = 0; if ( im->display_type != FL_IMAGE_NONE && im->modified ) { if ( im->pixels ) { fl_free_matrix( im->pixels ); im->pixels = 0; } im->display_type = FL_IMAGE_NONE; } if ( ! xwa ) { static XWindowAttributes tmpxwa; XGetWindowAttributes( im->xdisplay, win, &tmpxwa ); xwa = &tmpxwa; } /* Handle transparency */ if ( im->tran_rgb >= 0 && im->app_background >= 0 ) { int ar, ag, ab, tc; if ( im->app_background >= 0 ) bk = im->app_background; if ( FL_IsCI( im->type ) && im->tran_index >= 0 && im->tran_index < im->map_len ) { tc = im->tran_index; FL_UNPACK3( bk, ar, ag, ab ); im->red_lut[ tc ] = ar; im->green_lut[ tc ] = ag; im->blue_lut[ tc ] = ab; } else flimage_replace_pixel( im, im->tran_rgb, bk ); } if ( ! ( im->win == win || Compatible( * xwa, im ) ) ) { adapt_image_to_window( im, xwa ); if ( im->rgb2p.rbits > 8 || im->rgb2p.gbits > 8 ) rgb2pixel = rgb2pixel_more_than_8bits; else rgb2pixel = rgb2pixel_8bits_or_less; } im->win = win; if ( im->depth == 32 && im->rgb2p.rbits + im->rgb2p.gbits + im->rgb2p.bbits < 32 ) im->depth = im->rgb2p.rbits + im->rgb2p.gbits + im->rgb2p.bbits; /* Prepare the display image */ if ( im->depth == 1 && im->type != FL_IMAGE_MONO ) { unsigned short **ci; int otype = im->type; if ( im->type != FL_IMAGE_CI ) { flimage_convert( im, FL_IMAGE_MONO, 2 ); im->pixels = im->ci; im->ci = 0; } else { im->pixels = fl_get_matrix( im->h, im->w, sizeof **im->pixels ); memcpy( im->pixels[ 0 ], im->ci[ 0 ], sizeof **im->ci * im->w * im->h ); flimage_convert( im, FL_IMAGE_MONO, 2 ); ci = im->pixels; im->pixels = im->ci; im->ci = ci; } im->available_type &= ~ FL_IMAGE_MONO; im->type = otype; im->display_type = FL_IMAGE_MONO; im->available_type |= otype; } else if ( ( im->vclass == StaticGray || im->vclass == GrayScale ) && im->depth != 1 && ! FL_IsGray( im->type ) ) { int otype = im->type; flimage_convert( im, FL_IMAGE_GRAY, 2 ); im->type = otype; /* this gets reset by fl_display_gray */ im->display_type = FL_IMAGE_GRAY; } else if ( ( im->vclass == PseudoColor || im->vclass == StaticColor ) && im->type == FL_IMAGE_RGB ) { int max_colors = 1 << im->depth; unsigned short **ci = fl_get_matrix( im->h, im->w, sizeof **ci ); if ( max_colors > 250 ) max_colors -= 20; im->map_len = max_colors; flimage_getcolormap( im ); do_quantization( im, im->xcolormap, im->map_len, ci ); im->pixels = ci; im->display_type = FL_IMAGE_CI; } if ( ( type = im->display_type ) == FL_IMAGE_NONE ) type = im->type; switch ( type ) { case FL_IMAGE_GRAY: case FL_IMAGE_GRAY16: ret = fl_display_gray( im, win ); break; case FL_IMAGE_CI: case FL_IMAGE_MONO: ret = fl_display_ci( im, win ); break; case FL_IMAGE_RGB: ret = fl_display_rgb( im, win ); break; case FL_IMAGE_PACKED: ret = fl_display_packed( im, win ); break; default: ret = -1; } return ret; } /*************************************** * We always keep hi-res image whenever possible. For this reason, * the displayed image and the image in memory are not necessarily the * same type. When we quantize for display, we do not overwrite the * the image, rather we create a displayable image ***************************************/ int flimage_sdisplay( FL_IMAGE * im, Window win ) { XWindowAttributes xwa; int ret = 0; if ( win <= 0 || !im || im->w <= 0 || im->type == FL_IMAGE_NONE ) return -1; if ( sizeof( int ) != 4 ) { fprintf( stderr, "FatalError: Assumed sizeof(int)==4\n" ); exit( 1 ); } /* Check for consistent subimage */ im->sx = FL_clamp( im->sx, 0, im->w ); im->sy = FL_clamp( im->sy, 0, im->h ); im->sw = FL_clamp( im->sw, 0, im->w ); im->sh = FL_clamp( im->sh, 0, im->h ); if ( im->sx + im->sw > im->w ) im->sx = im->sw = 0; if ( im->sy + im->sh > im->h ) im->sy = im->sh = 0; if ( im->double_buffer ) { im->sxd = im->syd = 0; im->swd = im->w; im->shd = im->h; im->wxd = im->wyd = 0; } else { im->sxd = im->sx; im->syd = im->sy; im->wxd = im->wx; im->wyd = im->wy; im->swd = im->sw ? im->sw : im->w; im->shd = im->sh ? im->sh : im->h; } XGetWindowAttributes( im->xdisplay, win, &xwa ); if ( ! im->setup->do_not_clear ) { /* Only clear the minimum region we have to */ int sw = im->sw ? im->sw : im->w; int sh = im->sh ? im->sh : im->h; if ( im->wx > 0 ) XClearArea( im->xdisplay, win, 0, 0, im->wx, 0, 0 ); if ( im->wy > 0 ) XClearArea( im->xdisplay, win, 0, 0, 0, im->wy, 0 ); XClearArea( im->xdisplay, win, im->wx + sw, 0, 0, 0, 0 ); XClearArea( im->xdisplay, win, 0, im->wy + sh, 0, 0, 0 ); } if ( im->double_buffer ) create_backbuffer( im, win, xwa.depth ); /* Check if redraw. Possible optimization: obtain the dirty region and do subimage stuff */ if ( im->ximage && !im->modified && ( im->win == win || Compatible( xwa, im ) ) ) { handle_redraw( im, win ); return 0; } /* If we got here, we need to re-generate ximage */ if ( im->ximage ) { XDestroyImage( ( XImage * ) im->ximage ); im->ximage = None; } if ( ! Compatible( xwa, im ) ) { if ( im->gc ) XFreeGC( im->xdisplay, im->gc ); if ( im->textgc ) XFreeGC( im->xdisplay, im->textgc ); im->gc = im->textgc = None; } if ( ! im->gc ) im->gc = XCreateGC( im->xdisplay, win, 0, 0 ); ret = flimage_to_ximage( im, win, &xwa ); if ( ret >= 0 ) { im->win = im->double_buffer ? im->pixmap : win; XPutImage( im->xdisplay, im->win, im->gc, im->ximage, im->sxd, im->syd, im->wxd, im->wyd, im->swd, im->shd ); im->display_markers( im ); im->display_text( im ); im->win = win; if ( im->double_buffer ) flimage_swapbuffer( im ); im->modified = 0; } return ret; } /*************************************** * quantize a full color image ***************************************/ static int do_quantization( FL_IMAGE * im, Colormap colormap, int maxcol, unsigned short ** ci ) { int empty_slots, done, repeats; unsigned long *newpixels; int request = FL_max( maxcol - 4, 1 ); do { if ( im->type == FL_IMAGE_RGB ) flimage_quantize_rgb( im->red, im->green, im->blue, im->w, im->h, request, ci, &im->map_len, im->red_lut, im->green_lut, im->blue_lut, im ); else flimage_quantize_packed( im->packed, im->w, im->h, request, ci, &im->map_len, im->red_lut, im->green_lut, im->blue_lut, im); newpixels = get_colors( colormap, im->red_lut, im->green_lut, im->blue_lut, im->map_len, &empty_slots ); /* It's better to take a chance of finding similar colors in the colormap than reducing the number of colors too much */ done = empty_slots == im->map_len || empty_slots < 12 || empty_slots < maxcol / 4; if ( ! done ) { repeats = count_repeats_and_shared( newpixels, empty_slots ); XFreeColors( im->xdisplay, colormap, newpixels, empty_slots, 0 ); fl_free( newpixels ); im->map_len = 1; request = empty_slots - repeats; } } while ( ! done ); if ( empty_slots ) XFreeColors( im->xdisplay, colormap, newpixels, empty_slots, 0 ); fl_free( newpixels ); return newpixels ? 0 : -1; } /***************************************************************** * local functions ***************************************************************/ #define SSS 8 /*************************************** ***************************************/ static int count_repeats_and_shared( unsigned long * array, int len ) { int i, j, n; if ( len < 10 ) return 0; /* This does not really count the shared colors, but < 5 is a good guess */ for ( i = n = 0; i < len - 1; i++ ) for ( j = i + 1; j < len; j++ ) if ( array[ i ] == array[ j ] || array[ i ] < SSS ) n++; n += array[ len - 1 ] < SSS; return n > 4 ? 4 : n; } /*************************************** ***************************************/ int flimage_display( FL_IMAGE * in_image, Window win ) { int err = 0; FL_IMAGE *im = in_image; if ( ! im || im->w <= 0 || win == 0 ) return -1; for ( err = 0; err >= 0 && im; im = im->next ) { im->app_background = in_image->app_background; err = flimage_sdisplay( im, win ); XSync( in_image->xdisplay, 0 ); if ( in_image->setup->delay ) fl_msleep( in_image->setup->delay ); } return err; } /*************************************** * convert an XImage into flimage ***************************************/ static int convert_ximage( FL_IMAGE * im, XImage * ximage ) { unsigned int rshift, gshift, bshift, delta; unsigned int rbits, gbits, bbits; unsigned int *ui; unsigned short *us; unsigned char *uc; unsigned int rnorm, gnorm, bnorm, r, g, b; int x, y; #if 0 /* For some reason, red_mask is not always set on some systems. This problem makes this conversion unsafe as we're blindingly using the red_mask of some arbirary window! */ fli_rgbmask_to_shifts( ximage->red_mask, &rshift, &rbits ); fli_rgbmask_to_shifts( ximage->green_mask, &gshift, &gbits ); fli_rgbmask_to_shifts( ximage->blue_mask, &bshift, &bbits ); #else ximage->red_mask = im->rgb2p.rmask; ximage->green_mask = im->rgb2p.gmask; ximage->blue_mask = im->rgb2p.bmask; rshift = im->rgb2p.rshift; gshift = im->rgb2p.gshift; bshift = im->rgb2p.bshift; rbits = im->rgb2p.rbits; gbits = im->rgb2p.gbits; bbits = im->rgb2p.bbits; #endif rnorm = FL_PCBITS - rbits; gnorm = FL_PCBITS - gbits; bnorm = FL_PCBITS - bbits; if ( im->rgb2p.gbits > FL_PCBITS ) { rshift += rbits - FL_PCBITS; gshift += gbits - FL_PCBITS; bshift += gbits - FL_PCBITS; rnorm = gnorm = bnorm = 0; } if ( ximage->bits_per_pixel != 1 && ximage->bits_per_pixel % 8 ) { M_err( "ConvertImage", "unsupported bpp=%d", ximage->bits_per_pixel ); return -1; } if ( im->vclass == TrueColor || im->vclass == DirectColor ) im->type = FL_IMAGE_RGB; else { im->type = im->depth == 1 ? FL_IMAGE_MONO : FL_IMAGE_CI; im->map_len = 1 << im->depth; } im->w = ximage->width; im->h = ximage->height; flimage_invalidate_pixels( im ); if ( flimage_getmem( im ) < 0 ) { flimage_error( im, "ConvertXImage(%dX%d): out of memory", im->w, im->h ); return -1; } im->modified = 1; switch ( ximage->bits_per_pixel ) { case 32: ui = ( unsigned int * ) ximage->data; delta = ximage->bytes_per_line / 4; for ( y = 0; y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) { im->red[ y][ x ] = ( ui[ x ] & ximage->red_mask ) >> rshift; im->green[ y][ x ] = ( ui[ x ] & ximage->green_mask ) >> gshift; im->blue[ y][ x ] = ( ui[ x ] & ximage->blue_mask ) >> bshift; } ui += delta; } im->modified = 1; break; case 16: if ( im->vclass == GrayScale || im->vclass == StaticGray ) { /* Probably very rare */ M_err( "ConvertXImage", "16bpp grayscale not handled" ); return -1; } us = ( unsigned short * ) ximage->data; delta = ximage->bytes_per_line / 2; for ( y = 0; y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) { r = ( us[ x ] & ximage->red_mask ) >> rshift; g = ( us[ x ] & ximage->green_mask ) >> gshift; b = ( us[ x ] & ximage->blue_mask ) >> bshift; /* Normalize */ im->red[ y ][ x ] = ( ( r + 1 ) << rnorm ) - 1; im->green[ y ][ x ] = ( ( g + 1 ) << gnorm ) - 1; im->blue[ y ][ x ] = ( ( b + 1 ) << bnorm ) - 1; } us += delta; } im->modified = 1; break; case 8: uc = ( unsigned char * ) ximage->data; if ( im->type == FL_IMAGE_RGB ) { for ( y = 0; y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) { r = ( uc[ x ] & ximage->red_mask ) >> rshift; g = ( uc[ x ] & ximage->green_mask ) >> gshift; b = ( uc[ x ] & ximage->blue_mask ) >> bshift; /* normalize */ im->red[ y ][ x ] = ( ( r + 1 ) << rnorm ) - 1; im->green[ y ][ x ] = ( ( g + 1 ) << gnorm ) - 1; im->blue[ y ][ x ] = ( ( b + 1 ) << bnorm ) - 1; } uc += ximage->bytes_per_line; } } else { XColor xcolor[ 256 ], *xc, *xce; int max_colors = 1 << im->depth, pixel; for ( x = 0; x < max_colors; x++ ) xcolor[ x ].pixel = x; XQueryColors( im->xdisplay, im->xcolormap, xcolor, max_colors ); for ( xc = xcolor, xce = xc + max_colors; xc < xce; xc++ ) { pixel = xc->pixel; im->red_lut[ pixel ] = xc->red >> 8; im->green_lut[ pixel ] = xc->green >> 8; im->blue_lut[ pixel ] = xc->blue >> 8; } for ( y = 0; y < im->h; y++ ) { for ( x = 0; x < im->w; x++ ) im->ci[ y ][ x ] = uc[ x ]; uc += ximage->bytes_per_line; } } break; case 1: uc = ( unsigned char * ) ximage->data; for ( y = 0; y < im->h; y++ ) { fl_unpack_bits( im->ci[ y ], uc, ximage->bytes_per_line ); uc += ximage->bytes_per_line; } break; default: M_err( "XImageConvert", "unsupported bpp %d", ximage->depth ); im->modified = 0; return -1; } return 0; } /*************************************** * Setup the pixel conversion using the window attributes ***************************************/ static int flimage_from_pixmap_( FL_IMAGE * im, Pixmap pixmap, int w, int h ) { XImage *ximage; int status; if ( w == 0 || h == 0 ) { unsigned int ww, hh, bjunk, djunk; int xx, yy; Window root; XGetGeometry( im->xdisplay, pixmap, &root, &xx, &yy, &ww, &hh, &bjunk, &djunk ); w = ww; h = hh; } /* Turn pixmap into an X image */ ximage = XGetImage( im->xdisplay, pixmap, 0, 0, w, h, AllPlanes, ZPixmap ); if ( ! ximage ) { flimage_error( im, "XGetImage() failed" ); return -1; } /* It's possible that im may contain nothing if w == h == 0 on input */ if ( im->rgb2p.rbits == 0 ) { XWindowAttributes xwa; XGetWindowAttributes( im->xdisplay, fl_root, &xwa ); adapt_image_to_window( im, &xwa ); } status = convert_ximage( im, ximage ); /* The old Ximage is now out of date */ if ( im->ximage ) XDestroyImage((XImage *) im->ximage); im->ximage = ximage; return status; } /*************************************** ***************************************/ int flimage_from_pixmap( FL_IMAGE * im, Pixmap pixmap ) { if ( ! im || !pixmap ) return -1; return flimage_from_pixmap_( im, pixmap, 0, 0 ); } /*************************************** ***************************************/ Pixmap flimage_to_pixmap( FL_IMAGE * im, FL_WINDOW win ) { Pixmap pixmap; XWindowAttributes xwa; if ( ! im || im->type == FLIMAGE_NONE || win == 0 ) return 0; XGetWindowAttributes( im->xdisplay, win, &xwa ); if ( ! im->gc ) im->gc = XCreateGC( im->xdisplay, win, 0, 0 ); pixmap = XCreatePixmap( im->xdisplay, win, im->w, im->h, xwa.depth ); if ( flimage_to_ximage( im, win, &xwa ) >= 0 ) XPutImage( im->xdisplay, pixmap, im->gc, im->ximage, 0, 0, 0, 0, im->w, im->h ); return pixmap; } /*************************************** * Render possible annotations into the the image ***************************************/ int flimage_render_annotation( FL_IMAGE * im, FL_WINDOW win ) { int status; XWindowAttributes xwa; if ( ! im || ! win ) return -1; if ( ! im->ntext && ! im->nmarkers ) return 0; XGetWindowAttributes( im->xdisplay, win, &xwa ); /* Create an offscreen pixmap to hold the image */ create_backbuffer(im, win, xwa.depth); if ( flimage_to_ximage( im, win, &xwa ) < 0 ) return -1; XPutImage( im->xdisplay, im->pixmap, im->gc, im->ximage, 0, 0, 0, 0, im->w, im->h ); im->win = im->pixmap; im->display_markers( im ); im->display_text( im ); im->win = win; status = flimage_from_pixmap_( im, im->pixmap, im->w, im->h ); im->free_text( im ); im->free_markers( im ); return status; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/image/image_postscript.c0000644000175000017500000005512211247055071017037 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * This file is part of the XForms library package. * Copyright (c) 1993, 1998-2002 By T.C. Zhao * All rights reserved. * * PostScript support. * * Do we want to integrate the stuff from ps_core.c, ps_draw.c and * postscript.c to consolidate ps support ? * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "flimage.h" #include "flimage_int.h" #include "private/flsnprintf.h" #ifndef FLPS_H #include "flps.h" #endif #include "private/pflps.h" #include #include #include typedef FLPSInfo SPEC; /*************************************** ***************************************/ FLPS_CONTROL * flimage_ps_options( void ) { static SPEC *sp; if ( ! sp ) { extern float fli_dpi; /* I don't like this and will change it */ sp = fl_calloc( 1, sizeof *sp ); sp->orientation = FLPS_AUTO; sp->paper_w = 8.5; sp->paper_h = 11.0; sp->auto_fit = 1; sp->xdpi = sp->ydpi = fli_dpi; sp->printer_dpi = 300; sp->vm = sp->hm = 0.3; sp->xscale = sp->yscale = 1.0; sp->tmpdir = "/tmp"; sp->gamma = 1.0; sp->verbose = 0; sp->comment = 0; sp->pack = 0; sp->lastr = -1; sp->ps_color = 1; /* cache */ sp->cur_color = FLIMAGE_BADCOLOR; sp->cur_style = sp->cur_size = sp->cur_lw = -1; } return ( FLPS_CONTROL * ) sp; } /*************************************** ***************************************/ static int PS_identify( FILE * fp ) { char buf[ 2 ]; size_t c; c = fread( buf, 1, 2, fp ); rewind( fp ); return c == 2 && buf[ 0 ] == '%' && buf[ 1 ] == '!'; } /*************************************** * this is a fake to get past the driver ***************************************/ static int PS_description( FL_IMAGE * im ) { im->extra_io_info = fl_malloc( sizeof( SPEC ) ); memcpy( im->extra_io_info, flimage_ps_options( ), sizeof( SPEC ) ); im->w = im->h = 1; im->type = FL_IMAGE_RGB; return 0; } #define GS_DEVICE "ppmraw" #define FL_FILE "ppm" #define GS_OPTION "-q -DNOPAUSE" /*************************************** * load a specific page ***************************************/ static int load_page( FL_IMAGE * im, int pageNo ) { char name[ 1024 ], tmpf[ 1024 ]; SPEC *sp = im->extra_io_info; FLIMAGE_IO *fileIO; int status, n; fl_snprintf( name, sizeof name, "%s/%s_%d", sp->tmpdir, sp->prefix, pageNo ); if ( sp->verbose ) M_err( "LoadPage", "loading %s", name ); if ( ! ( n = flimage_is_supported( name ) ) ) { M_err( "LoadPage", "internal error. %s unknown", name ); return -1; } fclose( im->fpin ); im->fpin = fopen( name, "rb" ); strcpy( tmpf, im->infile ); strcpy( im->infile, name ); im->completed = pageNo; im->visual_cue( im, "Loading PostScript" ); /* re-direct the io handling */ im->image_io = fileIO = &flimage_io[ n - 1 ]; im->type = fileIO->type; fileIO->identify( im->fpin ); if ( ( status = fileIO->read_description( im ) ) >= 0 ) status = flimage_getmem( im ); if ( status >= 0 ) status = fileIO->read_pixels( im ); strcpy( im->infile, tmpf ); return status; } /*************************************** * delete all temporary files ***************************************/ static void PS_cleanup( FL_IMAGE * im ) { int i, n = im->total_frames >= 1 ? im->total_frames : 1; SPEC *sp = im->extra_io_info; char name[ 1024 ]; if ( ! sp ) return; for ( i = 1; i <= n; i++ ) { fl_snprintf( name, sizeof name, "%s/%s_%d", sp->tmpdir, sp->prefix, i ); if ( sp->verbose ) M_err( "Cleanup", "deleting %s", name ); remove( name ); } fl_free( sp->prefix ); fl_free( sp ); im->extra_io_info = 0; } /*************************************** ***************************************/ static const char * file_tail( char *s ) { char *p = strrchr( s, '/' ); return p ? ( p + 1 ) : s; } /*************************************** ***************************************/ static int PS_read_pixels( FL_IMAGE * im ) { char cmd[ 1024 ]; int npages, status; SPEC *sp = im->extra_io_info; FL_Dirlist *dirlist; const FL_Dirlist *dls, *dl; char prefix[ 1024 ]; int old_sort; /* the tmp file pattern will be /tmp/gs_$InputFile_$pid_pageNO */ fl_snprintf( prefix, sizeof prefix, "gs_%s_%d", file_tail( im->infile ), ( int ) fli_getpid( ) ); sp->prefix = strdup( prefix ); if ( sp->verbose ) M_err( "LoadPS", "prefix=%s", sp->prefix ); fl_snprintf( cmd, sizeof cmd, "gs -sDEVICE=%s %s -r%dx%d -sOutputFile=%s/%s_%%d -- %s %s", GS_DEVICE, GS_OPTION, (int) sp->xdpi, ( int ) sp->ydpi, sp->tmpdir, sp->prefix, im->infile, sp->first_page_only ? "/showpage { systemdict begin showpage quit end} def" : "" ); if ( sp->verbose ) M_err( "LoadPS", "executing %s\n", cmd ); else strcat( cmd, " 2 > /dev/null" ); im->completed = -1; /* indicate infinite/unknown */ im->visual_cue( im, "Converting PS ..." ); if ( ( status = system( cmd ) ) ) { M_err( "ReadPS", " status=%d", status ); flimage_error( im, "ReadPS failed. Status=%d", status ); /* return -1; */ } im->completed = 1; im->visual_cue( im, "Loading PostScript" ); /* we really do not need the current image stuff */ flimage_freemem( im ); /* find out how many pages we have. Turn off sorting, much faster */ old_sort = fl_set_dirlist_sort( FL_NONE ); dl = fl_get_dirlist( sp->tmpdir, strcat( prefix, "*" ), &npages, 1 ); fl_set_dirlist_sort( old_sort ); if ( ! ( dirlist = ( FL_Dirlist * ) dl ) ) { PS_cleanup( im ); return -1; } /* remove directories from the list */ for ( dls = dl + npages; dl < dls; dl++ ) if ( dl->type == FT_DIR ) npages--; fl_free_dirlist( dirlist ); if ( sp->verbose ) M_err( "LoadPS", "Total %d pages", npages ); if ( npages <= 0 ) { PS_cleanup( im ); flimage_error( im, "LoadPS: no page written!" ); return -1; } im->total_frames = npages; if ( ! sp->first_page_only ) { im->more = npages > 1; im->random_frame = load_page; im->cleanup = PS_cleanup; } im->total = im->total_frames; /* construct the filename and load it */ status = load_page( im, 1 ); /* need to cleanup the file if single page. For multipage, the driver will cleanup */ if ( ! im->more || status < 0 ) PS_cleanup( im ); return status; } /*************************************************************************** * Output routine **************************************************************************/ /*************************************** ***************************************/ static void PS_push( void ) { flps_output( "gsave\n" ); } /*************************************** ***************************************/ static void PS_pop( void ) { flps_output( "grestore\n" ); } /*************************************** ***************************************/ static void PS_trailer( SPEC *sp ) { PS_pop( ); flps_output( 0 ); fputs( "%%Trailer\n", sp->fp ); } /*************************************** ***************************************/ static int auto_scale( float pagew, float pageh, float w, float h, int landscape ) { float sx, sy; int i = 0; if ( ( ! landscape && ( pagew < w || pageh < h ) ) || ( landscape && ( pagew < h || pageh < w ) ) ) { if ( ! landscape ) { sx = ( pagew - 2.0 ) / w; sy = ( pageh - 2.0 ) / h; } else { sx = ( pagew - 2.0 ) / h; sy = ( pageh - 2.0 ) / w; } i = 100.0 * FL_min( sx, sy ); } return i; } /*************************************** ***************************************/ static void PS_start_image( FL_IMAGE * im FL_UNUSED_ARG ) { PS_push( ); } /*************************************** ***************************************/ static void PS_end_image( FL_IMAGE * im FL_UNUSED_ARG ) { PS_pop( ); } #define LEFT '(' #define RIGHT ')' static void PS_annotation_init( FL_IMAGE * ); static void PS_annotation( FL_IMAGE * im ); /*************************************** ***************************************/ static void PS_write_header( FL_IMAGE * im ) { FILE *fp = im->fpout; SPEC *sp = im->extra_io_info; float pagew = sp->paper_w - 2.0 * sp->hm; float pageh = sp->paper_h - 2.0 * sp->vm; float hm = sp->hm, vm = sp->vm; float s2px, s2py; float xscale = sp->xscale, yscale = sp->yscale; int xo, yo; int w = im->w, h = im->h; int orientation; int rescale; sp->fp = fp; /* check the size and orientation */ pagew *= 72.0; pageh *= 72.0; hm *= 72.0; vm *= 72.0; sp->s2px = s2px = 72.0 / sp->xdpi; sp->s2py = s2py = 72.0 / sp->ydpi; w *= xscale * s2px; h *= yscale * s2py; if ( ( orientation = sp->orientation ) == FLPS_AUTO ) { /* pick the orientation so even margin results */ int plm, pbm, llm, lbm; plm = ( pagew - w ) / 2; pbm = ( pageh - h ) / 2; llm = ( pagew - h ) / 2; lbm = ( pageh - w ) / 2; orientation = ( FL_abs( lbm - llm ) < FL_abs( pbm - plm ) ) ? FLPS_LANDSCAPE : FLPS_PORTRAIT; } sp->landscape = orientation == FLPS_LANDSCAPE; /* always make the image fit on the page */ if ( ( rescale = auto_scale( pagew, pageh, w, h, sp->landscape ) ) && sp->auto_fit) { xscale *= rescale * 0.01; yscale *= rescale * 0.01; w *= rescale * 0.01; h *= rescale * 0.01; } /* update */ sp->final_xscale = xscale; sp->final_yscale = yscale; /* get the origin of the system. For BoundingBox only. Actual PS output computes these on the fly */ xo = hm + ( pagew - ( sp->landscape ? h : w ) ) * 0.5; yo = vm + ( pageh - ( sp->landscape ? w : h ) ) * 0.5; xo -= ( sp->landscape ? sp->miscb : sp->miscl ) * xscale * s2px; yo -= ( sp->landscape ? sp->miscl : sp->miscb ) * xscale * s2py; w += ( sp->miscr + sp->miscl ) * xscale * s2px; h += ( sp->misct + sp->miscb ) * yscale * s2py; /* write header */ flps_emit_header( file_tail( im->infile ), im->total_frames, xo - 1, yo - 1, xo + w + 1, yo + h + 1 ); /* Prolog. Basic defines. */ fputs( "/inch { 72 mul } def /D {def} def /BD {bind def} def\n", fp ); fputs( "% Beginning of modifiable parameters\n", fp ); fprintf( fp, "/pagew {%.2g inch} BD\t%% page width\n", sp->paper_w ); fprintf( fp, "/pageh {%.2g inch} BD \t%% page height\n", sp->paper_h ); fprintf( fp, "/lm {%.2g inch} BD \t%% Left margin\n", sp->hm ); fprintf( fp, "/bm {%.2g inch} BD \t%% Bottom margin\n", sp->vm ); fprintf( fp, "/xscale %g D /yscale %g D\t %% DPIScale %g SizeScale %g\n", s2px * xscale, s2py * yscale, (s2px + s2py) * 0.5, rescale * 0.01 ); fputs( "% End of modifiable parameters\n", fp ); fprintf( fp, "/pw { pagew lm 2 mul sub } BD \t%% writable width\n" ); fprintf( fp, "/ph { pageh bm 2 mul sub } BD \t%% writable height\n" ); /* instead of emitting numbers, the actual calculation is output so that * both scale and margin can be adjusted in PS */ flps_output( "/xo pw xscale div %d sub 2 div def\n", sp->landscape ? im->h : im->w ); flps_output( "/yo ph yscale div %d sub 2 div def\n", sp->landscape ? im->w : im->h ); PS_annotation_init( im ); flps_output( 0 ); fputs( "%%EndProlog\n", fp ); if ( sp->comment ) fprintf( sp->fp, "%%OverallStateSave{\n" ); PS_push( ); /* honor the margin request */ flps_output( "lm bm translate\n" ); } static const char *hexdigits = "0123456789abcdef"; #define OutPixel( c ) \ do { \ putc( hexdigits[ ( c ) >> 4 ], fp ); \ putc( hexdigits[ ( c ) & 15 ], fp ); \ } while ( 0 ) /*************************************** * pixel data only ***************************************/ static int PS_write_pixels( FL_IMAGE * im ) { FILE *fp = im->fpout; int ok = 1, j, k; im->total = im->h; im->completed = 0; if ( FL_IsRGB( im ) ) { unsigned char *pc, *ss; im->visual_cue( im, "Writing ColorPS" ); for ( j = 0, k = 1; ok && j < im->h; j++, im->completed++ ) { for ( pc = im->red[ j ], ss = pc + im->w; pc < ss; pc++, k++ ) { OutPixel( *pc ); if ( k % 37 == 0 ) putc( '\n', fp ); } for ( pc = im->green[ j ], ss = pc + im->w; pc < ss; pc++, k++ ) { OutPixel( *pc ); if ( k % 37 == 0 ) putc( '\n', fp ); } for ( pc = im->blue[ j ], ss = pc + im->w; pc < ss; pc++, k++ ) { OutPixel( *pc ); if ( k % 37 == 0 ) putc( '\n', fp ); } if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) { im->visual_cue( im, "Writing PS" ); ok = ! ferror( fp ); } } } else { unsigned short *pc, *ss; unsigned char g; im->visual_cue( im, "Writing GrayPS" ); for ( j = 0, k = 1; ok && j < im->h; j++, im->completed++ ) { for ( pc = im->gray[ j ], ss = pc + im->w; pc < ss; pc++, k++ ) { g = *pc & 0xff; OutPixel( g ); if ( k % 37 == 0 ) putc( '\n', fp ); } if ( ! ( im->completed & FLIMAGE_REPFREQ ) ) { im->visual_cue( im, "Writing PS" ); ok = ! ferror( fp ); } } } putc( '\n', fp ); return ok ? 1 : -1; } /*************************************** ***************************************/ static void make_raster_command( FL_IMAGE * im, char pscmd[ ] ) { int rgb = FL_IsRGB( im ); sprintf( pscmd, "StartRaster" ); if ( ! rgb ) { flps_output( "/graystring %d string def\n", im->w ); flps_output( "/%s\n", pscmd ); flps_output( " {%d %d %d [ %d 0 0 -%d 0 %d]\n", im->w, im->h, FL_PCBITS, im->w, im->h, im->h ); flps_output( " {currentfile graystring readhexstring pop}\n" ); flps_output( " imag`e\n} bind def\n" ); } else { flps_output( "/redstring %d string def\n", im->w ); flps_output( "/grnstring %d string def\n", im->w ); flps_output( "/blustring %d string def\n", im->w ); flps_output( "/%s\n", pscmd ); flps_output( " {%d %d %d [ %d 0 0 -%d 0 %d]\n", im->w, im->h, FL_PCBITS, im->w, im->h, im->h ); flps_output( " {currentfile redstring readhexstring pop}\n" ); flps_output( " {currentfile grnstring readhexstring pop}\n" ); flps_output( " {currentfile blustring readhexstring pop}\n" ); flps_output( " true 3 colorimage\n} bind def\n"); } } /*************************************** ***************************************/ static int PS_write_image( FL_IMAGE * sim ) { SPEC *sp = sim->extra_io_info; char pscmd[ 512 ]; FL_IMAGE *im = sim; int err, npage; if ( ! sp ) { sp = sim->extra_io_info = fl_calloc( 1, sizeof *sp ); memcpy( sp, flimage_ps_options( ), sizeof *sp ); } sp->fp = sim->fpout; flps_switch_flps( sp ); PS_write_header( sim ); fprintf( sp->fp, sp->comment ? " %%StartOfMultiImage {\n" : "" ); PS_push( ); for ( err = 0, npage = 1, im = sim; !err && im; im = im->next, npage++ ) { im->fpout = sim->fpout; flps_output( 0 ); fprintf( im->fpout, "%%%%Page: %d %d\n", npage, sim->total_frames ); /* the origin of the image (xo,yo) and annotation */ flps_output( "xscale yscale scale xo yo translate\n" ); if ( sp->landscape ) { flps_output( "%d %d translate\n", sim->h, 0 ); flps_output( " 90 rotate\n" ); } PS_start_image( im ); make_raster_command( im, pscmd ); flps_output( "%d %d scale %s\n", im->w, im->h, pscmd ); flps_output( 0 ); err = PS_write_pixels( im ) < 0; PS_end_image( im ); PS_annotation( im ); flps_output( "showpage\n" ); } if ( sp->comment ) fprintf (sp->fp, " %%EndOfMultiImage}\n" ); PS_pop( ); PS_trailer( sp ); fflush( sim->fpout ); flps_reset_cache( ); flps_restore_flps( ); fl_free( sim->extra_io_info ); sim->extra_io_info = 0; return err ? -1 : 1; } void flimage_enable_ps( void ) { flimage_add_format( "PostScript", "ps", "ps", FL_IMAGE_RGB | FL_IMAGE_GRAY, PS_identify, PS_description, PS_read_pixels, PS_write_image ); } /*************************************** * Marker output * M-moveto LT-lineto L ***************************************/ #define MBUFLEN 10 static void PS_annotation_init( FL_IMAGE * im ) { const char *mbuf[ MBUFLEN ]; int i, j, k, out; FLIMAGE_MARKER *m; if ( ! im->nmarkers && !im->ntext ) return; flps_output( "/M {moveto} BD /G {setgray} BD /RGB {setrgbcolor} BD\n" ); flps_output( "/LT {lineto} BD /L {M LT} BD /S {stroke} BD /F {fill} BD\n" ); flps_output( "/L {M LT} BD /S {stroke} BD /F {fill} BD\n" ); flps_output( "/LW {setlinewidth} BD /C {closepath} BD\n" ); memset( mbuf, 0, MBUFLEN ); if ( im->nmarkers ) { flps_output( "%%marker defs: t w h angle xo yo\n" ); flps_output( 0 ); flps_output( "/DTD {[5 4 1 4] 0 setdash} BD\n" ); /* dot-dash */ flps_output( "/DT {[1 3] 0 setdash} BD\n" ); /* dot */ flps_output( "/LD {[8 5] 0 setdash} BD\n" ); /* long dash */ flps_output( "/DS {[4 4] 0 setdash} BD\n" ); /* dash */ flps_output( "/SL {[] 0 setdash} BD\n" ); /* solid */ flps_output( "/NP {newpath} BD\n" ); /* solid */ flps_output( "/BM {gsave} D /EM {grestore} D\n" ); flps_output( "/MK {newpath translate rotate scale LW} BD\n" ); /* define primitives (-1 to +1) */ for ( k = 0, m = im->marker, i = 0; i < im->nmarkers; i++, m++ ) { for ( j = out = 0; ! out && j < MBUFLEN; j++ ) out = m->name == mbuf[ j ]; if ( ! out ) { mbuf[ k++ ] = m->name; flps_output( "/%s {%s %s} D\n", m->name, "MK", m->psdraw ); } } } if ( im->ntext ) { /* do we want to scale the font ? */ flps_output( "/point {xscale yscale add 2 div div} BD\n" ); flps_output( "/SetFont {findfont exch scalefont setfont} BD\n" ); flps_output( "/CP {currentpoint} BD /SW {stringwidth} BD\n" ); flps_output( "/Lshow {show} BD\n" ); flps_output( "/Cshow {dup SW pop -2 div 0 rmoveto show} BD\n" ); flps_output( "/Rshow {dup SW pop neg 0 rmoveto show} BD\n" ); } } /*************************************** ***************************************/ #if 0 static void switch_to_ISOLatin1( FILE * fp ) { /***** usage: newfontname oldfontname SwitchISO ******/ flps_output( 0 ); flps_output( "% Switch to ISOLatin1 to get special characters" ); flps_output( 0 ); flps_output( "/languagelevel where\n" ); flps_output( " {pop languagelevel} {1} ifelse\n" ); flps_output( " 2 lt {/BitEncoding /StandardEncoding load def}\n" ); flps_output( " {/BitEncoding /ISOLatin1Encoding load def}\n" ); flps_output( " ifelse\n" ); flps_output( "/SwitchToISO {\n" ); flps_output( " findfont dup length\n dict begin {1 index /FID ne {def} " "{pop pop} ifelse} forall\n" ); flps_output( " /Encoding BitEncoding def " ); flps_output( " currentdict end\n definefont pop\n} bind def\n" ); } #endif /*************************************** ***************************************/ static void PS_annotation( FL_IMAGE * im ) { FLIMAGE_MARKER *m = im->marker; FLIMAGE_TEXT *t = im->text; int r, g, b, i, thickness; SPEC *sp = im->extra_io_info; for ( i = 0; i < im->nmarkers; i++, m++ ) { thickness = m->thickness + (m->thickness == 0); FL_UNPACK( m->color, r, g, b ); flps_rgbcolor( r, g, b ); flps_linestyle( m->style ); flps_output( "BM %.3g %g %g %g %d %d %s", 2.0 * thickness / ( m->w + m->h ), 0.5 * m->w, 0.5 * m->h, m->angle * 0.1, m->x, im->h - m->y, m->name ); flps_output( " %c EM\n", "SF"[ m->fill ] ); } /* we make use of the ps_text.c */ sp->isRGBColor = 1; for ( i = 0; i < im->ntext; i++, t++ ) { sp->rotation = t->angle; flps_draw_text( t->align, t->x - 1, im->h - t->y - 1, 2, 2, t->color, t->style, t->size, t->str ); } sp->rotation = 0; sp->isRGBColor = 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/demos/0000755000175000017500000000000011377311601013335 5ustar jensjensxforms-1.0.93sp1/demos/crab_tran.xpm0000644000175000017500000000376511171560225016031 0ustar jensjens/* XPM */ static char * crab[] = { /* crab pixmap * width height ncolors chars_per_pixel */ "28 28 6 2 ", ". c None m white s None ", "x c orange m black s s_orange ", "* c #ff72c2 m black s s_#ff72c2 ", "+ c red m white s s_SteelBlue ", "G c black m black s s_black ", "a c LightGrey m white s s_LightGrey ", /* pixels */ ". . . . . . * * * * . . . . . . . . . * * * * . . . . . ", ". . . . + * x x * . . . . . . . . . . + * x x * . . . . ", ". . . + * x x * . . . . . . . . . . . . + * x x * . . . ", ". . + * x * . . . * . . . . . . . . . * . . + * x * . . ", ". . + * x * . . + * . . . . . . . . + * . . + * x * . . ", ". . + * x * . + * * . . . . . . . . + * * . + * x * . . ", ". . + * x * + * * . . . . . . . . . . + * * + * x * . . ", ". . + * x * * * . . . . . . . . . . . . + * * x x * . . ", ". . . + * x * . . + * . . . . . . + * . . + * x * . . . ", ". . . + * x . . + * . + * * . * * . + * . . + x * . . . ", ". . . . + x . . + * . + * * . * * . + * . . + x . . . . ", ". . . . + x . . . + * + * * * * * + * . . . + x . . . . ", ". . . . + * x . . + * * * * * * * * * . . + x * . . . . ", ". . . . . + * x * * * * x x x x x * * * * x * . . . . . ", ". . . . + + + * * x x x x x x x x x x x x * . . . . . . ", ". . + + * x x x x x x x x x x x x x x x x x x * x . . . ", ". + * x x a + * * x x x x x x x x x x x * * a G * x * . ", "+ * x . . . + * * x x x x x x x x x x x * * G . . . x * ", ". . . . . . + * * x x x x x x x x x x x * * . . . . . . ", ". . . . . + * * x x x x x x x x x x x x x * * . . . . . ", ". . . + * x x x * x x x x x x x x x x x * x x x * . . . ", ". . + * x a a + * * x x x x x x x x x * * a a a x * . . ", ". + * x G G G + * * x x x x x x x x x * * a G G G x * . ", ". + * G . . . + * x * x x x x x x x * x * a G . . . * . ", ". . . . . . + * x a * * * x x x * * * a x * G . . . . . ", ". . . . . + * x a G a a * * * * * a a G a x * G . . . . ", ". . . . . + x a G . G G a a a a a G G . G G x a G . . . ", ". . . . . + x a G . . . G G G G G . . . . . x a G . . . " } ; xforms-1.0.93sp1/demos/buttonall.c0000644000175000017500000000511011203636407015504 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * All button classes * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd/buttons_gui.h" /* from fd/ directory */ #include /* callbacks for form buttform */ /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void bw_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int bws[ ] = { -4, -3, -2, -1, 1, 2, 3, 4 }; int n = fl_get_choice( ob ) - 1; FD_buttform *fdui = ob->form->fdui; fl_freeze_form( ob->form ); fl_set_object_bw( fdui->backface, bws[ n ] ); fl_set_object_bw( fdui->objsgroup, bws[ n ] ); fl_set_object_bw( fdui->done, bws[ n ] ); /* redrawing the backface wipes out the done button. Redraw it*/ fl_redraw_object( fdui->done ); fl_unfreeze_form( ob->form ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_buttform *fd_buttform; fl_initialize( &argc, argv, 0, 0, 0 ); fd_buttform = create_form_buttform( ); /* fill-in form initialization code */ fl_set_pixmapbutton_file( fd_buttform->pbutt,"crab45.xpm" ); fl_set_bitmapbutton_file( fd_buttform->bbutt,"bm1.xbm" ); fl_addto_choice( fd_buttform->bw_obj, " -4 | -3 | -2 | -1 | 1| 2| 3| 4" ); fl_set_choice( fd_buttform->bw_obj, 5 ); /* show the first form */ fl_show_form( fd_buttform->buttform, FL_PLACE_CENTER, FL_FULLBORDER, "buttform" ); while ( fl_do_forms( ) ) /* empty */ ; return 0; } xforms-1.0.93sp1/demos/sliderall.c0000644000175000017500000001015511203636407015460 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the different types of sliders */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" FL_FORM *form; FL_OBJECT *exitobj; /*************************************** ***************************************/ void create_form_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 780, 320 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 780, 320, "" ); fl_set_object_color( obj, FL_PALEGREEN, FL_COL1 ); obj = fl_add_box( FL_SHADOW_BOX, 20, 30, 360, 270, "SLIDER" ); fl_set_object_color( obj, FL_SLATEBLUE, 47 ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_box( FL_SHADOW_BOX, 390, 30, 370, 270, "VALSLIDER" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_slider( FL_VERT_SLIDER, 30, 50, 40, 220, "vert" ); fl_set_object_color( obj, FL_INDIANRED, FL_PALEGREEN ); obj = fl_add_slider( FL_VERT_FILL_SLIDER, 80, 50, 40, 220, "vert_fill" ); fl_set_object_color( obj, FL_INDIANRED, FL_PALEGREEN ); obj = fl_add_slider( FL_HOR_SLIDER, 180, 50, 195, 40, "hor" ); fl_set_object_color( obj, FL_INDIANRED, FL_PALEGREEN ); obj = fl_add_slider( FL_HOR_FILL_SLIDER, 180, 110, 190, 40, "hor_fill" ); fl_set_object_color( obj, FL_INDIANRED, FL_PALEGREEN ); obj = fl_add_valslider( FL_VERT_NICE_SLIDER, 610, 50, 30, 220, "vert_nice" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_color( obj, FL_SLATEBLUE, FL_INDIANRED ); obj = fl_add_valslider( FL_VERT_FILL_SLIDER, 660, 50, 40, 220, "vert_fill" ); fl_set_object_color( obj, FL_INDIANRED, FL_PALEGREEN ); obj = fl_add_valslider( FL_HOR_SLIDER, 400, 50, 190, 40, "hor" ); fl_set_object_color( obj, FL_INDIANRED, FL_PALEGREEN ); obj = fl_add_valslider( FL_HOR_FILL_SLIDER, 400, 110, 190, 40, "hor_fill" ); fl_set_object_color( obj, FL_INDIANRED, FL_PALEGREEN ); fl_add_valslider( FL_HOR_BROWSER_SLIDER, 400, 220, 190, 25, "hor_browser" ); exitobj = obj = fl_add_button( FL_NORMAL_BUTTON, 450, 260, 100, 30, "Exit" ); fl_set_object_color( obj, FL_INDIANRED, FL_RED ); obj = fl_add_slider( FL_VERT_NICE_SLIDER, 130, 50, 30, 220, "vert_nice" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_color( obj, FL_SLATEBLUE, FL_INDIANRED ); obj = fl_add_slider( FL_HOR_NICE_SLIDER, 180, 170, 190, 30, "hor_nice" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_color( obj, FL_SLATEBLUE, FL_INDIANRED ); fl_add_slider( FL_HOR_BROWSER_SLIDER, 180, 220, 190, 25, "hor_browser" ); obj = fl_add_valslider( FL_HOR_NICE_SLIDER, 400, 170, 190, 30, "hor_nice" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_color( obj, FL_SLATEBLUE, FL_INDIANRED ); obj = fl_add_valslider( FL_VERT_SLIDER, 710, 50, 40, 220, "vert" ); fl_set_object_color( obj, FL_INDIANRED, FL_PALEGREEN ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_form( ); fl_show_form( form, FL_PLACE_CENTER | FL_FREE_SIZE, FL_FULLBORDER, "All Sliders" ); do obj = fl_do_forms( ); while ( obj != exitobj ); fl_hide_form( form ); return 0; } xforms-1.0.93sp1/demos/ldial.c0000644000175000017500000000565311253656005014602 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This is an example of the use of dials. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_FORM *form; FL_OBJECT *dial[ 3 ], *text[ 3 ], *result; enum { RED, GREEN, BLUE }; /*************************************** ***************************************/ static void dial_callback( FL_OBJECT * obj FL_UNUSED_ARG, long arg ) { int clr[ 3 ]; size_t i; char str[ 60 ]; for ( i = RED; i <= BLUE; i++ ) clr[ i ] = fl_get_dial_value( dial[ i ] ); sprintf( str, "%d", clr[ arg ] ); fl_set_object_label( text[ arg ], str ); fl_mapcolor( FL_FREE_COL1, clr[ 0 ], clr[ 1 ], clr[ 2 ] ); fl_redraw_object( result ); } /*************************************** ***************************************/ static void makeform( void ) { FL_OBJECT *quit; size_t i; const char *txt[ ] = { "Red", "Green", "Blue" }; FL_COLOR clr[ ] = { FL_RED, FL_GREEN, FL_BLUE }; form = fl_bgn_form( FL_UP_BOX, 300, 330 ); quit = fl_add_button( FL_NORMAL_BUTTON, 45, 15, 210, 45, "A Color Editor" ); fl_set_object_lsize( quit, FL_LARGE_SIZE ); for ( i = RED; i <= BLUE; i++ ) { dial[ i ] = fl_add_dial( FL_LINE_DIAL, 30, 240 - i * 85, 60, 60, txt[ i ] ); fl_set_dial_bounds( dial[ i ], 0.0, 255.0 ); fl_set_dial_angles( dial[ i ], 15.0, 345.0 ); fl_set_dial_value( dial[ i ], 128.0 ); fl_set_object_color( dial[ i ], clr[ i ], FL_DIAL_COL2 ); fl_set_object_return( dial[ i ], FL_RETURN_CHANGED ); fl_set_object_callback( dial[ i ], dial_callback, i ); text[ i ] = fl_add_box( FL_DOWN_BOX, 105, 255 - i * 85, 50, 25, "128" ); } result = fl_add_box( FL_DOWN_BOX, 180, 70, 90, 245, "" ); fl_mapcolor( FL_FREE_COL1, 128, 128, 128 ); fl_set_object_color( result, FL_FREE_COL1, FL_FREE_COL1 ); fl_set_object_dblbuffer( result, 1 ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "ColorEditor", 0, 0 ); makeform( ); fl_show_form( form, FL_PLACE_MOUSE, FL_TRANSIENT, "Color Editor" ); fl_do_forms( ); fl_finish(); return 0; } xforms-1.0.93sp1/demos/wwwl.c0000644000175000017500000002374211315744733014521 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* Demo showing object gravity, form minsize etc. (also double click). * * With some more work, this could be made into a useful program ... * */ #ifndef __VMS # define WWW_BROWSER "netscape" #else # define WWW_BROWSER "netscape_dir:netscape" #endif #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "private/flsnprintf.h" #include /* Header file generated with fdesign. */ typedef struct { FL_FORM * www; void * vdata; long ldata; FL_OBJECT * listbr; FL_OBJECT * cat; FL_OBJECT * file; FL_OBJECT * shown; } FD_www; extern FD_www *create_form_www( void ); /* Application program begins */ #define MAX_SITES 30 typedef struct { char *cat; char *sites[ MAX_SITES ][ 2 ]; } WWW; /* real program should have these on disks */ static WWW www_sites[ ] = { { "XForms App.", { { "@b@C4XForms Home Page", "http://world.std.com/~xforms" }, { "UnixCockpit - File Manager", "ftp://ftp.uni-wuppertal.de/pub/unix/cockpit" }, { "xfmail - mailer ", "http://Burka.NetVision.net.il/xfmail/xfmail.html" }, { "XRPlay - RPlay audio", "ftp://ftp.sdsu.edu/pub/rplay" }, { "Lyx - LaTeX Frontend", "http://www.lehigh.edu/~dlj0/LyriX.html" }, { "XWatch - Sys Monitor", "http://www.icce.rug.nl/docs/programs/xwatch/xwatch.html" }, { "xamixer - Sound mixer", "ftp://sunsite.unc.edu/pub/Linux/apps/sound/mixers" }, { "pyxforms - A Python binding to xforms", "ftp://ultra7.unl.edu.ar/pub/pyxforms" }, { "xirc - An IRC client with GUI", "http://www.bitgate.com/xirc" }, { "xdata - An appointment manager", "ftp://jurassic.upr.clu.edu/pub/xforms" }, { "xfmixer - Audio mixer", "http://linux.ms.mff.cuni.cz/~rdou3187/xfmix/xfmix.html" }, { "CaXmix - Audio mixer", "http://synergy.caltech.edu/~john/programs.html" }, { NULL, NULL, } } }, { "X related", { { "@b@C4XForms Home Page", "http://bragg.phys.uwm.edu/xforms" }, { "X Journal", "http://landru.unx.com/SIGS/TXJ/docs/txjhome.html" }, { "X Archive Site", "ftp://ftp.x.org" }, { "OpenGL and X", "http://www.sgi.com/Technology/openGL/opengl.html", }, { NULL, NULL } } }, /* useful FAQS */ { "All FAQs", { { "Usenet FAQs", "http://www.cis.ohio-state.edu/hypertext/faq/usenet" }, { NULL, NULL } } }, /* Sports related www sites */ { "Sports", { { "SatchelSports", "http://www.starwave.com/SatchelSports.html" }, { "Game Recap", "http://www.starwave.com/SatchelSports.html" }, { "Patricia's NBA Daily News", "http://www.primenet.com/~terra/news.html" }, { "Houston Rockets", "http://hyrax.med.uth.tmc.edu/misc/rockets.html" }, { NULL, NULL } } }, /* money */ { "Financial", { { "@f Holt Report", "ftp://ftp.netcom.com/pub/ge/geoholt/holt_rpt.htm" }, { NULL, NULL, } } }, { "Travel", { { "New York", "http://www.panix.com/clay/nyc.html" }, { NULL, NULL } } }, /* things that do not belong to any of the above */ { "Misc", { { "Star Trek: Voyager", "http://voyager.paramount.com" }, { "Linux Journal", "http://www.ssc.com/lj/mags.html" }, { NULL, NULL } } }, /* sentinel */ { NULL, { { NULL, NULL } } } }; FD_www *ui; static int show_sites; /*************************************** * initialize and show how many categories we have got ***************************************/ void init_cat( void ) { WWW *www = www_sites; for ( ; www->cat; www++ ) fl_addto_choice( ui->cat, www->cat ); } /*************************************** * initialize file menu ***************************************/ void init_file_menu( void ) { fl_fit_object_label( ui->file, 1, 0 ); fl_addto_menu( ui->file, "Save|Load|Quit" ); } /*************************************** * initialize sites given category cat ***************************************/ void init_sites( int cat ) { WWW *www = www_sites + cat - 1; int i; if ( cat <= 0 ) return; /* cat changed. Update sites */ fl_freeze_form( ui->www ); fl_clear_browser( ui->listbr ); for ( i = 0; www->sites[ i ][ 0 ]; i++ ) fl_addto_browser( ui->listbr, www->sites[ i ][ show_sites ] ); fl_unfreeze_form( ui->www ); } /*************************************** * new categorey is selected ***************************************/ void change_cat( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { init_sites( fl_get_choice( ob ) ); } /*************************************** * we can show either the subject a site carries or the site name ***************************************/ void init_shown( void ) { fl_addto_choice( ui->shown, "Subject|Sites" ); } /*************************************** * request a change of what is shown, site name or subject ***************************************/ void change_shown( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int oldshow = show_sites; if ( ( show_sites = fl_get_choice( ob ) == 2 ) != oldshow ) init_sites(fl_get_choice( ui->cat ) ); } /*************************************** * file menu is selected. Currently we do nothing except exit ***************************************/ void do_file_menu( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( fl_get_menu( ob )== 3 ) { fl_end_all_command( ); exit( 1 ); } else fl_show_alert( "Sorry","Not implemented yet","", 0 ); } /*************************************** * give category, cat, and the line no. within the browser, get sitename ***************************************/ char * get_site( int cat, int thesite ) { return www_sites[ cat - 1 ].sites[ thesite - 1 ][ 1 ]; } /*************************************** * either double-clicked or connect button is pressed ***************************************/ void connect_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { char cmdbuf[ 1024 ]; int i; if ( ( i = fl_get_browser( ui->listbr ) ) > 0 ) { fl_set_cursor( ui->www->window, XC_watch ); fl_XFlush( ); fl_snprintf( cmdbuf, sizeof cmdbuf, "%s %s", WWW_BROWSER, get_site( fl_get_choice( ui->cat ), i ) ); if( fl_exe_command( cmdbuf, 0 ) < 0 ) fprintf( stderr,"Error running %s\n", cmdbuf ); fl_reset_cursor( ui->www->window ); } } /*************************************** ***************************************/ void change_sites( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { /* no-op */ } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); ui = create_form_www( ); /* some basic resizing policy */ fl_set_form_minsize( ui->www, 320, 330 ); init_file_menu( ); init_cat( ); init_sites( 1 ); init_shown( ); ui->listbr->u_vdata = ( void * ) 100; fl_set_browser_dblclick_callback( ui->listbr, connect_cb, 0 ); fl_show_form( ui->www, FL_PLACE_CENTER | FL_FREE_SIZE, FL_FULLBORDER, "www launcher" ); fl_do_forms( ); fl_end_all_command( ); fl_finish( ); return 0; } /*************************************** ***************************************/ FD_www *create_form_www( void ) { FL_OBJECT *obj; FD_www *fdui = fl_calloc( 1, sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -3 ); fdui->www = fl_bgn_form( FL_NO_BOX, 371, 331 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 371, 331, "" ); obj = fl_add_frame( FL_UP_FRAME, 3, 2, 365, 25, "" ); fl_set_object_gravity( obj, FL_North, FL_North ); fdui->listbr = obj = fl_add_browser( FL_HOLD_BROWSER, 20, 90, 250, 220, "" ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); fl_set_object_callback( obj, change_sites, 0 ); fdui->cat = obj = fl_add_choice( FL_NORMAL_CHOICE, 20, 50, 112, 25, "" ); fl_set_object_gravity( obj, FL_North, FL_North ); fl_set_object_callback( obj, change_cat, 0 ); fdui->file = obj = fl_add_menu( FL_PULLDOWN_MENU, 15, 5, 42, 20, "File" ); fl_set_object_shortcut( obj, "Ff#f",1 ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthWest ); fl_set_object_callback( obj, do_file_menu, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 280, 280, 75, 30, "Done" ); fl_set_button_shortcut( obj, "#Dd]", 1 ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); obj = fl_add_button( FL_NORMAL_BUTTON, 280, 90, 75, 30, "Connect" ); fl_set_button_shortcut( obj, "C#cc", 1 ); fl_set_object_gravity( obj, FL_NorthEast, FL_NorthEast ); fl_set_object_callback( obj, connect_cb, 0 ); fdui->shown = obj = fl_add_choice( FL_NORMAL_CHOICE, 156, 50, 112, 25, "" ); fl_set_object_gravity( obj, FL_North, FL_North ); fl_set_object_callback( obj,change_shown, 0 ); fl_end_form( ); fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/demos/goodies.c0000644000175000017500000000513611203636407015141 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo program uses the routines in the goodies section, that help you create easy forms in an even easier way. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" /*************************************** ***************************************/ void timeout_remove_alert( int id FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { fl_hide_alert( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { int choice; char str1[ 100 ], str2[ 100 ]; const char *s; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); #if 0 fl_set_resource( FLOKLabel, "Go" ); #endif if( fl_show_question( "Do you want bold font ?",1 ) ) fl_set_goodies_font( FL_BOLD_STYLE, FL_NORMAL_SIZE ); fl_show_messages( "This is a test program for the goodies of the " "forms library" ); fl_add_timeout( 5000, timeout_remove_alert, 0 ); fl_show_alert( "Alert", "Alert form can be used to inform", "about recoverable errors", 0 ); if ( fl_show_question( "Do you want to quit?", 0 ) ) exit( 0 ); strcpy( str1, ( s = fl_show_input( "Give a string:","" ) ) ? s : "" ); fl_show_message( "You typed:", "", str1 ); choice = fl_show_choices( "Pick a choice", 3, "One", "Two", "Three", 2 ); switch ( choice ) { case 1: fl_show_message( "You typed: One", "", "" ); break; case 2: fl_show_message( "You typed: Two", "", "" ); break; case 3: fl_show_message( "You typed: Three", "", "" ); break; default: fl_show_message( "An error occured!", "", "" ); break; } strcpy( str2, ( s = fl_show_input( "Give another string:", str1 ) ) ? s : "" ); fl_show_message( "You typed:", "", str2 ); fl_show_messages( "Good Bye" ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/inputall.c0000644000175000017500000000476611316160253015344 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Show all the input field types * * This file is part of xforms package. * T.C. Zhao and M. Overmars, 1997 */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd/inputall_gui.h" #include /* callbacks for form input */ /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void input_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int cx, cy; char buf[ 128 ]; fl_get_input_cursorpos( ob, &cx, &cy ); sprintf( buf,"x=%d y=%d",cx, cy ); fl_set_object_label( ( ( FD_input * ) ob->form->fdui )->report, buf ); } /*************************************** ***************************************/ void hide_show_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_input *fd = ob->form->fdui; if ( fl_object_is_visible( fd->multiinput ) ) fl_hide_object( fd->multiinput ); else fl_show_object( fd->multiinput ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_input *fd_input; fl_initialize( &argc, argv, 0, 0, 0 ); fd_input = create_form_input( ); /* fill-in form initialization code */ fl_set_object_dblbuffer( fd_input->report, 1 ); fl_set_object_return( fd_input->multiinput, FL_RETURN_ALWAYS ); fl_set_object_return( fd_input->norminput, FL_RETURN_ALWAYS ); /* show the first form */ fl_show_form( fd_input->input, FL_PLACE_CENTERFREE, FL_FULLBORDER, "input" ); while ( fl_do_forms( ) ) /* empty */ ; return 0; } xforms-1.0.93sp1/demos/crab.xpm0000644000175000017500000000400011171560225014764 0ustar jensjens/* XPM */ static char * crab[] = { /* crab pixmap * width height ncolors chars_per_pixel */ "28 28 6 2 ", ". c None m white s s_SkyBlue ", "x c orange m black s s_orange ", "* c #ff72c2 m black s s_#ff72c2 ", "+ c SteelBlue m white s s_SteelBlue ", "G c black m black s s_black ", "a c LightGrey m white s s_LightGrey ", /* pixels */ ". . . . . . * * * * . . . . . . . . . * * * * . . . . . ", ". . . . + * x x * . . . . . . . . . . + * x x * . . . . ", ". . . + * x x * . . . . . . . . . . . . + * x x * . . . ", ". . + * x * . . . * . . . . . . . . . * . . + * x * . . ", ". . + * x * . . + * . . . . . . . . + * . . + * x * . . ", ". . + * x * . + * * . . . . . . . . + * * . + * x * . . ", ". . + * x * + * * . . . . . . . . . . + * * + * x * . . ", ". . + * x * * * . . . . . . . . . . . . + * * x x * . . ", ". . . + * x * . . + * . . . . . . + * . . + * x * . . . ", ". . . + * x . . + * . + * * . * * . + * . . + x * . . . ", ". . . . + x . . + * . + * * . * * . + * . . + x . . . . ", ". . . . + x . . . + * + * * * * * + * . . . + x . . . . ", ". . . . + * x . . + * * * * * * * * * . . + x * . . . . ", ". . . . . + * x * * * * x x x x x * * * * x * . . . . . ", ". . . . + + + * * x x x x x x x x x x x x * . . . . . . ", ". . + + * x x x x x x x x x x x x x x x x x x * x . . . ", ". + * x x a + * * x x x x x x x x x x x * * a G * x * . ", "+ * x . . . + * * x x x x x x x x x x x * * G . . . x * ", ". . . . . . + * * x x x x x x x x x x x * * . . . . . . ", ". . . . . + * * x x x x x x x x x x x x x * * . . . . . ", ". . . + * x x x * x x x x x x x x x x x * x x x * . . . ", ". . + * x a a + * * x x x x x x x x x * * a a a x * . . ", ". + * x G G G + * * x x x x x x x x x * * a G G G x * . ", ". + * G . . . + * x * x x x x x x x * x * a G . . . * . ", ". . . . . . + * x a * * * x x x * * * a x * G . . . . . ", ". . . . . + * x a G a a * * * * * a a G a x * G . . . . ", ". . . . . + x a G . G G a a a a a G G . G G x a G . . . ", ". . . . . + x a G . . . G G G G G . . . . . x a G . . . " } ; xforms-1.0.93sp1/demos/multilabel.c0000644000175000017500000000537711203636407015651 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* Multiline labels. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" FL_FORM *form; FL_OBJECT *readyobj; /*************************************** ***************************************/ void create_form_0( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 400, 470 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 400, 470, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); obj = fl_add_text( FL_NORMAL_TEXT, 140, 40, 120, 120, "This is\na multi-line\nlabelT" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); obj = fl_add_text( FL_NORMAL_TEXT, 140, 160, 120, 120, "This is\na multi-line\nlabelC" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_color( obj, FL_PALEGREEN, FL_COL1 ); fl_set_object_lsize( obj, FL_LARGE_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); readyobj = obj = fl_add_button( FL_NORMAL_BUTTON, 280, 400, 100, 50, "I am sure\nthat I am\nReady" ); fl_set_object_lsize( obj, FL_SMALL_SIZE ); obj = fl_add_text( FL_NORMAL_TEXT, 260, 160, 120, 120, "This is\na multi-line\nlabelR" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_lalign( obj, FL_ALIGN_RIGHT ); obj = fl_add_text( FL_NORMAL_TEXT, 140, 280, 120, 120, "This is\na multi-line\nlabelB" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM ); obj = fl_add_text( FL_NORMAL_TEXT, 20, 160, 120, 120, "This is\na multi-line\nlabelL" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_0( ); fl_show_form( form,FL_PLACE_CENTER, FL_NOBORDER, "Labels" ); do obj = fl_do_forms( ); while ( obj != readyobj ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/freedraw_leak.c0000644000175000017500000002060511203636407016301 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the use of FREE Object with color leakage * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include /* Header file generated with fdesign. */ typedef struct { FL_FORM * drawfree; void * vdata; char * cdata; long ldata; FL_OBJECT * freeobj; FL_OBJECT * colorobj; FL_OBJECT * hsli; FL_OBJECT * wsli; FL_OBJECT * rsli; FL_OBJECT * gsli; FL_OBJECT * bsli; FL_OBJECT * drobj[ 3 ]; } FD_drawfree; extern FD_drawfree *create_form_drawfree( void ); static FD_drawfree *drawui; extern void draw_initialize( FD_drawfree * ); static int max_w = 150, max_h = 150; static Display *dpy; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { dpy = fl_initialize( &argc, argv, "FormDemo", 0, 0 ); drawui = create_form_drawfree( ); fl_set_color_leak( 1 ); draw_initialize( drawui ); fl_show_form( drawui->drawfree, FL_PLACE_CENTER, FL_TRANSIENT, "FreeObject"); fl_do_forms( ); return 0; } /* Structure mantainace */ typedef void (*DrawFunc) (int, int, int, int, int, unsigned long); void draw_triangle(int fill, int x, int y, int w, int h, unsigned long col) { XPoint xpoint[5]; GC gc = fl_state[fl_vmode].gc[0]; Window win = fl_winget(); xpoint[0].x = x; xpoint[0].y = y + h - 1; xpoint[1].x = x + w/2; xpoint[1].y = y; xpoint[2].x = x + w - 1; xpoint[2].y = y + h - 1; XSetForeground(dpy, gc, fl_get_flcolor(col)); if(fill) XFillPolygon (dpy, win, gc, xpoint, 3, Nonconvex, Unsorted); else { xpoint[3].x = xpoint[0].x; xpoint[3].y = xpoint[0].y; XDrawLines(dpy, win, gc, xpoint, 4, CoordModeOrigin); } } static DrawFunc drawfunc[] = { fl_oval, fl_rectangle, draw_triangle }; typedef struct { DrawFunc drawit; int x, y, w, h, fill, c[3]; int newfig; } DrawFigure; static DrawFigure saved_figure[800], *cur_fig; void draw_initialize(FD_drawfree *ui) { cur_fig = saved_figure; cur_fig->c[0] = cur_fig->c[1] = cur_fig->c[2] = 127, cur_fig->w = cur_fig->h = 30; cur_fig->drawit = fl_oval; cur_fig->fill = 1; fl_mapcolor(FL_FREE_COL1, cur_fig->c[0], cur_fig->c[1], cur_fig->c[2]); fl_set_slider_bounds(ui->wsli, 1, max_w); fl_set_slider_bounds(ui->hsli, 1, max_h); fl_set_slider_precision(ui->wsli, 0); fl_set_slider_precision(ui->hsli, 0); fl_set_slider_value(ui->wsli, cur_fig->w); fl_set_slider_value(ui->hsli, cur_fig->h); /* intial drawing function */ fl_set_button(ui->drobj[0], 1); /* setup the color slider so we can find out colorobject from the callback funtions. This is not necessary as drawui is static, this is done to show how to access other objects from an object callback function */ ui->rsli->u_vdata = ui; ui->gsli->u_vdata = ui; ui->bsli->u_vdata = ui; } void switch_object( FL_OBJECT * ob FL_UNUSED_ARG, long which) { cur_fig->drawit = drawfunc[which]; } void change_color(FL_OBJECT * ob, long which) { cur_fig->c[which] = (int)(fl_get_slider_value(ob) * 255); fl_mapcolor(FL_FREE_COL1, cur_fig->c[0], cur_fig->c[1], cur_fig->c[2]); fl_redraw_object(((FD_drawfree *)ob->u_vdata)->colorobj); } void fill_cb( FL_OBJECT * ob, long notused FL_UNUSED_ARG ) { cur_fig->fill = !fl_get_button(ob); } void change_size(FL_OBJECT * ob, long which) { if (which == 0) cur_fig->w = (int)fl_get_slider_value(ob); else cur_fig->h = (int)fl_get_slider_value(ob); } void refresh_cb( FL_OBJECT * ob FL_UNUSED_ARG, long which FL_UNUSED_ARG ) { fl_redraw_object(drawui->freeobj); } void clear_cb( FL_OBJECT * ob FL_UNUSED_ARG, long notused FL_UNUSED_ARG ) { saved_figure[0] = *cur_fig; cur_fig = saved_figure; fl_redraw_object(drawui->freeobj); } /* The routine that does drawing */ int freeobject_handler( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key, void * xev FL_UNUSED_ARG ) { DrawFigure *dr; switch (event) { case FL_DRAW: if (cur_fig->newfig == 1) cur_fig->drawit(cur_fig->fill, cur_fig->x + ob->x, cur_fig->y + ob->y, cur_fig->w, cur_fig->h, FL_FREE_COL1); else { fl_drw_box(ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, FL_BOUND_WIDTH); for (dr = saved_figure; dr < cur_fig; dr++) { fl_mapcolor(FL_FREE_COL1, dr->c[0], dr->c[1], dr->c[2]); dr->drawit(dr->fill, dr->x + ob->x, dr->y + ob->y, dr->w, dr->h, FL_FREE_COL1); } } cur_fig->newfig = 0; break; case FL_PUSH: if (key != 2) { cur_fig->x = mx - cur_fig->w/2; cur_fig->y = my - cur_fig->h/2; /* convert position to relative to the free object */ cur_fig->x -= ob->x; cur_fig->y -= ob->y; cur_fig->newfig = 1; fl_redraw_object(ob); *(cur_fig+1) = *cur_fig; cur_fig++; cur_fig->newfig = 0; } break; } return 0; } FD_drawfree *create_form_drawfree(void) { FL_OBJECT *obj; FD_drawfree *fdui = (FD_drawfree *) fl_calloc(1, sizeof(FD_drawfree)); fdui->drawfree = fl_bgn_form(FL_NO_BOX, 530, 490); obj = fl_add_box(FL_UP_BOX,0,0,530,490,""); obj = fl_add_frame(FL_DOWN_FRAME,145,55,370,405,""); fdui->freeobj = obj = fl_add_free(FL_NORMAL_FREE, 145, 55, 370, 405, "", freeobject_handler); /* fl_set_object_dblbuffer(obj, 1); */ fl_set_object_boxtype(obj, FL_FLAT_BOX); fdui->colorobj = obj = fl_add_box(FL_BORDER_BOX,25,325,90,25,""); fl_set_object_color(obj, FL_FREE_COL1, FL_COL1), fdui->hsli = obj = fl_add_valslider(FL_HOR_SLIDER,15,55,120,25,"Height"); fl_set_object_lalign(obj,FL_ALIGN_TOP); fl_set_object_callback(obj,change_size,1); obj = fl_add_button(FL_NORMAL_BUTTON,395,15,105,30,"Quit"); fl_set_object_shortcut(obj,"Qq#q",1); obj = fl_add_checkbutton(FL_PUSH_BUTTON,15,430,100,35,"Outline"); fl_set_object_color(obj,FL_MCOL,FL_BLUE); fl_set_object_callback(obj,fill_cb,0); fdui->wsli = obj = fl_add_valslider(FL_HOR_SLIDER,15,95,120,25,"Width"); fl_set_object_lalign(obj,FL_ALIGN_TOP); fl_set_object_callback(obj,change_size,0); obj = fl_add_button(FL_NORMAL_BUTTON,280,15,105,30,"Refresh"); fl_set_object_callback(obj,refresh_cb,0); obj = fl_add_button(FL_NORMAL_BUTTON,165,15,105,30,"Clear"); fl_set_object_callback(obj,clear_cb,0); fl_bgn_group(); fdui->drobj[0] = obj = fl_add_button(FL_RADIO_BUTTON,10,390,40,40,"@#circle"); fl_set_object_lcol(obj,FL_YELLOW); fl_set_object_callback(obj,switch_object,0); fdui->drobj[1] = obj = fl_add_button(FL_RADIO_BUTTON,50,390,40,40,"@#square"); fl_set_object_lcol(obj,FL_YELLOW); fl_set_object_callback(obj,switch_object,1); fdui->drobj[2] = obj = fl_add_button(FL_RADIO_BUTTON,90,390,40,40,"@#8>"); fl_set_object_lcol(obj,FL_YELLOW); fl_set_object_callback(obj,switch_object,2); fl_end_group(); fdui->rsli = obj = fl_add_slider(FL_VERT_FILL_SLIDER,25,195,30,125,""); fl_set_object_color(obj,FL_COL1,FL_RED); fl_set_object_callback(obj,change_color,0); fdui->gsli = obj = fl_add_slider(FL_VERT_FILL_SLIDER,55,195,30,125,""); fl_set_object_color(obj,FL_COL1,FL_GREEN); fl_set_object_callback(obj,change_color,1); fdui->bsli = obj = fl_add_slider(FL_VERT_FILL_SLIDER,85,195,30,125,""); fl_set_object_color(obj,FL_COL1,FL_BLUE); fl_set_object_callback(obj,change_color,2); fl_end_form(); return fdui; } xforms-1.0.93sp1/demos/pushbutton.c0000644000175000017500000000425211203636407015721 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* A demo that shows the use of push buttons. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" FL_FORM *form; FL_OBJECT *abox[ 8 ]; /*************************************** ***************************************/ static void push_cb( FL_OBJECT * ob, long n ) { if ( fl_get_button( ob ) ) fl_show_object( abox[ n ] ); else fl_hide_object( abox[ n ] ); } /*************************************** ***************************************/ static void makeform( void ) { int i; FL_OBJECT *obj; form = fl_bgn_form( FL_UP_BOX, 400, 400 ); for ( i = 0; i < 8; i++ ) { obj = fl_add_button( FL_PUSH_BUTTON, 40, 310 - 40 * i, 80, 30, "" ); fl_set_object_color( obj, FL_BLACK + i + 1, FL_BLACK + i + 1 ); fl_set_object_callback( obj, push_cb, i ); abox[ i ] = fl_add_box( FL_DOWN_BOX, 150 + 30 * i, 40, 25, 320, "" ); fl_set_object_color( abox[ i ], FL_BLACK + i + 1, FL_BLACK + i + 1 ); fl_hide_object( abox[ i ] ); } fl_add_button( FL_NORMAL_BUTTON, 40, 350, 80, 30, "Exit" ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); makeform( ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "Push Buttons" ); /* fl_do_forms will return only when Exit is pressed */ fl_do_forms( ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/iconify.c0000644000175000017500000000363011203636407015145 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Test iconification * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "crab.xpm" FL_FORM * create_form_form(void); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; Pixmap p, mask; unsigned int w, h; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = create_form_form( ); p = fl_read_pixmapfile( fl_root, "crab.xpm", &w, &h, &mask, 0, 0, 0 ); fl_set_form_icon( form, p, mask ); fl_show_form( form, FL_PLACE_CENTER, FL_FULLBORDER, "IconTest" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ FL_FORM * create_form_form( void ) { FL_OBJECT *obj; FL_FORM *form = fl_bgn_form( FL_NO_BOX, 151, 111 ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 0, 0, 151, 111, "Iconify Me\nvia Window Manager" ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fl_set_pixmapbutton_data( obj, crab ); fl_end_form( ); return form; } xforms-1.0.93sp1/demos/borderwidth.c0000644000175000017500000001142411213420546016016 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * demo showing the effect of different border widths * * This file is part of xforms packge * T.C. Zhao and M. Overmars (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include extern void done_callback( FL_OBJECT *, long ); extern void bw_callback( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * bwform; void * vdata; char * cdata; long ldata; FL_OBJECT * done; FL_OBJECT * bw_select; FL_OBJECT * bwgroup; FL_OBJECT * pmobj; } FD_bwform; FD_bwform *fd_bwform; extern FD_bwform * create_form_bwform( void ); /* callbacks for form bwform */ /*************************************** ***************************************/ void done_callback( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void bw_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { static int bws[ ] = { -5, -4, -3, -2, -1, 1, 2, 3, 4, 5 }; FL_POPUP_RETURN *r = fl_get_select_item( ob ); int bw = bws[ r->val ]; fl_set_object_bw( fd_bwform->bwgroup, bw ); fl_set_object_bw( fd_bwform->done, bw ); fl_popup_set_bw( ( FL_POPUP * ) r->popup, bw ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { int bw; char txt[ 9 ]; /* application default. Can be overriden by the command line options */ fl_set_border_width( 1 ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_bwform = create_form_bwform( ); /* form initialization code */ fl_set_pixmapbutton_file( fd_bwform->pmobj, "crab.xpm" ); fl_add_select_items( fd_bwform->bw_select, "-5 Pixel|-4 Pixel|-3 Pixel|-2 Pixel|-1 Pixel|" " 1 Pixel| 2 Pixel| 3 Pixel| 4 Pixel| 5 Pixel" ); bw = fl_get_border_width( ); if ( bw < -5 || bw == 0 || bw > 5 ) fl_set_border_width( bw = -2 ); sprintf( txt, "%2d Pixel", bw ); fl_set_select_item( fd_bwform->bw_select, fl_get_select_item_by_label( fd_bwform->bw_select, txt ) ); /* show the form */ fl_show_form( fd_bwform->bwform, FL_PLACE_CENTER, FL_TRANSIENT, "bwform" ); while ( fl_do_forms( ) ) /* empty */ ; return 0; } /*************************************** * Form definition file generated with fdesign. ***************************************/ FD_bwform * create_form_bwform( void ) { FL_OBJECT *obj; FD_bwform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->bwform = fl_bgn_form( FL_NO_BOX, 380, 340 ); fdui->bwgroup = fl_bgn_group(); fl_add_box( FL_UP_BOX, 0, 0, 380, 340, "" ); fl_add_frame( FL_EMBOSSED_FRAME, 220, 60, 135, 145, "" ); fl_add_frame( FL_ENGRAVED_FRAME, 15, 60, 185, 145, "" ); fl_add_slider( FL_HOR_SLIDER, 25, 70, 160, 20, "" ); fl_add_valslider( FL_HOR_BROWSER_SLIDER, 25, 105, 160, 20, "" ); obj = fl_add_scrollbar( FL_HOR_THIN_SCROLLBAR, 25, 140, 160, 20, "" ); fl_set_scrollbar_size( obj, 0.2 ); fl_add_counter( FL_NORMAL_COUNTER, 25, 175, 160, 20, "" ); fdui->pmobj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 305, 145, 40, 35, "" ); fl_add_positioner( FL_NORMAL_POSITIONER, 30, 225, 100, 80, "" ); fl_add_button( FL_NORMAL_BUTTON, 230, 65, 100, 28, "Button" ); fl_add_lightbutton( FL_PUSH_BUTTON, 230, 98, 100, 28, "LightButton" ); fl_add_roundbutton( FL_PUSH_BUTTON, 230, 128, 80, 32, "Button" ); obj = fl_add_round3dbutton( FL_PUSH_BUTTON, 230, 152, 80, 32, "Button" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_add_checkbutton( FL_PUSH_BUTTON, 230, 175, 80, 32, "Button" ); fl_add_input( FL_NORMAL_INPUT, 195, 240, 160, 28, "Input" ); fdui->bw_select = obj = fl_add_select( FL_MENU_SELECT, 105, 20, 100, 28, "Border Width" ); fl_set_object_callback( obj, bw_callback, 0 ); fl_end_group( ); fdui->done = obj = fl_add_button( FL_NORMAL_BUTTON, 270, 290, 75, 30, "Done" ); fl_set_object_callback( obj, done_callback, 0 ); fl_end_form( ); fdui->bwform->fdui = fdui; return fdui; } xforms-1.0.93sp1/demos/picture.xbm0000644000175000017500000000156411171560225015526 0ustar jensjens#define picture_width 32 #define picture_height 32 static char picture_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x18, 0x64, 0x6f, 0xf6, 0x26, 0x0a, 0x00, 0x00, 0x50, 0xf2, 0xff, 0xff, 0x4f, 0x14, 0x04, 0x00, 0x28, 0x14, 0x0e, 0x00, 0x28, 0x10, 0x32, 0x00, 0x08, 0x94, 0x03, 0x00, 0x08, 0xf4, 0x04, 0x00, 0x08, 0xb0, 0x08, 0x00, 0x08, 0x34, 0x01, 0x00, 0x28, 0x34, 0x01, 0x00, 0x28, 0x12, 0x00, 0x40, 0x48, 0x12, 0x20, 0xa6, 0x48, 0x14, 0x50, 0x11, 0x29, 0x14, 0x50, 0x48, 0x2a, 0x10, 0x27, 0xac, 0x0e, 0xd4, 0x71, 0xe8, 0x0a, 0x74, 0x20, 0xa8, 0x0a, 0x14, 0x20, 0x00, 0x08, 0x10, 0x50, 0x00, 0x08, 0x14, 0x00, 0x00, 0x28, 0x14, 0x00, 0x00, 0x28, 0xf2, 0xff, 0xff, 0x4f, 0x0a, 0x00, 0x00, 0x50, 0x64, 0x6f, 0xf6, 0x26, 0x18, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xforms-1.0.93sp1/demos/objreturn.c0000644000175000017500000001134511211743031015510 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* demo showing the choices when to return object. Note this program, * strictly speaking, is illegal in the usage of user data parameter * in the callback function. * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include /**** Forms and Objects ****/ typedef struct { FL_FORM * form0; void * vdata; long ldata; FL_OBJECT * obj[ 4 ]; FL_OBJECT * br; FL_OBJECT * when; } FD_form0; extern FD_form0 *create_form_form0( void ); static FD_form0 *fd_form0; /* callbacks for form form0 */ /*************************************** ***************************************/ const char *mess[ ] = { "slider returned", "counter returned", "input 1 returned", "input 2 returned" }; void return_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data ) { fl_addto_browser( fd_form0->br, mess[ data ] ); } /*************************************** ***************************************/ void set_when( int n ) { fl_set_object_return( fd_form0->obj[ 0 ], n ); fl_set_object_return( fd_form0->obj[ 1 ], n ); fl_set_object_return( fd_form0->obj[ 2 ], n ); fl_set_object_return( fd_form0->obj[ 3 ], n ); } /*************************************** ***************************************/ void when_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { set_when( fl_get_select_item( ob )->val ); } /*************************************** ***************************************/ void resetlog_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_clear_browser( fd_form0->br ); } /*************************************** ***************************************/ int main( int argc, char * argv[] ) { fl_set_border_width( -2 ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_form0 = create_form_form0( ); /* fill-in form initialization code */ set_when( 0 ); fl_set_object_dblbuffer( fd_form0->br, 1); fl_add_select_items( fd_form0->when, "RETURN_NONE%x|RETURN_CHANGED%x|" "RETURN_END%x|RETURN_END_CHANGED%x|RETURN_ALWAYS%x", FL_RETURN_NONE, FL_RETURN_CHANGED, FL_RETURN_END, FL_RETURN_END_CHANGED, FL_RETURN_ALWAYS ); /* show the first form */ fl_show_form( fd_form0->form0, FL_PLACE_CENTER, FL_FULLBORDER, "form0" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ FD_form0 * create_form_form0( void ) { FL_OBJECT *obj; FD_form0 *fdui = fl_calloc( 1, sizeof *fdui ); fdui->form0 = fl_bgn_form( FL_NO_BOX, 321, 276 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 321, 276, "" ); fdui->obj[ 0 ] = obj = fl_add_valslider( FL_HOR_SLIDER, 12, 55, 138, 22, "" ); fl_set_object_lalign( obj ,FL_ALIGN_BOTTOM| FL_ALIGN_INSIDE ); fl_set_object_callback( obj, return_cb, 0 ); fl_set_slider_return( obj, FL_RETURN_CHANGED ); fdui->obj[ 1 ] = obj = fl_add_counter( FL_NORMAL_COUNTER, 12, 85, 138, 22, "" ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE ); fl_set_object_callback( obj, return_cb, 1 ); fdui->obj[ 2 ] = obj = fl_add_input( FL_NORMAL_INPUT, 12, 150, 138, 25, "" ); fl_set_object_callback( obj, return_cb, 2 ); fdui->br = obj = fl_add_browser( FL_NORMAL_BROWSER, 170, 55, 140, 160, "" ); fdui->obj[ 3 ] = obj = fl_add_input( FL_INT_INPUT, 12, 187, 138, 25, "" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT | FL_ALIGN_INSIDE ); fl_set_object_callback( obj, return_cb, 3 ); fdui->when = obj = fl_add_select( FL_NORMAL_SELECT, 40, 12, 240, 27, "" ); fl_set_object_callback( obj, when_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 170, 239, 80, 25, "Done" ); obj = fl_add_button( FL_NORMAL_BUTTON, 70, 239, 80, 25, "ResetLog" ); fl_set_object_callback( obj, resetlog_cb, 0 ); fl_end_form( ); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/demos/sld_radio.c0000644000175000017500000000363311203636407015450 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of a slider as radio object */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *sl, *but1, *but2, *but3, *but, *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 300, 300 ); sl = fl_add_slider( FL_VERT_SLIDER, 40, 40, 60, 220, "X" ); sl->radio = 1; but1 = fl_add_lightbutton( FL_RADIO_BUTTON, 140, 220, 120, 40, "0.0" ); but2 = fl_add_lightbutton( FL_RADIO_BUTTON, 140, 160, 120, 40, "0.5" ); but3 = fl_add_lightbutton( FL_RADIO_BUTTON, 140, 100, 120, 40, "1.0" ); but = fl_add_button( FL_NORMAL_BUTTON, 140, 40, 120, 40, "Exit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "slRadio" ); do { obj = fl_do_forms( ); if ( obj == but1 ) fl_set_slider_value( sl, 0.0 ); if ( obj == but2 ) fl_set_slider_value( sl, 0.5 ); if ( obj == but3 ) fl_set_slider_value( sl, 1.0 ); } while ( obj != but ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/01Readme0000644000175000017500000000112011320127467014613 0ustar jensjensHere are a few programs70 demonstrating the usage and appearance of object classes in the XForms Library. Note that these programs also serve as testing/QA programs, so if you have a problem with a particular object, see if the same object works in the demo program. On the other hand, if one of the demo programs doesn't work you have rather likely found a bug in XForms. Please report it! Simply type 'demo' to start the demo/test suite. OpenGL/Mesa demos may not have been generated if you configured XForms to be built without GL support (via the '--disable-gl' option of 'configure'). xforms-1.0.93sp1/demos/timer2.c0000644000175000017500000000572711203636407014720 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* A demo showing the use of timer objects. * note there is only one fl_do_form(). */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_FORM *form1, *form2; FL_OBJECT *tim, *tim2; #define TIME 5 /*************************************** ***************************************/ void timer1_expired( FL_OBJECT * ob, long q ) { fl_deactivate_form( form1 ); fl_set_timer( tim2, 10 ); fl_show_form( form2, FL_PLACE_MOUSE, FL_TRANSIENT, "Q" ); } /*************************************** ***************************************/ void nothing( FL_OBJECT * ob, long q ) { } /*************************************** ***************************************/ void continue_cb( FL_OBJECT * ob, long q ) { fl_hide_form( form2 ); fl_activate_form( form1 ); fl_set_timer( tim, TIME ); fl_set_object_callback( tim, nothing, 0 ); } /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob, long a ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void makeforms( void ) { FL_OBJECT *obj; form1 = fl_bgn_form( FL_UP_BOX, 400, 400 ); obj = fl_add_button( FL_NORMAL_BUTTON, 140, 160, 120, 80, "Push Me" ); fl_set_object_callback( obj, done_cb, 0 ); tim = fl_add_timer( FL_VALUE_TIMER, 200, 40, 90, 50, "Time Left" ); fl_set_object_callback( tim, timer1_expired, 0 ); fl_set_object_lcol( tim, FL_BLACK ); fl_end_form( ); form2 = fl_bgn_form( FL_UP_BOX, 320, 120 ); fl_add_box( FL_NO_BOX, 160, 40, 0, 0, "You were too late" ); obj = fl_add_button( FL_NORMAL_BUTTON, 100, 70, 120, 30, "Try Again" ); fl_set_object_callback( obj, continue_cb, 0 ); tim2 = fl_add_timer( FL_HIDDEN_TIMER, 0, 0, 1, 2, "" ); fl_set_object_callback( tim2, continue_cb, 0 ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); makeforms( ); fl_show_form( form1, FL_PLACE_CENTER, FL_NOBORDER, "Timer" ); fl_set_timer( tim, TIME ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/colsel1.c0000644000175000017500000000457411203636407015057 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /************ show the use of setting object colors and call-back routines. ************/ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_FORM *form; FL_OBJECT *topbox; /*************************************** ***************************************/ void change_color( FL_OBJECT * obj FL_UNUSED_ARG, long col ) { fl_set_object_color( topbox, col, col ); } /*************************************** ***************************************/ void makeform( void ) { FL_OBJECT *obj; int i, j; char str[ 32 ]; form = fl_bgn_form( FL_UP_BOX, 100, 100 ); for ( i = 0; i < 8; i++ ) for ( j = 0; j < 8; j++ ) { sprintf( str, "%d", 8 * j + i ); obj = fl_add_button( FL_RADIO_BUTTON, 11 + 10 * i, 15 + 10 * j, 8, 6, str ); fl_set_object_color( obj, 8 * j + i, 8 * j + i ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM ); fl_set_object_callback( obj, change_color, ( long ) ( 8 * j + i ) ); } topbox = fl_add_button( FL_NORMAL_BUTTON, 30, 5, 40, 8, "The Color Map" ); fl_set_object_lsize( topbox, FL_LARGE_SIZE ); fl_set_object_lstyle( topbox, FL_BOLD_STYLE ); fl_end_form( ); fl_adjust_form_size( form ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *ret; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); makeform( ); fl_scale_form( form, 4.0, 4.0 ); fl_show_form( form, FL_PLACE_FREE, FL_TRANSIENT, "colsel" ); do ret = fl_do_forms( ); while ( ret != topbox ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/colsel.c0000644000175000017500000000222311203636407014763 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* default color chooser from the internal/built-in colormap */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { int i = 0; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); while ( 1 ) i = fl_show_colormap( i ); return 0; } xforms-1.0.93sp1/demos/xyover0000644000175000017500000000534611171560225014624 0ustar jensjens/* * Demo showing the use of xyplot overlay, plot key and * PostScript output. * * This file is part of xforms package * T.C. Zhao and M. Overmars */ #include "forms.h" #include #include /**** Forms and Objects ****/ typedef struct { FL_FORM *fff; void *vdata; long ldata; FL_OBJECT *xyplot; } FD_fff; extern FD_fff *create_form_fff(void); extern void init_xyplot(FD_fff *); int main(int argc, char *argv[]) { FD_fff *fd_fff; fl_initialize(&argc, argv, "FormDemo", 0, 0); fd_fff = create_form_fff(); /* fill-in form initialization code */ init_xyplot(fd_fff); /* show the first form */ fl_show_form(fd_fff->fff, FL_PLACE_MOUSE, FL_TRANSIENT, "XYPlot Overlay"); fl_do_forms(); if(fl_object_ps_dump(fd_fff->xyplot,"test.ps")>= 0) fprintf(stderr,"PostScript output test.ps written\n"); return 0; } void newsymbol(FL_OBJECT *ob, int id, FL_POINT *p, int n, int w, int h) { int r = (w + h) / 4; FL_POINT *ps = p + n; for (; p < ps; p++) fl_circf(p->x, p->y, r, FL_WHITE); } void init_xyplot(FD_fff * fd_fff) { int i; float xx[20], yy[20]; for (i = 0; i <= 10; i++) { xx[i] = i; yy[i] = exp(-(xx[i] - 5) * (xx[i] - 5) / 8); } fl_set_xyplot_data(fd_fff->xyplot, xx, yy, 8, "Plot Title", "X-Axis", "Y|Axis"); fl_set_xyplot_ybounds(fd_fff->xyplot, 0, 1.1); fl_set_xyplot_xbounds(fd_fff->xyplot, 0, 10); fl_add_xyplot_overlay(fd_fff->xyplot, 1, xx, yy, 11, FL_GREEN); fl_set_xyplot_overlay_type(fd_fff->xyplot, 1, FL_LINEPOINTS_XYPLOT); fl_set_xyplot_interpolate(fd_fff->xyplot, 1, 2, 0.1); fl_set_xyplot_symbol(fd_fff->xyplot,-1, newsymbol); fl_add_xyplot_text(fd_fff->xyplot, 0.5, 1.0, "Gaussian\nDistribution", FL_ALIGN_RIGHT, FL_WHITE); fl_set_xyplot_key(fd_fff->xyplot, 0, "Original"); fl_set_xyplot_key(fd_fff->xyplot, 1, "Overlay"); fl_set_xyplot_key_position(fd_fff->xyplot, 9.8, 1.08, FL_ALIGN_BOTTOM_LEFT); } FD_fff * create_form_fff(void) { FL_OBJECT *obj; FD_fff *fdui = (FD_fff *) fl_calloc(1, sizeof(*fdui)); fdui->fff = fl_bgn_form(FL_NO_BOX, 370, 310); obj = fl_add_box(FL_UP_BOX, 0, 0, 370, 310, ""); fdui->xyplot = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT, 10, 20, 350, 260, "An XYPlot with overlay"); fl_set_object_lalign(obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_boxtype(obj, FL_DOWN_BOX); fl_set_object_color(obj, FL_BLACK, FL_YELLOW); obj = fl_add_button(FL_HIDDEN_BUTTON, 10, 10, 350, 290, ""); fl_set_button_shortcut(obj,"qQ", 0); fl_end_form(); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/demos/canvas.c0000644000175000017500000002076311337505554014774 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the interaction with a canvas object. * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include extern void sensitive_setting( FL_OBJECT *, long ); extern void misc_cb( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * canvasform; void * vdata; char * cdata; long ldata; FL_OBJECT * canvas; FL_OBJECT * br; FL_OBJECT * keyboard; FL_OBJECT * mouse; FL_OBJECT * done; FL_OBJECT * misc; FL_OBJECT * menu; } FD_canvasform; extern FD_canvasform * create_form_canvasform( void ); static GC canvasGC; /*************************************** ***************************************/ int canvas_expose( FL_OBJECT * ob FL_UNUSED_ARG, Window win, int w, int h, XEvent * ev FL_UNUSED_ARG, void * d) { FD_canvasform *ui = d; XFillRectangle( fl_get_display( ), win, canvasGC, 0, 0, w, h ); fl_addto_browser( ui->br, "Expose" ); return 0; } /*************************************** ***************************************/ int canvas_key( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev, void * d ) { FD_canvasform *ui = d; char buf[ 128 ]; sprintf( buf, "KeyPress: keysym=%ld", XKeycodeToKeysym( fl_display, ev->xkey.keycode, 0 ) ); fl_addto_browser( ui->br, buf ); return 0; } /*************************************** ***************************************/ int canvas_but( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev, void * d ) { FD_canvasform *ui = d; char buf[ 128 ]; sprintf( buf, "Button%s: %d", ev->type==ButtonPress ? "Press" : "Release", ev->xbutton.button ); fl_addto_browser( ui->br, buf ); return 0; } /*************************************** ***************************************/ int canvas_misc( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev, void * d ) { FD_canvasform *ui = d; fl_addto_browser( ui->br, ev->xcrossing.type == EnterNotify ? "Enter canvas" : "Leave canvas" ); return 0; } /*************************************** ***************************************/ void init_canvas( FD_canvasform * fdui ) { fl_add_canvas_handler( fdui->canvas, Expose, canvas_expose, fdui ); fl_add_canvas_handler( fdui->canvas, KeyPress, canvas_key, fdui ); fl_add_canvas_handler( fdui->canvas, ButtonPress,canvas_but, fdui ); fl_add_canvas_handler( fdui->canvas, ButtonRelease,canvas_but, fdui ); fl_set_button( fdui->mouse, 1 ); fl_set_button( fdui->keyboard, 1 ); canvasGC = XCreateGC( fl_get_display() , fl_state[ fl_vmode ].trailblazer, 0, 0 ); XSetForeground( fl_get_display( ), canvasGC, fl_get_flcolor( FL_BLACK ) ); } FD_canvasform *fd_canvasform; /* callbacks */ /*************************************** ***************************************/ void sensitive_setting( FL_OBJECT * ob, long event ) { FL_HANDLE_CANVAS hc = event == KeyPress ? canvas_key : canvas_but; if ( fl_get_button( ob ) ) fl_add_canvas_handler( fd_canvasform->canvas, event, hc, fd_canvasform ); else fl_remove_canvas_handler( fd_canvasform->canvas, event, hc ); } /*************************************** ***************************************/ void disable_it( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { ( fl_get_button( ob ) ? fl_deactivate_object : fl_activate_object ) ( fd_canvasform->canvas ); } /*************************************** ***************************************/ void hide_it( FL_OBJECT * ob, long all ) { if ( all ) { fl_hide_form( fd_canvasform->canvasform ); fl_show_form( fd_canvasform->canvasform, FL_PLACE_POSITION, FL_FULLBORDER, "canvas" ); #if 0 fl_remove_selected_xevent( fd_canvasform->canvasform->window, OwnerGrabButtonMask ); #endif } else { if ( fl_object_is_visible( fd_canvasform->canvas ) ) { fl_hide_object( fd_canvasform->canvas ); fl_set_object_label( ob, "ShowCanvas" ); } else { fl_show_object( fd_canvasform->canvas ); fl_set_object_label( ob, "HideCanvas" ); } } } /*************************************** ***************************************/ void misc_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( fl_get_button( ob ) ) { fl_add_canvas_handler( fd_canvasform->canvas, EnterNotify, canvas_misc, fd_canvasform ); fl_add_canvas_handler( fd_canvasform->canvas, LeaveNotify, canvas_misc, fd_canvasform ); } else { fl_remove_canvas_handler( fd_canvasform->canvas, EnterNotify, canvas_misc ); fl_remove_canvas_handler( fd_canvasform->canvas, LeaveNotify, canvas_misc ); } } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_set_border_width( -2 ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_canvasform = create_form_canvasform( ); /* fill-in form initialization code */ init_canvas( fd_canvasform ); fl_add_nmenu_items( fd_canvasform->menu, "Item1|Item2|Item3|Item4" ); fl_show_form( fd_canvasform->canvasform, FL_PLACE_FREE, FL_FULLBORDER, "canvasform" ); #if 0 fl_remove_selected_xevent( fd_canvasform->canvasform->window, OwnerGrabButtonMask ); #endif while ( fl_do_forms( ) != fd_canvasform->done ) /* empty */ ; return 0; } /*************************************** ***************************************/ FD_canvasform * create_form_canvasform( void ) { FL_OBJECT *obj; FD_canvasform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->canvasform = fl_bgn_form( FL_NO_BOX, 450, 280 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 450, 280, "" ); fdui->canvas = fl_add_canvas( FL_NORMAL_CANVAS, 20, 40, 155, 187, "" ); fdui->br = fl_add_browser( FL_NORMAL_BROWSER, 188, 40, 152, 187, "" ); obj = fl_add_button( FL_PUSH_BUTTON, 30, 236, 90, 27, "Deactivate" ); fl_set_object_callback( obj, disable_it, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 120, 236, 90, 27, "HideCanvas" ); fl_set_object_callback( obj, hide_it, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 210, 236, 90, 27, "HideForm" ); fl_set_object_callback( obj, hide_it, 1 ); fdui->done = fl_add_button( FL_NORMAL_BUTTON, 300, 236, 90, 27, "Done" ); obj = fl_add_text( FL_NORMAL_TEXT, 130, 10, 120, 20, "Canvas" ); fl_set_object_lsize( obj, FL_MEDIUM_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->menu = obj = fl_add_nmenu( FL_NORMAL_NMENU, 20, 10, 45, 22, "Menu" ); fl_set_object_shortcut( obj, "#m", 1 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->keyboard = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 345, 40, 76, 26, "Keyboard" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, sensitive_setting, KeyPress ); fdui->mouse = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 345, 70, 76, 26, "Mouse" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, sensitive_setting, ButtonPress ); fdui->misc = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 345, 100, 74, 26, "Enter/Leave" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, misc_cb, ButtonPress ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/porsche.xpm0000644000175000017500000001101511171560225015524 0ustar jensjens/* XPM */ static char * porsche[] = { /* porsche pixmap * width height ncolors chars_per_pixel */ "64 64 4 1 ", " c None m None s s_slateblue ", ". c yellow m white s s_yellow ", "r c red m white s s_red ", "b c black m black s s_black ", /* pixels */ " ", " ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb............................................bb ", " bb..bbbb..bbbb..bbbb..bbbb..bbbb..b..b..bbbb..bb ", " bb..b..b..b..b..b..b..b..b..b..b..b..b..b.....bb ", " bb..b..b..b..b..b..b..b.....b.....b..b..b.....bb ", " bb..bbbb..b..b..bbb...bbbb..b.....bbbb..bbbb..bb ", " bb..b.....b..b..b..b.....b..b.....b..b..b.....bb ", " bb..b.....b..b..b..b..b..b..b..b..b..b..b.....bb ", " bb..b.....bbbb..b..b..bbbb..bbbb..b..b..bbbb..bb ", " bb............................................bb ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb.....................bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb......b...b...bb.....bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb.....b...b...b....b..bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb....bb..bb.bbbbbbb...bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb...bbbbbbbb......bb..bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb..bbbb...............bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb.bbb.................bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb..........b..b.......bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb.....b...b..b........bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb....b...b..b..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb....b.bbbbbbbbb..............bbbbbbbbbbbbbbbbb ", " bb...bbbb.......bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb..bbb.........b..............bbbbbbbbbbbbbbbbb ", " bb.bbb..........b...bbb........bbbbbbbbbbbbbbbbb ", " bb.........b..b.b..bbbbb.......bbbbbbbbbbbbbbbbb ", " bb.....b..b..b..b..b.bbb.....b.brrrrrrrrrrrrrrbb ", " bb....b..b..b..bb....bbb....bb.brrrrrrrrrrrrrrbb ", " bb...bb.bbbbbbb.b....bbb....bb.brrrrrrrrrrrrrrbb ", " bb..bbbbb......bb...bbbbb...b..brrrrrrrrrrrrrrbb ", " bb.bbb..........b.bbbbbbbbbbb..brrrrrrrrrrrrrrbb ", " bb..............b.b.bbbbbbbbb..brrrrrrrrrrrrrrbb ", " bbbbbbbbbbbbbbbbb.b.b....bbbb..bbbbbbbbbbbbbbbbb ", " bbbbbbbbbbbbbbbbb...b.....b.b..b..............bb ", " bbbbbbbbbbbbbbbbb........bb.bb.b...b..b.......bb ", " bbbbbbbbbbbbbbbb........b..b..b..b..b...b...bb ", " bbbbbbbbbbbbbbbb.......b..b...b.b..b...b....bb ", " bbbbbbbbbbbbbbbbb............b.bbbbbbbbbb...bb ", " bbrrrrrrrrrrrrrrb..........bbbb........bb.bb ", " bbrrrrrrrrrrrrrrrb........bbbb............bb ", " bbrrrrrrrrrrrrrrrbbbbbbbb.......b..b....bb ", " bbrrrrrrrrrrrrrrrrrrbb.....b...b..b..b..bb ", " bbrrrrrrrrrrrrrrrrrbb....b...b..b..b..bb ", " bbrrrrrrrrrrrrrrrrrbb...bb.bbbbbbbb...bb ", " bbbbbbbbbbbbbbbbbbbb...bbbb......bb.bb ", " bbbbbbbbbbbbbbbbbbb..bbb...........b ", " bbbbbbbbbbbbbbbbbbb.bbb...........bb ", " bbbbbbbbbbbbbbbbbb..............bb ", " bbbbbbbbbbbbbbbbb...b.b.b.....bb ", " bbbbbbbbbbbbbbbb..b.b.b..b..bb ", " bbrrrrrrrrrrrbb..bbbbbbb..bb ", " bbrrrrrrrrrrbb.bbb....b.bb ", " bbrrrrrrrrrbb.bb......bb ", " bbbrrrrrrrbb.......bbb ", " bbbbrrrrrbb.....bbbb ", " bbbbrrrbb...bbbb ", " bbbbrbb.bbbb ", " bbbbbbbb ", " bbbb ", " bb ", " " } ; xforms-1.0.93sp1/demos/invslider.c0000644000175000017500000000574711203636407015517 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Inverted slider * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include extern void invert_it(FL_OBJECT *, long); typedef struct { FL_FORM * inv; void * vdata; char * cdata; long ldata; FL_OBJECT * sl[ 3 ]; FL_OBJECT * done; } FD_inv; extern FD_inv *create_form_inv( void ); FD_inv *ui; /*************************************** ***************************************/ void invert_it( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( fl_get_button( ob ) ) { fl_set_slider_bounds( ui->sl[ 0 ], 1.0, 0.0 ); fl_set_slider_bounds( ui->sl[ 1 ], 1.0, 0.0 ); fl_set_slider_bounds( ui->sl[ 2 ], 1.0, 0.0 ); } else { fl_set_slider_bounds( ui->sl[ 0 ], 0.0, 1.0 ); fl_set_slider_bounds( ui->sl[ 1 ], 0.0, 1.0 ); fl_set_slider_bounds( ui->sl[ 2 ], 0.0, 1.0 ); } } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); ui = create_form_inv( ); /* fill-in form initialization code */ fl_show_form( ui->inv, FL_PLACE_CENTER | FL_FREE_SIZE, FL_TRANSIENT, "inv" ); while ( fl_do_forms( ) != ui->done ) /* empty */ ; return 0; } /*************************************** * Form definition file generated with fdesign. ***************************************/ FD_inv * create_form_inv( void ) { FL_OBJECT *obj; FD_inv *fdui = fl_calloc( 1, sizeof *fdui ); fdui->inv = fl_bgn_form(FL_NO_BOX, 245, 280); fl_add_box(FL_UP_BOX,0,0,245,280,""); fdui->sl[0] = fl_add_valslider( FL_VERT_SLIDER, 20, 30, 35, 230, "" ); fdui->sl[1] = fl_add_valslider( FL_VERT_FILL_SLIDER, 65, 30, 35, 230, "" ); fdui->sl[2] = obj = fl_add_valslider( FL_VERT_NICE_SLIDER, 115, 30, 35, 230, "" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fdui->done = fl_add_button( FL_RETURN_BUTTON, 160, 235, 75, 30, "Exit" ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 165, 30, 75, 35, "Invert" ); fl_set_object_callback( obj, invert_it, 0 ); fl_end_form( ); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/demos/arrowbutton.c0000644000175000017500000000465411203636407016102 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This demo shows the use of special symbol labels * * This file is part of xforms packge * M. Overmars and T.C. Zhao (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 400, 400 ); obj = fl_add_button( FL_NORMAL_BUTTON, 50, 250, 100, 100, "@1" ); fl_set_object_lcol( obj, FL_BLUE ); obj = fl_add_button( FL_NORMAL_BUTTON, 150, 250, 100, 100, "@2" ); fl_set_object_lcol( obj, FL_BLUE ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 250, 100, 100, "@3" ); fl_set_object_lcol( obj, FL_BLUE ); obj = fl_add_button( FL_NORMAL_BUTTON, 50, 150, 100, 100, "@4" ); fl_set_object_lcol( obj, FL_BLUE ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 150, 100, 100, "@6" ); fl_set_object_lcol( obj, FL_BLUE ); obj = fl_add_button( FL_NORMAL_BUTTON, 50, 50, 100, 100, "@7" ); fl_set_object_lcol( obj, FL_BLUE ); obj = fl_add_button( FL_NORMAL_BUTTON, 150, 50, 100, 100, "@8" ); fl_set_object_lcol( obj, FL_BLUE ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 50, 100, 100, "@9" ); fl_set_object_lcol( obj, FL_BLUE ); obj = fl_add_button( FL_NORMAL_BUTTON, 150, 150, 100, 100, "@square" ); fl_set_object_lcol( obj, FL_GREEN ); fl_set_object_color( obj, FL_MAGENTA, FL_RED ); fl_end_form( ); fl_show_form( form, FL_PLACE_ASPECT, FL_TRANSIENT, "Buttons" ); while ( fl_do_forms( ) != obj ) /* empty */ ; fl_finish( ); return 0; } xforms-1.0.93sp1/demos/longlabel.c0000644000175000017500000000546211203636407015451 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* Demo of the Use of a very long label */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" char *label1= "This demo shows the use of some very\n" "long labels. The dynamic storage allocation\n" "for such long labels should guarantee that\n" "all of this works without any problem."; char *label2="This is the second string that should again\n" "be a bit larger such that a new, larger amount\n" "of storage has to be allocated for the label.\n" "This is of course no problem. By the way,\n" "dynamic allocation of storage saves a lot\n" "of memory because for most objects the label\n" "is much shorter than the 64 bytes that were\n" "allocated for it in the previous version of\n" "the Forms Library"; char *label3="And now back to the first one:\n\n" "This demo shows the use of some very\n" "long labels. The dynamic storage allocation\n" "for such long labels should guarantee that\n" "all of this works without any problem."; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *strobj, *but; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 400, 300 ); strobj = fl_add_box( FL_DOWN_BOX, 10, 10, 380, 240, "Press Next" ); fl_set_object_lsize( strobj, FL_NORMAL_SIZE ); but = fl_add_button( FL_NORMAL_BUTTON, 160, 260, 80, 30, "Next" ); fl_end_form( ); fl_set_form_hotobject( form, but ); fl_show_form( form, FL_PLACE_HOTSPOT, FL_TRANSIENT, "longlabel" ); fl_do_forms( ); fl_set_object_label( strobj,label1 ); fl_do_forms( ); fl_set_object_label( strobj,label2 ); fl_do_forms( ); fl_set_object_label( strobj, "Now we turn to a short label" ); fl_do_forms( ); fl_set_object_label( strobj,label3 ); fl_set_object_label( but,"Quit" ); fl_do_forms( ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/nomail.xbm0000644000175000017500000000640711171560225015333 0ustar jensjens#define nomail_width 64 #define nomail_height 64 static unsigned char nomail_bits[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x0e, 0xc0, 0x00, 0x00, 0x80, 0x01, 0x00, 0xc0, 0x01, 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, 0x38, 0x00, 0x00, 0x02, 0x00, 0x80, 0x01, 0x00, 0x06, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0xc0, 0x1f, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0x30, 0x60, 0x00, 0x00, 0x08, 0x00, 0x80, 0x01, 0x08, 0x80, 0x00, 0x00, 0x08, 0x00, 0x80, 0x01, 0x04, 0x07, 0x01, 0x00, 0x10, 0x00, 0x80, 0x01, 0x82, 0x0f, 0x02, 0x00, 0x10, 0x00, 0x80, 0x01, 0x82, 0x0f, 0x02, 0x00, 0x10, 0x00, 0x80, 0x01, 0x01, 0x07, 0x04, 0x00, 0x20, 0x00, 0x80, 0x01, 0x01, 0x00, 0x04, 0x00, 0x20, 0x00, 0x80, 0x81, 0x00, 0x00, 0x08, 0x00, 0x26, 0x00, 0x80, 0x81, 0x00, 0x00, 0x08, 0x80, 0x27, 0x00, 0x80, 0x81, 0x00, 0x00, 0x08, 0xe0, 0x27, 0x00, 0x80, 0x81, 0x22, 0xa2, 0x08, 0xd8, 0x27, 0x00, 0x80, 0x41, 0x36, 0xa5, 0x10, 0xc6, 0x27, 0x00, 0x80, 0x41, 0xaa, 0xa8, 0x90, 0xc1, 0x27, 0x00, 0x80, 0x41, 0xaa, 0xaf, 0x90, 0xc1, 0x27, 0x00, 0x80, 0x41, 0xa2, 0xa8, 0x10, 0xc0, 0x27, 0x00, 0x80, 0x41, 0xa2, 0xa8, 0x17, 0xc0, 0x21, 0x00, 0x80, 0x41, 0x00, 0x00, 0x10, 0x40, 0x20, 0x00, 0x80, 0x41, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x80, 0x41, 0xfe, 0xff, 0x17, 0x00, 0x20, 0x00, 0x80, 0x41, 0x00, 0x00, 0x10, 0x00, 0x30, 0x00, 0x80, 0x41, 0xfe, 0xff, 0x17, 0x00, 0x3c, 0x0e, 0x80, 0x41, 0x00, 0x00, 0x10, 0x00, 0x0f, 0x11, 0x80, 0x41, 0x00, 0x00, 0x10, 0xc0, 0x1b, 0x11, 0x80, 0x41, 0x00, 0x00, 0x10, 0xf0, 0xe4, 0x10, 0x80, 0x41, 0x00, 0x00, 0x10, 0x3c, 0x84, 0x08, 0x80, 0x41, 0x00, 0x00, 0x10, 0x0f, 0x88, 0x3c, 0x80, 0x41, 0x00, 0x00, 0xd0, 0x03, 0xf0, 0x43, 0x80, 0x41, 0x00, 0x00, 0xf0, 0x01, 0x8c, 0x43, 0x80, 0xc1, 0xff, 0xff, 0x3f, 0x01, 0x82, 0x24, 0x80, 0xc1, 0xff, 0xff, 0x1f, 0x01, 0x82, 0x18, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0xfc, 0x08, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x20, 0x09, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x10, 0x06, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x10, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x08, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x08, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0xb4, 0x3f, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x0e, 0x28, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x03, 0x16, 0x80, 0x01, 0x00, 0x02, 0x02, 0x81, 0xc0, 0x11, 0x80, 0x01, 0x00, 0x02, 0x02, 0x41, 0x38, 0x08, 0x80, 0x01, 0x00, 0x02, 0x02, 0x21, 0x04, 0x04, 0x80, 0x01, 0x00, 0x02, 0x02, 0x11, 0x03, 0x02, 0x80, 0x01, 0x00, 0x02, 0x02, 0xc9, 0x80, 0x01, 0x80, 0x01, 0x00, 0x02, 0x02, 0x25, 0x60, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x13, 0x18, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x02, 0xc2, 0xfe, 0x00, 0x00, 0x80, 0x01, 0x00, 0x02, 0x32, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; xforms-1.0.93sp1/demos/fd/0000755000175000017500000000000011377311601013726 5ustar jensjensxforms-1.0.93sp1/demos/fd/buttons_gui.fd0000644000175000017500000001625211171560225016611 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: buttform Width: 290 Height: 260 Number of Objects: 22 -------------------- class: FL_BOX type: UP_BOX box: 0 0 290 260 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: backface callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 185 215 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: done callback: done_cb argument: 0 -------------------- class: FL_BEGIN_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: objsgroup callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 175 170 100 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_GREEN alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 210 170 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_GREEN alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BITMAPBUTTON type: NORMAL_BUTTON box: 25 85 40 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: bitmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: bbutt callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 25 25 40 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: pixmapbutton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pbutt callback: argument: -------------------- class: FL_CHECKBUTTON type: RADIO_BUTTON box: 100 31 70 32 boxtype: FL_NO_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Red shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHECKBUTTON type: RADIO_BUTTON box: 100 60 70 32 boxtype: FL_NO_BOX colors: FL_COL1 FL_GREEN alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Green shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHECKBUTTON type: RADIO_BUTTON box: 100 90 70 32 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Blue shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 20 170 108 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LightButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 200 35 75 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Red shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 200 64 75 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_GREEN alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Green shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 200 93 75 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Blue shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 180 170 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 240 170 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: PUSH_BUTTON box: 130 210 30 30 boxtype: FL_OVAL3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: go shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 210 90 30 boxtype: FL_ROUNDED3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 105 135 80 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: BW shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: bw_obj callback: bw_cb argument: 0 -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 190 25 85 100 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RoundButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 90 25 90 100 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CheckButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_END_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/demos/fd/twheel_gui.fd0000644000175000017500000000517511171560225016405 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: twheelform Width: 220 Height: 260 Number of Objects: 7 -------------------- class: FL_BOX type: UP_BOX box: 0 0 220 260 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 15 70 190 130 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_THUMBWHEEL type: VERT_THUMBWHEEL box: 30 90 20 100 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vert callback: valchange_cb argument: 0 step: 0.01 -------------------- class: FL_THUMBWHEEL type: HOR_THUMBWHEEL box: 60 130 120 23 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hor callback: valchange_cb argument: 0 step: 0.01 -------------------- class: FL_TEXT type: NORMAL_TEXT box: 60 90 120 30 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: report callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 35 20 160 30 boxtype: FL_EMBOSSED_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: returnchange_cb argument: 0 content: End & Changed content: Whenever Changed content: Always At End content: Always value: 2 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 120 215 80 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Enough shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/demos/fd/is_gui.fd0000644000175000017500000003520011171560225015520 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 6 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: is_mainform Width: 950 Height: 780 Number of Objects: 12 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 950 780 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: DOWN_BOX box: 5 50 250 690 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CANVAS type: NORMAL_CANVAS box: 260 55 655 660 boxtype: FL_DOWN_BOX colors: FL_NoColor FL_BLACK alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: canvas callback: argument: -------------------- class: FL_SCROLLBAR type: VERT_THIN_SCROLLBAR box: 920 55 19 665 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vscroll callback: vscroll_callback argument: 0 -------------------- class: FL_SCROLLBAR type: HOR_THIN_SCROLLBAR box: 258 720 659 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hscroll callback: hscroll_callback argument: 0 -------------------- class: FL_TABFOLDER type: TOP_TABFOLDER box: 8 53 244 684 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: tabfolder callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 690 745 255 30 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 259 3 675 45 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 10 10 60 25 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: File shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: filemenu_callback argument: 0 content: New shortcut: #N content: Open shortcut: #O content: Save shortcut: #S content: Save As%l shortcut: #A content: Exit shortcut: #E -------------------- class: FL_SLIDER type: HOR_FILL_SLIDER box: 285 747 156 26 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_DODGERBLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: progressbar callback: argument: 0 value: 0 slsize: 0.15 return: FL_RETURN_END_CHANGED -------------------- class: FL_TEXT type: NORMAL_TEXT box: 6 745 278 29 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: status callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 442 745 245 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: errormsg callback: argument: 0 =============== FORM =============== Name: viewform Width: 240 Height: 670 Number of Objects: 7 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 240 670 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 10 298 224 68 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Window Levelling shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 30 80 40 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: DoubleBuffer shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: doublebuffer callback: doublebuffer_callback argument: 0 -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 10 460 220 120 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: HeaderInfo shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: headerinfo callback: argument: -------------------- class: FL_VALSLIDER type: HOR_NICE_SLIDER box: 20 340 195 18 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: W shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: window callback: windowlevel_callback argument: 0 bounds: 0 4095 precision: 0 value: 256 increment: 1 1 -------------------- class: FL_VALSLIDER type: HOR_NICE_SLIDER box: 20 316 195 18 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: L shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: level callback: windowlevel_callback argument: 0 bounds: 0 4095 precision: 0 value: 2514 increment: 1 1 -------------------- class: FL_PIXMAP type: NORMAL_PIXMAP box: 160 585 70 70 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pixmap callback: argument: =============== FORM =============== Name: processform Width: 240 Height: 670 Number of Objects: 17 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 240 670 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 10 275 220 90 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CurrentFillColor shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 6 60 229 150 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Scale shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 60 120 120 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Width shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: width callback: argument: 0 bounds: 0.1 100.0 value: 1.0 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 60 140 120 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Height shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: height callback: argument: 0 bounds: 0.1 101.0 value: 1.0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 12 80 82 22 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: subpixel callback: argument: content: subpixel content: no subpixel -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 96 80 67 22 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: aspect callback: argument: content: aspect content: exact value: 2 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 150 175 70 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: OK shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: scaling_callback argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 40 175 80 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Pixel shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pixel callback: switchtopixel_callback argument: 0 -------------------- class: FL_VALSLIDER type: HOR_FILL_SLIDER box: 30 290 160 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: red callback: colorchange_callback argument: 0 bounds: 0 255 precision: 0 value: 205 slsize: 0.15 -------------------- class: FL_VALSLIDER type: HOR_FILL_SLIDER box: 30 310 160 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_GREEN alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: green callback: colorchange_callback argument: 1 bounds: 0 255 precision: 0 value: 87 slsize: 0.15 step: 1 -------------------- class: FL_VALSLIDER type: HOR_FILL_SLIDER box: 30 330 160 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: blue callback: colorchange_callback argument: 2 bounds: 0 255 precision: 0 value: 128 slsize: 0.15 -------------------- class: FL_BOX type: FLAT_BOX box: 193 290 30 60 boxtype: FL_FLAT_BOX colors: FL_FREE_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: colorobj callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 164 80 68 22 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: align callback: argument: content: center content: topleft -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 40 410 70 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Sharpen shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: convolve_callback argument: (long)FLIMAGE_SHARPEN -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 120 410 70 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Smooth shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: convolve_callback argument: (long)FLIMAGE_SMOOTH -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 40 450 70 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Auto Crop shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: autocrop_callback argument: 0 =============== FORM =============== Name: saveAs_form Width: 320 Height: 400 Number of Objects: 3 -------------------- class: FL_BOX type: UP_BOX box: 0 0 320 400 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FORMBROWSER type: NORMAL_FORMBROWSER box: 7 52 310 340 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: formcontainer callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 65 10 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Format shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: outformat callback: outformat_callback argument: 0 =============== FORM =============== Name: annotationform Width: 240 Height: 670 Number of Objects: 1 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 240 670 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: paintform Width: 240 Height: 670 Number of Objects: 1 -------------------- class: FL_BOX type: UP_BOX box: 0 0 240 670 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/demos/fd/inputall_gui.fd0000644000175000017500000000673711223137757016762 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: input Width: 441 Height: 441 Number of Objects: 10 -------------------- class: FL_BOX type: UP_BOX box: 0 0 441 441 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 40 40 340 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Normal Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: norminput callback: input_cb argument: 0 -------------------- class: FL_INPUT type: INT_INPUT box: 40 100 160 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Integer Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: FLOAT_INPUT box: 230 100 160 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Float Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: DATE_INPUT box: 40 150 160 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Date Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: SECRET_INPUT box: 230 150 160 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Secret Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: MULTILINE_INPUT box: 40 210 360 180 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Multi-line input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: multiinput callback: input_cb argument: 0 -------------------- class: FL_TEXT type: NORMAL_TEXT box: 30 400 210 30 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: report callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 330 400 70 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: done_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 250 400 70 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Hide/Show shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: hide_show_cb argument: 0 ============================== create_the_form xforms-1.0.93sp1/demos/fd/porsche.xpm0000644000175000017500000001101511171560225016115 0ustar jensjens/* XPM */ static char * porsche[] = { /* porsche pixmap * width height ncolors chars_per_pixel */ "64 64 4 1 ", " c None m None s s_slateblue ", ". c yellow m white s s_yellow ", "r c red m white s s_red ", "b c black m black s s_black ", /* pixels */ " ", " ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb............................................bb ", " bb..bbbb..bbbb..bbbb..bbbb..bbbb..b..b..bbbb..bb ", " bb..b..b..b..b..b..b..b..b..b..b..b..b..b.....bb ", " bb..b..b..b..b..b..b..b.....b.....b..b..b.....bb ", " bb..bbbb..b..b..bbb...bbbb..b.....bbbb..bbbb..bb ", " bb..b.....b..b..b..b.....b..b.....b..b..b.....bb ", " bb..b.....b..b..b..b..b..b..b..b..b..b..b.....bb ", " bb..b.....bbbb..b..b..bbbb..bbbb..b..b..bbbb..bb ", " bb............................................bb ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb.....................bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb......b...b...bb.....bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb.....b...b...b....b..bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb....bb..bb.bbbbbbb...bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb...bbbbbbbb......bb..bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb..bbbb...............bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb.bbb.................bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb..........b..b.......bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb.....b...b..b........bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb....b...b..b..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb....b.bbbbbbbbb..............bbbbbbbbbbbbbbbbb ", " bb...bbbb.......bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb..bbb.........b..............bbbbbbbbbbbbbbbbb ", " bb.bbb..........b...bbb........bbbbbbbbbbbbbbbbb ", " bb.........b..b.b..bbbbb.......bbbbbbbbbbbbbbbbb ", " bb.....b..b..b..b..b.bbb.....b.brrrrrrrrrrrrrrbb ", " bb....b..b..b..bb....bbb....bb.brrrrrrrrrrrrrrbb ", " bb...bb.bbbbbbb.b....bbb....bb.brrrrrrrrrrrrrrbb ", " bb..bbbbb......bb...bbbbb...b..brrrrrrrrrrrrrrbb ", " bb.bbb..........b.bbbbbbbbbbb..brrrrrrrrrrrrrrbb ", " bb..............b.b.bbbbbbbbb..brrrrrrrrrrrrrrbb ", " bbbbbbbbbbbbbbbbb.b.b....bbbb..bbbbbbbbbbbbbbbbb ", " bbbbbbbbbbbbbbbbb...b.....b.b..b..............bb ", " bbbbbbbbbbbbbbbbb........bb.bb.b...b..b.......bb ", " bbbbbbbbbbbbbbbb........b..b..b..b..b...b...bb ", " bbbbbbbbbbbbbbbb.......b..b...b.b..b...b....bb ", " bbbbbbbbbbbbbbbbb............b.bbbbbbbbbb...bb ", " bbrrrrrrrrrrrrrrb..........bbbb........bb.bb ", " bbrrrrrrrrrrrrrrrb........bbbb............bb ", " bbrrrrrrrrrrrrrrrbbbbbbbb.......b..b....bb ", " bbrrrrrrrrrrrrrrrrrrbb.....b...b..b..b..bb ", " bbrrrrrrrrrrrrrrrrrbb....b...b..b..b..bb ", " bbrrrrrrrrrrrrrrrrrbb...bb.bbbbbbbb...bb ", " bbbbbbbbbbbbbbbbbbbb...bbbb......bb.bb ", " bbbbbbbbbbbbbbbbbbb..bbb...........b ", " bbbbbbbbbbbbbbbbbbb.bbb...........bb ", " bbbbbbbbbbbbbbbbbb..............bb ", " bbbbbbbbbbbbbbbbb...b.b.b.....bb ", " bbbbbbbbbbbbbbbb..b.b.b..b..bb ", " bbrrrrrrrrrrrbb..bbbbbbb..bb ", " bbrrrrrrrrrrbb.bbb....b.bb ", " bbrrrrrrrrrbb.bb......bb ", " bbbrrrrrrrbb.......bbb ", " bbbbrrrrrbb.....bbbb ", " bbbbrrrbb...bbbb ", " bbbbrbb.bbbb ", " bbbbbbbb ", " bbbb ", " bb ", " " } ; xforms-1.0.93sp1/demos/fd/scrollbar_gui.fd0000644000175000017500000001042511171560225017072 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: scb Width: 470 Height: 230 Number of Objects: 12 -------------------- class: FL_BOX type: UP_BOX box: 0 0 470 230 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SCROLLBAR type: HOR_SCROLLBAR box: 30 15 230 17 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: HOR_SCROLLBAR shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hor callback: noop_cb argument: 0 -------------------- class: FL_SCROLLBAR type: HOR_THIN_SCROLLBAR box: 30 60 230 18 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: HOR_THIN_SCROLLBAR shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hor_thin callback: noop_cb argument: 0 value: 0.11 -------------------- class: FL_SCROLLBAR type: HOR_NICE_SCROLLBAR box: 30 110 230 18 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: HOR_NICE_SCROLLBAR shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hor_nice callback: noop_cb argument: 0 -------------------- class: FL_SCROLLBAR type: VERT_SCROLLBAR box: 300 10 17 185 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vert callback: noop_cb argument: 0 -------------------- class: FL_SCROLLBAR type: VERT_THIN_SCROLLBAR box: 338 10 17 185 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vert_thin callback: noop_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 195 80 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Hide shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hide callback: hide_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 100 195 80 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Deactivate shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: deactivate callback: deactivate_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 200 195 80 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: done_cb argument: 0 -------------------- class: FL_SCROLLBAR type: VERT_NICE_SCROLLBAR box: 370 10 17 185 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vert_nice callback: noop_cb argument: 0 value: 1 -------------------- class: FL_SCROLLBAR type: HOR_PLAIN_SCROLLBAR box: 30 155 230 18 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: HOR_PLAIN_SCROLLBAR shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: noop_cb argument: 0 value: 0.77 slsize: 0.20 -------------------- class: FL_SCROLLBAR type: VERT_PLAIN_SCROLLBAR box: 410 10 17 185 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: noop_cb argument: 0 value: 0.97 slsize: 0.20 ============================== create_the_forms xforms-1.0.93sp1/demos/fd/dim_porsche.xpm0000644000175000017500000001103011171560225016743 0ustar jensjens/* XPM */ static char * dim_porsche[] = { /* porsche pixmap * width height ncolors chars_per_pixel */ "64 64 4 1 ", " c None m None s s_slateblue ", ". c yellow3 m white s s_yellow3 ", "r c red3 m white s s_red3 ", "b c gray40 m black s s_black40 ", /* pixels */ " ", " ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb............................................bb ", " bb..bbbb..bbbb..bbbb..bbbb..bbbb..b..b..bbbb..bb ", " bb..b..b..b..b..b..b..b..b..b..b..b..b..b.....bb ", " bb..b..b..b..b..b..b..b.....b.....b..b..b.....bb ", " bb..bbbb..b..b..bbb...bbbb..b.....bbbb..bbbb..bb ", " bb..b.....b..b..b..b.....b..b.....b..b..b.....bb ", " bb..b.....b..b..b..b..b..b..b..b..b..b..b.....bb ", " bb..b.....bbbb..b..b..bbbb..bbbb..b..b..bbbb..bb ", " bb............................................bb ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb.....................bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb......b...b...bb.....bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb.....b...b...b....b..bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb....bb..bb.bbbbbbb...bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb...bbbbbbbb......bb..bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb..bbbb...............bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb.bbb.................bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb..........b..b.......bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb.....b...b..b........bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb....b...b..b..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb....b.bbbbbbbbb..............bbbbbbbbbbbbbbbbb ", " bb...bbbb.......bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb..bbb.........b..............bbbbbbbbbbbbbbbbb ", " bb.bbb..........b...bbb........bbbbbbbbbbbbbbbbb ", " bb.........b..b.b..bbbbb.......bbbbbbbbbbbbbbbbb ", " bb.....b..b..b..b..b.bbb.....b.brrrrrrrrrrrrrrbb ", " bb....b..b..b..bb....bbb....bb.brrrrrrrrrrrrrrbb ", " bb...bb.bbbbbbb.b....bbb....bb.brrrrrrrrrrrrrrbb ", " bb..bbbbb......bb...bbbbb...b..brrrrrrrrrrrrrrbb ", " bb.bbb..........b.bbbbbbbbbbb..brrrrrrrrrrrrrrbb ", " bb..............b.b.bbbbbbbbb..brrrrrrrrrrrrrrbb ", " bbbbbbbbbbbbbbbbb.b.b....bbbb..bbbbbbbbbbbbbbbbb ", " bbbbbbbbbbbbbbbbb...b.....b.b..b..............bb ", " bbbbbbbbbbbbbbbbb........bb.bb.b...b..b.......bb ", " bbbbbbbbbbbbbbbb........b..b..b..b..b...b...bb ", " bbbbbbbbbbbbbbbb.......b..b...b.b..b...b....bb ", " bbbbbbbbbbbbbbbbb............b.bbbbbbbbbb...bb ", " bbrrrrrrrrrrrrrrb..........bbbb........bb.bb ", " bbrrrrrrrrrrrrrrrb........bbbb............bb ", " bbrrrrrrrrrrrrrrrbbbbbbbb.......b..b....bb ", " bbrrrrrrrrrrrrrrrrrrbb.....b...b..b..b..bb ", " bbrrrrrrrrrrrrrrrrrbb....b...b..b..b..bb ", " bbrrrrrrrrrrrrrrrrrbb...bb.bbbbbbbb...bb ", " bbbbbbbbbbbbbbbbbbbb...bbbb......bb.bb ", " bbbbbbbbbbbbbbbbbbb..bbb...........b ", " bbbbbbbbbbbbbbbbbbb.bbb...........bb ", " bbbbbbbbbbbbbbbbbb..............bb ", " bbbbbbbbbbbbbbbbb...b.b.b.....bb ", " bbbbbbbbbbbbbbbb..b.b.b..b..bb ", " bbrrrrrrrrrrrbb..bbbbbbb..bb ", " bbrrrrrrrrrrbb.bbb....b.bb ", " bbrrrrrrrrrbb.bb......bb ", " bbbrrrrrrrbb.......bbb ", " bbbbrrrrrbb.....bbbb ", " bbbbrrrbb...bbbb ", " bbbbrbb.bbbb ", " bbbbbbbb ", " bbbb ", " bb ", " " } ; xforms-1.0.93sp1/demos/fd/Makefile.am0000644000175000017500000000047311171560225015766 0ustar jensjensinclude $(top_srcdir)/config/common.am CLEANFILES = *.bak *.[ch] EXTRA_DIST = \ dim_porsche.xpm \ porsche.xpm \ buttons_gui.fd \ butttypes_gui.fd \ fbtest_gui.fd \ folder_gui.fd \ formbrowser_gui.fd \ ibrowser_gui.fd \ inputall_gui.fd \ is_gui.fd \ pmbrowse_gui.fd \ scrollbar_gui.fd \ twheel_gui.fd xforms-1.0.93sp1/demos/fd/ibrowser_gui.fd0000644000175000017500000003042111245063550016742 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -2 SnapGrid: 5 =============== FORM =============== Name: ibcanvas Width: 945 Height: 730 Number of Objects: 36 -------------------- class: FL_BOX type: UP_BOX box: 0 0 945 730 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CANVAS type: NORMAL_CANVAS box: 15 50 770 630 boxtype: FL_DOWN_BOX colors: FL_NoColor FL_BLACK alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthWest FL_SouthEast name: canvas callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 830 35 70 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: File shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: browse_file argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 850 695 70 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Quit shortcut: Qq#q^[ resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: callback: quit_callback argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 873 100 60 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: B&\W shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: convert_type argument: FL_IMAGE_MONO -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 813 130 60 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Gray shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: convert_type argument: FL_IMAGE_GRAY -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 873 70 60 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RGB shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: convert_type argument: FL_IMAGE_RGB -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 813 70 60 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Packed shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: convert_type argument: FL_IMAGE_PACKED -------------------- class: FL_TEXT type: NORMAL_TEXT box: 20 10 760 33 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_X gravity: FL_NorthWest FL_NoGravity name: text callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 10 690 230 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthWest FL_SouthWest name: status callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 245 690 475 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_X gravity: FL_SouthWest FL_SouthEast name: error callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 830 440 80 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Write shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: callback: write_image argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 818 477 109 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: format callback: argument: value: 0 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 800 575 135 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: xfloat callback: argument: return: FL_RETURN_END_CHANGED bounds: 0 5 precision: 1 value: 1 step: 0.1 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 800 595 135 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: yfloat callback: argument: return: FL_RETURN_END_CHANGED bounds: 0 5 precision: 1 value: 1 step: 0.1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 800 620 50 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Scale shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: callback: scale_image argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 835 540 75 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Rotate shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: callback: rotate_image argument: 0 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 825 515 100 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: angle callback: argument: bounds: -180 180 precision: 0 sstep: 1 lstep: 5 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 815 655 40 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: FlipX shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: callback: flip_image argument: 'y' -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 865 655 40 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: FlipY shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: callback: flip_image argument: 'x' -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 813 100 60 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CI shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: convert_type argument: FL_IMAGE_CI -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 850 615 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: AA shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: anti_aliasing callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 720 690 70 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: comments shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: comments callback: show_comments argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 815 290 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: SubImage shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: subimage callback: argument: -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 794 359 146 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: level shortcut: resize: FL_RESIZE_ALL gravity: FL_East FL_East name: level callback: window_level argument: 0 bounds: 0 4095 precision: 0 value: 0 slsize: 0.10 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 792 400 148 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: width shortcut: resize: FL_RESIZE_ALL gravity: FL_East FL_East name: width callback: window_level argument: 0 bounds: 0 4095 precision: 0 value: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 803 168 64 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Sharpen shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: convolve_it argument: (long)FL_SHARPEN -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 803 198 64 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Smooth shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: convolve_it argument: (long)FL_SMOOTH -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 803 229 64 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Tint shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: tint_it argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 867 228 69 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Smooth shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: convolve_it argument: (long)FL_SMOOTH -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 867 198 69 29 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: HistoGram shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: enhance_it argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 803 260 64 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Crop shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: crop_it argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 868 260 69 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Border shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: crop_it argument: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 867 168 69 28 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Warp shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthEast FL_NorthEast name: callback: warp_it argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 805 320 55 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Annotate shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: annotate callback: annotate_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 865 320 55 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Render shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: render_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/demos/fd/formbrowser_gui.fd0000644000175000017500000004576311171560225017473 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 7 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: buttonform Width: 430 Height: 210 Number of Objects: 11 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 430 210 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 30 151 80 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 40 91 100 30 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RoundButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 160 160 110 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Round3DButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 170 120 110 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CheckButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 20 50 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LightButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 320 36 80 80 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: PixmapButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: porsche.xpm focus_file: fullpath: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 140 50 100 30 boxtype: FL_ROUNDED3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 290 146 100 30 boxtype: FL_EMBOSSED_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 210 90 60 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_SLATEBLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 130 10 150 30 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Form1 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: staticform Width: 431 Height: 211 Number of Objects: 8 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 431 211 boxtype: FL_FLAT_BOX colors: FL_INDIANRED FL_INDIANRED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_INDIANRED label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 40 40 60 45 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: A Box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 130 30 120 55 boxtype: FL_NO_BOX colors: FL_BLACK FL_INDIANRED alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LabelFrame shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHART type: PIE_CHART box: 270 20 130 105 boxtype: FL_BORDER_BOX colors: FL_INDIANRED FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: chart callback: argument: -------------------- class: FL_CLOCK type: ANALOG_CLOCK box: 30 100 85 85 boxtype: FL_UP_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BITMAP type: NORMAL_BITMAP box: 150 140 30 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: nomail.xbm focus_file: fullpath: 1 -------------------- class: FL_PIXMAP type: NORMAL_PIXMAP box: 210 120 60 60 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: porsche.xpm focus_file: fullpath: 1 -------------------- class: FL_TEXT type: NORMAL_TEXT box: 310 150 70 25 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Text shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: mainform Width: 460 Height: 290 Number of Objects: 8 -------------------- class: FL_BOX type: UP_BOX box: 0 0 460 290 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 381 250 64 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: done callback: done_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 15 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Hide shortcut: #H resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: hide callback: hide_show_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 79 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Show shortcut: #S resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: show callback: hide_show_cb argument: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 155 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: ReShow shortcut: #R resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: reshow callback: reshow_cb argument: 0 -------------------- class: FL_BUTTON type: PUSH_BUTTON box: 217 249 79 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Jump shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: set callback: scroll_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 296 249 69 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Deactivate shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: deactivate callback: deactivate_cb argument: 0 -------------------- class: FL_FORMBROWSER type: NORMAL_FORMBROWSER box: 20 20 420 220 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: formbrowser callback: argument: =============== FORM =============== Name: valuatorform Width: 430 Height: 390 Number of Objects: 13 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 430 390 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 260 180 110 110 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: xvalue: 0.679012 yvalue: 0.71831 -------------------- class: FL_VALSLIDER type: HOR_NICE_SLIDER box: 130 130 250 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.87 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 30 270 110 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: -1.0 -------------------- class: FL_SLIDER type: VERT_NICE_SLIDER box: 10 40 20 160 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.49 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 60 350 150 21 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.10 -------------------- class: FL_SLIDER type: HOR_FILL_SLIDER box: 60 170 159 22 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_SLATEBLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.25 -------------------- class: FL_DIAL type: NORMAL_DIAL box: 160 220 60 58 boxtype: FL_UP_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SCROLLBAR type: VERT_THIN_SCROLLBAR box: 394 14 18 180 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.20 -------------------- class: FL_SCROLLBAR type: HOR_SCROLLBAR box: 170 70 140 16 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.25 -------------------- class: FL_THUMBWHEEL type: VERT_THUMBWHEEL box: 80 70 17 84 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_THUMBWHEEL type: HOR_THUMBWHEEL box: 280 330 90 19 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 100 10 180 30 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Valuator Form shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: choiceform Width: 430 Height: 210 Number of Objects: 6 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 430 210 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 40 70 52 22 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_LEFT_BCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pulldown callback: argument: content: Menu item 1 shortcut: 1#1 content: Menu item 2 shortcut: 2#2 content: Menu Item None mode: FL_PUP_GRAY content: Menu item 3 shortcut: 3#3 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 10 120 111 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: choice callback: argument: content: Choice item 1 shortcut: 1#1 content: Choice item 2 content: Choice item 3 -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 250 10 164 184 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browser callback: argument: content: @c@bBrowser content: This is line #1 of the browser content: This is line #2 of the browser content: This is line #3 of the browser content: This is line #4 of the browser content: This is line #5 of the browser content: This is line #6 of the browser content: This is line #7 of the browser content: @C1This is line #8 of the browser content: This is line #9 of the browser content: @C2This is line #10 of the browser content: This is line #11 of the browser content: This is line #12 of the browser content: This is line #13 of the browser content: @C3This is line #14 of the browser -------------------- class: FL_MENU type: PUSH_MENU box: 150 130 75 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pushmenu callback: argument: content: 1 content: 2 content: 3 content: 4 -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 40 10 170 30 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Choice Form shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: inputform Width: 430 Height: 210 Number of Objects: 3 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 430 210 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: MULTILINE_INPUT box: 70 40 280 90 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: MultiLine\nInput shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 80 152 250 34 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: big Width: 520 Height: 460 Number of Objects: 5 -------------------- class: FL_BOX type: BORDER_BOX box: 0 0 520 460 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_THUMBWHEEL type: VERT_THUMBWHEEL box: 100 50 17 80 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 180 30 180 150 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_XYPLOT type: ACTIVE_XYPLOT box: 30 210 290 210 boxtype: FL_DOWN_BOX colors: FL_BLACK FL_GREEN alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: ActiveXYPlot shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xyplot callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 345 425 170 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: End ofBif FORM shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/demos/fd/.cvsignore0000644000175000017500000000002511171560225015723 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/demos/fd/butttypes_gui.fd0000644000175000017500000000736211171560225017160 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: form0 Width: 360 Height: 330 Number of Objects: 11 -------------------- class: FL_BOX type: UP_BOX box: 0 0 360 330 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: HIDDEN_BUTTON box: 0 0 360 330 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 18 15 107 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Normal shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 -------------------- class: FL_BUTTON type: PUSH_BUTTON box: 18 53 107 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Push shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 18 91 107 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Radio 1 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 value: 1 -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 18 129 107 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Radio 2 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 -------------------- class: FL_BUTTON type: TOUCH_BUTTON box: 18 167 107 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Touch shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 -------------------- class: FL_BUTTON type: INOUT_BUTTON box: 18 205 107 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: InOut shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 -------------------- class: FL_BUTTON type: MENU_BUTTON box: 18 243 107 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 -------------------- class: FL_BUTTON type: RETURN_BUTTON box: 18 281 107 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: button_cb argument: 0 -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 135 15 210 296 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: br callback: button_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/demos/fd/folder_gui.fd0000644000175000017500000003535111223642337016372 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 6 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: buttonform Width: 430 Height: 210 Number of Objects: 10 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 430 210 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 30 151 80 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 40 91 100 30 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RoundButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 135 151 110 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Round3DButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 170 111 110 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CheckButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 30 31 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LightButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 320 36 80 80 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: PixmapButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: porsche.xpm fullpath: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 185 26 100 30 boxtype: FL_ROUNDED3D_UPBOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 290 146 100 30 boxtype: FL_EMBOSSED_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 175 71 60 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_SLATEBLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: staticform Width: 431 Height: 211 Number of Objects: 8 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 431 211 boxtype: FL_FLAT_BOX colors: FL_INDIANRED FL_INDIANRED alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_INDIANRED label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 40 40 60 45 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: A Box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 130 30 120 55 boxtype: FL_NO_BOX colors: FL_BLACK FL_INDIANRED alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LabelFrame shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHART type: PIE_CHART box: 270 20 130 105 boxtype: FL_BORDER_BOX colors: FL_INDIANRED FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: chart callback: argument: -------------------- class: FL_CLOCK type: ANALOG_CLOCK box: 30 100 85 85 boxtype: FL_UP_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BITMAP type: NORMAL_BITMAP box: 150 140 30 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAP type: NORMAL_PIXMAP box: 210 120 60 60 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 310 150 70 25 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Text shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: mainform Width: 461 Height: 291 Number of Objects: 8 -------------------- class: FL_BOX type: UP_BOX box: 0 0 461 291 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 381 250 64 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: done callback: done_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 15 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Hide shortcut: #H resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hide callback: hide_show_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 79 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Show shortcut: #S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: show callback: hide_show_cb argument: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 155 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: ReShow shortcut: #R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: reshow callback: reshow_cb argument: 0 -------------------- class: FL_TABFOLDER type: TOP_TABFOLDER box: 15 11 435 230 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: folder callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 232 249 64 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Set shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: set callback: set_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 296 249 69 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Deactivate shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: deactivate callback: deactivate_cb argument: 0 =============== FORM =============== Name: valuatorform Width: 431 Height: 211 Number of Objects: 10 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 431 211 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 280 50 82 72 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: xvalue: 0.679012 yvalue: 0.71831 -------------------- class: FL_VALSLIDER type: HOR_NICE_SLIDER box: 55 10 240 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.87 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 130 110 110 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: -1.0 -------------------- class: FL_SLIDER type: VERT_NICE_SLIDER box: 10 30 20 160 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.49 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 70 170 150 21 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.10 -------------------- class: FL_SLIDER type: HOR_FILL_SLIDER box: 69 57 159 22 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_SLATEBLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.25 -------------------- class: FL_DIAL type: NORMAL_DIAL box: 60 90 60 58 boxtype: FL_UP_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SCROLLBAR type: VERT_THIN_SCROLLBAR box: 394 14 18 180 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.20 -------------------- class: FL_SCROLLBAR type: HOR_SCROLLBAR box: 238 158 140 16 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.25 =============== FORM =============== Name: choiceform Width: 431 Height: 211 Number of Objects: 5 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 431 211 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 45 36 45 21 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_LEFT_BCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pulldown callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 24 93 111 27 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: choice callback: argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 257 14 154 179 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browser callback: argument: -------------------- class: FL_MENU type: PUSH_MENU box: 152 51 75 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pushmenu callback: argument: =============== FORM =============== Name: inputform Width: 430 Height: 210 Number of Objects: 3 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 430 210 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: MULTILINE_INPUT box: 70 20 280 90 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: MultiLine\nInput shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 80 132 250 34 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Input shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/demos/fd/fbtest_gui.fd0000644000175000017500000000505611171560225016402 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: fbform Width: 371 Height: 361 Number of Objects: 7 -------------------- class: FL_BOX type: UP_BOX box: 0 0 371 361 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 20 50 240 290 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browser callback: argument: -------------------- class: FL_CHECKBUTTON type: RADIO_BUTTON box: 270 50 70 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: AlphaSort shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: sort_method_cb argument: FL_ALPHASORT value: 1 -------------------- class: FL_CHECKBUTTON type: RADIO_BUTTON box: 270 85 70 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: SizeSort shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: sort_method_cb argument: FL_SIZESORT -------------------- class: FL_CHECKBUTTON type: RADIO_BUTTON box: 270 120 70 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: TimeSort shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: sort_method_cb argument: FL_MTIMESORT -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 275 310 75 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: done_cb argument: 0 -------------------- class: FL_TEXT type: NORMAL_TEXT box: 10 15 220 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: total callback: argument: ============================== create_the_forms xforms-1.0.93sp1/demos/fd/pmbrowse_gui.fd0000644000175000017500000000346611171560225016754 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: ttt Width: 330 Height: 320 Number of Objects: 5 -------------------- class: FL_BOX type: UP_BOX box: 0 0 330 320 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BITMAP type: NORMAL_BITMAP box: 30 20 270 240 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: bm callback: argument: -------------------- class: FL_PIXMAP type: NORMAL_PIXMAP box: 30 20 270 240 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pm callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 220 280 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: done callback: done argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 280 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Load shortcut: L resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: load callback: reload argument: 0 ============================== create_the_forms xforms-1.0.93sp1/demos/fd/Makefile.in0000644000175000017500000002445211377311601016002 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = demos/fd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D CLEANFILES = *.bak *.[ch] EXTRA_DIST = \ dim_porsche.xpm \ porsche.xpm \ buttons_gui.fd \ butttypes_gui.fd \ fbtest_gui.fd \ folder_gui.fd \ formbrowser_gui.fd \ ibrowser_gui.fd \ inputall_gui.fd \ is_gui.fd \ pmbrowse_gui.fd \ scrollbar_gui.fd \ twheel_gui.fd all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign demos/fd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign demos/fd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/demos/fdial.c0000644000175000017500000000671211253656054014575 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This is an example of the use of filled dials, dial range * and dial direction. * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_FORM *form; FL_OBJECT *button, *red, *green, *blue, *redtext, *greentext, *bluetext, *result; /*************************************** ***************************************/ void makeform( void ) { form = fl_bgn_form( FL_UP_BOX, 300, 330 ); button = fl_add_button( FL_NORMAL_BUTTON, 45, 15, 210, 45, "A Color Editor" ); fl_set_object_lsize( button, FL_LARGE_SIZE ); red = fl_add_dial( FL_FILL_DIAL, 30, 240, 60, 60, "Red" ); fl_set_dial_bounds( red, 0.0, 255.0 ); fl_set_dial_value( red, 128.0 ); fl_set_object_color( red, FL_DIAL_COL1, FL_RED ); fl_set_object_return( red, FL_RETURN_CHANGED ); redtext = fl_add_box( FL_DOWN_BOX, 105, 255, 50, 25, "" ); green = fl_add_dial( FL_FILL_DIAL, 30, 155, 60, 60, "Green" ); fl_set_dial_bounds( green, 0.0, 255.0 ); fl_set_dial_value( green, 128.0 ); fl_set_dial_angles( green, 45.0, 360 - 45.0 ); fl_set_object_color( green, FL_DIAL_COL1, FL_GREEN ); fl_set_object_return( green, FL_RETURN_CHANGED ); greentext = fl_add_box( FL_DOWN_BOX, 105, 170, 50, 25,"" ); blue = fl_add_dial( FL_FILL_DIAL, 30, 70, 60, 60, "Blue" ); fl_set_dial_bounds( blue, 0.0, 255.0 ); fl_set_dial_value( blue, 128.0 ); fl_set_object_color( blue, FL_DIAL_COL1, FL_BLUE ); fl_set_dial_direction( blue, FL_DIAL_CCW ); fl_set_object_return( blue, FL_RETURN_CHANGED ); bluetext = fl_add_box( FL_DOWN_BOX, 105, 90, 50, 25, "" ); result = fl_add_box( FL_DOWN_BOX, 180, 70, 90, 245, "" ); fl_set_object_color( result, FL_FREE_COL1, FL_FREE_COL1 ); fl_set_object_dblbuffer( result, 1 ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *ret; int r, g, b; char str[ 100 ]; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); makeform( ); fl_show_form( form, FL_PLACE_MOUSE, FL_TRANSIENT, "A Form" ); do { r = fl_get_dial_value( red ) + 0.001; g = fl_get_dial_value( green ) + 0.001; b = fl_get_dial_value( blue ) + 0.001; fl_mapcolor( FL_FREE_COL1, r, g, b ); fl_redraw_object( result ); sprintf( str, "%d", r ); fl_set_object_label( redtext, str ); sprintf( str, "%d", g ); fl_set_object_label( greentext, str ); sprintf( str, "%d", b ); fl_set_object_label( bluetext, str ); ret = fl_do_forms( ); } while ( ret != button ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/menubar.c0000644000175000017500000000461211203636407015137 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * menubar routines demo. * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "bm1.xbm" #include "bm2.xbm" typedef struct { FL_FORM * menubar; void * vdata; long ldata; } FD_menubar; extern FD_menubar *create_form_menubar( void ); /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob, long data ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_menubar *fd_menubar; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_menubar = create_form_menubar( ); fl_show_form( fd_menubar->menubar, FL_PLACE_CENTER, FL_FULLBORDER, "menubar" ); while ( fl_do_forms( ) ) /* empty */ ; return 0; } FL_PUP_ENTRY file_menu[] = { { "_Open" }, { "Save" }, { "_Save As ..." }, { "Exit" }, { NULL } }; /*************************************** ***************************************/ FD_menubar * create_form_menubar( void ) { FL_OBJECT *obj; FD_menubar *fdui = fl_calloc( 1, sizeof *fdui ); fdui->menubar = fl_bgn_form( FL_NO_BOX, 325, 175 ); fl_add_box( FL_UP_BOX, 0, 0, 325, 175, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 140, 60, 25, "Done" ); fl_set_object_callback( obj, done_cb, 0 ); fl_add_menubar( 0, 0, 0, 325, 30, "test" ); fl_end_form( ); fl_set_menubar( obj, "File|Message|Find" ); fl_set_menubar_entries( obj,"File", file_menu ); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/demos/pushme.c0000644000175000017500000000245011203636407015005 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *simpleform; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); simpleform = fl_bgn_form( FL_UP_BOX, 230, 160 ); fl_add_button( FL_NORMAL_BUTTON, 40, 50, 150, 60, "Push Me" ); fl_end_form( ); fl_show_form( simpleform, FL_PLACE_MOUSE, FL_NOBORDER, "PushMe" ); fl_do_forms( ); fl_hide_form( simpleform ); return 0; } xforms-1.0.93sp1/demos/demo27.c0000644000175000017500000001746011316205261014603 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /** * \file demo27.c * * This demo shows the use of event callbacks and form callbacks. * purposesly mixed form callback, object callback and event callback * to show the flexibility of Forms Library's event handling (and * test if they actually work together). * * This file is part of xforms package * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" Window main_win; /*------------ Color Part --------------------*/ FL_FORM *colorform; FL_OBJECT *redsl, *greensl, *bluesl, *colorobj; int r = 128, g = 128, b = 128; /*************************************** * color form callback routine ***************************************/ void color_callback( FL_OBJECT * obj FL_UNUSED_ARG, void * d FL_UNUSED_ARG ) { r = 255 * fl_get_slider_value( redsl ); g = 255 * fl_get_slider_value( greensl ); b = 255 * fl_get_slider_value( bluesl ); fl_mapcolor( FL_FREE_COL1, r, g, b ); fl_redraw_object( colorobj ); } /*************************************** ***************************************/ void create_colorform( void ) { FL_OBJECT *obj; if ( colorform ) return; colorform = fl_bgn_form( FL_NO_BOX, 315, 190 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 315, 190, "" ); bluesl = obj = fl_add_slider( FL_HOR_SLIDER, 20, 25, 220, 35, "" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); redsl = obj = fl_add_slider( FL_HOR_SLIDER, 20, 135, 220, 35, "" ); fl_set_object_color( obj, FL_COL1, FL_RED ); greensl = obj = fl_add_slider( FL_HOR_SLIDER, 20, 80, 220, 35, "" ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); colorobj = obj = fl_add_box( FL_BORDER_BOX, 250, 25, 50, 145, "" ); fl_set_object_color( obj, FL_FREE_COL1, FL_FREE_COL1 ); fl_end_form( ); } /*************************************** * initializes the color part ***************************************/ void init_colorpart( void ) { create_colorform( ); fl_set_form_callback( colorform, color_callback, 0 ); fl_set_form_position( colorform, 20, -300 - colorform->h ); fl_show_form( colorform, FL_PLACE_GEOMETRY, FL_TRANSIENT, "Color" ); fl_mapcolor( FL_FREE_COL1,r,g,b ); fl_redraw_object( colorobj ); } /*--------------- Control Part -------------------*/ FL_FORM * controlform; FL_OBJECT * squareobj, * exitobj, * sizeobj; int curobj = 1, cursize = 20; /*************************************** ***************************************/ void select_object( FL_OBJECT * ob FL_UNUSED_ARG, long which ) { curobj = which; } void clearit( FL_OBJECT *, long ); /*************************************** * control form callback routine ***************************************/ void control_callback( FL_OBJECT * obj, void * d FL_UNUSED_ARG ) { if ( obj == sizeobj ) cursize = 40 * fl_get_slider_value( sizeobj ); else if ( obj == exitobj ) { fl_finish( ); exit( 0 ); } } /*************************************** ***************************************/ void create_controlform( void ) { FL_OBJECT *obj; controlform = fl_bgn_form( FL_UP_BOX, 260, 230 ); fl_bgn_group( ); squareobj = obj = fl_add_button( FL_RADIO_BUTTON, 20, 150, 60, 60, "@square" ); fl_set_object_lcol( obj, FL_YELLOW ); fl_set_object_callback( obj, select_object, 1 ); obj = fl_add_button( FL_RADIO_BUTTON, 20, 90, 60, 60, "@circle" ); fl_set_object_lcol( obj, FL_YELLOW ); fl_set_object_callback( obj, select_object, 2 ); obj = fl_add_button( FL_RADIO_BUTTON, 20, 30, 60, 60, "@8>" ); fl_set_object_lcol( obj, FL_YELLOW ); fl_set_object_callback( obj, select_object, 3 ); fl_end_group( ); exitobj = fl_add_button( FL_NORMAL_BUTTON, 160, 30, 80, 30, "Exit" ); obj = fl_add_button( FL_NORMAL_BUTTON, 160, 180, 80, 30, "Clear" ); fl_set_object_callback( obj, clearit, 0 ); sizeobj = fl_add_slider( FL_VERT_SLIDER, 100, 30, 40, 180, "size" ); fl_set_slider_bounds( sizeobj, 0.025, 1.0 ); fl_end_form( ); } /*************************************** * initializes the control part ***************************************/ void init_controlpart( void ) { create_controlform( ); fl_set_form_callback( controlform, control_callback, 0 ); fl_set_button( squareobj, 1 ); fl_set_form_geometry( controlform, 20, -controlform->h - 40, controlform->w, controlform->h ); fl_show_form( controlform, FL_PLACE_SIZE, FL_TRANSIENT, "Control" ); } /*--------------- Main part -------------------*/ typedef struct{ int type, r, g, b, x, y, size; } OBJ; OBJ ob[ 10000 ]; int onumb = 0; /*************************************** ***************************************/ void drawit( OBJ * obj ) { fl_winset( main_win ); fl_mapcolor( FL_FREE_COL1, obj->r, obj->g, obj->b ); if ( obj->type == 1 ) fl_rectf( obj->x - obj->size, obj->y - obj->size, 2 * obj->size, 2 * obj->size, FL_FREE_COL1 ); else if ( obj->type == 2 ) fl_circf( obj->x, obj->y, obj->size, FL_FREE_COL1 ); else if ( obj->type == 3 ) { FL_POINT point[ 3 ]; point[ 0 ].x = obj->x - obj->size; point[ 0 ].y = obj->y + obj->size; point[ 1 ].x = obj->x + obj->size; point[ 1 ].y = obj->y + obj->size; point[ 2 ].x = obj->x; point[ 2 ].y = obj->y - obj->size; fl_polyf( point, 3, FL_FREE_COL1 ); } } /*************************************** * draws a particular object ***************************************/ void drawobject( void ) { FL_Coord x0, y0; unsigned int km; OBJ *cur_obj = ob + onumb; fl_get_win_mouse( main_win, &x0, &y0, &km ); cur_obj->x = x0 ; cur_obj->y = y0 ; cur_obj->r = r; cur_obj->g = g; cur_obj->b = b; cur_obj->type = curobj; cur_obj->size = cursize; drawit( cur_obj ); onumb++; } /*************************************** ***************************************/ void redrawit( void ) { int i; XClearWindow( fl_display, main_win ); for ( i = 0; i < onumb; i++ ) drawit( ob + i ); } /*************************************** ***************************************/ void clearit( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { onumb = 0; redrawit( ); } /*************************************** * Event callback routine ***************************************/ int main_callback( XEvent * xev, void * p FL_UNUSED_ARG ) { fl_winset( main_win ); if ( xev->type == Expose ) redrawit( ); else if ( xev->type == ButtonPress ) drawobject( ); return 0; } /*************************************** ***************************************/ void init_mainpart( void ) { fl_pref_wingeometry( 400, 300, 400, 400 ); fl_pref_winsize( 400, 400 ); fl_winbackground( 0, fl_get_flcolor( FL_COL1 ) ); main_win = fl_winopen( "Drawing" ); fl_set_event_callback( main_callback, 0 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); init_colorpart( ); init_controlpart( ); init_mainpart( ); color_callback( colorobj, 0 ); while ( fl_do_forms( ) ) /* empty */ ; return( 0 ); } xforms-1.0.93sp1/demos/timer.c0000644000175000017500000001114411203636407014624 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * timer routine tester * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include /**** Callback routines ****/ extern void expired( FL_OBJECT *, long ); extern void suspend_resume( FL_OBJECT *, long ); extern void reset( FL_OBJECT *, long ); extern void timer_direction( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * timerform; void * vdata; long ldata; FL_OBJECT * timer; FL_OBJECT * down; } FD_timerform; extern FD_timerform * create_form_timerform( void ); #define T 20 FD_timerform *fd_timerform; /*************************************** * callbacks for form timer form ***************************************/ void suspend_resume( FL_OBJECT * ob FL_UNUSED_ARG, long data ) { if ( data ) fl_resume_timer( fd_timerform->timer ); else fl_suspend_timer( fd_timerform->timer ); } /*************************************** ***************************************/ void reset( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_set_timer( fd_timerform->timer, T ); } /*************************************** ***************************************/ void timer_direction( FL_OBJECT * ob FL_UNUSED_ARG, long data ) { fl_set_timer_countup( fd_timerform->timer, data ); } /*************************************** ***************************************/ void expired( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { if ( fl_show_question( "Expired!\n\nQuit?", 0 ) == 1 ) { fl_finish( ); exit( 0 ); } else fl_set_timer( fd_timerform->timer, T ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_set_border_width( -2 ); fl_initialize( &argc, argv, 0, 0, 0 ); fd_timerform = create_form_timerform( ); /* fill-in form initialization code */ fl_set_timer( fd_timerform->timer, T ); fl_set_button( fd_timerform->down, 1 ); /* show the first form */ fl_show_form( fd_timerform->timerform, FL_PLACE_CENTER, FL_FULLBORDER, "timerform" ); fl_do_forms( ); return 0; } /*************************************** * Form definition file generated with fdesign ***************************************/ FD_timerform * create_form_timerform( void ) { FL_OBJECT *obj; FD_timerform *fdui = fl_calloc(1, sizeof *fdui ); fdui->timerform = fl_bgn_form( FL_NO_BOX, 290, 210 ); fl_add_box( FL_UP_BOX, 0, 0, 290, 210, "" ); fl_add_frame( FL_UP_FRAME, 0, 0, 290, 94, "" ); fl_add_frame( FL_UP_FRAME, 0, 100, 330, 190, "" ); fl_add_button( FL_NORMAL_BUTTON, 100, 170, 80, 30, "Done" ); fdui->timer = obj = fl_add_timer( FL_VALUE_TIMER, 20, 30, 180, 40, "Timer" ); fl_set_object_boxtype( obj, FL_UP_BOX ); fl_set_object_lsize( obj, FL_MEDIUM_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_lstyle( obj, FL_TIMES_STYLE ); fl_set_object_callback( obj, expired, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 20, 120, 80, 30, "Suspend" ); fl_set_object_callback( obj, suspend_resume, 0); obj = fl_add_button( FL_NORMAL_BUTTON, 100, 120, 80, 30, "Resume" ); fl_set_object_callback( obj, suspend_resume, 1 ); obj = fl_add_button( FL_NORMAL_BUTTON, 180, 120, 80, 30, "Reset" ); fl_set_object_callback( obj, reset, 0 ); obj = fdui->down = fl_add_checkbutton( FL_RADIO_BUTTON, 210, 20, 70, 30, "Down" ); fl_set_object_shortcut( obj, "D#D", 1 ); fl_set_object_callback( obj, timer_direction, 0 ); obj = fl_add_checkbutton( FL_RADIO_BUTTON, 210, 50, 70, 30, "Up" ); fl_set_object_shortcut( obj, "U#U", 1 ); fl_set_object_callback( obj, timer_direction, 1 ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/new_popup.c0000644000175000017500000001326611203636407015527 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ int style_cb( FL_POPUP_RETURN *r ) { int style, size, mod; fl_popup_entry_get_font( r->user_data, &style, &size ); mod = style & ( FL_SHADOW_STYLE | FL_ENGRAVED_STYLE | FL_EMBOSSED_STYLE ); fl_popup_entry_set_font( r->user_data, r->val | mod, size ); return FL_IGNORE; } /*************************************** ***************************************/ int size_cb( FL_POPUP_RETURN *r ) { int style; fl_popup_entry_get_font( r->user_data, &style, NULL ); fl_popup_entry_set_font( r->user_data, style, r->val ); fl_popup_get_title_font( r->user_data, &style, NULL ); fl_popup_set_title_font( r->user_data, style, r->val ); return FL_IGNORE; } /*************************************** ***************************************/ int mod_cb( FL_POPUP_RETURN *r ) { int style, size; fl_popup_entry_get_font( r->user_data, &style, &size ); style &= ~ ( FL_SHADOW_STYLE | FL_ENGRAVED_STYLE | FL_EMBOSSED_STYLE ); fl_popup_entry_set_font( r->user_data, style | r->val, size ); return FL_IGNORE; } /*************************************** ***************************************/ int pol_cb( FL_POPUP_RETURN *r ) { FL_POPUP_ENTRY *e; for ( e = r->popup->entries; e != NULL; e = e->next ) if ( e != r->entry ) fl_popup_entry_clear_state( e, FL_POPUP_CHECKED ); fl_popup_set_policy( r->user_data, r->val ); return FL_IGNORE; } /*************************************** ***************************************/ void do_pup( FL_OBJECT * obj, long q FL_UNUSED_ARG ) { static FL_POPUP *m = NULL, *sm1, *sm2, *sm3, *sm4; if ( m == NULL ) { m = fl_popup_add( FL_ObjWin( obj ), "Popup" ); sm1 = fl_popup_add( FL_ObjWin( obj ), NULL ); sm2 = fl_popup_add( FL_ObjWin( obj ), NULL ); sm3 = fl_popup_add( FL_ObjWin( obj ), NULL ); sm4 = fl_popup_add( FL_ObjWin( obj ), NULL ); fl_popup_add_entries( sm4, "FL_POPUP_NORMAL_SELECT%T%x%u%f", FL_POPUP_NORMAL_SELECT, m, pol_cb ); fl_popup_add_entries( sm4, "FL_POPUP_DRAG_SELECT%t%x%u%f", FL_POPUP_DRAG_SELECT, m, pol_cb ); fl_popup_add_entries( sm3, "None%x%R%u%f", 0, 1, m, mod_cb ); fl_popup_add_entries( sm3, "FL_SHADOW_STYLE%x%r%u%f", FL_SHADOW_STYLE, 1, m, mod_cb ); fl_popup_add_entries( sm3, "FL_ENGRAVED_STYLE%x%r%u%f", FL_ENGRAVED_STYLE, 1, m, mod_cb ); fl_popup_add_entries( sm3, "FL_EMBOSSED_STYLE%x%r%u%f", FL_EMBOSSED_STYLE, 1, m, mod_cb ); fl_popup_add_entries( sm1, "FL_NORMAL_STYLE%Sn%x%R%u%f%s", FL_NORMAL_STYLE, 1, m, style_cb, "n" ); fl_popup_add_entries( sm1, "FL_BOLD_STYLE%Sb%x%r%u%f%s", FL_BOLD_STYLE, 1, m, style_cb, "b" ); fl_popup_add_entries( sm1, "FL_ITALIC_STYLE%Si%x%r%u%f%s", FL_ITALIC_STYLE, 1, m, style_cb, "i" ); fl_popup_add_entries( sm1, "FL_BOLDITALIC_STYLE%SI%x%r%u%f%s", FL_BOLDITALIC_STYLE, 1, m, style_cb, "I" ); fl_popup_add_entries( sm1, "%l|Font modifier%SCtrl-M%m%s", sm3, "^m" ); fl_popup_add_entries( sm2, "FL_TINY_SIZE%x%r%u%f", FL_TINY_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_SMALL_SIZE%x%r%u%f", FL_SMALL_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_NORMAL_SIZE%x%R%u%f", FL_NORMAL_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_MEDIUM_SIZE%x%r%u%f", FL_MEDIUM_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_LARGE_SIZE%x%r%u%f", FL_LARGE_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_HUGE_SIZE%x%r%u%f", FL_HUGE_SIZE, 1, m, size_cb ); fl_popup_add_entries( m, "Font style%m", sm1 ); fl_popup_add_entries( m, "Font size%m", sm2 ); fl_popup_add_entries( m, "Policy%m", sm4 ); fl_popup_set_min_width( m, 100 ); } if ( fl_get_button_numb( obj ) >= FL_SHORTCUT ) fl_popup_set_position( m, obj->form->x + obj->x, obj->form->y + obj->y + obj->h ); fl_popup_do( m ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 260, 210 ); fl_add_box( FL_UP_BOX, 0, 0, 260, 210, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 150, 150, 90, 35, "Done" ); fl_set_object_callback( obj, done_cb, 0 ); obj = fl_add_button( FL_MENU_BUTTON, 30, 90, 100, 30, "Popup" ); fl_set_button_shortcut( obj, "Pp#p", 1 ); fl_set_object_callback( obj, do_pup, 0 ); fl_end_form( ); /* initialize */ fl_show_form( form, FL_PLACE_MOUSE, FL_TRANSIENT, "New Popup Demo" ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/minput.c0000644000175000017500000000351611316467556015040 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /*************************************** ***************************************/ void input_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int x, y; fl_get_input_cursorpos( ob, &x , &y ); fprintf( stderr," x = %d y = %d\n", x, y ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *but, *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 400, 450 ); fl_add_input( FL_MULTILINE_INPUT, 30, 270, 340, 150, "" ); obj = fl_add_input( FL_MULTILINE_INPUT, 30, 90, 340, 150, "" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, input_cb, 0 ); but = fl_add_button( FL_NORMAL_BUTTON, 160, 30, 80, 30, "Exit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_CENTERFREE, FL_FULLBORDER, "MultiLineInput" ); do obj = fl_do_forms( ); while ( obj != but ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/browserall.c0000644000175000017500000001716711212213732015663 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This is a demo that shows the different types of browsers. * * This file is part of xforms package * M. Overmars and T.C. Zhao (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" FL_FORM *form; FL_OBJECT *br[ 4 ], *exitobj, *readout; static void create_form( void ); static void fill_browsers( void ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form( ); fill_browsers( ); fl_show_form( form,FL_PLACE_CENTER | FL_FREE_SIZE, FL_TRANSIENT, "All Browsers" ); fl_do_forms( ); fl_hide_form( form ); return 0; } static const char *bnames[ ] = { "NORMAL_BROWSER", "SELECT_BROWSER", "HOLD_BROWSER", "MULTI_BROWSER" }; /*************************************** ***************************************/ static void deselect( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { int i; for ( i = 0; i < 4; i++ ) fl_deselect_browser( br[ i ] ); } /*************************************** ***************************************/ static void set_size( FL_OBJECT * obj FL_UNUSED_ARG, long arg ) { int i; for ( i = 0; i < 4; i++ ) fl_set_browser_fontsize( br[ i ], arg ); } /*************************************** ***************************************/ static void set_style( FL_OBJECT * obj FL_UNUSED_ARG, long arg ) { int i; for ( i = 0; i < 4; i++ ) fl_set_browser_fontstyle( br[ i ], arg ); } /*************************************** ***************************************/ static void br_callback( FL_OBJECT * ob, long arg ) { char buf[ 1024 ]; const char *mb[ ] = { "left", "middle", "right", "scroll-up", "scroll-down" }; int i; if ( ( i = fl_mouse_button( ) ) >= FL_LEFT_MOUSE && i <= FL_SCROLLDOWN_MOUSE ) sprintf( buf, "In %s [%s]: ", bnames[ arg ], mb[ i - FL_LEFT_MOUSE ] ); else sprintf( buf, "In %s: ", bnames[ arg ] ); if ( ( i = fl_get_browser( ob ) ) ) { strcat( buf, fl_get_browser_line( ob, i > 0 ? i : -i ) ); strcat( buf, i > 0 ? " was selected" : " was deselected." ); } fl_set_object_label( readout, buf ); } /*************************************** ***************************************/ static void vcallback( FL_OBJECT * ob FL_UNUSED_ARG, int topline FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { int i; int yoffset = fl_get_browser_yoffset( br[ 0 ] ); for ( i = 1; i < 4; i++ ) fl_set_browser_yoffset( br[ i ], yoffset ); } /*************************************** ***************************************/ static void link_browsers( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int sync = fl_get_button( ob ); int i; fl_set_object_label( ob, sync ? "Unlink": "Link" ); if ( sync ) { int yoffset = fl_get_browser_yoffset( br[ 0 ] ); for ( i = 1; i < 4; i++ ) { fl_set_browser_vscrollbar( br[ i ], FL_OFF ); fl_set_browser_yoffset( br[ i ], yoffset ); } fl_set_browser_vscroll_callback( br[ 0 ], vcallback, 0 ); } else { for ( i = 1; i < 4; i++ ) fl_set_browser_vscrollbar( br[ i ], FL_ON ); fl_set_browser_vscroll_callback( br[ 0 ], NULL, 0 ); } } /*************************************** ***************************************/ static void create_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_UP_BOX, 700, 570 ); readout = fl_add_text( FL_NORMAL_TEXT, 50, 30, 600, 50, "" ); fl_set_object_lsize( readout, FL_NORMAL_SIZE ); fl_set_object_lalign( readout, FL_ALIGN_CENTER ); fl_set_object_lstyle( readout, FL_BOLD_STYLE ); fl_set_object_boxtype( readout, FL_UP_BOX ); fl_set_object_color( readout, FL_MAGENTA, FL_MAGENTA ); br[ 0 ] = obj = fl_add_browser( FL_NORMAL_BROWSER, 20, 120, 150, 290, bnames[ 0 ] ); fl_set_object_callback( obj, br_callback, 0 ); br[ 1 ] = obj = fl_add_browser( FL_SELECT_BROWSER, 190, 120, 150, 290, bnames[ 1 ] ); fl_set_object_callback( obj, br_callback, 1 ); br[ 2 ] = obj = fl_add_browser( FL_HOLD_BROWSER, 360, 120, 150, 290, bnames[ 2 ] ); fl_set_object_color( obj, FL_WHITE, FL_GREEN ); fl_set_object_callback( obj, br_callback, 2 ); br[ 3 ] = obj = fl_add_browser( FL_MULTI_BROWSER, 530, 120, 150, 290, bnames[ 3 ] ); fl_set_object_color( obj,FL_WHITE, FL_CYAN ); fl_set_object_callback( obj, br_callback, 3 ); exitobj = fl_add_button( FL_NORMAL_BUTTON, 560, 510, 120, 30, "Exit" ); obj = fl_add_button( FL_NORMAL_BUTTON, 560, 460, 120, 30, "Deselect" ); fl_set_object_callback( obj, deselect, 0 ); fl_bgn_group( ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 20, 500, 100, 30, "Tiny" ); fl_set_object_lsize( obj, FL_TINY_SIZE ); fl_set_object_callback( obj, set_size, obj->lsize ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 130, 500, 100, 30, "Small" ); fl_set_object_lsize( obj, FL_SMALL_SIZE ); fl_set_object_callback( obj, set_size, obj->lsize ); fl_set_button( obj, 1 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 240, 500, 100, 30, "Normal" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, set_size, obj->lsize ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 350, 500, 100, 30, "Large" ); fl_set_object_lsize( obj, FL_LARGE_SIZE ); fl_set_object_callback( obj, set_size, obj->lsize ); obj = fl_add_button( FL_BUTTON, 470, 510, 45,30, "Link" ); fl_set_object_callback( obj, link_browsers, 0 ); fl_end_group( ); fl_bgn_group( ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 20, 450, 100, 30, "Normal" ); fl_set_object_callback( obj, set_style, FL_NORMAL_STYLE ); fl_set_button( obj, 1 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 120, 450, 100, 30, "Bold" ); fl_set_object_callback( obj, set_style, FL_BOLD_STYLE ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 220, 450, 100, 30, "Italic" ); fl_set_object_callback( obj, set_style, FL_ITALIC_STYLE ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 320, 450, 100, 30, "BoldItalic" ); fl_set_object_callback( obj, set_style, FL_BOLDITALIC_STYLE ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 420, 450, 100, 30, "Fixed" ); fl_set_object_callback( obj, set_style, FL_FIXED_STYLE ); fl_end_group( ); fl_end_form( ); } /*************************************** ***************************************/ static void fill_browsers( void ) { int i, j; char buf[ 128 ]; for ( i = 0; i < 4; i++ ) for ( j = 1; j <= 100; j++ ) { if ( j == 5 || j == 6 ) sprintf( buf, "@NLine with qb %3d", j ); else if ( j == 10 ) strcpy( buf, "@-trailing text should be ignored" ); else if ( j == 40 ) sprintf( buf, "@mLine with qb %3d", j ); else sprintf( buf, "Line with qb %3d",j ); fl_add_browser_line( br[ i ], buf ); } } xforms-1.0.93sp1/demos/demo06.c0000644000175000017500000000554311203636407014604 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* A demo of the forms library using light buttons for radio buttons and input fields. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_FORM *form; FL_OBJECT *but; /*************************************** ***************************************/ void make_form1( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_UP_BOX, 500, 400 ); fl_bgn_group( ); obj = fl_add_box( FL_UP_BOX, 150, 295, 300, 65, "Children " ); fl_set_object_lalign( obj, FL_ALIGN_LEFT); fl_add_lightbutton( FL_RADIO_BUTTON, 175, 310, 50, 35, "1" ); fl_add_lightbutton( FL_RADIO_BUTTON, 241, 310, 50, 35, "2" ); fl_add_lightbutton( FL_RADIO_BUTTON, 308, 310, 50, 35, "3" ); fl_add_lightbutton( FL_RADIO_BUTTON, 375, 310, 50, 35, "4" ); fl_end_group( ); fl_bgn_group( ); obj = fl_add_box( FL_UP_BOX, 150, 230, 300, 65, "Married " ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_add_lightbutton( FL_RADIO_BUTTON, 175, 245, 100, 35, "Yes" ); fl_add_lightbutton( FL_RADIO_BUTTON, 325, 245, 100, 35, "No" ); fl_end_group( ); fl_bgn_group( ); obj = fl_add_box( FL_UP_BOX, 150, 165, 300, 65, "Sex " ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_add_lightbutton( FL_RADIO_BUTTON, 175, 180, 100, 35, "Male" ); fl_add_lightbutton( FL_RADIO_BUTTON, 325, 180, 100, 35, "Female" ); fl_end_group( ); fl_add_input( FL_NORMAL_INPUT, 150, 30, 300, 30, "Name " ); fl_add_input( FL_NORMAL_INPUT, 150, 75, 300, 30, "Address " ); fl_add_input( FL_NORMAL_INPUT, 150, 120, 300, 30, "City " ); but = fl_add_button( FL_NORMAL_BUTTON, 25, 360, 75, 30, "OK" ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); make_form1( ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "Demo06" ); while ( 1 ) { do obj = fl_do_forms( ); while ( obj != but ); if ( fl_show_question( "Do you really want to Quit?", 0 )) { fl_finish( ); exit( 0 ); } } return 0; } xforms-1.0.93sp1/demos/ibrowser.c0000644000175000017500000004041311253657534015352 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * image support test. See also iconvert program * * T.C. Zhao (1999.03.01) * * The GUI (fdui) is placed in image->app_data; */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "fd/ibrowser_gui.h" /* from fd/ directory */ #include static FL_IMAGE *curr_image; Colormap map; /*************************************** ***************************************/ static void show_image_info( FL_IMAGE * im ) { FD_ibcanvas *fdui; char buf[ 128 ], wl[ 128 ]; if ( ! im ) return; if ( im->type == FL_IMAGE_GRAY16 ) sprintf( wl, "(l=%d w=%d)", im->level, im->wwidth ); else wl[ 0 ] = '\0'; sprintf( buf, "%s(%s): (%dX%d) t=%s ot=%s dt=%s cols=%d used=%d %s", im->infile,im->fmt_name, im->w,im->h, flimage_type_name( im->type ) + 9, flimage_type_name( im->original_type ) + 9, flimage_type_name( im->display_type ) + 9, im->map_len, im->colors, wl ); fdui = im->app_data; fl_set_object_label( fdui->text, buf ); if ( im->comments ) { fl_activate_object( fdui->comments ); fl_set_object_lcol( fdui->comments, FL_BLACK ); } else { fl_deactivate_object( fdui->comments ); fl_set_object_lcol( fdui->comments, FL_INACTIVE_COL ); } } /*************************************** ***************************************/ void show_comments( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { if ( curr_image && curr_image->comments ) fprintf( stderr,"%s\n", curr_image->comments ); } /*************************************** ***************************************/ static int load_and_show( const char * filename, void * data ) { FD_ibcanvas *fdui = data; FL_IMAGE *image; int r, g, b; image = flimage_load( filename ); if ( image ) { show_image_info( image ); fl_get_icm_color( fdui->canvas->col1, &r, &g, &b ); image->app_background = FL_PACK3( r, g, b ); #if 0 image->sh = image->h / 2; image->sw = image->w / 2; #endif flimage_display( image, FL_ObjWin( fdui->canvas ) ); show_image_info( image ); flimage_free( curr_image ); curr_image = image; #if 0 fl_update_display( 1 ); sleep( 5 ); image->wx = image->wy = 90; image->sx = image->sy = 80; image->sh = image->h - 90; image->sw = image->w - 90; flimage_display( image, FL_ObjWin( fdui->canvas ) ); #endif /* Re-adjust the window level stuff */ if ( image->type == FL_IMAGE_GRAY16) { fl_set_slider_bounds( fdui->level, 0, image->gray_maxval ); fl_set_slider_bounds( fdui->width, 0, image->gray_maxval ); } } else fprintf( stderr, "can't load %s\n", filename ); return 0; } /*************************************** ***************************************/ void scale_image( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_ibcanvas *fdui = ob->form->fdui; float xs = fl_get_slider_value( fdui->xfloat ); float ys = fl_get_slider_value( fdui->yfloat ); int aa = fl_get_button( fdui->anti_aliasing ); if ( ! curr_image ) return; flimage_scale( curr_image, xs * curr_image->w, ys * curr_image->h, aa ? FLIMAGE_SUBPIXEL : FLIMAGE_NOSUBPIXEL ); flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } /*************************************** ***************************************/ void annotate_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_ibcanvas *fdui = ob->form->fdui; char buf[ 128 ]; static int cnt; static int tx = -1, ty; static int r, g, b; int mw = 35, mh = 35, delta = 450, i, j; FLIMAGE_TEXT text; if ( ! curr_image ) return; if ( tx < 0 ) { tx = curr_image->w / 2; ty = curr_image->h / 2; } sprintf( buf, "Text at[%d %d]\nWith Centered display", tx, ty ); if ( ++cnt % 3 == 0 ) { r = 255; g = 0; b = 0; } else if ( cnt % 3 == 1 ) { r = 0; g = 255; b = 0; } else if ( cnt % 3 == 2 ) { r = 0; g = 0; b = 255; } /* positioning check */ flimage_add_text( curr_image, "@arrow", 6, 0, 20, FL_PACK(r,g,b), 0, 1, 30, 30, 0 ); flimage_add_text( curr_image, "X", 1, 0, 20, FL_PACK(r,g,b), 0, 1, 30, 30, 0 ); flimage_add_marker( curr_image, "oval", 30,30, mw - 15, mh - 15, FL_SOLID, 0, 0, FL_PACK( r, g, b ), 0 ); flimage_add_text( curr_image, buf, strlen( buf ), FL_TIMESBOLD_STYLE, 20, FL_PACK( r, g, b ), FL_PACK( 255, 0, 255 ), 0, tx, ty, 0 ); memset( &text, 0, sizeof text ); text.align = FL_ALIGN_LEFT; text.str = ( char * ) "qXXd\nqXXd"; text.len = strlen( text.str ); text.style = FL_TIMESBOLD_STYLE; text.size = 12; text.x = curr_image->w; text.y = curr_image->h; text.color = FL_PACK( r, g, b ); text.bcolor = FL_PACK( r, 0, b ); text.nobk = 1; flimage_add_text_struct( curr_image, &text ); tx += 5; ty += 5; for ( j = 0; j < 8; j++ ) { const char *ss[ ] = { "oval", "delta", "rect", "cross", "arrow", "thinarrow", "line", "star" }; for ( i = 0; i < 9; i++ ) { flimage_add_marker( curr_image, ss[ j ], curr_image->w - i * mw, curr_image->h- j * mh, mw - 15, mh - 15, FL_SOLID, i % 2, i * delta, FL_PACK( r, g, b ), 0 ); } } flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); } /*************************************** ***************************************/ void render_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_ibcanvas *fdui = ob->form->fdui; if ( curr_image ) { flimage_render_annotation( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } } /*************************************** ***************************************/ void flip_image( FL_OBJECT * ob, long data ) { FD_ibcanvas *fdui = ob->form->fdui; if ( ! curr_image ) return; flimage_flip( curr_image, data ); flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); } /*************************************** ***************************************/ void rotate_image( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_ibcanvas *fdui = ob->form->fdui; int angle = fl_get_counter_value( fdui->angle ); int subpix = fl_get_button( fdui->anti_aliasing ); unsigned int fill = 0; if ( ! curr_image ) return; curr_image->fill_color = fill; flimage_rotate( curr_image, angle * 10, subpix ? FLIMAGE_SUBPIXEL : 0 ); flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } /*************************************** ***************************************/ void write_image( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_ibcanvas *fdui = ob->form->fdui; const char *f; if ( ! curr_image ) return; fl_use_fselector( 1 ); fl_set_fselector_placement( FL_PLACE_MOUSE ); if ( ! ( f = fl_show_fselector( "Save Image", 0, "*", 0 ) ) ) return; flimage_dump( curr_image, f, fl_get_choice_text( fdui->format ) ); } /*************************************** ***************************************/ static int expose_handle( FL_OBJECT * ob FL_UNUSED_ARG, Window win, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * xev FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { if ( curr_image ) flimage_display( curr_image, win ); return 0; } /*************************************** ***************************************/ static int motion_handle( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * xev FL_UNUSED_ARG, void * data FL_UNUSED_ARG) { if ( ! curr_image ) return 0; if ( 1 ) { /* fprintf( stderr, "X=%d Y=%d\n", xev->xmotion.x, xev->xmotion.y ); */ } return 0; } /*************************************** ***************************************/ void convolve_it( FL_OBJECT * ob, long data ) { FD_ibcanvas *fdui = ob->form->fdui; int subimage = fl_get_button( fdui->subimage ); if ( ! curr_image ) return; if ( subimage ) { curr_image->subw = curr_image->w / 2; curr_image->subh = curr_image->h / 2; curr_image->subx = curr_image->w / 4; curr_image->suby = curr_image->h / 4; } else curr_image->subw = 0; flimage_convolve( curr_image, ( int ** )data, 0, 0 ); flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } /*************************************** ***************************************/ void tint_it( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_ibcanvas *fdui = ob->form->fdui; int subimage = fl_get_button( fdui->subimage ); if ( ! curr_image ) return; if ( subimage ) { curr_image->subw = curr_image->w / 2; curr_image->subh = curr_image->h / 2; curr_image->subx = curr_image->w / 4; curr_image->suby = curr_image->h / 4; } else curr_image->subw = 0; flimage_tint( curr_image, FL_PACK( 0, 0, 200 ), 0.3 ); flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } /*************************************** ***************************************/ void window_level( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_ibcanvas *fdui = ob->form->fdui; if ( ! curr_image || curr_image->type != FL_IMAGE_GRAY16 ) return; flimage_windowlevel( curr_image, fl_get_slider_value( fdui->level ), fl_get_slider_value( fdui->width ) ); flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } /*************************************** ***************************************/ void warp_it( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { static float m[ 2 ][ 2 ] = { { 0.5, 0.5 }, { -1, 0.7 } }; FD_ibcanvas *fdui = ob->form->fdui; int aa = fl_get_button( fdui->anti_aliasing ); if ( ! curr_image ) return ; curr_image->fill_color = FL_PACK(255,255,0); #if 0 flimage_warp( curr_image, border, curr_image->w + 2, curr_image->h + 2, ( aa ? FLIMAGE_SUBPIXEL : FLIMAGE_NOSUBPIXEL ) | FLIMAGE_CENTER ); #else flimage_warp( curr_image, m, 0,0, aa ? FLIMAGE_SUBPIXEL : FLIMAGE_NOSUBPIXEL ); #endif flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } /*************************************** ***************************************/ void enhance_it( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_ibcanvas *fdui = ob->form->fdui; if ( curr_image ) { flimage_enhance( curr_image, 0 ); flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } } /*************************************** ***************************************/ void crop_it( FL_OBJECT * ob, long data ) { FD_ibcanvas *fdui = ob->form->fdui; if ( ! curr_image ) return; if ( data == 0 ) flimage_autocrop( curr_image, FLIMAGE_AUTOCOLOR ); else { curr_image->fill_color = FL_PACK( 255, 255, 0 ); flimage_crop( curr_image, -1, -1, -1, -1 ); } flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } /*************************************** ***************************************/ void convert_type( FL_OBJECT * ob, long type ) { FD_ibcanvas *fdui = ob->form->fdui; if ( curr_image ) { flimage_convert( curr_image, type, 0 ); flimage_display( curr_image, FL_ObjWin( fdui->canvas ) ); show_image_info( curr_image ); } } /*************************************** ***************************************/ #if STUPID_WM /* this shouldn't be necessary, but there are too many stupid WMs */ static int enter_handle( FL_OBJECT * ob, Window win, int w, int h, XEvent * xev, void * data ) { if ( fl_vmode != FL_DirectColor ) XInstallColormap( fl_display, map ); return 0; } #endif /* callbacks and freeobj handles for form ibcanvas */ /*************************************** ***************************************/ void browse_file( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_use_fselector( 0 ); fl_set_fselector_placement( FL_PLACE_MOUSE ); fl_set_fselector_callback( load_and_show, ob->form->fdui ); fl_show_fselector( "Load an Image", 0, "*", 0 ); } /*************************************** ***************************************/ void quit_callback( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { flimage_free( curr_image ); exit( 0 ); } /*************************************** ***************************************/ static int supported_image_filter( const char * name, int type ) { return type == FT_DIR || ( type == FT_FILE && flimage_is_supported( name ) > 0 ); } /*************************************** ***************************************/ static void error_report( FL_IMAGE * im, const char * s ) { FD_ibcanvas *fdui = im->app_data; if ( ! s ) s = " "; fl_set_object_label( fdui->error, s ); } /*************************************** ***************************************/ static int status_report( FL_IMAGE * im, const char * s ) { FD_ibcanvas *fdui = im->app_data; char buf[ 512 ]; if ( im->completed < 0 ) strcpy( buf, s ); else if ( im->completed >= 0 && im->completed < im->total ) { sprintf( buf,"%s %3.0f%% (%4d of %4d)", s, ( im->completed * 100.0 ) / im->total, im->completed, im->h ); } else strcpy( buf, s ); fl_set_object_label( fdui->status, buf ); fl_update_display( 0 ); return 0; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_ibcanvas *fd_ibcanvas; int n; static FLIMAGE_SETUP setup; #if STUPID_WM int vmode; #endif fl_set_border_width( -2 ); fl_initialize( &argc, argv, 0, 0, 0 ); fd_ibcanvas = create_form_ibcanvas( ); fl_set_object_color( fd_ibcanvas->canvas, FL_COL1, FL_COL1 ); setup.visual_cue = status_report; setup.error_message = error_report; setup.app_data = fd_ibcanvas; setup.delay = 70; flimage_setup( &setup ); flimage_enable_png( ); flimage_enable_xwd( ); flimage_enable_bmp( ); flimage_enable_xbm( ); flimage_enable_gif( ); flimage_enable_sgi( ); flimage_enable_fits( ); flimage_enable_xpm( ); flimage_enable_tiff( ); flimage_enable_ps( ); #ifndef NO_JPEG flimage_enable_jpeg( ); #endif for ( n = flimage_get_number_of_formats(); n; n-- ) fl_addto_choice( fd_ibcanvas->format, ( flimage_get_format_info( n ) )->short_name ); fl_set_dirlist_filter( supported_image_filter ); fl_add_canvas_handler( fd_ibcanvas->canvas, Expose, expose_handle, 0 ); fl_add_canvas_handler( fd_ibcanvas->canvas, MotionNotify, motion_handle, 0 ); /* fill-in form initialization code */ #if STUPID_WM vmode = fl_get_vclass( ); map = fl_create_colormap( fl_state[vmode].xvinfo, 30 ); fprintf( stderr, "map=0x%x\n", map ); fl_set_canvas_colormap( fd_ibcanvas->canvas, map ); fl_add_canvas_handler( fd_ibcanvas->canvas, EnterNotify, enter_handle, 0 ); #endif /* Show the first form */ fl_show_form( fd_ibcanvas->ibcanvas, FL_PLACE_CENTERFREE, FL_FULLBORDER, "ibcanvas" ); while ( fl_do_forms( ) ) /* empty */ ; return 0; } #include "fd/ibrowser_gui.c" xforms-1.0.93sp1/demos/folder.c0000644000175000017500000001141411316160470014754 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Tabbed folder demo and tester * * This file is part of xforms package * T.C. Zhao and M. Overmars * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd/folder_gui.h" #include /* callback routines */ /*************************************** ***************************************/ void hide_show_cb( FL_OBJECT * ob, long data) { FD_mainform *fdui = ob->form->fdui; ( data ? fl_show_object : fl_hide_object )( fdui->folder ); } /*************************************** ***************************************/ void reshow_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_hide_form( ob->form ); fl_show_form( ob->form, FL_PLACE_POSITION, FL_FULLBORDER, "TabFolder" ); } /*************************************** ***************************************/ void set_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_mainform *fdui = ob->form->fdui; int n = fl_get_active_folder_number( fdui->folder ); fl_set_folder_bynumber( fdui->folder, n % 5 + 1 ); } /*************************************** ***************************************/ void deactivate_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_mainform *fdui = ob->form->fdui; if ( fl_object_is_active( fdui->folder ) ) { fl_set_object_label( ob, "Activate" ); fl_deactivate_object( fdui->folder ); } else { fl_set_object_label( ob, "Deactivate" ); fl_activate_object( fdui->folder ); } } /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { #if 0 fl_hide_form( ob->form ); fl_free_form( ob->form ); if ( fl_show_question( "Do you want to quit ?", 0 ) ) exit( 0 ); fprintf( stderr, "will quit after 5 seconds\n" ); fl_msleep( 5000 ); #endif fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ static void make_folder( FL_OBJECT * folder ) { FD_buttonform *fd_buttonform; FD_staticform *fd_staticform; FD_valuatorform *fd_valuatorform; FD_choiceform *fd_choiceform; FD_inputform *fd_inputform; #if 0 float x[ ] = { 0, 1, 2, 3, 4, 5 }; #endif float y[ ] = { 5.5, 4, 4.5, 3.8, 4, 5 }; const char *label[ ] = { "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" }; size_t i; #if 0 FL_OBJECT *ob; #endif fd_buttonform = create_form_buttonform( ); fd_staticform = create_form_staticform( ); fd_valuatorform = create_form_valuatorform( ); fd_choiceform = create_form_choiceform( ); fd_inputform = create_form_inputform( ); /* fill-in form initialization code */ for ( i = 0; i < sizeof y / sizeof *y; i++) fl_add_chart_value( fd_staticform->chart, y[ i ],label[ i ], i + 1 ); fl_addto_menu( fd_choiceform->pulldown, "MenuEntry1|MenuEntry2|MenuEntry3|MenuEntry4" ); fl_addto_menu( fd_choiceform->pushmenu, "MenEntry1|MenuEntry2|MenuEntry3" ); fl_addto_choice( fd_choiceform->choice, "Choice1|Choice2|Choice3|Choice4|Choice5|Choice6" ); fl_load_browser( fd_choiceform->browser, "01Readme" ); #if 1 fl_addto_tabfolder( folder,"ButtonObj", fd_buttonform->buttonform ); fl_addto_tabfolder( folder,"StaticObj", fd_staticform->staticform ); fl_addto_tabfolder( folder,"ValuatorObj", fd_valuatorform->valuatorform ); fl_addto_tabfolder( folder,"ChoiceObj", fd_choiceform->choiceform ); fl_addto_tabfolder( folder,"InputObj", fd_inputform->inputform ); #endif } /*************************************** ***************************************/ int main( int argc, char *argv[ ] ) { FD_mainform *fd_mainform; fl_set_border_width( -2 ); fl_initialize( &argc, argv, 0, 0, 0 ); fd_mainform = create_form_mainform( ); fl_set_object_return( fd_mainform->folder, FL_RETURN_NONE ); make_folder( fd_mainform->folder ); /* show the first form */ fl_show_form( fd_mainform->mainform, FL_PLACE_ASPECT, FL_FULLBORDER, "TabFolder"); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/test.xpm0000644000175000017500000000212611171560225015043 0ustar jensjens/* XPM */ char * test_xpm[] = { "30 30 2 1", " c #CF3CC71BC71B", ". c #51445144FFFF", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " . . ", " .... .. ... .... ", " . . . . . . ", " . .... .. . ", " . . .. . ", " . .. . . . . ", " .. ... ... .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; xforms-1.0.93sp1/demos/ll.c0000644000175000017500000001227011203636407014114 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include /**** Forms and Objects ****/ typedef struct { FL_FORM * axypform; void * vdata; long ldata; FL_OBJECT * xyplot; FL_OBJECT * status; } FD_axypform; extern FD_axypform * create_form_axypform( void ); #define LOG FD_axypform *xypui; /* callbacks for form axypform */ /*************************************** ***************************************/ void xyplot_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { float x, y; int i; char buf[ 64 ]; fl_get_xyplot( ob, &x, &y, &i ); fl_object_ps_dump( ob, "test.ps" ); if ( i < 0 ) return ; sprintf( buf, "X=%g Y=%g", x, y ); fl_set_object_label( xypui->status, buf ); } /*************************************** ***************************************/ void alwaysreturn_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_xyplot_return( xypui->xyplot, fl_get_button( ob ) ); } /*************************************** ***************************************/ void interpolate_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { #ifdef LOG fl_set_xyplot_interpolate( xypui->xyplot, 0, fl_get_button(ob) ? 2 : 0, 20000 ); #else fl_set_xyplot_interpolate( xypui->xyplot, 0, fl_get_button( ob ) ? 2 : 0, 0.2 ); #endif } /*************************************** ***************************************/ void inspect_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_xyplot_inspect( xypui->xyplot, fl_get_button( ob ) ); } /*************************************** ***************************************/ void notic_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int notic = fl_get_button( ob ); if ( notic ) { fl_set_xyplot_xtics( xypui->xyplot, -1, -1 ); fl_set_xyplot_ytics( xypui->xyplot, -1, -1 ); } else { fl_set_xyplot_xtics( xypui->xyplot, 0, 0 ); fl_set_xyplot_ytics( xypui->xyplot, 0, 0 ); } } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { float x[ 25 ], y[ 25 ]; int i; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); xypui = create_form_axypform( ); fl_set_object_dblbuffer( xypui->status, 1 ); for ( i = 0; i <= 10; i++ ) #ifdef LOG x[ i ] = y[ i ] = pow( 10, i - 12 ); #else x[ i ] = y[ i ] = i; #endif fl_set_xyplot_data( xypui->xyplot, x, y, 11, "", "", "" ); #ifdef LOG fl_set_xyplot_xscale( xypui->xyplot, FL_LOG, 5 ); fl_set_xyplot_yscale( xypui->xyplot, FL_LOG, 5 ); fl_set_xyplot_xbounds( xypui->xyplot, 0.01, 10 ); fl_set_xyplot_ytics( xypui->xyplot, 3, 5 ); fl_set_xyplot_xgrid( xypui->xyplot, FL_GRID_MINOR ); /* fl_set_xyplot_ygrid( xypui->xyplot, 2 ); */ #endif fl_show_form( xypui->axypform, FL_PLACE_MOUSE, FL_TRANSIENT, "axypform" ); fl_do_forms( ); fl_finish( ); return 0; } /*************************************** ***************************************/ FD_axypform * create_form_axypform( void ) { FL_OBJECT *obj; FD_axypform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->axypform = fl_bgn_form( FL_NO_BOX, 431, 301 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 431, 301, "" ); fdui->xyplot = obj = fl_add_xyplot( FL_ACTIVE_XYPLOT, 20, 50, 285, 235, "" ); fl_set_object_boxtype( obj, FL_DOWN_BOX ); fl_set_object_color( obj, FL_BLACK, FL_GREEN ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE ); fl_set_object_callback( obj, xyplot_cb, 0 ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 315, 40, 80, 25, "AlwaysReturn" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, alwaysreturn_cb, 0 ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 315, 65, 80, 25, "Interpolate" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, interpolate_cb, 0 ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 315, 90, 85, 25, "InspectOnly" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, inspect_cb, 0 ); fdui->status = obj = fl_add_text( FL_NORMAL_TEXT, 45, 15, 170, 25, "" ); fl_set_object_boxtype( obj, FL_DOWN_BOX ); obj = fl_add_button( FL_NORMAL_BUTTON, 325, 250, 90, 30, "Done" ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 315, 120, 85, 25, "NoTics" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, notic_cb, 0 ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/butttypes.c0000644000175000017500000000374011203636407015552 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * All button types * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd/butttypes_gui.h" #include /* callbacks for form form0 */ /*************************************** ***************************************/ void button_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_form0 *ui = ( FD_form0 * ) ob->form->fdui; char buf[ 128 ]; if ( ob->type == FL_HIDDEN_BUTTON ) { if ( fl_show_question( "Want to Quit ?", 1 ) == 1 ) { fl_finish( ); exit( 0 ); } } else { sprintf( buf, "%s callback called: %d", ob->label, fl_get_button( ob ) ); fl_addto_browser( ui->br, buf ); } } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_form0 *fd_form0; fl_initialize( &argc, argv, 0, 0, 0 ); fd_form0 = create_form_form0( ); /* fill-in form initialization code */ /* show the first form */ fl_show_form( fd_form0->form0, FL_PLACE_CENTER, FL_FULLBORDER, "form0" ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/rescale.c0000644000175000017500000000553211203636407015126 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* Demo for scaling forms. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" typedef struct { FL_FORM * form; FL_OBJECT *smallerobj, *largerobj, *scaleobj, *cell00, *exitobj; } FD_form; /*************************************** ***************************************/ FD_form * create_form_form(void) { FL_OBJECT *obj; FD_form *fdui = calloc( 1, sizeof *fdui ); fdui->form = fl_bgn_form( FL_NO_BOX, 470, 370 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 470, 370, "" ); obj = fl_add_box( FL_SHADOW_BOX, 30, 30, 410, 70, "Scaling Forms" ); fl_set_object_color( obj, 9, 47 ); fl_set_object_lsize( obj, 16 ); fdui->smallerobj = fl_add_button( FL_NORMAL_BUTTON, 30, 220, 130, 40, "Smaller" ); fdui->largerobj = fl_add_button( FL_NORMAL_BUTTON, 310, 220, 130, 40, "Larger" ); fdui->scaleobj = obj = fl_add_input( FL_FLOAT_INPUT, 170, 140, 270, 40, "Scale:" ); fdui->exitobj = obj = fl_add_button( FL_NORMAL_BUTTON, 310, 300, 130, 40, "Exit" ); fl_end_form( ); return fdui; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { float sc = 1, oldsc; FL_OBJECT *obj; FD_form *ui; char str[ 32 ]; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); ui = create_form_form( ); sprintf( str, "%.2f", sc ); fl_set_input( ui->scaleobj, str ); fl_show_form( ui->form, FL_PLACE_CENTER | FL_FREE_SIZE, FL_FULLBORDER, "Scaling" ); while ( 1 ) { oldsc = sc; obj = fl_do_forms( ); if ( obj == ui->exitobj ) exit( 0 ); if ( obj == ui->smallerobj ) sc = sc * 0.8; if ( obj == ui->largerobj ) sc = sc / 0.8; if ( obj == ui->scaleobj ) sc = atof( fl_get_input( ui->scaleobj ) ); if ( sc < 0.50 ) sc = 0.50; if ( sc > 3 ) sc = 3; if ( sc != oldsc ) { fl_scale_form( ui->form, sc / oldsc, sc / oldsc ); sprintf( str, "%.2f", sc ); fl_set_input( ui->scaleobj, str ); } } } xforms-1.0.93sp1/demos/Makefile.am0000644000175000017500000001461211171560225015375 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = 01Readme iconvert.1 demo.menu test.ps \ bm1.xbm bm2.xbm newmail.xbm nomail.xbm picture.xbm srs.xbm \ crab45.xpm crab_tran.xpm crab.xpm porsche.xpm \ test.xpm xconq.xpm xterm.xpm SUBDIRS = fd SUFFIXES = .fd .c # forms.h is a generated file INCLUDES = -I../lib -I../lib/include -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/image $(X_CFLAGS) if BUILD_GL GL = gl glwin else GL = endif noinst_PROGRAMS = arrowbutton \ borderwidth \ boxtype \ browserall \ browserop \ buttonall \ butttypes \ canvas \ canvas2 \ chartall \ chartstrip \ choice \ colbrowser \ colsel \ colsel1 \ counter \ cursor \ demo \ demo05 \ demo06 \ demo27 \ demo33 \ demotest \ demotest2 \ demotest3 \ dirlist \ fbrowse \ fbrowse1 \ fdial \ flclock \ folder \ fonts \ formbrowser \ free1 \ freedraw \ freedraw_leak \ $(GL) \ goodies \ grav \ group \ ibrowser \ iconify \ iconvert \ inputall \ invslider \ itest \ lalign \ ldial \ ll \ longlabel \ menu \ minput \ minput2 \ multilabel \ ndial \ newbutton \ new_popup \ nmenu \ objinactive \ objpos \ objreturn \ pmbrowse \ popup \ positioner \ positionerXOR \ preemptive \ pup \ pushbutton \ pushme \ rescale \ scrollbar \ secretinput \ select \ sld_alt \ sld_radio \ sldinactive \ sldsize \ sliderall \ strsize \ symbols \ thumbwheel \ timer \ timerprec \ timeoutprec \ touchbutton \ xyplotactive \ xyplotall \ xyplotover \ yesno \ yesno_cb \ wwwl # menubar # Most of these demos link against libforms only. For them this default is # sufficient: LDFLAGS = ../lib/libforms.la $(X_LIBS) $(X_PRE_LIBS) $(XPM_LIB) -lX11 $(LIBS) $(X_EXTRA_LIBS) arrowbutton_SOURCES = arrowbutton.c borderwidth_SOURCES = borderwidth.c boxtype_SOURCES = boxtype.c browserall_SOURCES = browserall.c browserop_SOURCES = browserop.c buttonall_SOURCES = buttonall.c nodist_buttonall_SOURCES = fd/buttons_gui.c fd/buttons_gui.h buttonall.$(OBJEXT): fd/buttons_gui.c butttypes_SOURCES = butttypes.c nodist_butttypes_SOURCES = fd/butttypes_gui.c fd/butttypes_gui.h butttypes.$(OBJEXT): fd/butttypes_gui.c canvas_SOURCES = canvas.c canvas2_SOURCES = canvas2.c chartall_SOURCES = chartall.c chartstrip_SOURCES = chartstrip.c choice_SOURCES = choice.c colbrowser_SOURCES = colbrowser.c colsel_SOURCES = colsel.c colsel1_SOURCES = colsel1.c counter_SOURCES = counter.c cursor_SOURCES = cursor.c demo_SOURCES = demo.c demo05_SOURCES = demo05.c demo06_SOURCES = demo06.c demo27_SOURCES = demo27.c demo33_SOURCES = demo33.c demotest_SOURCES = demotest.c nodist_demotest_SOURCES = fd/folder_gui.c fd/folder_gui.h demotest.$(OBJEXT): fd/folder_gui.c demotest2_SOURCES = demotest2.c demotest3_SOURCES = demotest3.c dirlist_SOURCES = dirlist.c nodist_dirlist_SOURCES = fd/fbtest_gui.c fd/fbtest_gui.h dirlist.$(OBJEXT): fd/fbtest_gui.c fbrowse_SOURCES = fbrowse.c fbrowse1_SOURCES = fbrowse1.c fdial_SOURCES = fdial.c flclock_SOURCES = flclock.c folder_SOURCES = folder.c nodist_folder_SOURCES = fd/folder_gui.c fd/folder_gui.h folder.$(OBJEXT): fd/folder_gui.c fonts_SOURCES = fonts.c formbrowser_SOURCES = formbrowser.c nodist_formbrowser_SOURCES = fd/formbrowser_gui.c fd/formbrowser_gui.h formbrowser.$(OBJEXT): fd/formbrowser_gui.c free1_SOURCES = free1.c freedraw_SOURCES = freedraw.c freedraw_leak_SOURCES = freedraw_leak.c gl_SOURCES = gl.c gl_LDADD = ../gl/libformsGL.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) -lGL -lX11 $(LIBS) $(X_EXTRA_LIBS) glwin_SOURCES = glwin.c glwin_LDADD = ../gl/libformsGL.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) -lGL -lX11 $(LIBS) $(X_EXTRA_LIBS) goodies_SOURCES = goodies.c grav_SOURCES = grav.c group_SOURCES = group.c ibrowser_SOURCES = ibrowser.c ibrowser.$(OBJEXT): fd/ibrowser_gui.c ibrowser_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) iconify_SOURCES = iconify.c iconvert_SOURCES = iconvert.c iconvert_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) inputall_SOURCES = inputall.c nodist_inputall_SOURCES = fd/inputall_gui.c fd/inputall_gui.h inputall.$(OBJEXT): fd/inputall_gui.c invslider_SOURCES = invslider.c itest_SOURCES = itest.c itest.$(OBJEXT): fd/is_gui.c itest_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) lalign_SOURCES = lalign.c ldial_SOURCES = ldial.c ll_SOURCES = ll.c ll_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) longlabel_SOURCES = longlabel.c menu_SOURCES = menu.c #menubar_SOURCES = menubar.c minput_SOURCES = minput.c minput2_SOURCES = minput2.c multilabel_SOURCES = multilabel.c ndial_SOURCES = ndial.c newbutton_SOURCES = newbutton.c crossbut.c new_popup_SOURCES = new_popup.c nmenu_SOURCES = nmenu.c objinactive_SOURCES = objinactive.c objpos_SOURCES = objpos.c objreturn_SOURCES = objreturn.c pmbrowse_SOURCES = pmbrowse.c nodist_pmbrowse_SOURCES = fd/pmbrowse_gui.c fd/pmbrowse_gui.h pmbrowse.$(OBJEXT): fd/pmbrowse_gui.c popup_SOURCES = popup.c positioner_SOURCES = positioner.c positionerXOR_SOURCES = positionerXOR.c preemptive_SOURCES = preemptive.c pup_SOURCES = pup.c pushbutton_SOURCES = pushbutton.c pushme_SOURCES = pushme.c rescale_SOURCES = rescale.c scrollbar_SOURCES = scrollbar.c nodist_scrollbar_SOURCES = fd/scrollbar_gui.c fd/scrollbar_gui.h scrollbar.$(OBJEXT): fd/scrollbar_gui.c secretinput_SOURCES = secretinput.c select_SOURCES = select.c sld_alt_SOURCES = sld_alt.c sld_radio_SOURCES = sld_radio.c sldinactive_SOURCES = sldinactive.c sldsize_SOURCES = sldsize.c sliderall_SOURCES = sliderall.c strsize_SOURCES = strsize.c symbols_SOURCES = symbols.c thumbwheel_SOURCES = thumbwheel.c nodist_thumbwheel_SOURCES = fd/twheel_gui.c fd/twheel_gui.h thumbwheel.$(OBJEXT): fd/twheel_gui.c timer_SOURCES = timer.c timerprec_SOURCES = timerprec.c timeoutprec_SOURCES = timeoutprec.c touchbutton_SOURCES = touchbutton.c xyplotactive_SOURCES = xyplotactive.c xyplotall_SOURCES = xyplotall.c xyplotover_SOURCES = xyplotover.c xyplotover_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) yesno_SOURCES = yesno.c yesno_cb_SOURCES = yesno_cb.c wwwl_SOURCES = wwwl.c .fd.c: ../fdesign/fdesign ../fdesign/fdesign -dir fd -convert $< xforms-1.0.93sp1/demos/xconq.xpm0000644000175000017500000000254611171560225015222 0ustar jensjens/* XPM */ static char * xconq [] = { "32 32 5 1", " s grey90 c grey90 g4 grey90", ". m black c black g4 black", "X m white c SkyBlue g4 grey80", "o m white c LightGray g4 grey50", "O m white c OliveDrab g4 grey40", " ", " . ", " ..X.. ", " ..XXXXX.. ", " ..XXXXXXXXX.. ", " ..XXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXX.XXXXXXX.. ", " .XXXXXXXXXXXXXXXXXXX.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXX..........XXXXXX. ", " .XXXXXXXXXX...oooooooo.XXXXXX. ", " .X..........ooooooooo..XXXXXX. ", " .XXXXXXXXXX.................X. ", " .XXXXXXX...............oooo.X. ", " .XXXXXX..oooooooooooooooooo.X. ", " .XXXXXX....................XX. ", " .XXXXXXX..o.o.o.o.o.o.oo..XXX. ", " .XXXXXXXX................XXXX. ", " .............................. ", " .OOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", " ..OO.O.O.O.O.O.O.O.O.O.O.O.OO. ", " ..O.O.O.O.O.O.O.O.O.O.O.O.. ", " ..OO.O.O.O.O.O.O.O.OO.. ", " ..O.O.O.O.O.O.O.O.. ", " ..OO.O.O.O.OO.. ", " ..O.O.O.O.. ", " ..OOO.. ", " ... "}; xforms-1.0.93sp1/demos/chartall.c0000644000175000017500000000677211203636407015311 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Showing all different charts * * This file is part of xforms package * M. Overmars and T.C. Zhao (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" FL_FORM *form; FL_OBJECT *barchart, *linechart, *filledchart, *piechart, *specialpiechart, *exitbut, *horbarchart, *spikechart; void create_form_form( void ); /*************************************** ***************************************/ void fill_in( FL_OBJECT * ob ) { int c = FL_BLACK; fl_add_chart_value( ob, 15.0, "item 1", ++c ); fl_add_chart_value( ob, 5.0, "item 2", ++c ); fl_add_chart_value( ob, 0.0, "item 3", ++c ); fl_add_chart_value( ob, -10., "item 4", ++c ); fl_add_chart_value( ob, 25.0, "item 5", ++c ); fl_add_chart_value( ob, 12.0, "item 6", ++c ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_form( ); fill_in( barchart ); fill_in( horbarchart ); fill_in( linechart ); fl_set_object_helper( linechart, "A LineChart" ); fill_in( filledchart ); fill_in( spikechart ); fill_in( piechart ); fill_in( specialpiechart ); fl_show_form( form, FL_PLACE_CENTER, FL_TRANSIENT, "Charts" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ void create_form_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 940, 360 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 940, 360, "" ); barchart = obj = fl_add_chart( FL_BAR_CHART, 20, 20, 210, 140, "BAR_CHART" ); fl_set_object_boxtype( obj, FL_RSHADOW_BOX ); linechart = obj = fl_add_chart( FL_LINE_CHART, 250, 20, 210, 140, "LINE_CHART" ); fl_set_object_boxtype( obj, FL_RSHADOW_BOX ); filledchart = obj = fl_add_chart( FL_FILLED_CHART, 250, 190, 210, 140, "FILLED_CHART" ); fl_set_object_boxtype( obj ,FL_RSHADOW_BOX ); piechart = obj = fl_add_chart( FL_PIE_CHART, 480, 190, 210, 140, "PIE_CHART" ); fl_set_object_boxtype( obj, FL_RSHADOW_BOX ); specialpiechart = obj = fl_add_chart( FL_SPECIALPIE_CHART, 710, 20, 210, 140, "SPECIALPIE_CHART" ); fl_set_object_boxtype( obj, FL_RSHADOW_BOX ); horbarchart = obj = fl_add_chart( FL_HORBAR_CHART, 20, 190, 210, 140, "HORBAR_CHART" ); fl_set_object_boxtype( obj, FL_RSHADOW_BOX ); spikechart = obj = fl_add_chart( FL_SPIKE_CHART, 480, 20, 210, 140, "SPIKE_CHART" ); fl_set_object_boxtype( obj, FL_RSHADOW_BOX ); exitbut = obj = fl_add_button( FL_NORMAL_BUTTON, 750, 260, 140, 30, "Exit" ); fl_end_form( ); } xforms-1.0.93sp1/demos/crab45.xpm0000644000175000017500000000371011171560225015144 0ustar jensjens/* XPM */ static char * crab45[] = { /* crab45 pixmap * width height ncolors chars_per_pixel */ "28 28 6 2 ", ". c None s s_SkyBlue ", "x c orange s s_orange ", "* c #ff72c2 s s_#ff72c2 ", "+ c SteelBlue s s_SteelBlue ", "G c black s s_black ", "a c LightGrey s s_LightGrey ", /* pixels */ ". . . . . . . . . . * * * * * * * . . . . . . . . . . . ", ". . . . . . . . * x x x x x x x * . . . . . . . . . . . ", ". . . . . . . * * * * * * * x x * . . . . . . . . . . . ", ". . . . . . . . . . . . . * x x x * . . . . . . . . . . ", ". . . . . . . . . . * x x x x * x x . . . . . . . . . . ", ". . . . . . . . + + * * * * * * * x x . . . . . . . . . ", ". . . . . . . . . . . . . . . . . * x x . . . . . * . . ", ". . * . . . . . . . . . . . . . . . * x . . * * x x . . ", ". * * . . + . . . . . . + + x x + * * x * * x x x + . . ", ". x * . . + . . . . . . . . + x + * x x x x x + + . . . ", "* x * . * * . . . . . . + . + x * * x x x * * . . . . . ", "* x * . x * . . . . . + x + + x x x x x x * * . . * * * ", "* x * . x * . . + . + x x x x x x x x x x * * * * x x x ", "* x * * x * . . + . . + x x x x x x x x x * * x x x G G ", "* x x x x * . . x + + + x x x x x x x x x x x * * G G . ", "* x x x * * . . x x x x x x x x x x x x x x x * * G G . ", "* * * x . * . . + + * x x x x x x x x x x x x * * G G . ", ". . . * . x * . * * * x x x x x x x x x x x x x * * * * ", ". . . . . x x * * x x x x x x x x x x x x x x * x x x x ", ". . . . . . x x x x x x x x x x x x x x x x * * G G G x ", ". . . . . . . . * x x x x x x x x x x x x x * * G G + . ", ". . . . . . . . * x * * * * x x x x x x x * * * G G . . ", ". . . . . . . * x x * * * * x x x x x * * * * * * G G . ", ". . . . . . . * x + . . * x * * * x * * * * * G G G G . ", ". . . . . . . x x + . . * x * * * * x G G G * G G G . . ", ". . . . . . * x + . . * x x G G G * x G G G G G . . . . ", ". . . . . . . . . . . * x G G G G * x G + . G G . . . . ", ". . . . . . . . . . . * x G . . . * x x . . . . . . . . " } ; xforms-1.0.93sp1/demos/newmail.xbm0000644000175000017500000000534511171560225015510 0ustar jensjens#define /home/zhao/xforms/DEMOS/newmail_width 64 #define /home/zhao/xforms/DEMOS/newmail_height 64 static char /home/zhao/xforms/DEMOS/newmail_bits[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00, 0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00, 0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x07,0x00,0x00,0x80,0x01,0x00, 0x00,0x70,0x38,0x00,0x00,0x80,0x01,0x00,0x00,0x0e,0xc0,0x00,0x00,0x80, 0x01,0x00,0xc0,0x01,0x00,0x01,0x00,0x80,0x01,0x00,0x38,0x00,0x20,0x02, 0x00,0x80,0x01,0x00,0x06,0x00,0x38,0x04,0x00,0x80,0x01,0xc0,0x1f,0x00, 0x3e,0x04,0x00,0x80,0x01,0x30,0x60,0x80,0x3f,0x08,0x00,0x80,0x01,0x08, 0x80,0x80,0x3f,0x08,0x00,0x80,0x01,0x04,0x07,0x81,0x3f,0x10,0x00,0x80, 0x01,0x82,0x0f,0x82,0x3f,0x10,0x00,0x80,0x01,0x82,0x0f,0x82,0x1f,0x10, 0x00,0x80,0x01,0x01,0x07,0x84,0x07,0x20,0x00,0x80,0x01,0x01,0x00,0x84, 0x01,0x20,0x00,0x80,0x81,0x00,0x00,0x88,0x00,0x20,0x00,0x80,0x81,0x40, 0x00,0x88,0x00,0x20,0x00,0x80,0x81,0xa0,0x00,0x88,0x00,0x20,0x00,0x80, 0x81,0x12,0xa3,0x88,0x00,0x20,0x00,0x80,0x41,0x4e,0xa6,0x90,0x00,0x20, 0x00,0x80,0x41,0xa6,0xac,0x90,0x01,0x20,0x00,0x80,0x41,0x42,0xa9,0x90, 0x01,0x20,0x00,0x80,0x41,0x81,0xb0,0x10,0x00,0x20,0x00,0x80,0xc1,0x00, 0xa0,0x17,0x00,0x20,0x00,0x80,0x41,0x01,0x40,0x10,0x00,0x20,0x00,0x80, 0x41,0x02,0x82,0x10,0x00,0x20,0x00,0x80,0x41,0x06,0x05,0x17,0x00,0x20, 0x00,0x80,0x41,0x88,0x0a,0x12,0x00,0x30,0x00,0x80,0x41,0xfe,0xff,0x17, 0x00,0x3c,0x0e,0x80,0x41,0x00,0x00,0x10,0x00,0x0f,0x11,0x80,0x41,0x00, 0x00,0x10,0xc0,0x1b,0x11,0x80,0x41,0x00,0x00,0x10,0xf0,0xe4,0x10,0x80, 0x41,0x00,0x00,0x10,0x3c,0x84,0x08,0x80,0x41,0x00,0x00,0x10,0x0f,0x88, 0x3c,0x80,0x41,0x00,0x00,0xd0,0x03,0xf0,0x43,0x80,0x41,0x00,0x00,0xf0, 0x01,0x8c,0x43,0x80,0xc1,0xff,0xff,0x3f,0x01,0x82,0x24,0x80,0xc1,0xff, 0xff,0x1f,0x01,0x82,0x18,0x80,0x01,0x00,0x02,0x02,0x01,0xfc,0x08,0x80, 0x01,0x00,0x02,0x02,0x01,0x20,0x09,0x80,0x01,0x00,0x02,0x02,0x01,0x10, 0x06,0x80,0x01,0x00,0x02,0x02,0x01,0x10,0x00,0x80,0x01,0x00,0x02,0x02, 0x01,0x08,0x00,0x80,0x01,0x00,0x02,0x02,0x01,0x08,0x00,0x80,0x01,0x00, 0x02,0x02,0x01,0xb4,0x3f,0x80,0x01,0x00,0x02,0x02,0x01,0x0e,0x28,0x80, 0x01,0x00,0x02,0x02,0x01,0x03,0x16,0x80,0x01,0x00,0x02,0x02,0x81,0xc0, 0x11,0x80,0x01,0x00,0x02,0x02,0x41,0x38,0x08,0x80,0x01,0x00,0x02,0x02, 0x21,0x04,0x04,0x80,0x01,0x00,0x02,0x02,0x11,0x03,0x02,0x80,0x01,0x00, 0x02,0x02,0xc9,0x80,0x01,0x80,0x01,0x00,0x02,0x02,0x25,0x60,0x00,0x80, 0x01,0x00,0x02,0x02,0x13,0x18,0x00,0x80,0x01,0x00,0x02,0x02,0x01,0x07, 0x00,0x80,0x01,0x00,0x02,0xc2,0xfe,0x00,0x00,0x80,0x01,0x00,0x02,0x32, 0x00,0x00,0x00,0x80,0x01,0x00,0x02,0x0e,0x00,0x00,0x00,0x80,0x01,0x00, 0xfe,0x03,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x80, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; xforms-1.0.93sp1/demos/canvas2.c0000644000175000017500000002017111316160013015027 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the interaction with a canvas object. * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include /**** Forms and Objects ****/ typedef struct { FL_FORM * canvasform; void * vdata; char * cdata; long ldata; FL_OBJECT * canvas; FL_OBJECT * br; FL_OBJECT * keyboard; FL_OBJECT * mouse; FL_OBJECT * move; FL_OBJECT * misc; } FD_canvasform; static FD_canvasform * create_form_canvasform( void ); FD_canvasform *fd_canvasform; static GC canvasGC; /*************************************** ***************************************/ static int canvas_expose( FL_OBJECT * ob FL_UNUSED_ARG, Window win, int w, int h, XEvent * ev FL_UNUSED_ARG, void * d ) { FD_canvasform *ui = d; XFillRectangle( fl_get_display( ), win, canvasGC, 0, 0, w, h ); fl_addto_browser( ui->br, "Expose" ); return 0; } /*************************************** ***************************************/ static int canvas_key( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev, void * d ) { FD_canvasform *ui = d; char buf[ 128 ]; sprintf( buf, "KeyPress: keysym=%ld", XKeycodeToKeysym( fl_display, ev->xkey.keycode, 0 ) ); fl_addto_browser( ui->br, buf ); return 0; } /*************************************** ***************************************/ static int canvas_but( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev, void * d ) { FD_canvasform *ui = d; char buf[ 128 ]; sprintf( buf, "Button%s: %d", ev->type == ButtonPress? "Press" : "Release", ev->xbutton.button ); fl_addto_browser( ui->br, buf ); return 0; } /*************************************** ***************************************/ static int canvas_move( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev, void * d ) { FD_canvasform *ui = d; char buf[ 128 ]; sprintf( buf, "Position: %d %d", ev->xmotion.x, ev->xmotion.y ); fl_addto_browser( ui->br, buf ); return 0; } /*************************************** ***************************************/ static int canvas_misc( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev, void * d ) { FD_canvasform *ui = d; fl_addto_browser( ui->br, ev->xcrossing.type == EnterNotify ? "Enter canvas" : "Leave canvas" ); return 0; } /*************************************** ***************************************/ static void init_canvas( FD_canvasform * fdui ) { fl_add_canvas_handler( fdui->canvas, Expose, canvas_expose, fdui ); fl_add_canvas_handler( fdui->canvas, KeyPress, canvas_key, fdui ); fl_add_canvas_handler( fdui->canvas, ButtonPress, canvas_but, fdui ); fl_add_canvas_handler( fdui->canvas, ButtonRelease, canvas_but, fdui ); fl_set_button( fdui->mouse, 1 ); fl_set_button( fdui->keyboard, 1 ); canvasGC = XCreateGC( fl_get_display( ),fl_state[ fl_vmode ].trailblazer, 0, 0 ); XSetForeground( fl_get_display( ), canvasGC, fl_get_flcolor( FL_BLACK ) ); } /* callbacks */ /*************************************** ***************************************/ static void sensitive_setting( FL_OBJECT * ob, long event ) { FL_HANDLE_CANVAS hc; int count = 1; int events[ 2 ] = { event, 0 }; switch ( event ) { case KeyPress: hc = canvas_key; break; case ButtonPress: hc = canvas_but; events[ 1 ] = ButtonRelease; count = 2; break; case EnterNotify: hc = canvas_misc; events[ 1 ] = LeaveNotify; count = 2; break; case MotionNotify: hc = canvas_move; break; default: return; } if ( fl_get_button( ob ) ) while ( count > 0 ) fl_add_canvas_handler( fd_canvasform->canvas, events[ --count ], hc, fd_canvasform ); else while ( count > 0 ) fl_remove_canvas_handler( fd_canvasform->canvas, events[ --count ], hc ); } /*************************************** ***************************************/ static void disable_it( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( fl_get_button( ob ) ) fl_deactivate_object( fd_canvasform->canvas ); else fl_activate_object( fd_canvasform->canvas ); } /*************************************** ***************************************/ static void hide_it( FL_OBJECT * ob, long all FL_UNUSED_ARG ) { if ( fl_object_is_visible( fd_canvasform->canvas ) ) { fl_hide_object( fd_canvasform->canvas ); fl_set_object_label( ob, "ShowCanvas" ); } else { fl_show_object( fd_canvasform->canvas ); fl_set_object_label( ob, "HideCanvas" ); } } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_canvasform = create_form_canvasform( ); /* fill-in form initialization code */ init_canvas( fd_canvasform ); fl_show_form( fd_canvasform->canvasform, FL_PLACE_FREE, FL_FULLBORDER, "canvasform" ); fl_do_forms(); fl_finish( ); return 0; } /*************************************** ***************************************/ static FD_canvasform * create_form_canvasform( void ) { FL_OBJECT *obj; FD_canvasform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->canvasform = fl_bgn_form( FL_NO_BOX, 450, 280 ); fl_add_box( FL_UP_BOX, 0, 0, 450, 280, "" ); fdui->canvas = fl_add_canvas( FL_NORMAL_CANVAS, 20, 40, 155, 187, "" ); fdui->br = fl_add_browser( FL_NORMAL_BROWSER, 188, 40, 152, 187, "" ); obj = fl_add_text( FL_NORMAL_TEXT, 103, 10, 150, 20, "Canvas Events" ); fl_set_object_lsize( obj, FL_MEDIUM_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->keyboard = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 345, 40, 76, 26, "Keyboard" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, sensitive_setting, KeyPress ); fdui->mouse = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 345, 70, 76, 26, "Buttons" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, sensitive_setting, ButtonPress ); fdui->move = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 345, 100, 74, 26, "Movements" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, sensitive_setting, MotionNotify ); fdui->misc = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 345, 130, 74, 26, "Enter\nLeave" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, sensitive_setting, EnterNotify ); obj = fl_add_button( FL_PUSH_BUTTON, 30, 240, 90, 27, "Deactivate" ); fl_set_object_callback( obj, disable_it, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 130, 240, 90, 27, "HideCanvas" ); fl_set_object_callback( obj, hide_it, 0 ); fl_add_button( FL_NORMAL_BUTTON, 300, 240, 90, 27, "Done" ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/gl.c0000644000175000017500000002167211316160224014107 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * OpenGL/mesa canvas demo * * On most platforms, the mesa/OpenGL support is not compiled into * the shared library (It it in the static library). You can compile * ../FORMS/gl.c and put it in the shared library if you have mesa/OpenGL * * Also you might want to make a link libGL.a to libMesaGL.a * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "GL/gl.h" #include "GL/glx.h" #include "include/forms.h" #include "gl/glcanvas.h" #include typedef struct { FL_FORM * form; void * vdata; char * cdata; long ldata; FL_OBJECT * canvas; FL_OBJECT * done; FL_OBJECT * menu; FL_OBJECT * butgrp; } FD_form; extern FD_form * create_form_form(void); FD_form *ui; static int prim = GL_POLYGON ; #define v3f glVertex3f /*************************************** ***************************************/ static void draw_cube( void ) { glColor3f( 1.0, 0.0, 0.0 ); glBegin( prim ); v3f( 1.0, 1.0, 1.0 ); v3f( 1.0, -1.0, 1.0 ); v3f( 1.0, -1.0, -1.0 ); v3f( 1.0, 1.0, -1.0 ); glEnd( ); glBegin( prim ); v3f( -1.0, 1.0, 1.0 ); v3f( -1.0, 1.0, -1.0 ); v3f( -1.0, -1.0, -1.0 ); v3f( -1.0, -1.0, 1.0 ); glEnd( ); glColor3f( 0.0, 1.0, 0.0 ); glBegin( prim ); v3f( 1.0, 1.0, 1.0 ); v3f( 1.0, 1.0, -1.0 ); v3f( -1.0, 1.0, -1.0 ); v3f( -1.0, 1.0, 1.0 ); glEnd( ); glBegin( prim ); v3f( 1.0, -1.0, 1.0 ); v3f( -1.0, -1.0, 1.0 ); v3f( -1.0, -1.0, -1.0 ); v3f( 1.0, -1.0, -1.0 ); glEnd( ); glColor3f( 0.0, 0.0, 1.0 ); glBegin( prim ); v3f( 1.0, 1.0, 1.0 ); v3f( -1.0, 1.0, 1.0 ); v3f( -1.0, -1.0, 1.0 ); v3f( 1.0, -1.0, 1.0 ); glEnd( ); glBegin( prim ); v3f( 1.0, 1.0, -1.0 ); v3f( 1.0,-1.0, -1.0 ); v3f( -1.0,-1.0, -1.0 ); v3f( -1.0, 1.0, -1.0 ); glEnd( ); } /*************************************** ***************************************/ int idle_cb( XEvent * ev, void * data FL_UNUSED_ARG ) { static GLfloat xrot, yrot, zrot; if ( ! fl_form_is_visible( ui->form ) || ! fl_object_is_visible( ui->canvas ) ) return 0; fl_activate_glcanvas(ui->canvas); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glPushMatrix( ); glRotatef( xrot, 1.0, 0.0, 0.0 ); glRotatef( yrot, 0.0, 1.0, 0.0 ); glRotatef( zrot, 0.0, 0.0, 1.0 ); glTranslatef( -1.0,1.2,-0.5 ); draw_cube( ); glPopMatrix( ); glFinish( ); if ( ev ) { xrot += 10.0; yrot += 7.0; zrot -= 3.0; } glXSwapBuffers( fl_display, fl_get_canvas_id( ui->canvas ) ); return 0; } /*************************************** ***************************************/ int canvas_expose( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w, int h, XEvent * xev FL_UNUSED_ARG, void * ud FL_UNUSED_ARG ) { glViewport( 0, 0, ( GLint ) w, ( GLint ) h ); glClearColor( 0.0, 0.0, 0.0, 0.0 ); glMatrixMode( GL_PROJECTION ); glLoadIdentity( ); glFrustum( -1.0, 1.0, -1.0, 1.0, 1.0, 10.0 ); glTranslatef( 0.0, 0.0, -5.0 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity( ); glCullFace( GL_BACK ); glEnable( GL_CULL_FACE ); glShadeModel( GL_FLAT ); /* refresh */ idle_cb( 0, 0 ); return 0; } /*************************************** ***************************************/ int buttonpress_cb( FL_OBJECT * ob FL_UNUSED_ARG, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * xev FL_UNUSED_ARG, void * ud FL_UNUSED_ARG ) { static int suspended; suspended = ( suspended + 1 ) % 2; fl_set_idle_callback( suspended ? 0 : idle_cb, 0 ); return 0; } /*************************************** ***************************************/ void switch_primitive( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { static int primitive[ ] = { GL_POLYGON, GL_LINE_LOOP }; static int i ; prim = primitive[ ++i % 2 ]; } /* switch single/dblbuffer */ static int sbuf[ ]= { GLX_RGBA,GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, None }; static int dbuf[ ]= { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, /* GLX_DOUBLEBUFFER, */ None}; /*************************************** ***************************************/ void buffer_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { static int is_double = 1; FD_form *fdui = ob->form->fdui; is_double = ! is_double; fl_set_object_label( ob,is_double ? "Single":"Double" ); fl_set_glcanvas_attributes( fdui->canvas, is_double ? dbuf : sbuf ); } /*************************************** ***************************************/ void menu_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *ob; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); ui = create_form_form( ); /* fill-in form initialization code */ fl_set_object_gravity( ui->butgrp, NorthEastGravity, NorthEastGravity ); fl_addto_menu( ui->menu,"Item1|Item2|Item3|Item4" ); fl_add_canvas_handler( ui->canvas, Expose, canvas_expose, 0 ); fl_add_canvas_handler( ui->canvas, ButtonPress, buttonpress_cb, 0 ); fl_set_idle_callback( idle_cb, 0 ); /* geometry stuff */ // fl_set_form_minsize( ui->form, 340, 280 ); fl_show_form( ui->form, FL_PLACE_CENTER | FL_FREE_SIZE, FL_FULLBORDER, "OpenGL Canvas"); while( ( ob = fl_do_forms( ) ) != ui->done ) /* empty */ ; fl_finish( ); return 0; } /*************************************** ***************************************/ static void hide_it( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( fl_object_is_visible( ui->canvas ) ) { fl_hide_object( ui->canvas ); fl_set_object_label( ob,"Show" ); } else { fl_show_object( ui->canvas ); fl_set_object_label( ob, "Hide" ); } } /*************************************** ***************************************/ static void reshow( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_hide_form( ob->form ); fl_show_form( ui->form, FL_PLACE_CENTER | FL_FREE_SIZE, FL_FULLBORDER, "OpenGL Canvas" ); } #include /*************************************** ***************************************/ FD_form * create_form_form( void ) { FL_OBJECT *obj; FD_form *fdui = fl_calloc( 1, sizeof *fdui); fdui->form = fl_bgn_form( FL_NO_BOX, 340, 280 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 340, 280, "" ); fdui->canvas = obj = fl_add_glcanvas( FL_NORMAL_CANVAS, 20, 45, 225, 215, "" ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); fdui->done = obj = fl_add_button( FL_NORMAL_BUTTON, 255, 230, 70, 30, "Done"); fl_set_button_shortcut( obj, "Dd#d", 1 ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fdui->menu = obj = fl_add_menu( FL_PULLDOWN_MENU, 20, 15, 54, 20, "Canvas" ); fl_set_object_shortcut( obj, "#CcC", 1 ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthWest ); fl_set_object_callback( obj, menu_cb, 0 ); fdui->butgrp = fl_bgn_group( ); obj = fl_add_button( FL_NORMAL_BUTTON, 255, 45, 70, 30, "Poly/Line" ); fl_set_object_gravity( obj, FL_NorthEast, FL_NorthEast ); fl_set_object_callback( obj, switch_primitive, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 255, 75, 70, 30, "Hide" ); fl_set_button_shortcut( obj, "#HhH", 1 ); fl_set_object_callback( obj,hide_it, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 255, 105, 70, 30, "ReShow" ); fl_set_button_shortcut( obj, "#RRr", 1 ); fl_set_object_callback( obj, reshow, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 255, 135, 70, 30, "Single" ); fl_set_object_callback( obj, buffer_cb, 0 ); fl_end_group( ); fl_end_form( ); fdui->form->fdui = fdui; return fdui; } xforms-1.0.93sp1/demos/chartstrip.c0000644000175000017500000001214711203636407015673 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * A demo of a moving chart * * This file is part of xforms package * M. Overmars and T.C. Zhao (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" long func = 1; double x = 0.0; double step = 0.15; FL_FORM *form; FL_OBJECT *chartobj, *sinobj, *exitbut, *stepobj; static void create_form_form(void); /*************************************** ***************************************/ static void set_function( FL_OBJECT * obj FL_UNUSED_ARG, long arg ) { func = arg; fl_clear_chart( chartobj ); x = 0.0; } /*************************************** ***************************************/ static void set_step( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { step = fl_get_slider_value( stepobj ); } /*************************************** ***************************************/ static double next_step( void ) { double res = 0.0; switch ( func) { case 1: res = sin( x ); break; case 2: res = sin( 2 * x ) * cos( x ); break; case 3: res = sin( 2 * x ) + cos( x ); break; case 4: res = sin( 3 * x ) + cos( x ); break; case 5: res = sin( x ) * sin( x ) + cos( x ); break; case 6: res = sin( x ) * sin( x ) * sin( x ); break; } x += 0.2 * step; return res; } /*************************************** ***************************************/ int idle_cb( XEvent * xev FL_UNUSED_ARG, void * d FL_UNUSED_ARG ) { fl_insert_chart_value( chartobj, 1, next_step( ), "", 1 ); return 0; } /*************************************** ***************************************/ void add_value( void * xev FL_UNUSED_ARG, void * a FL_UNUSED_ARG ) { fl_insert_chart_value( chartobj, 1, next_step( ), "", 1 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *obj; fl_flip_yorigin( ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_form( ); fl_set_chart_bounds( chartobj, -1.5, 1.5 ); fl_set_chart_maxnumb( chartobj, 80 ); fl_set_chart_autosize( chartobj, 0 ); fl_set_button( sinobj, 1 ); fl_set_slider_value( stepobj, 0.5 ); fl_set_slider_bounds( stepobj, 0.0, 1.0 ); fl_show_form( form,FL_PLACE_CENTER | FL_FREE_SIZE, FL_TRANSIENT, "StripChart" ); do { fl_insert_chart_value( chartobj,1,next_step( ), "", 1 ); obj = fl_check_forms( ); } while ( obj != exitbut ); fl_finish( ); return 0; } /*************************************** ***************************************/ static void create_form_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 490, 320 ); fl_add_box( FL_BORDER_BOX, 0, 0, 490, 320, "" ); chartobj = obj = fl_add_chart( FL_LINE_CHART, 20, 160, 390, 140, "" ); fl_set_object_dblbuffer( obj, 1 ); fl_bgn_group( ); sinobj = obj = fl_add_lightbutton( FL_RADIO_BUTTON, 30, 120, 170, 30, "sin(x)" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_callback( obj, set_function, 1 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 30, 90, 170, 30, "sin(2x)*cos(x)" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_callback( obj, set_function, 2 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 30, 60, 170, 30, "sin(2x)+cos(x)" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_callback( obj, set_function, 3 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 240, 120, 160, 30, "sin(3x)+cos(x)" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_callback( obj, set_function, 4 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 240, 90, 160, 30, "sin(x)^2 + cos(x)" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_callback( obj, set_function, 5 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 240, 60, 160, 30, "sin(x)^3" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_callback( obj, set_function, 6 ); fl_end_group( ); exitbut = obj = fl_add_button( FL_NORMAL_BUTTON, 150, 20, 140, 30, "Exit" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); stepobj = obj = fl_add_valslider( FL_VERT_SLIDER, 430, 20, 40, 280, "" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_callback( obj, set_step, 0 ); fl_end_form( ); } xforms-1.0.93sp1/demos/group.c0000644000175000017500000002247111203636407014645 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the use of groups * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "porsche.xpm" #include "nomail.xbm" #include "bm1.xbm" extern void show_group( FL_OBJECT *, long ); /**** Forms and Objects ****/ #define NGROUP 4 typedef struct { FL_FORM * objsform; void * vdata; char * cdata; long ldata; FL_OBJECT * bitbutton; FL_OBJECT * pixbutton; FL_OBJECT * bit; FL_OBJECT * pix; FL_OBJECT * chart; FL_OBJECT * quit; FL_OBJECT * menu; FL_OBJECT * choice; FL_OBJECT * browser; FL_OBJECT * xyplot; FL_OBJECT * button[5]; FL_OBJECT * group[5]; } FD_objsform; extern FD_objsform *create_form_objsform( void ); FD_objsform *fd_objsform; /* callbacks for form objsform */ /*************************************** ***************************************/ void show_group( FL_OBJECT * ob FL_UNUSED_ARG, long data ) { int i; for ( i = 0; i <= NGROUP;i++) ( i == data ? fl_show_object : fl_hide_object )( fd_objsform->group[ i ] ); } /*************************************** ***************************************/ void init_gui( FD_objsform *fd ) { float x[6] = { 0, 1, 2, 3, 4, 5}; float y[6] = { 5.5, 4, 4.5, 3.8, 4, 5}; char *label[] = { "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" }; size_t i; fl_addto_menu( fd->menu, "One\tF1|Two\tF2|Three\tF3|Four\tF4" ); fl_addto_choice( fd->choice, "Option1|Option2|Option3" ); fl_set_pixmapbutton_data( fd->pixbutton, porsche ); fl_set_pixmap_data( fd->pix, porsche ); fl_set_bitmapbutton_data( fd->bitbutton, bm1_width, bm1_height, bm1_bits ); fl_set_bitmap_data( fd->bit, nomail_width, nomail_height, nomail_bits ); fl_set_browser_fontsize( fd->browser, FL_NORMAL_SIZE ); fl_addto_browser( fd->browser, "browser line 1\nbrowser line 2" ); fl_addto_browser( fd->browser, "browser line 3\nbrowser line 4" ); fl_addto_browser( fd->browser, "browser line 5\nbrowser line 6" ); fl_addto_browser( fd->browser, "browser line 7\nbrowser line 8" ); fl_addto_browser( fd->browser, "browser line 9\nbrowser line 10" ); fl_addto_browser( fd->browser, "browser line 11\nbrowser line 12" ); fl_addto_browser( fd->browser, "browser line 13\nbrowser line 14" ); fl_addto_browser( fd->browser, "browser line 15\nbrowser line 16" ); fl_addto_browser( fd->browser, "browser line 17\nbrowser line 18" ); for ( i = 0; i < sizeof y / sizeof *y; i++ ) fl_add_chart_value( fd->chart, y[ i ], label[ i ], i + 1 ); fl_set_xyplot_data( fd->xyplot, x, y, 6, "", "","" ); fl_add_xyplot_overlay( fd->xyplot, 1, x, y, 6, FL_RED ); fl_add_xyplot_text( fd->xyplot, 2.5, 5.2, "Weekly Summary", FL_ALIGN_CENTER, FL_BLUE ); fl_add_xyplot_text( fd->xyplot, 3, 3.85, "@-22->", FL_ALIGN_TOP, FL_RED ); fl_set_xyplot_overlay_type( fd->xyplot, 1, FL_NORMAL_XYPLOT ); fl_set_xyplot_alphaxtics( fd->xyplot, "Mon|Tue|Wed|Thu|Fri|Sat", 0 ); fl_set_xyplot_ytics( fd->xyplot, -1, -1 ); fl_set_xyplot_linewidth( fd->xyplot, 0, 3 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, 0, 0, 0 ); fd_objsform = create_form_objsform( ); init_gui( fd_objsform ); /* fill-in form initialization code */ fl_set_button( fd_objsform->button[ 0 ], 1 ); show_group( 0, 0 ); /* show the first form */ fl_show_form( fd_objsform->objsform, FL_PLACE_CENTER, FL_FULLBORDER, "objsform" ); while ( fl_do_forms( ) != fd_objsform->quit ) /* empty */ ; fl_finish( ); return 0; } /* Form definition file generated with fdesign. */ #include /*************************************** ***************************************/ FD_objsform * create_form_objsform( void ) { FL_OBJECT *obj; FD_objsform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->objsform = fl_bgn_form( FL_NO_BOX, 456, 361 ); fl_add_box( FL_FLAT_BOX, 0, 0, 456, 361, "" ); fl_add_box( FL_UP_BOX, 0, 0, 455, 360, "" ); fl_add_box( FL_UP_BOX, 0, 0, 456, 70, "" ); fdui->button[ 0 ] = obj = fl_add_button( FL_RADIO_BUTTON, 15, 20, 75, 30, "Static" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fl_set_object_callback( obj, show_group, 0 ); fdui->button[ 1 ] = obj = fl_add_button( FL_RADIO_BUTTON, 90, 20, 75, 30, "Button" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fl_set_object_callback( obj, show_group, 1 ); fdui->button[ 2 ] = obj = fl_add_button( FL_RADIO_BUTTON, 165, 20, 70, 30, "Valuator" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fl_set_object_callback( obj, show_group, 2 ); fdui->button[ 3 ] = obj = fl_add_button( FL_RADIO_BUTTON, 235, 20, 70, 30, "Input" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fl_set_object_callback( obj, show_group, 3 ); fdui->button[ 4 ] = obj = fl_add_button( FL_RADIO_BUTTON, 305, 20, 70, 30, "Other" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fl_set_object_callback( obj, show_group, 4 ); fl_add_box( FL_UP_BOX, 0, 70, 456, 291, "" ); fl_add_box( FL_DOWN_BOX, 9, 90, 435, 260, "" ); fdui->group[ 2 ] = fl_bgn_group( ); obj = fl_add_text( FL_NORMAL_TEXT, 260, 140, 80, 30, "Text" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT | FL_ALIGN_INSIDE ); fl_add_slider( FL_HOR_BROWSER_SLIDER, 60, 120, 170, 25, "" ); obj = fl_add_slider( FL_HOR_FILL_SLIDER, 60, 160, 170, 30, "" ); fl_set_slider_value( obj, 0.54 ); obj = fl_add_slider( FL_VERT_SLIDER, 390, 110, 30, 170, "" ); fl_set_slider_value( obj, 0.48 ); fl_add_valslider( FL_VERT_SLIDER, 350, 110, 30, 170, "" ); obj = fl_add_dial( FL_FILL_DIAL, 50, 220, 90, 70, "" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_add_positioner( FL_NORMAL_POSITIONER, 150, 210,120, 100, "" ); fl_add_counter( FL_NORMAL_COUNTER, 300, 300, 130, 30, "" ); fl_end_group( ); fdui->group[ 1 ] = fl_bgn_group( ); fdui->bitbutton = fl_add_bitmapbutton( FL_NORMAL_BUTTON, 60, 250, 50, 40, "" ); fdui->pixbutton = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 85, 120, 80, 80, "" ); fl_add_button( FL_NORMAL_BUTTON, 290, 270, 90, 35, "Button" ); obj = fl_add_round3dbutton( FL_PUSH_BUTTON, 260, 95, 60, 40, "Round3DButton" ); fl_set_object_color( obj, FL_COL1, FL_MAGENTA ); fl_add_roundbutton( FL_PUSH_BUTTON, 220, 140, 60, 40, "RoundButton" ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 190, 230, 50, 40, "CheckButton" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_add_lightbutton( FL_PUSH_BUTTON, 290, 200, 100, 30, "LightButton" ); obj = fl_add_button( FL_PUSH_BUTTON, 120, 290, 100, 35 ,"Button"); fl_set_object_boxtype( obj, FL_ROUNDED3D_UPBOX ); fl_end_group( ); fdui->group[ 0 ] = fl_bgn_group( ); obj = fl_add_box( FL_UP_BOX, 40, 120, 70, 70, "A Box" ); fl_set_object_lsize( obj,FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fdui->bit = fl_add_bitmap( FL_NORMAL_BITMAP, 30, 220, 80, 70, "bitmap" ); fl_add_clock( FL_ANALOG_CLOCK, 330, 240, 90, 80, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 130, 120, 80, 70, "A Frame" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fdui->pix = fl_add_pixmap( FL_NORMAL_PIXMAP, 340, 110, 90, 70, "pixmap" ); fdui->chart = fl_add_chart( FL_PIE_CHART, 160, 210, 130, 110, "chart" ); obj = fl_add_text( FL_NORMAL_TEXT, 240, 130, 100, 30, "Text stuff\nand more stuff" ); fl_set_object_lalign( obj,FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); fl_end_group( ); fdui->group[ 3 ] = fl_bgn_group( ); fl_add_input( FL_NORMAL_INPUT, 140, 120, 150, 30, "Input" ); fl_add_input( FL_MULTILINE_INPUT, 60, 170, 320, 130, "" ); fl_end_group( ); fdui->quit = fl_add_button( FL_NORMAL_BUTTON, 385, 20, 60, 30, "Quit" ); fdui->group[ 4 ] = fl_bgn_group( ); fdui->menu = obj = fl_add_menu( FL_PULLDOWN_MENU, 190, 110, 40, 19, "Menu" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fdui->choice = fl_add_choice( FL_NORMAL_CHOICE, 290, 110, 120, 30, "" ); fdui->browser = fl_add_browser( FL_NORMAL_BROWSER, 30, 140, 140, 150, "" ); fdui->xyplot = obj = fl_add_xyplot( FL_IMPULSE_XYPLOT, 190, 150, 240, 180, "" ); fl_set_object_lsize( obj, FL_DEFAULT_SIZE ); fl_end_group( ); fl_end_form( ); fdui->objsform->fdui = fdui; return fdui; } xforms-1.0.93sp1/demos/xyplotactive.c0000644000175000017500000001250111376007042016233 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include /**** Forms and Objects ****/ typedef struct { FL_FORM * axypform; void * vdata; long ldata; FL_OBJECT * xyplot; FL_OBJECT * status; } FD_axypform; extern FD_axypform *create_form_axypform( void ); FD_axypform *xypui; /* callbacks for form axypform */ /*************************************** ***************************************/ void xyplot_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { float x, y; int i; char buf[ 64 ]; fl_get_xyplot( ob, &x, &y, &i ); if ( i < 0 ) return; sprintf( buf, "X=%.3f Y=%.3f", x, y ); fl_set_object_label( xypui->status, buf ); } /*************************************** ***************************************/ void alwaysreturn_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_object_return( xypui->xyplot, fl_get_button( ob ) ? FL_RETURN_CHANGED : FL_RETURN_END_CHANGED ); } /*************************************** ***************************************/ void interpolate_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_xyplot_interpolate( xypui->xyplot, 0, fl_get_button( ob ) ? 3 : 0, 0.2 ); } /*************************************** ***************************************/ void inspect_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_xyplot_inspect( xypui->xyplot, fl_get_button( ob ) ); } /*************************************** ***************************************/ void notic_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int notic = fl_get_button( ob ); if ( notic ) { fl_set_xyplot_xtics( xypui->xyplot, -1, -1 ); fl_set_xyplot_ytics( xypui->xyplot, -1, -1 ); } else { fl_set_xyplot_xtics( xypui->xyplot, 0, 0 ); fl_set_xyplot_ytics( xypui->xyplot, 0, 0 ); } } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { float x[ 11 ], y[ 11 ]; int i; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); xypui = create_form_axypform( ); /* Fill-in form initialization code */ fl_set_object_dblbuffer( xypui->status, 1 ); for ( i = 0; i < 11; i++ ) x[ i ] = y[ i ] = i; fl_set_xyplot_data( xypui->xyplot, x, y, 11, "", "", "" ); fl_set_xyplot_linewidth( xypui->xyplot, 0, 2 ); fl_set_xyplot_xgrid( xypui->xyplot, FL_GRID_MINOR ); /* Show the first form */ fl_show_form( xypui->axypform, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, "axypform" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ FD_axypform * create_form_axypform( void ) { FL_OBJECT *obj; FD_axypform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->axypform = fl_bgn_form( FL_NO_BOX, 431, 301 ); fl_add_box( FL_UP_BOX, 0, 0, 431, 301, "" ); fdui->xyplot = obj = fl_add_xyplot( FL_ACTIVE_XYPLOT, 20, 50, 285, 235, "" ); fl_set_object_boxtype( obj, FL_DOWN_BOX ); fl_set_object_color( obj, FL_BLACK, FL_GREEN ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE ); fl_set_object_callback( obj, xyplot_cb, 0 ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 315, 40, 80, 25, "AlwaysReturn" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, alwaysreturn_cb, 0 ); fl_set_object_gravity( obj, FL_NorthEast, FL_NorthEast ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 315, 65, 80, 25, "Interpolate" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, interpolate_cb, 0 ); fl_set_object_gravity( obj, FL_NorthEast, FL_NorthEast ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 315, 90, 85, 25, "InspectOnly" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, inspect_cb, 0 ); fl_set_object_gravity( obj, FL_NorthEast, FL_NorthEast ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 315, 120, 85, 25, "NoTics" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, notic_cb, 0 ); fl_set_object_gravity( obj, FL_NorthEast, FL_NorthEast ); fdui->status = obj = fl_add_box( FL_BORDER_BOX, 20, 15, 285, 25, "" ); fl_set_object_boxtype( obj, FL_DOWN_BOX ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthEast ); fl_set_object_lalign( obj, FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); obj = fl_add_button( FL_NORMAL_BUTTON, 325, 250, 90, 30, "Done" ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/pup.c0000644000175000017500000002205211203636407014310 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* Demo: complete pop-ups. * test font/cursor change * test attaching pup to menu */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include FL_FORM *pup; FL_OBJECT *done, *pret, *b1, *b2, *b3, *menu; void create_form_pup( void ); void init_menu( void ); int post( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_IOPT aa; unsigned int mask = FL_PDVisual; aa.vclass = FL_DefaultVisual; fl_set_defaults( mask, &aa ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_pup( ); /* initialize */ fl_set_object_posthandler( b1, post ); fl_set_object_posthandler( b2, post ); fl_set_object_posthandler( b3, post ); fl_show_form( pup, FL_PLACE_MOUSE, FL_TRANSIENT, "PupDemo" ); init_menu( ); fl_do_forms( ); return 0; } /* post-handler */ /*************************************** ***************************************/ int post( FL_OBJECT * ob, int ev, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * xev FL_UNUSED_ARG ) { static int n1 = -1, n2 = -1; if ( n1 == -1 ) { n1 = fl_defpup( FL_ObjWin( ob ), "line1|line2" ); fl_setpup_shadow( n1, 0 ); fl_setpup_bw( n1, 0 ); fl_setpup_pad( n1, 3, 0 ); n2 = fl_defpup( FL_ObjWin( ob ), "button1|button2" ); fl_setpup_shadow( n2, 0 ); fl_setpup_bw( n2, -1 ); fl_setpup_pad( n2, 3, 0 ); } if ( ev == FL_ENTER ) { if ( ob == b3 ) fl_show_oneliner( "button3", ob->form->x + ob->x + 5, ob->form->y + ob->y + ob->h + 5 ); else { fl_setpup_position( ob->form->x+ob->x, ob->form->y + ob->y + ob->h + 5 ); fl_showpup( ob == b1 ? n1 : n2 ); } } else if ( ev == FL_LEAVE ) { if ( ob == b3 ) fl_hide_oneliner( ); else fl_hidepup( ob == b1 ? n1 : n2 ); } return 0; } /*************************************** ***************************************/ void show_return_val( FL_POPUP_RETURN *r ) { char buf[ 128 ]; if ( r ) sprintf( buf, "Returned %ld (%s)", r->val, r->label ); else sprintf( buf, "Nothing returned" ); fl_set_object_label( pret, buf ); } /*************************************** ***************************************/ int style_cb( FL_POPUP_RETURN *r ) { int style, size, mod; fl_popup_entry_get_font( r->user_data, &style, &size ); mod = style & ( FL_SHADOW_STYLE | FL_ENGRAVED_STYLE | FL_EMBOSSED_STYLE ); fl_popup_entry_set_font( r->user_data, r->val | mod, size ); return FL_IGNORE; } /*************************************** ***************************************/ int size_cb( FL_POPUP_RETURN *r ) { int style; fl_popup_entry_get_font( r->user_data, &style, NULL ); fl_popup_entry_set_font( r->user_data, style, r->val ); fl_popup_get_title_font( r->user_data, &style, NULL ); fl_popup_set_title_font( r->user_data, style, r->val ); return FL_IGNORE; } /*************************************** ***************************************/ int mod_cb( FL_POPUP_RETURN *r ) { int style, size; fl_popup_entry_get_font( r->user_data, &style, &size ); style &= ~ ( FL_SHADOW_STYLE | FL_ENGRAVED_STYLE | FL_EMBOSSED_STYLE ); fl_popup_entry_set_font( r->user_data, style | r->val, size ); return FL_IGNORE; } /*************************************** ***************************************/ int pol_cb( FL_POPUP_RETURN *r ) { FL_POPUP_ENTRY *e; for ( e = r->popup->entries; e != NULL; e = e->next ) if ( e != r->entry ) fl_popup_entry_clear_state( e, FL_POPUP_CHECKED ); fl_popup_set_policy( r->user_data, r->val ); return FL_IGNORE; } /*************************************** ***************************************/ void do_pup( FL_OBJECT * ob, long q FL_UNUSED_ARG ) { static FL_POPUP *m = NULL, *sm1, *sm2, *sm3, *sm4; if ( m == NULL ) { m = fl_popup_add( FL_ObjWin( ob ), "Popup" ); sm1 = fl_popup_add( FL_ObjWin( ob ), NULL ); sm2 = fl_popup_add( FL_ObjWin( ob ), NULL ); sm3 = fl_popup_add( FL_ObjWin( ob ), NULL ); sm4 = fl_popup_add( FL_ObjWin( ob ), NULL ); fl_popup_add_entries( sm4, "FL_POPUP_NORMAL_SELECT%T%x%u%f", FL_POPUP_NORMAL_SELECT, m, pol_cb ); fl_popup_add_entries( sm4, "FL_POPUP_DRAG_SELECT%t%x%u%f", FL_POPUP_DRAG_SELECT, m, pol_cb ); fl_popup_add_entries( sm3, "None%x%R%u%f", 0, 1, m, mod_cb ); fl_popup_add_entries( sm3, "FL_SHADOW_STYLE%x%r%u%f", FL_SHADOW_STYLE, 1, m, mod_cb ); fl_popup_add_entries( sm3, "FL_ENGRAVED_STYLE%x%r%u%f", FL_ENGRAVED_STYLE, 1, m, mod_cb ); fl_popup_add_entries( sm3, "FL_EMBOSSED_STYLE%x%r%u%f", FL_EMBOSSED_STYLE, 1, m, mod_cb ); fl_popup_add_entries( sm1, "FL_NORMAL_STYLE%Sn%x%R%u%f%s", FL_NORMAL_STYLE, 1, m, style_cb, "n" ); fl_popup_add_entries( sm1, "FL_BOLD_STYLE%Sb%x%r%u%f%s", FL_BOLD_STYLE, 1, m, style_cb, "b" ); fl_popup_add_entries( sm1, "FL_ITALIC_STYLE%Si%x%r%u%f%s", FL_ITALIC_STYLE, 1, m, style_cb, "i" ); fl_popup_add_entries( sm1, "FL_BOLDITALIC_STYLE%SI%x%r%u%f%s", FL_BOLDITALIC_STYLE, 1, m, style_cb, "I" ); fl_popup_add_entries( sm1, "%l|Font modifier%Sm%m%s", sm3, "m" ); fl_popup_add_entries( sm2, "FL_TINY_SIZE%x%r%u%f", FL_TINY_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_SMALL_SIZE%x%r%u%f", FL_SMALL_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_NORMAL_SIZE%x%R%u%f", FL_NORMAL_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_MEDIUM_SIZE%x%r%u%f", FL_MEDIUM_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_LARGE_SIZE%x%r%u%f", FL_LARGE_SIZE, 1, m, size_cb ); fl_popup_add_entries( sm2, "FL_HUGE_SIZE%x%r%u%f", FL_HUGE_SIZE, 1, m, size_cb ); fl_popup_add_entries( m, "Font style%m", sm1 ); fl_popup_add_entries( m, "Font size%m", sm2 ); fl_popup_add_entries( m, "Policy%m", sm4 ); fl_popup_set_min_width( m, 100 ); } if ( fl_get_button_numb( ob ) >= FL_SHORTCUT ) fl_popup_set_position( m, ob->form->x + ob->x, ob->form->y + ob->y + ob->h ); fl_popup_do( m ); } /*************************************** ***************************************/ void init_menu( void ) { FL_POPUP *mm, *smm; mm = fl_popup_add( fl_default_win( ), NULL ); smm = fl_popup_add( fl_default_win( ), NULL ); fl_popup_add_entries( smm, "SubItem1%x|SubItem2%x|SubItem3%x", 11, 12, 13 ); fl_popup_add_entries( mm, "MenuItem1|MenuItem2%m|MenuItem3", smm ); fl_set_nmenu_popup( menu, mm ); } /*************************************** ***************************************/ void do_menu( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { char buf[ 128 ]; if ( fl_get_menu( ob ) >= 0 ) sprintf( buf, "%d (%s)", fl_get_menu( ob ), fl_get_menu_text( ob ) ); else sprintf( buf, "%d", fl_get_menu( ob ) ); fl_set_object_label( pret, buf ); } /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void create_form_pup( void ) { FL_OBJECT *obj; if ( pup ) return; pup = fl_bgn_form( FL_UP_BOX, 260, 210 ); fl_add_box( FL_UP_BOX, 0, 0, 260, 210, "" ); done = obj = fl_add_button( FL_NORMAL_BUTTON, 150, 150, 90, 35, "Done" ); fl_set_object_callback( obj, done_cb, 0 ); obj = fl_add_button( FL_MENU_BUTTON, 30, 90, 100, 30, "PopUp" ); fl_set_button_shortcut( obj, "Pp#p", 1 ); fl_set_object_callback( obj, do_pup, 0 ); menu = obj = fl_add_nmenu( FL_NORMAL_NMENU, 160, 95, 60, 25, "Menu" ); fl_set_button_shortcut( obj, "Mm#m", 1 ); fl_set_object_callback( obj, do_menu, 0 ); pret = obj = fl_add_text( FL_NORMAL_TEXT, 20, 60, 220, 30, "" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); b1 = fl_add_button( FL_NORMAL_BUTTON, 20, 10, 60, 30, "Button1" ); b2 = fl_add_button( FL_NORMAL_BUTTON, 90, 10, 60, 30, "Button2" ); b3 = fl_add_button( FL_NORMAL_BUTTON, 160, 10, 60, 30, "Button3" ); fl_end_form( ); } xforms-1.0.93sp1/demos/xyplotall.c0000644000175000017500000001277111311524600015532 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* test screen/world conversion in addition to showing the xyplot styles */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include typedef struct { int type; const char * name; FL_COLOR color; } XYType; #define VN( a, c ) { a, #a, c } static XYType xytype[ ] = { VN( FL_NORMAL_XYPLOT, FL_BLACK ), VN( FL_SQUARE_XYPLOT, FL_BLACK ), VN( FL_CIRCLE_XYPLOT, FL_BLACK ), VN( FL_FILL_XYPLOT, FL_BLACK ), VN( FL_POINTS_XYPLOT, FL_BLACK ), VN( FL_LINEPOINTS_XYPLOT, FL_BLACK ), VN( FL_DASHED_XYPLOT, FL_BLACK ), VN( FL_DOTTED_XYPLOT, FL_BLACK ), VN( FL_DOTDASHED_XYPLOT, FL_BLACK ), VN( FL_IMPULSE_XYPLOT, FL_BLACK ), VN( FL_ACTIVE_XYPLOT, FL_BLACK ), VN( FL_EMPTY_XYPLOT, FL_BLACK ), VN( -1, 0 ), }; #define N ( sizeof xytype / sizeof *xytype - 1 ) static FL_OBJECT *xyplot[ N ]; static void create_form_xyplot( void ); static FL_FORM *fxyplot; static float x[ N ][ 21 ], y[ N ][ 21 ]; /*************************************** ***************************************/ static void done_xyplot( FL_OBJECT * ob, long q FL_UNUSED_ARG ) { fl_hide_form( ob->form ); fl_finish( ); exit( 0 ); } #include /*************************************** ***************************************/ static int post( FL_OBJECT * ob, int ev, FL_Coord mx, FL_Coord my, int key, void * xev FL_UNUSED_ARG ) { if ( ev == FL_PUSH || ev == FL_MOTION ) { float wx, wy; char buf[ 64 ]; fl_xyplot_s2w( ob, mx, my, &wx, &wy ); sprintf( buf, "x=%d y=%d wx=%.1f wy=%.1f", mx, my, wx, wy ); fl_show_oneliner( buf, ob->x + ob->form->x + 5, ob->y + ob->form->y ); /* fl_object_ps_dump( ob,"test.ps" ); */ ob->wantkey = FL_KEY_ALL; ob->input = 1; } else if ( ev == FL_RELEASE ) { fl_hide_oneliner( ); } else if( ev == FL_KEYPRESS ) { fprintf( stderr,"key=%d\n",key ); } return 0; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { size_t i, j; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_xyplot( ); /* make sure double buffer also works */ for ( i = 0; i < 3; i++ ) fl_set_object_dblbuffer( xyplot[ i ], 0 ); for ( i = 0; i < N; i++ ) { for( j = 0; j < 21; j++ ) { x[ i ][ j ] = j * 3.1415 / 10 + 0.2; y[ i ][ j ] = sin( 2 * x[ i ][ j ] ) + cos( x[ i ][ j ] ); } fl_set_xyplot_data( xyplot[ i ], x[ i ], y[ i ], 21, "TestTitle", "X-axis", "Y|axis"); if ( i == 0 ) fl_add_xyplot_text( xyplot[ i ], x[ i ][ 15 ], 0.1, "@2->", FL_ALIGN_TOP, FL_BLUE ); else fl_add_xyplot_text( xyplot[ i ], x[ i ][ 8 ], 1.4, "Text Inset", FL_ALIGN_CENTER, FL_BLUE ); if ( i == 3 ) { fl_set_xyplot_xgrid( xyplot[ i ], FL_GRID_MAJOR ); fl_set_xyplot_xgrid( xyplot[ i ], FL_GRID_MINOR ); } else if ( i == 0 ) { fl_set_xyplot_xtics( xyplot[ i ], 7, 2 ); fl_set_xyplot_xbounds( xyplot[ i ], 6, 0 ); } else if ( i == 1 ) { fl_set_xyplot_ytics( xyplot[ i ], 5, 2 ); fl_set_xyplot_ybounds( xyplot[ i ], 2.4, -2.4 ); } fl_set_object_posthandler( xyplot[ i ], post ); } fl_show_form( fxyplot, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT, "XYplot" ); while ( fl_do_forms( ) ) /* empty */; return 0; } /*************************************** ***************************************/ static void create_form_xyplot( void ) { FL_OBJECT *obj; XYType *xy = xytype; int dx = 180, dy = 160; int i = 0, j = N / 3 + ( N % 3 ? 1 : 0 ); if ( fxyplot ) return; fxyplot = fl_bgn_form( FL_NO_BOX, 3 * ( dx + 20 ) + 20, j * ( dy + 30 ) + 120 ); fl_add_box( FL_UP_BOX, 0, 0, 3 * ( dx + 20 ) + 20, j * ( dy + 30 ) + 120, "" ); for ( j = 0; xy->type != -1; j++ ) { for ( i = 0; i < 3 && xy->type != -1; i++ ) { xyplot[ 3 * j + i ] = obj = fl_add_xyplot( xy->type, i * ( dx + 20 ) + 20 , j * ( dy + 30 ) + 60, dx, dy, xy->name ); fl_set_object_lsize( obj, FL_TINY_SIZE ); fl_set_object_color( obj, FL_COL1, xy->color ); xy++; } i = 0; } obj = fl_add_button( FL_NORMAL_BUTTON, ( 3 * ( dx + 20 ) + 20 ) / 2 - 50, j * ( dy + 30 ) + 60, 100, 30, "Exit" ); fl_set_object_callback( obj, done_xyplot, 0 ); obj = fl_add_text( FL_NORMAL_TEXT, ( 3 * ( dx + 20 ) + 20 ) / 2 - 90, 15, 240, 30, "FL_XYPLOT" ); fl_set_object_lcol( obj, FL_SLATEBLUE ); fl_set_object_lsize( obj, FL_HUGE_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE|FL_EMBOSSED_STYLE ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_end_form( ); } xforms-1.0.93sp1/demos/dirlist.c0000644000175000017500000000545011203636407015161 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * test of fl_get_dirlist() and its kin. * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include #include "fd/fbtest_gui.h" /*************************************** ***************************************/ static void fill_browser( FL_OBJECT * ob ) { FD_fbform *fdui = ( FD_fbform * ) ob->form->fdui; int nfiles = 0; const FL_Dirlist *dl = fl_get_dirlist( ".", "*", &nfiles, 0 ); const FL_Dirlist *ds; const FL_Dirlist *dlend = dl + nfiles; char buf[ 2048 ]; fl_freeze_form( ob->form ); sprintf( buf,"Total %d files", nfiles ); fl_set_object_label( fdui->total, buf ); fl_clear_browser( fdui->browser ); for ( ds = dl; dl < dlend; dl++ ) { sprintf( buf, "%-10s\t\t%5ldK\t%s", dl->name, dl->dl_size >> 10, ctime( &dl->dl_mtime ) + 3 ); fl_addto_browser_chars( fdui->browser, buf ); } fl_unfreeze_form( ob->form ); fl_free_dirlist( ( FL_Dirlist * ) ds ); } /* callbacks and freeobj handles for form fbform */ /*************************************** ***************************************/ void sort_method_cb( FL_OBJECT * ob, long data ) { fl_set_dirlist_sort( data ); fill_browser( ob ); } /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_fbform *fd_fbform; fl_initialize( &argc, argv, 0, 0, 0 ); fd_fbform = create_form_fbform( ); fl_set_browser_fontstyle( fd_fbform->browser, FL_FIXED_STYLE ); /* fill-in form initialization code */ fill_browser( fd_fbform->browser ); /* show the first form */ fl_show_form( fd_fbform->fbform, FL_PLACE_CENTERFREE, FL_FULLBORDER, "fbform" ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/thumbwheel.c0000644000175000017500000000425111310162423015640 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd/twheel_gui.h" /* callbacks and freeobj handles for form twheelform */ /*************************************** ***************************************/ void valchange_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_twheelform *fdui = ( FD_twheelform * ) ob->form->fdui; char buf[ 128 ]; sprintf( buf, "%.3f", fl_get_thumbwheel_value( ob ) ); fl_set_object_label( fdui->report, buf ); } /*************************************** ***************************************/ void returnchange_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_twheelform *fdui = ( FD_twheelform * ) ob->form->fdui; int n = fl_get_choice( ob ); if ( n == 1 ) n = FL_RETURN_END_CHANGED; else if ( n == 2 ) n = FL_RETURN_CHANGED; else if ( n == 3 ) n = FL_RETURN_END; else n = FL_RETURN_ALWAYS; fl_set_thumbwheel_return( fdui->vert, n ); fl_set_thumbwheel_return( fdui->hor, n ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_twheelform *fd_twheelform; fl_initialize( &argc, argv, 0, 0, 0 ); fd_twheelform = create_form_twheelform( ); /* show the first form */ fl_show_form( fd_twheelform->twheelform, FL_PLACE_CENTERFREE, FL_FULLBORDER, "twheelform" ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/yesno_cb.c0000644000175000017500000000405111316477661015316 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * same functionality as yesno.c, but with callbacks. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" /*************************************** ***************************************/ void yes_push( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fprintf( stderr, "Yes is pushed\n" ); exit( 1 ); } /*************************************** ***************************************/ void no_push( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fprintf( stderr, "No is pushed\n" ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 320, 120 ); fl_add_box( FL_NO_BOX, 80, 20, 160, 40, "Do you want to quit?" ); obj = fl_add_button( FL_NORMAL_BUTTON, 40, 70, 80, 30, "Yes" ); fl_set_object_callback( obj, yes_push, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 200, 70, 80, 30, "No" ); fl_set_object_callback( obj, no_push, 0 ); fl_end_form( ); fl_show_form( form,FL_PLACE_MOUSE, FL_TRANSIENT, "Question" ); fl_do_forms( ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/freedraw.c0000644000175000017500000002620011316203750015276 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the use of a free obejct * * This file is part of xforms package * T.C. Zhao and M. Overmars * */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" /**** Forms and Objects ****/ typedef struct { FL_FORM * drawfree; void * vdata; char * cdata; long ldata; FL_OBJECT * freeobj; FL_OBJECT * figgrp; FL_OBJECT * colgrp; FL_OBJECT * colorobj; FL_OBJECT * rsli; FL_OBJECT * gsli; FL_OBJECT * bsli; FL_OBJECT * miscgrp; FL_OBJECT * sizegrp; FL_OBJECT * hsli; FL_OBJECT * wsli; FL_OBJECT * drobj[ 3 ]; } FD_drawfree; extern FD_drawfree * create_form_drawfree( void ); static FD_drawfree * drawui; extern void draw_initialize( FD_drawfree * ); static int max_w = 150, max_h = 150; static Display *dpy; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { dpy = fl_initialize( &argc, argv, "FormDemo", 0, 0 ); drawui = create_form_drawfree( ); fl_set_object_color( drawui->colorobj, FL_FREE_COL1, FL_FREE_COL1 ); draw_initialize( drawui ); fl_show_form( drawui->drawfree, FL_PLACE_CENTER | FL_FREE_SIZE, FL_FULLBORDER, "FreeObject" ); fl_do_forms( ); fl_finish( ); return 0; } /* Structure mantainace */ typedef void ( *DrawFunc )( int, int, int, int, int, unsigned long ); /*************************************** ***************************************/ void draw_triangle( int fill, int x, int y, int w, int h, unsigned long col ) { XPoint xpoint[ 4 ]; GC gc = fl_state[ fl_vmode ].gc[ 0 ]; Window win = fl_winget( ); xpoint[ 0 ].x = x; xpoint[ 1 ].x = x + w / 2; xpoint[ 2 ].x = x + w - 1; xpoint[ 0 ].y = y + h - 1; xpoint[ 1 ].y = y; xpoint[ 2 ].y = y + h - 1; XSetForeground( dpy, gc, fl_get_pixel( col ) ); if ( fill ) XFillPolygon( dpy, win, gc, xpoint, 3, Nonconvex, Unsorted ); else { xpoint[ 3 ].x = xpoint[ 0 ].x; xpoint[ 3 ].y = xpoint[ 0 ].y; XDrawLines( dpy, win, gc, xpoint, 4, CoordModeOrigin ); } } static DrawFunc drawfunc[] = { fl_oval, fl_rectangle, draw_triangle }; typedef struct { DrawFunc drawit; int x, y, w, h, fill, c[ 3 ]; int newfig; FL_COLOR col; } DrawFigure; static DrawFigure saved_figure[ 800 ], *cur_fig; /*************************************** ***************************************/ void draw_initialize( FD_drawfree * ui ) { fl_set_form_minsize( ui->drawfree, 530, 490); fl_set_object_gravity( ui->colgrp, WestGravity, WestGravity ); fl_set_object_gravity( ui->sizegrp, SouthWestGravity, SouthWestGravity ); fl_set_object_gravity( ui->figgrp, NorthWestGravity, NorthWestGravity ); fl_set_object_gravity( ui->miscgrp, SouthGravity, SouthGravity ); fl_set_object_resize( ui->miscgrp, FL_RESIZE_NONE ); cur_fig = saved_figure; cur_fig->c[ 0 ] = cur_fig->c[ 1 ] = cur_fig->c[ 2 ] = 127, cur_fig->w = cur_fig->h = 30; cur_fig->drawit = fl_oval; cur_fig->fill = 1; cur_fig->col = FL_FREE_COL1 + 1; fl_mapcolor( FL_FREE_COL1, cur_fig->c[ 0 ], cur_fig->c[ 1 ], cur_fig->c[ 2 ] ); fl_mapcolor( cur_fig->col, cur_fig->c[ 0 ], cur_fig->c[ 1 ], cur_fig->c[ 2 ] ); fl_set_slider_bounds( ui->wsli, 1, max_w ); fl_set_slider_bounds( ui->hsli, 1, max_h ); fl_set_slider_precision( ui->wsli, 0 ); fl_set_slider_precision( ui->hsli, 0 ); fl_set_slider_value( ui->wsli, cur_fig->w ); fl_set_slider_value( ui->hsli, cur_fig->h ); /* color sliders */ fl_set_slider_bounds( ui->rsli, 1.0, 0 ); fl_set_slider_bounds( ui->gsli, 1.0, 0 ); fl_set_slider_bounds( ui->bsli, 1.0, 0 ); /* intial drawing function */ fl_set_button( ui->drobj[ 0 ], 1 ); /* setup the color slider so we can find out colorobject from the callback funtions. This is not necessary as drawui is static, this is done to show how to access other objects from an object callback function */ ui->rsli->u_vdata = ui; ui->gsli->u_vdata = ui; ui->bsli->u_vdata = ui; } /*************************************** ***************************************/ void switch_object( FL_OBJECT * ob FL_UNUSED_ARG, long which ) { cur_fig->drawit = drawfunc[ which ]; } /*************************************** ***************************************/ void change_color( FL_OBJECT * ob, long which ) { cur_fig->c[ which ] = fl_get_slider_value(ob) * 255.01; fl_mapcolor( cur_fig->col, cur_fig->c[ 0 ], cur_fig->c[ 1 ], cur_fig->c[ 2 ] ); fl_mapcolor( FL_FREE_COL1, cur_fig->c[ 0 ], cur_fig->c[ 1 ], cur_fig->c[ 2 ] ); fl_redraw_object( ( ( FD_drawfree * ) ob->u_vdata )->colorobj ); } /*************************************** ***************************************/ void fill_cb( FL_OBJECT * ob, long notused FL_UNUSED_ARG ) { cur_fig->fill = !fl_get_button( ob ); } /*************************************** ***************************************/ void change_size( FL_OBJECT * ob, long which ) { if ( which == 0 ) cur_fig->w = fl_get_slider_value( ob ); else cur_fig->h = fl_get_slider_value( ob ); } /*************************************** ***************************************/ void refresh_cb( FL_OBJECT * ob FL_UNUSED_ARG, long which FL_UNUSED_ARG ) { fl_redraw_object( drawui->freeobj ); } /*************************************** ***************************************/ void clear_cb( FL_OBJECT * ob FL_UNUSED_ARG, long notused FL_UNUSED_ARG ) { saved_figure[ 0 ] = *cur_fig; cur_fig = saved_figure; fl_redraw_object( drawui->freeobj ); } /*************************************** * The routine that does drawing ***************************************/ int freeobject_handler( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key, void * xev FL_UNUSED_ARG ) { DrawFigure *dr; switch ( event ) { case FL_DRAW: if ( cur_fig->newfig == 1 ) { cur_fig->drawit( cur_fig->fill, cur_fig->x + ob->x, cur_fig->y + ob->y, cur_fig->w, cur_fig->h, cur_fig->col ); } else { fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); for ( dr = saved_figure; dr < cur_fig; dr++ ) { dr->drawit( dr->fill, dr->x + ob->x, dr->y + ob->y, dr->w, dr->h, dr->col); } } cur_fig->newfig = 0; break; case FL_PUSH: if ( key != 2 ) { cur_fig->x = mx - cur_fig->w / 2; cur_fig->y = my - cur_fig->h / 2; /* convert position to relative to the free object */ cur_fig->x -= ob->x; cur_fig->y -= ob->y; cur_fig->newfig = 1; fl_redraw_object( ob ); *(cur_fig+1) = *cur_fig; fl_mapcolor( cur_fig->col + 1, cur_fig->c[ 0 ], cur_fig->c[ 1 ], cur_fig->c[ 2 ] ); cur_fig++; cur_fig->col++; } break; } return 0; } /*************************************** ***************************************/ FD_drawfree * create_form_drawfree( void ) { FL_OBJECT *obj; FD_drawfree *fdui = fl_calloc(1, sizeof *fdui ); fdui->drawfree = fl_bgn_form( FL_NO_BOX, 530, 490 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 530, 490, "" ); obj = fl_add_frame( FL_DOWN_FRAME, 145, 30, 370, 405, "" ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); fdui->freeobj = obj = fl_add_free( FL_NORMAL_FREE, 145, 30, 370, 405,"", freeobject_handler ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); obj = fl_add_checkbutton( FL_PUSH_BUTTON, 15, 25, 100, 35, "Outline" ); fl_set_object_color( obj, FL_MCOL,FL_BLUE ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthWest ); fl_set_object_callback( obj, fill_cb, 0 ); fdui->figgrp = fl_bgn_group( ); fdui->drobj[ 0 ] = obj = fl_add_button( FL_RADIO_BUTTON, 10, 60, 40, 40, "@#circle" ); fl_set_object_lcol( obj, FL_YELLOW ); fl_set_object_callback( obj, switch_object, 0 ); fdui->drobj[1] = obj = fl_add_button( FL_RADIO_BUTTON, 50, 60, 40, 40, "@#square" ); fl_set_object_lcol( obj, FL_YELLOW ); fl_set_object_callback( obj, switch_object, 1 ); fdui->drobj[ 2 ] = obj = fl_add_button( FL_RADIO_BUTTON, 90, 60, 40, 40, "@#8>" ); fl_set_object_lcol( obj, FL_YELLOW ); fl_set_object_callback( obj, switch_object, 2 ); fl_end_group( ); fdui->colgrp = fl_bgn_group(); fdui->colorobj = fl_add_box( FL_BORDER_BOX, 25, 140, 90, 25, "" ); fdui->rsli = obj = fl_add_slider( FL_VERT_FILL_SLIDER, 25, 170, 30, 125, "" ); fl_set_object_color( obj, FL_COL1, FL_RED ); fl_set_object_callback( obj, change_color, 0 ); fl_set_slider_return( obj, FL_RETURN_CHANGED ); fdui->gsli = obj = fl_add_slider( FL_VERT_FILL_SLIDER, 55, 170, 30, 125, "" ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); fl_set_object_callback( obj, change_color, 1 ); fl_set_slider_return( obj, FL_RETURN_CHANGED ); fdui->bsli = obj = fl_add_slider( FL_VERT_FILL_SLIDER, 85, 170, 30, 125, "" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, change_color, 2 ); fl_set_slider_return( obj, FL_RETURN_CHANGED ); fl_end_group( ); fdui->miscgrp = fl_bgn_group( ); obj = fl_add_button( FL_NORMAL_BUTTON, 420, 455, 105, 30, "Quit"); fl_set_button_shortcut( obj,"Qq#q", 1 ); obj = fl_add_button( FL_NORMAL_BUTTON, 280, 445, 105, 30, "Refresh" ); fl_set_object_callback( obj, refresh_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 165, 445, 105, 30, "Clear" ); fl_set_object_callback( obj, clear_cb, 0 ); fl_end_group( ); fdui->sizegrp = fl_bgn_group( ); fdui->hsli = obj = fl_add_valslider( FL_HOR_SLIDER, 15, 410, 120, 25, "Height" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, change_size, 1 ); fl_set_slider_return( obj, FL_RETURN_CHANGED ); fdui->wsli = obj = fl_add_valslider( FL_HOR_SLIDER, 15, 370, 120, 25, "Width" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, change_size, 0 ); fl_set_slider_return( obj, FL_RETURN_CHANGED ); fl_end_group( ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/itest.c0000644000175000017500000004142611203636407014642 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * image support test program * * This file is part of xforms package * T.C. Zhao (Nov., 1999) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flimage.h" #include "fd/is_gui.h" #include #include #include typedef struct { FL_IMAGE * image; FD_is_mainform * fd_mainform; FD_viewform * fd_viewform; FD_processform * fd_processform; FD_saveAs_form * fd_saveAs_form; const char * outformat; int double_buffer; int rgb[ 4 ]; /* current fill color */ } App; static App app; static int testicon = 1; /*************************************** ***************************************/ int visual_cue( FL_IMAGE * im, const char * s ) { fl_set_object_label( app.fd_mainform->status, s ); if ( im->completed < 0 ) fl_set_slider_value( app.fd_mainform->progressbar, 0 ); else fl_set_slider_value( app.fd_mainform->progressbar, im->completed / ( double ) im->total ); return 0; } /*************************************** * only show image file in file selector ***************************************/ static int image_file_filter( const char * name, int type ) { return type == FT_FILE && flimage_is_supported( name ); } /*************************************** * application initialization. Enable all formats and setup visual_cue * and error reporting functions. ***************************************/ static void app_init( void ) { FLIMAGE_SETUP setup; memset( &setup, 0, sizeof setup ); flimage_enable_bmp( ); flimage_enable_gif( ); flimage_enable_ps( ); flimage_enable_fits( ); flimage_enable_xpm( ); flimage_enable_xbm( ); flimage_enable_jpeg( ); flimage_enable_tiff( ); /* Setup visual cue and status reporting */ setup.visual_cue = visual_cue; setup.header_info = 1; setup.app_data = &app; flimage_setup( &setup ); fl_set_dirlist_filter( image_file_filter ); } /*************************************** ***************************************/ void doublebuffer_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { app.double_buffer = fl_get_button( ob ); if ( app.image ) app.image->double_buffer = app.double_buffer; } /*************************************** ***************************************/ void windowlevel_callback( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { if ( ! app.image ) return; flimage_windowlevel( app.image, fl_get_slider_value( app.fd_viewform->level ), fl_get_slider_value( app.fd_viewform->window ) ); app.image->display( app.image, app.image->win ); } /*** callbacks and freeobj handles for form is_mainform ***/ /*************************************** ***************************************/ void vscroll_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( app.image ) { app.image->wy = ( 0.5 - fl_get_scrollbar_value( ob ) ) * app.image->h; app.image->display( app.image, app.image->win ); } } /*************************************** ***************************************/ void hscroll_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( app.image ) { app.image->wx = ( 0.5 - fl_get_scrollbar_value( ob ) ) * app.image->w; app.image->display( app.image, app.image->win ); } } /*************************************** ***************************************/ void outformat_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { app.outformat = fl_get_choice_text( ob ); } /*** Image Processing callbacks ***/ /*************************************** ***************************************/ void colorchange_callback( FL_OBJECT * ob, long data ) { app.rgb[ data ] = fl_get_slider_value( ob ) + 0.1; fl_mapcolor( FL_FREE_COL1, app.rgb[ 0 ], app.rgb[ 1 ], app.rgb[ 2 ] ); fl_redraw_object( app.fd_processform->colorobj ); } /*************************************** ***************************************/ void autocrop_callback( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { if ( ! app.image ) return; flimage_autocrop( app.image, FLIMAGE_AUTOCOLOR ); app.image->display( app.image, app.image->win ); } /*************************************** ***************************************/ void convolve_callback( FL_OBJECT * ob FL_UNUSED_ARG, long data) { #if 1 if ( app.image ) { flimage_convolve( app.image, ( int ** ) data, 0, 0 ); app.image->display( app.image, app.image->win ); } #else /* pixtran test */ int red[ 256 ], green[ 256 ], blue[ 256 ], i; for ( i = 0; i < 256; i++ ) { red[ i ] = i * ( log10( 1.0 + 5 * i / 255.0 ) / log10( 1.0 + 5 ) ); green[ i ] = i * ( log10( 1.0 + 5 * i / 255.0 ) / log10( 1.0 + 5 ) ); blue[ i ] = i * ( log10( 1.0 + 5 * i / 255.0 ) / log10( 1.0 + 5 ) ); } flimage_transform_pixel( app.image, red, green, blue ); app.image->display( app.image, app.image->win ); #endif } /*************************************** ***************************************/ void scaling_callback( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FD_processform *processform = app.fd_processform; int neww, newh, options; float sw, sh; if ( ! app.image ) return; sw = fl_get_counter_value( processform->width ); sh = fl_get_counter_value( processform->height ); if ( fl_get_button( processform->pixel ) ) { neww = sw + 0.1; newh = sh + 0.1; } else { neww = sw * app.image->w + 0.1; newh = sh * app.image->h + 0.1; } if ( ! strcmp( fl_get_choice_text( processform->subpixel ), "subpixel" ) ) options = FLIMAGE_SUBPIXEL; else options = FLIMAGE_NOSUBPIXEL; if ( ! strcmp( fl_get_choice_text( processform->aspect ), "aspect" ) ) options |= FLIMAGE_ASPECT; if ( ! strcmp( fl_get_choice_text( processform->align ), "center" ) ) options |= FLIMAGE_CENTER; else options |= FLIMAGE_NOCENTER; app.image->fill_color = FL_PACK(app.rgb[ 0 ], app.rgb[ 1 ], app.rgb[ 2 ] ); if ( flimage_scale( app.image, neww, newh, options) < 0 ) fprintf( stderr, "scaling failed\n" ); app.image->display( app.image, app.image->win ); } /*************************************** ***************************************/ void switchtopixel_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_processform *processform = app.fd_processform; float w, h; FL_IMAGE *im = app.image; if ( ! app.image ) return; /* this function may be called in two ways: real callback when switch to pixel button is pressed or when called directly by the application when a new image is loaded */ if ( fl_get_button( processform->pixel ) ) { w = ob == 0 ? 1.0 : fl_get_counter_value( processform->width ); h = ob == 0 ? 1.0 : fl_get_counter_value( processform->height ); } else { w = ob == 0 ? im->w : fl_get_counter_value( processform->width ); h = ob == 0 ? im->h : fl_get_counter_value( processform->height ); } fl_freeze_form( processform->processform ); if ( fl_get_button( processform->pixel ) ) { fl_set_counter_bounds( processform->width, 0.1 * im->w, 10.0 * im->w ); fl_set_counter_bounds( processform->height, 0.1 * im->h, 10.0 * im->h ); fl_set_counter_value( processform->width, w * im->w ); fl_set_counter_value( processform->height, h * im->h ); fl_set_counter_precision( processform->width, 0 ); fl_set_counter_precision( processform->height, 0 ); fl_set_counter_step( processform->width, 1, 10 ); fl_set_counter_step( processform->height, 1, 10 ); } else { fl_set_counter_bounds( processform->width, 0.1, 10.0 ); fl_set_counter_bounds( processform->height, 0.1, 10.0 ); fl_set_counter_value( processform->width, w / im->w ); fl_set_counter_value( processform->height, h / im->h ); fl_set_counter_precision( processform->width, 1 ); fl_set_counter_precision( processform->height, 1 ); fl_set_counter_step( processform->width, 0.1, 1 ); fl_set_counter_step( processform->height, 0.1, 1 ); } fl_unfreeze_form( processform->processform ); } /*************************************** * when a new image is loaded, update the GUI ***************************************/ void update_process_form( void ) { switchtopixel_callback( 0, 0 ); } /******************** END OF PROCESS CALLBACKS ****************************/ /*************************************** ***************************************/ void reset_scrollbar( FL_IMAGE * im ) { FD_is_mainform *fdui = im->u_vdata; fl_set_scrollbar_value( fdui->hscroll, 0.5 ); fl_set_scrollbar_value( fdui->vscroll, 0.5 ); } /*************************************** ***************************************/ static void test_icon( void ) { Pixmap pixmap; FL_IMAGE *im; if( ! testicon || app.image == 0 ) return; im = flimage_dup( app.image ); if( app.image->w > 64 || app.image->h > 64 ) flimage_scale( im, 64, 64, FLIMAGE_ASPECT ); pixmap = flimage_to_pixmap( im, FL_ObjWin( app.fd_viewform->pixmap ) ); fl_free_pixmap_pixmap( app.fd_viewform->pixmap ); fl_set_pixmap_pixmap( app.fd_viewform->pixmap, pixmap, 0 ); flimage_free( im ); } /*************************************** ***************************************/ static int load_and_show( const char * file, void * data ) { FD_is_mainform *fdui = data; FL_IMAGE *image; FD_viewform *fd_viewform = app.fd_viewform; if ( ! ( image = flimage_load( file ) ) ) return 0; image->u_vdata = data; reset_scrollbar( image ); image->display( image, FL_ObjWin( fdui->canvas ) ); if ( app.image ) flimage_free( app.image ); app.image = image; app.image->double_buffer = app.double_buffer; app.outformat = image->fmt_name; /* update image info */ fl_freeze_form( fd_viewform->viewform ); fl_set_choice_text( app.fd_saveAs_form->outformat, app.outformat ); fl_clear_browser( fd_viewform->headerinfo ); if ( app.image->info ) fl_addto_browser( fd_viewform->headerinfo, app.image->info ); if ( app.image->type == FL_IMAGE_GRAY16 ) { fl_activate_object( fd_viewform->level ); fl_activate_object( fd_viewform->window ); fl_set_slider_bounds( fd_viewform->level, 0, image->gray_maxval ); fl_set_slider_bounds( fd_viewform->window, 0, image->gray_maxval ); } else { fl_deactivate_object( fd_viewform->level ); fl_deactivate_object( fd_viewform->window ); } test_icon( ); fl_unfreeze_form( fd_viewform->viewform ); update_process_form( ); return 0; } static int save_file( const char *, void * ); /*************************************** ***************************************/ void filemenu_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int n = fl_get_menu( ob ); switch ( n ) { case 2: /* Open */ fl_use_fselector( 0 ); fl_set_fselector_placement( FL_PLACE_MOUSE ); fl_set_fselector_callback( load_and_show, ob->form->fdui ); fl_show_fselector( "Load an Image", 0, "*", 0 ); break; case 3: /* Save */ if( app.image ) { const char *f; fl_use_fselector( 1 ); if ( ( f = fl_show_fselector( "OutputName", 0, "*", app.image->infile ) ) ) save_file( f, 0 ); } break; case 4: /* Save As */ if( app.image ) fl_show_form( app.fd_saveAs_form->saveAs_form, FL_PLACE_CENTERFREE, FL_TRANSIENT, "OutputForm"); break; case 5: exit( 0 ); } } /*************************************** ***************************************/ void progressbar( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { /* fill-in code for callback */ } /*************************************** ***************************************/ static int expose_handle( FL_OBJECT * ob FL_UNUSED_ARG, Window win, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * xev FL_UNUSED_ARG, void * data FL_UNUSED_ARG) { if ( app.image ) app.image->display( app.image, win ); return 0; } /********************************************************************** * The Save As dialog *********************************************************************/ /*************************************** * SaveAs file selector callback ***************************************/ static int save_file( const char * file, void * data FL_UNUSED_ARG ) { if ( ! file || ! *file ) return -1; return flimage_dump( app.image, file, app.outformat ); } /*************************************** ***************************************/ static void hide_it( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { char file[ 256 ]; const char *d, *f; /* get the selected file */ fl_use_fselector( 2 ); if ( ( d = fl_get_directory( ) ) && ( f = fl_get_filename( ) ) ) { sprintf( file,"%s/%s", d, f ); save_file( f, 0 ); } fl_hide_form( app.fd_saveAs_form->saveAs_form ); } /*************************************** ***************************************/ static void init_save_as_form( void ) { static FD_saveAs_form *fd_saveAs_form; const FLIMAGE_FORMAT_INFO *fmtinfo; int i, n; FD_FSELECTOR *fd_fselect; fd_saveAs_form = create_form_saveAs_form( ); app.fd_saveAs_form = fd_saveAs_form; fl_use_fselector( 2 ); fd_fselect = fl_get_fselector_fdstruct( ); /* fl_set_fselector_callback( save_file,0 ); */ fl_set_object_callback( fd_fselect->ready, hide_it, 0 ); fl_show_object( fd_fselect->ready ); fl_set_form_atclose( app.fd_saveAs_form->saveAs_form, fl_goodies_atclose, fd_fselect->ready ); /* put fselector into the formbrowser as a way of reparenting */ fl_addto_formbrowser( app.fd_saveAs_form->formcontainer, fd_fselect->fselect ); /* fill the output format choice */ for ( n = flimage_get_number_of_formats( ), i = 1; i <= n; i++ ) { fmtinfo = flimage_get_format_info( i ); if ( fmtinfo->read_write & FLIMAGE_WRITABLE ) fl_addto_choice( app.fd_saveAs_form->outformat, fmtinfo->short_name ); } app.outformat = fl_get_choice_text( app.fd_saveAs_form->outformat ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_is_mainform *fd_is_mainform; FD_viewform *fd_viewform; FD_processform *fd_processform; FD_annotationform *fd_annotationform; fl_set_border_width( -2 ); fl_initialize( &argc, argv, 0, 0, 0 ); fd_is_mainform = create_form_is_mainform( ); fd_viewform = create_form_viewform( ); fd_processform = create_form_processform( ); fd_annotationform = create_form_annotationform( ); /* initialize app GUI */ app.fd_mainform = fd_is_mainform; app.fd_viewform = fd_viewform; app.fd_processform = fd_processform; /* image related initializations */ app_init( ); /* fill-in form initialization code */ fl_set_browser_fontstyle( fd_viewform->headerinfo, FL_FIXED_STYLE ); fl_addto_tabfolder( fd_is_mainform->tabfolder, " View ", fd_viewform->viewform); fl_addto_tabfolder( fd_is_mainform->tabfolder, "Processing", fd_processform->processform ); fl_addto_tabfolder( fd_is_mainform->tabfolder, "Annotation", fd_annotationform->annotationform); fl_add_canvas_handler( fd_is_mainform->canvas, Expose, expose_handle, 0 ); app.rgb[ 0 ] = fl_get_slider_value( fd_processform->red ) + 0.1; app.rgb[ 1 ] = fl_get_slider_value( fd_processform->green ) + 0.1; colorchange_callback( fd_processform->blue, 2 ); init_save_as_form( ); /* show the main form */ fl_show_form( fd_is_mainform->is_mainform, FL_PLACE_CENTERFREE, FL_FULLBORDER, "is_mainform" ); while ( fl_do_forms( ) ) /* empty */ ; return 0; } #include "fd/is_gui.c" xforms-1.0.93sp1/demos/objpos.c0000644000175000017500000000432611203636407015004 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This is a crazy demo showing the "use" of changing * fields in objects. * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /*************************************** ***************************************/ void move_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data ) { static FL_Coord dx = 8, dy = 8; FL_OBJECT *but = ( FL_OBJECT * ) data; FL_Coord x, y, w, h; fl_get_object_geometry( but, &x, &y, &w, &h ); if ( x + dx < 0 || x + w + dx >= but->form->w ) dx = -dx; if ( y + dy < 0 || y + h + dy >= but->form->h ) dy = -dy; x += dx; y += dy; fl_set_object_position( but, x, y ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *but, *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_DOWN_BOX, 400, 200 ); but = fl_add_button( FL_NORMAL_BUTTON, 140, 160, 70, 35, "Exit" ); fl_set_object_resize( but, FL_RESIZE_NONE ); obj = fl_add_button( FL_TOUCH_BUTTON, 330, 150, 50, 30, "Move" ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fl_set_object_callback( obj,move_cb,( long ) but ); fl_end_form( ); fl_show_form( form, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, "ObjPos" ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/xterm.xpm0000644000175000017500000000261611171560225015227 0ustar jensjens/* XPM */ static char * xterm [] = { /* xterm pixmap * width height ncolors chars_per_pixel */ "32 32 4 1", /* pixels */ " s grey90 c grey90 g4 grey90", ". m black c black g4 black", "X m white c papayawhip g4 grey80", "o m white c gray50 g4 grey50", " ", " .................... ", " .XXXXXXXXXXXXXXXXXXXX.. ", " .XXX..............XXX.X. ", " .XX.oooooooooooooo.XX.XX. ", " .X.oooooooooooooooo.X.XX. ", " .X.oooooooooooooooo.X.XX. ", " .X.oooooooooooooooo.X.XX. ", " .X.oooooooooooooooo.X.XX. ", " .X.oooooooooooooooo.X.XX. ", " .X.oooooooooooooooo.X.XX. ", " .X.oooooooooooooooo.X.XX. ", " .X.oooooooooooooooo.X.X. ", " .X.oooooooooooooooo.X.X. ", " ..XX.oooooooooooooo.XX.. ", " .. .XXX..............XXX.. ", " . .XXXXXXXXXXXXXXXXXXXX. ", " . .................... ", " . .XXXXXX. ", " . .XXXXXX. ", " . .......XXXXXXXX.......... ", " . .XXXXXXXXXXXXXXXXXXXXXXXX. ", " . ......................... ", " . ", " . ........................... ", " ..XXXXXXXXXXXXXXXXXXXXXXXXX. ", " .XX.X.X..X.X..X.X.X.X..XX. ", " .XXXXXXXXXXXXXXXXXXXXXXXX. ", " .X..X..X..............XXX. ", " .XXXXXXXXXXXXXXXXXXXXXXXX. ", " .......................... ", " "}; xforms-1.0.93sp1/demos/browserop.c0000644000175000017500000000744511203636407015537 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This demo shows the basic browsers browsers * * This file is part of xforms package * M. Overmars and T.C. Zhao (1997) * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" FL_FORM *form; FL_OBJECT *browserobj, *inputobj, *exitobj; /*************************************** ***************************************/ void addit( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { /* append and show the last line. Don't use this if you just want * to add some lines. use fl_add_browser_line */ fl_addto_browser( browserobj, fl_get_input( inputobj ) ); } /*************************************** ***************************************/ void insertit( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_insert_browser_line( browserobj, fl_get_browser( browserobj ), fl_get_input( inputobj ) ); } /*************************************** ***************************************/ void replaceit( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { int n; if ( ( n = fl_get_browser( browserobj ) ) ) fl_replace_browser_line( browserobj, n, fl_get_input( inputobj ) ); } /*************************************** ***************************************/ void deleteit( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { int n; if ( ( n = fl_get_browser( browserobj ) ) ) fl_delete_browser_line( browserobj, n ); } /*************************************** ***************************************/ void clearit( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_clear_browser( browserobj ); } /*************************************** ***************************************/ void create_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_UP_BOX, 390, 420 ); browserobj = fl_add_browser( FL_HOLD_BROWSER, 20, 20, 210, 330, "" ); fl_set_object_dblbuffer( browserobj, 1 ); inputobj = fl_add_input( FL_NORMAL_INPUT, 20, 370, 210, 30, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 20, 120, 30, "Add" ); fl_set_object_callback( obj, addit, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 60, 120, 30, "Insert" ); fl_set_object_callback( obj, insertit, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 100, 120, 30, "Replace" ); fl_set_object_callback( obj, replaceit, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 160, 120, 30, "Delete" ); fl_set_object_callback( obj, deleteit, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 200, 120, 30, "Clear" ); fl_set_object_callback( obj, clearit, 0 ); exitobj = fl_add_button( FL_NORMAL_BUTTON, 250, 370, 120, 30, "Exit" ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form( ); fl_show_form( form, FL_PLACE_CENTER, FL_TRANSIENT, "Browser Op" ); do obj = fl_do_forms( ); while ( obj != exitobj ); fl_hide_form( form ); return 0; } xforms-1.0.93sp1/demos/demotest2.c0000644000175000017500000000513611203636407015416 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo program uses the routines in the goodies section, that help you create easy forms in an even easier way. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" /*************************************** ***************************************/ void timeout_remove_alert( int id FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { fl_hide_alert(); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { int choice; char str1[ 100 ], str2[ 100 ]; const char *s; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); #if 0 fl_set_resource( FLOKLabel, "Go" ); #endif if ( fl_show_question( "Do you want bold font ?", 1 ) ) fl_set_goodies_font( FL_BOLD_STYLE, FL_NORMAL_SIZE ); fl_show_messages( "This is a test program for the goodies of the" "forms library" ); fl_add_timeout( 5000, timeout_remove_alert, 0 ); fl_show_alert( "Alert", "Alert form can be used to inform", "recoverable errors", 0 ); if (fl_show_question( "Do you want to quit?", 0 ) ) exit( 0 ); strcpy(str1, ( s = fl_show_input( "Give a string:", "" ) ) ? s: "" ); fl_show_message( "You typed:", "", str1 ); choice = fl_show_choices( "Pick a choice", 2, "One", "Two", "Three", 2 ); switch ( choice ) { case 1 : fl_show_message( "You typed: One", "", "" ); break; case 2 : fl_show_message( "You typed: Two", "", "" ); break; case 3 : fl_show_message( "You typed: Three", "", "" ); break; default : fl_show_message( "An error occured!", "", "" ); break; } strcpy( str2, ( s = fl_show_input( "Give another string:", str1 ) ) ? s : "" ); fl_show_message( "You typed:", "", str2 ); fl_show_messages( "Good Bye" ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/thumb.c0000644000175000017500000001676411311011506014623 0ustar jensjens^^^^^^/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * test popups */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" typedef struct { FL_FORM * pupform; void * vdata; char * cdata; long ldata; FL_OBJECT * menu; FL_OBJECT * button; FL_OBJECT * choice; FL_OBJECT * status; FL_OBJECT * done_cb; } FD_pupform; extern FD_pupform * create_form_pupform( void ); extern void menu_callback( FL_OBJECT *, long ); extern void dopup_callback( FL_OBJECT *, long ); extern void choice_callback( FL_OBJECT *, long ); static void init_menu( FL_OBJECT * ); static void init_choice( FL_OBJECT * ); FD_pupform *fd_pupform; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, 0, 0, 0 ); fd_pupform = create_form_pupform( ); /* fill-in form initialization code */ init_menu( fd_pupform->menu ); init_choice( fd_pupform->choice ); /* show the first form */ fl_show_form( fd_pupform->pupform, FL_PLACE_CENTER, FL_FULLBORDER, "pupform" ); fl_do_forms( ); fl_finish( ); return 0; } /********* MENU ***********************************************/ /*************************************** ***************************************/ void menu_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_pupform *fdui = ob->form->fdui; char buf[ 128 ]; sprintf( buf,"item %d (%s) selected", fl_get_menu( ob ), fl_get_menu_text( ob ) ); fl_set_object_label( fdui->status, buf ); } /** menu initialization entries. No callbacks for the item */ FL_PUP_ENTRY menu_entries[ ] = { { "Menu Item1", NULL, NULL, 0 }, { "Menu Item2", NULL, NULL, 0 }, { "_Menu Item3", NULL, NULL, 0 }, { "/_Menu Item 4", NULL, NULL, 0 }, { "Menu Item 5", NULL, NULL, 0 }, { "Menu Item 6", NULL, NULL, 0 }, { "Menu Item 7", NULL, NULL, 0 }, { "Menu Item 8", NULL, NULL, 0 }, { NULL, NULL, NULL, 0 }, { "Menu Item10", NULL, NULL, 0 }, { "menu Item11", NULL, NULL, 0 }, { NULL, NULL, NULL, 0 } }; /*************************************** ***************************************/ static void menuitem_entercb( int n, void * data ) { char buf[ 128 ]; FD_pupform *fdui = data; fprintf( stderr, "pupId=%d\n", fl_current_pup( ) ); sprintf( buf,"Entered %d (%s)", n, fl_get_menu_item_text( fdui->menu, n ) ); fl_set_object_label( fdui->status, buf ); } /*************************************** ***************************************/ static void init_menu( FL_OBJECT *menu ) { /* if no entercb is desired, set_menu_entries is much simpler */ #if 0 fl_set_menu_entries( menu, menu_entries ); #else int n = fl_newpup( 0 ); fl_setpup_entries( n, menu_entries ); fl_setpup_entercb( n, menuitem_entercb, menu->form->fdui ); fl_setpup_bw( n, -2 ); fl_set_menu_popup( menu, n ); #endif } /*********** End of menu *************************/ /******* PopUP ***********************************/ static int pupID = -1; /*************************************** ***************************************/ static int pupitem_cb( int selected ) { char buf[ 128 ]; fprintf( stderr, "pupId=%d\n", fl_current_pup( ) ); sprintf( buf, "Item %d (%s) selected", selected, fl_getpup_text( pupID, selected ) ); fl_set_object_label( fd_pupform->status, buf ); return selected; } FL_PUP_ENTRY pup_entries[ ] = { { "Popup Item1", pupitem_cb, "1", FL_PUP_RADIO }, { "Popup Item2", pupitem_cb, "2", FL_PUP_RADIO }, { "Popup Item3", pupitem_cb, "3", FL_PUP_RADIO }, { "/Popup Item 4", pupitem_cb, NULL, 0 }, { "Popup Item 5", pupitem_cb, NULL, 0 }, { "Popup Item 6", pupitem_cb, NULL, 0 }, { "Popup Item 7", pupitem_cb, NULL, 0 }, { "Popup Item 8", pupitem_cb, NULL, 0 }, { NULL, NULL, NULL, 0 }, { "Popup Item10", pupitem_cb, 0, FL_PUP_GRAY }, { "Popup Item11", pupitem_cb, NULL, 0 }, { NULL, NULL, NULL, 0 } }; /*************************************** ***************************************/ static void pup_entercb( int n, void * data ) { FD_pupform *fdui = data; char buf[ 128 ]; fprintf( stderr, "pupId=%d\n", fl_current_pup( ) ); sprintf( buf, "Entered %d (%s)", n, pup_entries[ n - 1 ].text ); fl_set_object_label( fdui->status, buf ); } /*************************************** ***************************************/ void dopup_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( pupID < 0 ) { pupID = fl_newpup( 0 ); fl_setpup_entries( pupID, pup_entries ); fl_setpup_entercb( pupID, pup_entercb, ob->form->fdui ); } /* since each item has its own callback, ignore the return value */ fl_dopup( pupID ); } /********* End of pup *****************/ /*************************************** ***************************************/ static void init_choice( FL_OBJECT * ob ) { fl_addto_choice( ob, "Choice1|Choice2|Choice3" ); fl_addto_choice( ob, "Choice4|Choice5|Choice6" ); fl_addto_choice( ob, "Choice7|Choice8|Choice9" ); } /*************************************** ***************************************/ void choice_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { char buf[ 128 ]; FD_pupform *fdui = ob->form->fdui; sprintf( buf,"%d (%s) selected", fl_get_choice( ob ), fl_get_choice_text( ob ) ); fl_set_object_label( fdui->status, buf ); } /* Form definition file generated with fdesign. */ #include "include/forms.h" #include /*************************************** ***************************************/ FD_pupform * create_form_pupform( void ) { FL_OBJECT *obj; FD_pupform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->pupform = fl_bgn_form( FL_NO_BOX, 320, 250 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 320, 250, "" ); fdui->menu = obj = fl_add_menu( FL_PULLDOWN_MENU, 20, 95, 60, 20, "Menu" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_callback( obj, menu_callback, 0 ); fdui->button = obj = fl_add_button( FL_MENU_BUTTON, 100, 90, 75, 30, "Button" ); fl_set_object_callback( obj, dopup_callback, 0 ); fl_set_object_shortcut( obj, "#BB", 1 ); fdui->choice = obj = fl_add_choice( FL_NORMAL_CHOICE2, 195, 90, 105, 30, "" ); fl_set_object_callback( obj, choice_callback, 0 ); fdui->status = obj = fl_add_text( FL_NORMAL_TEXT, 25, 30, 265, 30, "" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_dblbuffer( obj, 1 ); fdui->done_cb = obj = fl_add_button( FL_NORMAL_BUTTON, 210, 200, 85, 30, "Done" ); // fl_add_thumbwheel( FL_FLAT_BOX, 30, 150, 20, 75, "test" ); fl_end_form( ); fl_adjust_form_size( fdui->pupform ); fdui->pupform->fdui = fdui; return fdui; } xforms-1.0.93sp1/demos/strsize.c0000644000175000017500000000572511203636407015217 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include extern void exit_cb(FL_OBJECT *, long); extern void input_cb(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM * form0; void * vdata; long ldata; FL_OBJECT * text; } FD_form0; extern FD_form0 *create_form_form0( void ); FD_form0 *fd_form0; /* callbacks for form form0 */ /*************************************** ***************************************/ void exit_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void input_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { const char *s = fl_get_input( ob ); int w = fl_get_string_width( ob->lstyle, ob->lsize, s, strlen( s ) ); int h = fl_get_string_height( ob->lstyle, ob->lsize, s, strlen( s ), 0, 0 ); char buf[ 18 ]; sprintf( buf, "w=%d h=%d", w, h ); fl_set_object_label( fd_form0->text, buf ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, 0, 0, 0 ); fd_form0 = create_form_form0( ); /* fill-in form initialization code */ /* show the first form */ fl_show_form( fd_form0->form0, FL_PLACE_CENTER, FL_FULLBORDER, "form0" ); fl_do_forms( ); return 0; } /* Form definition file generated with fdesign. */ /*************************************** ***************************************/ FD_form0 * create_form_form0( void ) { FL_OBJECT *obj; FD_form0 *fdui = fl_calloc( 1, sizeof *fdui ); fdui->form0 = fl_bgn_form( FL_NO_BOX, 311, 181 ); fl_add_box( FL_UP_BOX, 0, 0, 311, 181, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 220, 130, 80, 30, "Done" ); fl_set_object_callback( obj, exit_cb, 0 ); obj = fl_add_input( FL_NORMAL_INPUT, 20, 30, 280, 30, "" ); fl_set_object_callback( obj, input_cb, 0 ); fdui->text = obj = fl_add_text( FL_NORMAL_TEXT, 60, 90, 130, 30, "Text" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT | FL_ALIGN_INSIDE ); fl_end_form( ); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/demos/xyplotover.c0000644000175000017500000000711311203636407015740 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the use of xyplot overlay, plot key and * PostScript output. * * This file is part of xforms package * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include /**** Forms and Objects ****/ typedef struct { FL_FORM * fff; void * vdata; long ldata; FL_OBJECT * xyplot; } FD_fff; extern FD_fff * create_form_fff( void ); extern void init_xyplot( FD_fff * ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_fff *fd_fff; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_fff = create_form_fff( ); /* fill-in form initialization code */ init_xyplot( fd_fff ); /* show the first form */ fl_show_form( fd_fff->fff, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT, "XYPlot Overlay" ); fl_do_forms( ); if ( fl_object_ps_dump( fd_fff->xyplot, "test.ps" ) >= 0 ) fprintf( stderr, "PostScript output test.ps written\n" ); return 0; } /*************************************** ***************************************/ void init_xyplot( FD_fff * fd_fff ) { int i; float xx[ 20 ], yy[ 20 ]; for ( i = 0; i <= 10; i++ ) { xx[ i ] = i; yy[ i ] = exp( - ( xx[ i ] - 5 ) * ( xx[ i ] - 5 ) / 8 ); } fl_set_xyplot_data( fd_fff->xyplot, xx, yy, 8, "Plot Title", "X-Axis", "Y|Axis"); fl_set_xyplot_ybounds( fd_fff->xyplot, 0, 1.1 ); fl_set_xyplot_xbounds( fd_fff->xyplot, 0, 10 ); fl_add_xyplot_overlay( fd_fff->xyplot, 1, xx, yy, 11, FL_YELLOW ); fl_set_xyplot_overlay_type( fd_fff->xyplot, 1, FL_LINEPOINTS_XYPLOT ); fl_set_xyplot_interpolate( fd_fff->xyplot, 1, 2, 0.1 ); fl_add_xyplot_text( fd_fff->xyplot, 0.5, 1.0, "Gaussian\nDistribution", FL_ALIGN_RIGHT, FL_WHITE ); fl_set_xyplot_key( fd_fff->xyplot, 0, "Original" ); fl_set_xyplot_key( fd_fff->xyplot, 1, "Overlay" ); fl_set_xyplot_key_position( fd_fff->xyplot, 9.8, 1.08, FL_ALIGN_LEFT_BOTTOM ); } /*************************************** ***************************************/ FD_fff * create_form_fff( void ) { FL_OBJECT *obj; FD_fff *fdui = fl_calloc( 1, sizeof *fdui ); fdui->fff = fl_bgn_form( FL_NO_BOX, 370, 310 ); fl_add_box( FL_UP_BOX, 0, 0, 370, 310, "" ); fdui->xyplot = obj = fl_add_xyplot( FL_IMPULSE_XYPLOT, 10, 20, 350, 260, "An XYPlot with overlay" ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_boxtype( obj, FL_DOWN_BOX ); fl_set_object_color( obj, FL_BLACK, FL_GREEN ); obj = fl_add_button( FL_HIDDEN_BUTTON, 10, 10, 350, 290, "" ); fl_set_button_shortcut( obj,"qQ", 0 ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/positionerXOR.c0000644000175000017500000000512111203636407016266 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This demo shows the use of a positioner with XOR drawmode, most * useful for overlaying positioner on top of other object * * This file is part of xforms package * T.C. Zhao and M. Overmars 1997 */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_OBJECT *xval, *yval; /*************************************** * callback routine ***************************************/ void positioner_cb( FL_OBJECT * ob, long q FL_UNUSED_ARG ) { char str[ 30 ]; sprintf( str, "%f", fl_get_positioner_xvalue( ob ) ); fl_set_object_label( xval, str ); sprintf( str, "%f", fl_get_positioner_yvalue( ob ) ); fl_set_object_label( yval, str ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *pos, *ob; fl_set_border_width( -2 ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 350, 250 ); ob = fl_add_pixmap( FL_NORMAL_PIXMAP, 60, 70, 100, 100, "" ); fl_set_object_boxtype( ob, FL_DOWN_BOX ); fl_set_pixmap_file( ob, "porsche.xpm" ); pos = fl_add_positioner( FL_OVERLAY_POSITIONER, 60, 70, 100, 100, "" ); fl_set_positioner_xbounds( pos, 0, 1 ); fl_set_positioner_ybounds( pos, 0, 1 ); fl_set_object_callback( pos, positioner_cb, 0 ); xval = fl_add_box( FL_DOWN_BOX, 230, 40, 100, 30, "" ); fl_set_object_color( xval, FL_COL1, FL_COL1 ); yval = fl_add_box( FL_DOWN_BOX, 230, 90, 100, 30, "" ); fl_set_object_color( yval, FL_COL1, FL_COL1 ); fl_add_button( FL_NORMAL_BUTTON, 230, 200, 100, 30, "Exit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_CENTER, FL_TRANSIENT, "XOR Positioner" ); positioner_cb( pos, 0 ); fl_do_forms( ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/fonts.c0000644000175000017500000001075511203636407014644 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo, showing the different fonts in different sizes. * M. Overmars and T.C. Zhao */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" typedef struct { FL_FORM * fontsform; void * vdata; char * cdata; long ldata; FL_OBJECT * fontobj; FL_OBJECT * sizeobj; FL_OBJECT * textobj; } FD_fontsform; extern FD_fontsform *create_form_fontsform( void ); FD_fontsform *ui; /*************************************** ***************************************/ void done_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void style_cb( FL_OBJECT * obj, long arg FL_UNUSED_ARG ) { fl_set_object_lstyle( ui->textobj, fl_get_browser( obj ) - 1 ); } /*************************************** ***************************************/ void size_cb( FL_OBJECT * obj, long arg FL_UNUSED_ARG ) { int sizes[ ] = { 8, 10, 11, 12, 13, 14, 18, 24, 30 }; fl_set_object_lsize( ui->textobj, sizes[ fl_get_browser( obj ) - 1 ] ); } /*************************************** ***************************************/ void addit( const char * str ) { fl_add_browser_line( ui->fontobj, str ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_set_border_width( -3 ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); ui = create_form_fontsform( ); fl_scale_form( ui->fontsform, 1.1, 1.2 ); fl_set_object_dblbuffer( ui->textobj, 1 ); fl_set_object_bw( ui->textobj, 5 ); fl_enumerate_fonts( addit, 1 ); fl_select_browser_line( ui->fontobj, 1 ); fl_addto_browser( ui->sizeobj, "8 (tiny)" ); fl_addto_browser( ui->sizeobj, "10 (small)" ); fl_addto_browser( ui->sizeobj, "11 (scaled)" ); fl_addto_browser( ui->sizeobj, "12 (normal)" ); fl_addto_browser( ui->sizeobj, "13 (scaled)" ); fl_addto_browser( ui->sizeobj, "14 (medium)" ); fl_addto_browser( ui->sizeobj, "18 (large)" ); fl_addto_browser( ui->sizeobj, "24 (Huge)" ); fl_addto_browser( ui->sizeobj, "30 (scaled)" ); fl_select_browser_line( ui->sizeobj, 2 ); fl_set_object_lstyle( ui->textobj, FL_NORMAL_STYLE ); fl_call_object_callback( ui->fontobj ); fl_call_object_callback( ui->sizeobj ); fl_show_form( ui->fontsform, FL_PLACE_CENTER, FL_TRANSIENT, "Fonts" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ FD_fontsform * create_form_fontsform( void ) { FL_OBJECT *obj; FD_fontsform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->fontsform = fl_bgn_form( FL_NO_BOX, 371, 296 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 371, 296, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fdui->fontobj = obj = fl_add_browser( FL_HOLD_BROWSER, 10, 145, 195, 135, "" ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE ); fl_set_object_callback( obj, style_cb, 0 ); fdui->sizeobj = obj = fl_add_browser( FL_HOLD_BROWSER, 215, 145, 145, 135, "" ); fl_set_object_lalign( obj, FL_ALIGN_BOTTOM | FL_ALIGN_INSIDE ); fl_set_object_callback( obj, size_cb, 0 ); fdui->textobj = obj = fl_add_text( FL_NORMAL_TEXT, 10, 5, 351, 125, "The quick brown\nfox jumps over\n" "the lazy dog." ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); obj = fl_add_button( FL_HIDDEN_BUTTON, 0, 0, 370, 140, "Button" ); fl_set_button_shortcut( obj, "^[qQ", 1 ); fl_set_object_callback( obj, done_cb, 0 ); fl_end_form( ); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/demos/colbrowser.c0000644000175000017500000002367511205072462015676 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Test browser/slider and color handling. Select a colorname, * the program will show the color. Change the sliders, the * program will pick a colorname that has the closest color. * * This file is part of xforms package. * T.C. Zhao and M. Overmars (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #define MAX_RGB 3000 static FL_FORM *cl; static FL_OBJECT *rescol, *dbobj, *colbr, *rs, *gs, *bs; char dbname[ FL_PATH_MAX] ; static void create_form_cl( void ); static int load_browser( char * ); /* the RGB data file does not have a standard location on unix. */ #ifdef __VMS static char *rgbfile = "SYS$MANAGER:DECW$RGB.DAT"; #else #ifdef __EMX__ /* OS2 */ static char *rgbfile = "/XFree86/lib/X11/rgb.txt"; #else static char *rgbfile = "/usr/lib/X11/rgb.txt"; #endif #endif typedef struct { int r, g, b; } RGBdb; static RGBdb rgbdb[ MAX_RGB ]; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_cl( ); strcpy( dbname, rgbfile ); if ( load_browser( dbname ) ) fl_set_object_label( dbobj, dbname ); else fl_set_object_label( dbobj, "None" ); fl_set_form_minsize( cl, cl->w , cl->h ); fl_set_form_maxsize( cl, 2 * cl->w , 2 * cl->h ); fl_show_form( cl, FL_PLACE_FREE, FL_TRANSIENT, "RGB Browser" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ static void set_entry( int i ) { RGBdb *db = rgbdb + i; fl_freeze_form( cl ); fl_mapcolor( FL_FREE_COL4 + i, db->r, db->g, db->b ); fl_mapcolor( FL_FREE_COL4, db->r, db->g, db->b ); fl_set_slider_value( rs, db->r ); fl_set_slider_value( gs, db->g ); fl_set_slider_value( bs, db->b ); fl_redraw_object( rescol ); fl_unfreeze_form( cl ); } /*************************************** ***************************************/ static void br_cb( FL_OBJECT * ob, long q FL_UNUSED_ARG ) { int r = fl_get_browser( ob ); if ( r <= 0 ) return; set_entry( r - 1 ); } /*************************************** ***************************************/ static int read_entry( FILE * fp, int * r, int * g, int * b, char * name ) { int n; char buf[ 512 ], *p; if ( ! fgets( buf, sizeof buf, fp ) ) return 0; if ( *buf == '!' ) if ( ! fgets( buf, sizeof buf, fp ) ) return 0; if ( sscanf( buf, " %d %d %d %n", r, g, b, &n ) != 3 ) return 0; p = buf + n; /* Remove all spaces */ while ( *p ) { if ( * p != ' ' && *p != '\n' ) *name++ = *p; p++; } *name = '\0'; return ! ( feof( fp ) || ferror( fp ) ); } /*************************************** ***************************************/ static int load_browser( char * fname ) { FILE *fp; RGBdb *db = rgbdb, *dbs = db + MAX_RGB; int r, g, b, lr = -1, lg = -1, lb = -1; char name[ 256 ], buf[ 256 ]; #ifdef __EMX__ extern char *__XOS2RedirRoot( const char * ); if ( ! ( fp = fopen( __XOS2RedirRoot( fname ), "r" ) ) ) #else if ( ! ( fp = fopen( fname, "r" ) ) ) #endif { fl_show_alert( "Load", fname, "Can't open database file", 0 ); return 0; } /* read the items */ fl_freeze_form( cl ); while ( db < dbs && read_entry( fp, &r, &g, &b, name ) ) { db->r = r; db->g = g; db->b = b; /* unique the entries on the fly */ if ( lr != r || lg != g || lb != b ) { db++; lr = r; lg = g; lb = b; sprintf( buf, "(%3d %3d %3d) %s", r, g, b, name ); fl_addto_browser( colbr, buf ); } } fclose( fp ); if ( db < dbs ) db->r = 1000; /* sentinel */ else { db--; db->r = 1000; } fl_set_browser_topline( colbr, 1 ); fl_select_browser_line( colbr, 1 ); set_entry( 0 ); fl_unfreeze_form( cl ); return 1; } /*************************************** ***************************************/ static int search_entry( int r, int g, int b ) { RGBdb *db = rgbdb; int i, j, diffr, diffg, diffb; unsigned int diff, mindiff; mindiff = ~0; for ( i = j = 0; db->r < 256; db++, i++ ) { diffr = r - db->r; diffg = g - db->g; diffb = b - db->b; #ifdef FL_LINEAR diff = ( int ) ( 3.0 * FL_abs( r - db->r ) + 5.9 * FL_abs( g - db->g ) + 1.1 * FL_abs(b - db->b ) ); #else diff = ( int ) ( 3.0 * ( diffr * diffr ) + 5.9 * ( diffg * diffg ) + 1.1 * ( diffb * diffb ) ); #endif if ( mindiff > diff ) { mindiff = diff; j = i; } } return j; } /*************************************** ***************************************/ static void search_rgb( FL_OBJECT * ob FL_UNUSED_ARG, long q FL_UNUSED_ARG ) { int r, g, b, i; int top = fl_get_browser_topline( colbr ); r = ( int ) fl_get_slider_value( rs ); g = ( int ) fl_get_slider_value( gs ); b = ( int ) fl_get_slider_value( bs ); fl_freeze_form( cl ); fl_mapcolor( FL_FREE_COL4, r, g, b ); fl_redraw_object( rescol ); i = search_entry( r, g, b ); /* change topline only if necessary */ if ( i < top || i > top + 15 ) fl_set_browser_topline( colbr, i - 8 ); fl_select_browser_line( colbr, i + 1 ); fl_unfreeze_form( cl ); } /*************************************** * change database ***************************************/ static void db_cb( FL_OBJECT * ob, long q FL_UNUSED_ARG ) { const char *p = fl_show_input( "Enter new database name", dbname ); char buf[ 512 ]; if ( ! p || strcmp( p, dbname ) == 0 ) return; strcpy( buf, p ); if ( load_browser( buf ) ) { strcpy( dbname, buf ); fl_set_object_label( ob, dbname ); } } /*************************************** ***************************************/ static void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long q FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ static void create_form_cl( void ) { FL_OBJECT *obj; if ( cl ) return; cl = fl_bgn_form( FL_NO_BOX, 330, 385 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 330, 385, "" ); fl_set_object_color( obj, FL_COL1, FL_COL1 ); obj = fl_add_box( FL_NO_BOX, 40, 10, 250, 30, "Color Browser" ); fl_set_object_lcol( obj, FL_RED ); fl_set_object_lsize( obj, FL_HUGE_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE + FL_SHADOW_STYLE ); fl_set_object_gravity( obj, FL_North, FL_North ); fl_set_object_resize( obj, FL_RESIZE_NONE ); dbobj = obj = fl_add_button( FL_NORMAL_BUTTON, 40, 50, 250, 25, "" ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_color( obj, fl_get_visual_depth( )==1 ? FL_WHITE: FL_COL1, FL_COL1 ); fl_set_object_callback( obj, db_cb, 0 ); fl_set_object_gravity( obj, FL_North, FL_North ); fl_set_object_resize( obj, FL_RESIZE_X ); rescol = obj = fl_add_box( FL_FLAT_BOX, 225, 90, 90, 35, "" ); fl_set_object_color( obj, FL_FREE_COL4, FL_FREE_COL4 ); fl_set_object_boxtype( obj, FL_BORDER_BOX ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_NorthEast, FL_East ); rs = obj = fl_add_valslider( FL_VERT_FILL_SLIDER, 225, 130, 30, 200, "" ); fl_set_object_color( obj, FL_COL1, FL_RED ); fl_set_slider_bounds( obj, 0, 255 ); fl_set_slider_precision( obj, 0 ); fl_set_object_callback( obj, search_rgb, 0 ); fl_set_slider_return( obj, 0 ); fl_set_object_resize( obj, FL_RESIZE_Y ); fl_set_object_gravity( obj, FL_NorthEast, FL_SouthEast ); fl_set_object_return( obj, FL_RETURN_CHANGED ); gs = obj = fl_add_valslider( FL_VERT_FILL_SLIDER, 255, 130, 30, 200, "" ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); fl_set_slider_bounds( obj, 0, 255 ); fl_set_slider_precision( obj, 0 ); fl_set_object_callback( obj, search_rgb, 1 ); fl_set_slider_return( obj, 0 ); fl_set_object_resize( obj, FL_RESIZE_Y ); fl_set_object_gravity( obj, FL_NorthEast, FL_SouthEast ); fl_set_object_return( obj, FL_RETURN_CHANGED ); bs = obj = fl_add_valslider( FL_VERT_FILL_SLIDER, 285, 130, 30, 200, "" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_slider_bounds( obj, 0, 255 ); fl_set_slider_precision( obj, 0 ); fl_set_object_callback( obj, search_rgb, 2 ); fl_set_slider_return( obj, 0 ); fl_set_object_resize( obj, FL_RESIZE_Y ); fl_set_object_gravity( obj, FL_NorthEast, FL_SouthEast ); fl_set_object_return( obj, FL_RETURN_CHANGED ); colbr = obj = fl_add_browser( FL_HOLD_BROWSER, 10, 90, 205, 240, "" ); fl_set_browser_fontstyle( obj, FL_FIXED_STYLE ); fl_set_object_callback( obj, br_cb, 0 ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); obj = fl_add_button( FL_NORMAL_BUTTON, 135, 345, 80, 30, "Done" ); fl_set_object_callback( obj, done_cb, 0 ); fl_set_object_gravity( obj, FL_South, FL_South ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_end_form( ); fl_scale_form( cl, 1.1, 1.0 ); } xforms-1.0.93sp1/demos/iconvert.10000644000175000017500000000257611171560225015262 0ustar jensjens.\" .\" $Id: iconvert.1,v 1.2 2003/09/09 00:28:25 leeming Exp $ .\" .\" Use the following command to generate viewable man page .\" tbl fdesign.1 | {nt}roff -man .\" .\" ul | more -fsk to view .\" .\" .TH ICONVERT 1L "March 1999" "Version 0.11" "Forms Library" .SH NAME iconvert \- Forms Library Image Support demo .\" .\" setup .de Cr .ie n (c) .el \(co .. .SH SYNOPSIS .if n iconvert .if t \{ .B iconvert \} [-options] input output [fmt] .SH DESCRIPTION .I iconvert is a demo program based on .BR "Forms Library" 's image support. The program can be used to convert image formats. The input image file, if is in one of the supported format, is automatically recognized and read, then the output file is written into a format specified by the extension of the output file name or by the parameter fmt if present. .SH OPTIONS .I iconvert accepts the following command line options .TP 6 .B \-help Prints a brief summary of all command line options. .TP .B \-version Prints the current version of .I iconvert and exits. .TP .B \-verbose Specifies verbose mode where each phase of the conversion is printed to stderr. .SH EXIT STATUS The command exits with status 0 if the conversion is successful; 1 if the command line is bad, and 3 if conversion failed. .SH SEE ALSO xforms(5), fdesign(1L) .SH AUTHOR Copyright .Cr 1999 T.C. Zhao (tc_zhao@yahoo.com) .SH HOME PAGE http://bragg.phys.uwm.edu/xforms xforms-1.0.93sp1/demos/fbrowse1.c0000644000175000017500000000527611203636407015245 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of a browser and fl_call_object_callback. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_FORM *form; FL_OBJECT *br, *but; /*************************************** ***************************************/ void load_file( FL_OBJECT * ob FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { if ( ! fl_load_browser( br, fl_show_input( "Filename to load", "" ) ) ) fl_add_browser_line( br, "NO SUCH FILE!" ); } /*************************************** ***************************************/ void set_size( FL_OBJECT * ob FL_UNUSED_ARG, long arg ) { fl_set_browser_fontsize( br, arg ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 130, 100 ); br = fl_add_browser( FL_NORMAL_BROWSER, 5, 5, 95, 90, "" ); but = fl_add_button( FL_NORMAL_BUTTON, 105, 5, 20, 8, "Exit" ); obj = fl_add_button( FL_NORMAL_BUTTON, 105, 75, 20, 8, "Load" ); fl_set_object_callback( obj, load_file, 0 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 105, 60, 20, 8, "Small" ); fl_set_object_callback( obj, set_size, FL_SMALL_SIZE ); fl_call_object_callback( obj ); fl_set_button( obj, 1 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 105, 50, 20, 8, "Normal" ); fl_set_object_callback( obj, set_size, FL_NORMAL_SIZE ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 105, 40, 20, 8, "Large" ); fl_set_object_callback( obj, set_size, FL_LARGE_SIZE ); fl_end_form( ); fl_scale_form( form, 4.0, 4.0 ); fl_adjust_form_size( form ); fl_clear_browser( br ); fl_add_browser_line( br,"LOAD A FILE." ); fl_show_form( form,FL_PLACE_FREE, FL_FULLBORDER, "Browser" ); do obj = fl_do_forms( ); while ( obj != but ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/positioner.c0000644000175000017500000000433611203636407015704 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of a positioner. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_OBJECT *xval, *yval; /*************************************** * callback routine ***************************************/ void positioner_cb( FL_OBJECT * ob, long q FL_UNUSED_ARG ) { char str[ 30 ]; sprintf( str, "%f", fl_get_positioner_xvalue( ob ) ); fl_set_object_label( xval, str ); sprintf( str, "%f", fl_get_positioner_yvalue( ob ) ); fl_set_object_label( yval, str ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *pos; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 400, 280 ); pos = fl_add_positioner( FL_NORMAL_POSITIONER, 40, 40, 200, 200, "" ); fl_set_positioner_xbounds( pos, 0, 1 ); fl_set_positioner_ybounds( pos, 0, 1 ); fl_set_object_callback( pos, positioner_cb, 0 ); xval = fl_add_box( FL_DOWN_BOX, 270, 40, 100, 30, "" ); fl_set_object_color( xval, FL_COL1, FL_COL1 ); yval = fl_add_box( FL_DOWN_BOX, 270, 90, 100, 30, "" ); fl_set_object_color( yval, FL_COL1, FL_COL1 ); fl_add_button( FL_NORMAL_BUTTON, 270, 210, 100, 30, "Exit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "positioner" ); positioner_cb( pos, 0 ); fl_do_forms( ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/demo.c0000644000175000017500000003117511203636407014436 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /** * \file demo.c * * Driver for the demo/test suite * * This file is part of xforms package * M. Overmars and T.C. Zhao * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "include/forms.h" FL_FORM *form; extern void create_the_forms( void ); static int load_the_menu( const char * ); static void push_menu( const char * ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { char buf[ 1024 ], *p; int version, revision; /* Make sure the distribution is consistent wrt version numbers */ if ( FL_INCLUDE_VERSION != fl_library_version( &version, &revision ) ) { fprintf( stderr, "header/library version mismatch\n" ); fprintf( stderr, " Header: %d.%d.%s\n", FL_VERSION, FL_REVISION, FL_FIXLEVEL ); fprintf( stderr, " Library: %d.%d\n", version, revision ); exit( 1 ); } /* to cut down the "bug" reports of "can't run the demos", put . on path */ #ifndef __VMS if ( ( p = getenv( "PATH" ) )) putenv( strcat( strcat( strcpy( buf, "PATH=" ), p ), ":." ) ); #else printf( " -------->WARNING<-----------" ); printf( " The subdemos will not run unless DCL$PATH has been defined\n" ); printf( " to include the directory where they live\n" ); #endif fl_set_border_width( 1 ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fl_clear_command_log( ); create_the_forms( ); if ( ! load_the_menu( "demo.menu" ) ) exit( -1 ); push_menu( "@main" ); fl_show_form( form, FL_PLACE_CENTER, FL_TRANSIENT, "Demo" ); fl_do_forms( ); return 0; } FL_OBJECT *but[ 9 ]; /* Maintaining and building up the menus. */ typedef struct { char name[ 64 ]; int numb; char iname[ 9 ][ 64 ]; char icommand[ 9 ][ 64 ]; } MENU; #define MAXMENU 32 MENU menus[ MAXMENU ]; int mennumb = 0; /*************************************** * Returns the number of a given menu name. ***************************************/ int find_menu( const char * nnn ) { int i; for ( i = 0; i < mennumb; i++ ) if ( strcmp( menus[ i ].name, nnn ) == 0 ) return i; return -1; } /*************************************** * Creates a new menu with name nnn ***************************************/ static void create_menu( char nnn[ ] ) { if ( mennumb == MAXMENU - 1 ) return; strcpy( menus[ mennumb ].name, nnn ); menus[ mennumb ].numb = 0; mennumb++; } /*************************************** * Adds an item to a menu ***************************************/ static void addto_menu( char men[ ], char item[ ], char comm[ ] ) { int n = find_menu( men ); if ( n < 0 ) { create_menu( men ); n = find_menu( men ); } if ( menus[ n ].numb == 9 ) return; strcpy( menus[ n ].iname[ menus[ n ].numb ], item ); strcpy( menus[ n ].icommand[ menus[ n ].numb ], comm ); menus[ n ].numb++; } /* Button to Item conversion and back. */ int b2n[ ][ 9 ] = { { -1, -1, -1, -1, 0, -1, -1, -1, -1 }, { -1, -1, -1, 0, -1, 1, -1, -1, -1 }, { 0, -1, -1, -1, 1, -1, -1, -1, 2 }, { 0, -1, 1, -1, -1, -1, 2, -1, 3 }, { 0, -1, 1, -1, 2, -1, 3, -1, 4 }, { 0, -1, 1, 2, -1, 3, 4, -1, 5 }, { 0, -1, 1, 2, 3, 4, 5, -1, 6 }, { 0, 1, 2, 3, -1, 4, 5, 6, 7 }, { 0, 1, 2, 3, 4, 5, 6, 7, 8 } }; int n2b[ ][ 9 ] = { { 4, -1, -1, -1, -1, -1, -1, -1, -1 }, { 3, 5, -1, -1, -1, -1, -1, -1, -1 }, { 0, 4, 8, -1, -1, -1, -1, -1, -1 }, { 0, 2, 6, 8, -1, -1, -1, -1, -1 }, { 0, 2, 4, 6, 8, -1, -1, -1, -1 }, { 0, 2, 3, 5, 6, 8, -1, -1, -1 }, { 0, 2, 3, 4, 5, 6, 8, -1, -1 }, { 0, 1, 2, 3, 5, 6, 7, 8, -1 }, { 0, 1, 2, 3, 4, 5, 6, 7, 8 } }; /*************************************** * Transforms a button number to an item number when there are * maxnumb items in total. -1 if the button should not exist. ***************************************/ static int but2numb( int bnumb, int maxnumb ) { return b2n[ maxnumb ][ bnumb ]; } /*************************************** * Transforms an item number to a button number when there are * maxnumb items in total. -1 if the item should not exist. ***************************************/ static int numb2but( int inumb, int maxnumb ) { return n2b[ maxnumb ][ inumb ]; } /* Pushing and Popping menus */ char stack[ 64 ][ 32 ]; int stsize = 0; /*************************************** * Pushes a menu to be visible ***************************************/ static void push_menu( const char * nnn ) { int n, i, bn; int men = find_menu( nnn ); /* make exceptions for B&W */ FL_COLOR bc_more = fl_get_visual_depth( ) == 1 ? FL_COL1 : FL_INDIANRED; FL_COLOR bc_term = fl_get_visual_depth( ) == 1 ? FL_COL1 : FL_SLATEBLUE; if ( men < 0 ) return; n = menus[ men ].numb; fl_freeze_form( form ); for ( i = 0; i < 9; i++ ) fl_hide_object( but[ i ] ); for ( i = 0; i < n; i++ ) { bn = numb2but( i, n - 1 ); fl_show_object( but[ bn ] ); fl_set_object_label( but[ bn ], menus[ men ].iname[ i ] ); if ( menus[ men ].icommand[ i ][ 0 ] == '@' ) fl_set_object_color( but[ bn ], bc_more, FL_RED ); else fl_set_object_color( but[ bn], bc_term, FL_BLUE ); } fl_unfreeze_form( form ); strcpy( stack[ stsize ], nnn ); stsize++; } /*************************************** * Pops a menu ***************************************/ static void pop_menu( void ) { if ( stsize <= 1 ) return; stsize -= 2; push_menu( stack[ stsize ] ); } /*************************************** * The callback Routines ***************************************/ #if defined __cplusplus extern "C" #endif /*************************************** * handles a button push ***************************************/ void dobut( FL_OBJECT * obj FL_UNUSED_ARG, long arg ) { int men = find_menu( stack[ stsize - 1 ] ); int n = menus[ men ].numb; int bn = but2numb( ( int ) arg, n - 1 ); if ( menus[ men ].icommand[ bn ][ 0 ] == '@' ) push_menu( menus[ men ].icommand[ bn ] ); else { char cmd[ 1024 ]; char **vv; int c, i; vv = fl_get_cmdline_args( &c ); strcpy( cmd, menus[ men ].icommand[ bn ] ); for ( i = 1; i < c; i++ ) strcat( strcat( cmd, " " ), vv[ i ] ); fl_addto_command_log( "running " ); fl_addto_command_log( cmd ); fl_addto_command_log( "\n" ); fl_deactivate_all_forms( ); fl_exe_command( cmd, 1 ); fl_activate_all_forms( ); } } /*************************************** * Go up a level in the menu tree ***************************************/ void doback( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { pop_menu( ); } /*************************************** * Exit the program ***************************************/ void doexit( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_hide_form( form ); fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void showlog( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_show_command_log( FL_TRANSIENT ); } /*************************************** * Loads the menu file. Returns whether successful. ***************************************/ static int load_the_menu( const char * fname ) { FILE *fin; char line[ 256 ], mname[ 64 ], iname[ 64 ], cname[ 64 ]; int i, j; fin = fopen( fname, "r" ); if ( fin == NULL ) { fl_show_message( "ERROR", "", "Cannot read the menu description file." ); return 0; } while ( 1 ) { if ( fgets( line, 256, fin ) == NULL) break; j = 0; i = 0; while ( line[ i ] == ' ' || line[ i ] == '\t' ) i++; if ( line[ i ] == '\n' ) continue; if ( line[ i ] == '#' ) continue; while ( line[ i ] != ':' && line[ i ] != '\n' ) mname[ j++ ] = line[ i++ ]; mname[ j ] = '\0'; if ( line[ i ] == ':' ) i++; j = 0; while ( line[ i ] != ':' && line[ i ] != '\n' ) { if ( line[ i ] == '\\' && line[ i + 1 ] == 'n' ) { iname[ j++ ] = '\n'; i += 2; } else iname[ j++ ] = line[ i++ ]; } iname[ j ] = '\0'; if ( line[ i ] == ':' ) i++; j = 0; while ( line[ i ] != ':' && line[ i ] != '\n' ) cname[ j++ ] = line[ i++ ]; cname[ j ] = '\0'; addto_menu( mname, iname, cname ); } fclose( fin ); return 1; } /*************************************** ***************************************/ void create_form_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 370, 450 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 370, 450, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); obj = fl_add_box( FL_FRAME_BOX, 20, 20, 330, 40, "Forms Demonstration" ); fl_set_object_color( obj, FL_INDIANRED, FL_COL1 ); fl_set_object_lsize( obj, FL_HUGE_SIZE ); fl_set_object_lstyle( obj, FL_ENGRAVED_STYLE + FL_BOLD_STYLE ); fl_set_object_lcol( obj, FL_INDIANRED ); obj = fl_add_box( FL_FRAME_BOX, 20, 70, 330, 330, "" ); fl_set_object_color( obj, FL_INDIANRED, FL_COL1 ); obj = fl_add_button( FL_NORMAL_BUTTON, 190, 410, 110, 30, "Exit" ); fl_set_object_callback( obj, doexit, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 80, 410, 110, 30, "Show Log" ); fl_set_object_callback( obj, showlog, 0 ); obj = fl_add_button( FL_HIDDEN_BUTTON, 20, 20, 330, 380, "Button" ); fl_set_object_callback( obj, doback, 0 ); but[ 0 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 40, 90, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 0 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); but[ 1 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 140, 90, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 1 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); but[ 2 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 240, 90, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 2 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); but[ 5 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 240, 190, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 5 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); but[ 4 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 140, 190, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 4 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); but[ 3 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 40, 190, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 3 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); but[ 6 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 40, 290, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 6 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); but[ 7 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 140, 290, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 7 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); but[ 8 ] = obj = fl_add_button( FL_NORMAL_BUTTON, 240, 290, 90, 90, "Button" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fl_set_object_callback( obj, dobut, 8 ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fl_end_form( ); fl_adjust_form_size( form ); } /*************************************** ***************************************/ void create_the_forms( void ) { create_form_form( ); fl_set_form_dblbuffer( form, 1 ); } xforms-1.0.93sp1/demos/yesno.c0000644000175000017500000000316611203636407014646 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* A box with two buttons and a string. Simple boxes like this are very usefull for asking questions */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *yes, *no; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 320, 120 ); fl_add_box( FL_NO_BOX, 0, 10, 320, 40, "Do you want to quit?" ); yes = fl_add_button( FL_NORMAL_BUTTON, 40, 70, 80, 30," Yes" ); no = fl_add_button( FL_NORMAL_BUTTON, 200, 70, 80, 30, "No" ); fl_end_form( ); fl_show_form( form, FL_PLACE_MOUSE, FL_TRANSIENT, "Question" ); while ( fl_do_forms( ) != yes ) /* empty */ ; fl_hide_form( form ); return 0; } xforms-1.0.93sp1/demos/.cvsignore0000644000175000017500000000136311171560225015340 0ustar jensjensMakefile Makefile.in .deps .libs arrowbutton borderwidth boxtype browserall browserop buttonall butttypes canvas chartall chartstrip choice colbrowser colsel colsel1 counter cursor demo demo05 demo06 demo27 demo33 demotest demotest2 demotest3 dirlist fbrowse fbrowse1 fdial flclock folder fonts formbrowser free1 freedraw freedraw_leak goodies group ibrowser iconify iconvert inputall invslider itest lalign ldial ll longlabel menu minput minput2 multilabel ndial newbutton objinactive objpos objreturn pmbrowse popup positioner positionerXOR preemptive pup pushbutton pushme rescale scrollbar secretinput sld_radio sldinactive sldsize sliderall strsize symbols thumbwheel timer timerprec touchbutton wwwl xyplotactive xyplotall xyplotover yesno yesno_cb xforms-1.0.93sp1/demos/sldsize.c0000644000175000017500000000326311203636407015164 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of a setting slider sizes */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *sl1, *sl2, *but, *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 150, 300 ); sl1 = fl_add_slider( FL_VERT_SLIDER, 20, 20, 40, 180, "X" ); sl2 = fl_add_slider( FL_VERT_SLIDER, 90, 20, 40, 180, "Y" ); but = fl_add_button( FL_NORMAL_BUTTON, 40, 250, 70, 30, "Exit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "Slider Size" ); do { fl_set_slider_size( sl2, fl_get_slider_value( sl1 ) ); fl_set_slider_size( sl1, fl_get_slider_value( sl2 ) ); obj = fl_do_forms( ); } while ( obj != but ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/scrollbar.c0000644000175000017500000000515011316160365015467 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * scrollbar functionality check-out */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include "fd/scrollbar_gui.h" /* from fd/ directory */ /*************************************** ***************************************/ void hide_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_scb *fdui = ob->form->fdui; if ( fl_object_is_visible( fdui->hor_thin ) ) { fl_set_object_label( fdui->hide,"Show" ); fl_hide_object( fdui->hor_thin ); } else { fl_set_object_label( fdui->hide,"Hide" ); fl_show_object( fdui->hor_thin ); } } /*************************************** ***************************************/ void deactivate_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_scb *fdui = ob->form->fdui; if ( fl_object_is_active( fdui->hor_thin ) ) { fl_set_object_label( fdui->deactivate,"Activate" ); fl_deactivate_object( fdui->hor_thin ); } else { fl_set_object_label( fdui->deactivate,"Deactivate" ); fl_activate_object( fdui->hor_thin ); } } /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void noop_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_scb *fd_scb; fl_initialize( &argc, argv, 0, 0, 0 ); fd_scb = create_form_scb( ); fl_show_form( fd_scb->scb, FL_PLACE_CENTERFREE, FL_FULLBORDER, "form0" ); fl_do_forms( ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/timer.h0000644000175000017500000000242611171560225014632 0ustar jensjens/* * * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ #ifndef FD_timerform_h_ #define FD_timerform_h_ /* Header file generated with fdesign. */ /**** Callback routines ****/ extern void expired(FL_OBJECT *, long); extern void suspend_resume(FL_OBJECT *, long); extern void reset(FL_OBJECT *, long); extern void timer_direction(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM *timerform; FL_OBJECT *timer; FL_OBJECT *down; void *vdata; long ldata; } FD_timerform; extern FD_timerform * create_form_timerform(void); #endif /* FD_timerform_h_ */ xforms-1.0.93sp1/demos/iconvert.c0000644000175000017500000000762111203654176015345 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Convert an image file using the image support of Forms Library. * * Usage: iconvert [-version][-verbose][-help] inputimage outimage [fmt] * output image format is determined by the extension or * by fmt if present. * * Exit status: 0 (success) 1 (bad command line) 3 (conversion failed) * * T.C. Zhao (03/1999) * */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flimage.h" static void initialize( void ); static void usage( const char *, int ); static int parse_command_line( int *, char ** ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_IMAGE *im; const char *fmt = 0; char *const *args; initialize( ); args = argv + parse_command_line( &argc, argv ); if ( argc < 3 || ! ( fmt = argc >= 4 ? args[ 3 ] : strrchr( args[ 2 ], '.' ) ) ) usage( argv[ 0 ], argc >= 3 ); fmt += fmt[ 0 ] == '.'; im = flimage_load( strdup( args[ 1 ] ) ); return flimage_dump( im, args[ 2 ], fmt ) < 0 ? 3 : 0; } /*************************************** ***************************************/ static void usage( const char * cmd, int more ) { const FLIMAGE_FORMAT_INFO *info; int n, i, k; fprintf( stderr, "Usage: %s [-verbose][-help] infile outfile [fmt]\n", cmd ); if ( ! more ) exit( 1 ); fputs( " The output format is determined by the file extension " "or fmt.\n fmt or extension must be one of the following\n", stderr ); n = flimage_get_number_of_formats( ); for ( i = 1, k = 0; i <= n; i++ ) { info = flimage_get_format_info( i ); if ( info->read_write & FLIMAGE_WRITABLE ) { fprintf( stderr, "\t%s", info->extension ); if ( ++k % 6 == 0 ) fputc( '\n', stderr ); } } if ( k % 6 ) fputc( '\n', stderr ); exit( 1 ); } /* shut up visual_cue */ /*************************************** ***************************************/ static int noop( FL_IMAGE * im FL_UNUSED_ARG, const char * s FL_UNUSED_ARG ) { return 0; } /*************************************** ***************************************/ static int parse_command_line( int * argc, char * argv[ ] ) { int i; static FLIMAGE_SETUP setup; setup.visual_cue = noop; for ( i = 1; i < *argc && *argv[ i ] == '-'; ) { if ( strncmp( argv[ i ], "-verb", 5 ) == 0 ) { setup.visual_cue = 0; i++; } else if ( strncmp( argv[ i ], "-h", 2 ) == 0 ) { usage( argv[ 0 ], 1 ); i++; } else usage( argv[ 0 ], 0 ); } flimage_setup( &setup ); *argc -= i - 1; return i - 1; } /*************************************** ***************************************/ static void initialize( void ) { flimage_enable_xpm( ); flimage_enable_gif( ); flimage_enable_bmp( ); flimage_enable_sgi( ); flimage_enable_fits( ); flimage_enable_png( ); flimage_enable_xwd( ); flimage_enable_tiff( ); flimage_enable_ps( ); #ifndef NO_JPEG flimage_enable_jpeg( ); #endif } xforms-1.0.93sp1/demos/free1.c0000644000175000017500000000575611212330223014505 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo is meant to demonstrate the use of a free object in a form. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include int on = 1, dcol = 1; FL_COLOR cole; /*************************************** * The call back routine ***************************************/ int handle_free1( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { static int dcol = 1; switch ( event ) { case FL_DRAW: fl_rectf( obj->x, obj->y, obj->w, obj->h, obj->u_ldata ); break; case FL_RELEASE: on = ! on; break; case FL_STEP: if ( on ) { if ( ( FL_COLOR ) obj->u_ldata >= cole ) dcol = -1; if ( obj->u_ldata <= FL_FREE_COL1 ) dcol = 1; obj->u_ldata += dcol; fl_redraw_object( obj ); } break; } return 0; } /*************************************** ***************************************/ void done( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *obj; FL_COLOR i; int j, depth, col; fl_initialize(&argc, argv, "FormDemo", 0, 0); form = fl_bgn_form( FL_UP_BOX, 400, 400 ); obj = fl_add_button( FL_NORMAL_BUTTON, 320, 20, 40, 30, "Exit" ); fl_set_object_callback( obj, done, 0 ); obj = fl_add_free( FL_CONTINUOUS_FREE, 40, 80, 320, 280, "", handle_free1 ); fl_end_form( ); /* Can't do it if less than 4 bit deep... */ depth = fl_get_visual_depth( ); if ( depth < 4 ) { fprintf( stderr,"This Demo requires a depth of at least 4 bits\n" ); fl_finish( ); exit( 1 ); } /* ...but too large a depth also won't do */ if ( depth > 7 ) depth = 7; cole = ( 1 << depth ) - 1; if ( cole > 64 ) cole = 64; obj->u_ldata = col = FL_FREE_COL1; cole += col; for ( i = col; i <= cole; i++ ) { j = 255 * ( i - col ) / ( double ) ( cole - col ); fl_mapcolor( i, j, j, j ); } fl_show_form( form,FL_PLACE_CENTER, FL_NOBORDER, "Free Object" ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/pup.c.old0000644000175000017500000001602611171560225015067 0ustar jensjens/* * * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ /* Demo: complete pop-ups. * test font/cursor change * test attaching pup to menu */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include FL_FORM *pup; FL_OBJECT *done, *pret, *b1, *b2, *b3, *menu; void create_form_pup( void ); void init_menu( void ); int post( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_IOPT aa; unsigned int mask = FL_PDVisual; aa.vclass = FL_DefaultVisual; fl_set_defaults( mask, &aa ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_pup( ); /* initialize */ fl_set_object_posthandler( b1, post ); fl_set_object_posthandler( b2, post ); fl_set_object_posthandler( b3, post ); fl_show_form( pup, FL_PLACE_MOUSE, FL_TRANSIENT, "PupDemo" ); init_menu( ); fl_do_forms( ); return 0; } static int subm = -1, m = -1, ssm; /* post-handler */ /*************************************** ***************************************/ int post( FL_OBJECT * ob, int ev, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * xev FL_UNUSED_ARG ) { static int n1 = -1, n2 = -1; if ( n1 == -1 ) { n1 = fl_defpup( FL_ObjWin( ob ), "line1|line2" ); fl_setpup_shadow( n1, 0 ); fl_setpup_bw( n1, 0 ); fl_setpup_pad( n1, 3, 0 ); n2 = fl_defpup( FL_ObjWin( ob ), "button1|button2" ); fl_setpup_shadow( n2, 0 ); fl_setpup_bw( n2, -1 ); fl_setpup_pad( n2, 3, 0 ); } if ( ev == FL_ENTER ) { if ( ob == b3 ) fl_show_oneliner( "button3", ob->form->x + ob->x + 5, ob->form->y + ob->y + ob->h + 5 ); else { fl_setpup_position( ob->form->x+ob->x, ob->form->y + ob->y + ob->h + 5 ); fl_showpup( ob == b1 ? n1 : n2 ); } } else if ( ev == FL_LEAVE ) { if ( ob == b3 ) fl_hide_oneliner( ); else fl_hidepup( ob == b1 ? n1 : n2 ); } return 0; } /*************************************** ***************************************/ void show_return_val( int i ) { char buf[ 128 ]; if ( i >= 0 ) sprintf( buf, "Returned %d (%s)", i, fl_getpup_text( m, i ) ); else sprintf( buf, "Returned %d", i ); fl_set_object_label( pret, buf ); } /*************************************** ***************************************/ int ssm_cb( int a ) { show_return_val( a ); return a; } /*************************************** ***************************************/ void do_pup( FL_OBJECT * ob, long q FL_UNUSED_ARG ) { static int n; if ( subm == -1 ) { ssm = fl_newpup( FL_ObjWin( ob ) ); subm = fl_newpup( FL_ObjWin( ob ) ); m = fl_newpup( FL_ObjWin( ob ) ); /* fl_addtopup( ssm, "SubSubM%F%t", ssm_cb );*/ fl_addtopup( ssm, "SSMItem20%x20%R1" ); fl_addtopup( ssm, "SSMItem21%x21%r1" ); fl_addtopup( ssm, "SSMItem22%x22%r1%l" ); fl_addtopup( ssm, "SSMitem30%x30%R2" ); fl_addtopup( ssm, "SSMItem31%x31%r2" ); fl_addtopup( ssm, "SSMItem32%x32%b" ); /* fl_addtopup( subm, "SubMenu%t" );*/ fl_addtopup( subm, "SMItemA\tAlt-A%x10%h","#a" ); fl_addtopup( subm, "SMItemB\tAlt-B%x11%h","#b" ); fl_addtopup( subm, "SM%%ItemC\tAlt-C%x12%h","#c" ); fl_addtopup( subm, "SMItemD\tAlt-F5%x13%h%m","#&5", ssm ); fl_addtopup( subm, "SMItemE\tAlt-E%x14","#E" ); fl_setpup_mode( subm, 14, FL_PUP_GREY ); fl_addtopup( m, "PopUP%t" ); fl_addtopup( m, "MenuItem1%h","1#1" ); fl_addtopup( m, "MenuItem2%h", "2#2" ); fl_setpup_submenu( m, 2, subm ); fl_addtopup( m, "MenuItem3%h","3#3" ); fl_addtopup( m, "MenuItem4%h", "4#4" ); } if ( fl_get_button_numb( ob ) >= FL_SHORTCUT ) fl_setpup_position( ob->form->x + ob->x, ob->form->y + ob->y + ob->h ); show_return_val( fl_dopup( m ) ); /* test if changing size/style ok */ n = ! n; fl_setpup_fontsize( n ? 14 : 12 ); fl_setpup_fontstyle( n ? FL_TIMES_STYLE : FL_BOLDITALIC_STYLE ); fl_setpup_cursor( m, n ? XC_hand2 : XC_sb_right_arrow ); } /*************************************** ***************************************/ void init_menu( void ) { int mm, smm; mm = fl_newpup( fl_default_win( ) ); fl_setpup_bw( mm, -2 ); fl_setpup_shadow( mm, 0 ); smm = fl_newpup( 0 ); fl_setpup_shadow( smm, 0 ); fl_addtopup( mm, "MenuItem1|MenuItem2%m|MenuItem3", smm ); fl_addtopup( smm, "SubItem1%x11|SubItem2%x12|SubItem3%x13" ); /* attach pup to menu */ fl_set_menu_popup( menu, mm ); } /*************************************** ***************************************/ void do_menu( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { char buf[ 128 ]; if ( fl_get_menu( ob ) >= 0 ) sprintf( buf, "%d (%s)", fl_get_menu( ob ), fl_get_menu_text( ob ) ); else sprintf( buf, "%d", fl_get_menu( ob ) ); fl_set_object_label( pret, buf ); } /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void create_form_pup( void ) { FL_OBJECT *obj; if ( pup ) return; pup = fl_bgn_form( FL_UP_BOX, 260, 210 ); fl_add_box( FL_UP_BOX, 0, 0, 260, 210, "" ); done = obj = fl_add_button( FL_NORMAL_BUTTON, 150, 150, 90, 35, "Done" ); fl_set_object_callback( obj, done_cb, 0 ); obj = fl_add_button( FL_MENU_BUTTON, 30, 90, 100, 30, "PopUp" ); fl_set_button_shortcut( obj, "Pp#p",1 ); fl_set_object_callback( obj, do_pup, 0 ); menu = obj = fl_add_menu( FL_PULLDOWN_MENU, 160, 95, 60, 25, "Menu" ); fl_set_object_callback( obj, do_menu, 0 ); pret = obj = fl_add_text( FL_NORMAL_TEXT, 20, 60, 220, 30, "" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); b1 = fl_add_button( FL_NORMAL_BUTTON, 20, 10, 60, 30, "Button1" ); b2 = fl_add_button( FL_NORMAL_BUTTON, 90, 10, 60, 30, "Button2" ); b3 = fl_add_button( FL_NORMAL_BUTTON, 160, 10, 60, 30, "Button3" ); fl_end_form( ); } xforms-1.0.93sp1/demos/grav.c0000644000175000017500000002757111376177766014501 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * Author: Jens Thoms Toerring * */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" /**** Forms and Objects ****/ typedef struct { FL_FORM * grav; FL_OBJECT * box; FL_OBJECT * rx; FL_OBJECT * ry; } FD_gravity; typedef struct { FL_OBJECT * box; FL_OBJECT * rx; FL_OBJECT * ry; unsigned int grav; } FD_grav_data; typedef struct { FL_FORM * help; int is_shown; } FD_help; static FD_grav_data gd[ 9 ]; static unsigned int g[ ] = { FL_NorthWest, FL_North, FL_NorthEast, FL_West, FL_NoGravity, FL_East, FL_SouthWest, FL_South, FL_SouthEast }; static int w = 500, h = 400; static int bw = 200, bh = 200; #define ULC_POS_LEFT_FIXED( obj ) \ ( ( obj )->nwgravity == FL_NorthWest \ || ( obj )->nwgravity == FL_West \ || ( obj )->nwgravity == FL_SouthWest ) #define ULC_POS_RIGHT_FIXED( obj ) \ ( ( obj )->nwgravity == FL_NorthEast \ || ( obj )->nwgravity == FL_East \ || ( obj )->nwgravity == FL_SouthEast ) #define LRC_POS_LEFT_FIXED( obj ) \ ( ( obj )->segravity == FL_NorthWest \ || ( obj )->segravity == FL_West \ || ( obj )->segravity == FL_SouthWest ) #define LRC_POS_RIGHT_FIXED( obj ) \ ( ( obj )->segravity == FL_NorthEast \ || ( obj )->segravity == FL_East \ || ( obj )->segravity == FL_SouthEast ) #define HAS_FIXED_HORI_ULC_POS( obj ) \ ( ULC_POS_LEFT_FIXED( obj ) || ULC_POS_RIGHT_FIXED( obj ) ) #define HAS_FIXED_HORI_LRC_POS( obj ) \ ( LRC_POS_LEFT_FIXED( obj ) || LRC_POS_RIGHT_FIXED( obj ) ) #define HAS_FIXED_WIDTH( obj ) \ ( HAS_FIXED_HORI_ULC_POS( obj ) && HAS_FIXED_HORI_LRC_POS( obj ) ) #define ULC_POS_TOP_FIXED( obj ) \ ( ( obj )->nwgravity == FL_NorthWest \ || ( obj )->nwgravity == FL_North \ || ( obj )->nwgravity == FL_NorthEast ) #define ULC_POS_BOTTOM_FIXED( obj ) \ ( ( obj )->nwgravity == FL_SouthWest \ || ( obj )->nwgravity == FL_South \ || ( obj )->nwgravity == FL_SouthEast ) #define LRC_POS_TOP_FIXED( obj ) \ ( ( obj )->segravity == FL_NorthWest \ || ( obj )->segravity == FL_North \ || ( obj )->segravity == FL_NorthEast ) #define LRC_POS_BOTTOM_FIXED( obj ) \ ( ( obj )->segravity == FL_SouthWest \ || ( obj )->segravity == FL_South \ || ( obj )->segravity == FL_SouthEast ) #define HAS_FIXED_VERT_ULC_POS( obj ) \ ( ULC_POS_TOP_FIXED( obj ) || ULC_POS_BOTTOM_FIXED( obj ) ) #define HAS_FIXED_VERT_LRC_POS( obj ) \ ( LRC_POS_TOP_FIXED( obj ) || LRC_POS_BOTTOM_FIXED( obj ) ) #define HAS_FIXED_HEIGHT( obj ) \ ( HAS_FIXED_VERT_ULC_POS( obj ) && HAS_FIXED_VERT_LRC_POS( obj ) ) /*************************************** ***************************************/ static void check_resize( FD_grav_data * g ) { fl_set_button( g->rx, g->box->resize & FL_RESIZE_X ); fl_set_button( g->ry, g->box->resize & FL_RESIZE_Y ); if ( HAS_FIXED_WIDTH( g->box ) ) fl_set_object_lcol( g->rx, FL_INACTIVE_COL ); else fl_set_object_lcol( g->rx, FL_BLACK ); if ( HAS_FIXED_HEIGHT( g->box ) ) fl_set_object_lcol( g->ry, FL_INACTIVE_COL ); else fl_set_object_lcol( g->ry, FL_BLACK ); } /*************************************** ***************************************/ static void nw_callback( FL_OBJECT * obj FL_UNUSED_ARG, long data ) { FD_grav_data *g = ( FD_grav_data * ) data; fl_set_object_gravity( g->box, g->grav, g->box->segravity ); check_resize( g ); } /*************************************** ***************************************/ static void se_callback( FL_OBJECT * obj FL_UNUSED_ARG, long data ) { FD_grav_data *g = ( FD_grav_data * ) data; fl_set_object_gravity( g->box, g->box->nwgravity, g->grav ); check_resize( g ); } /*************************************** ***************************************/ static void rx_callback( FL_OBJECT * obj FL_UNUSED_ARG, long data ) { FD_grav_data *g = ( FD_grav_data * ) data; unsigned int r = g->box->resize; if ( r & FL_RESIZE_X ) r &= ~ FL_RESIZE_X; else r |= FL_RESIZE_X; fl_set_object_resize( g->box, r ); } /*************************************** ***************************************/ static void ry_callback( FL_OBJECT * obj FL_UNUSED_ARG, long data ) { FD_grav_data *g = ( FD_grav_data * ) data; unsigned int r = g->box->resize; if ( r & FL_RESIZE_Y ) r &= ~ FL_RESIZE_Y; else r |= FL_RESIZE_Y; fl_set_object_resize( g->box, r ); } /*************************************** ***************************************/ static void reset_callback( FL_OBJECT * obj FL_UNUSED_ARG, long data ) { FD_grav_data *g = ( FD_grav_data * ) data; fl_set_form_size( g->box->form, w, h ); fl_set_object_geometry( g->box, ( w - bw ) / 2, ( h - bh ) / 2, bw, bh ); } /*************************************** ***************************************/ static void help_callback( FL_OBJECT * obj FL_UNUSED_ARG, long data ) { FD_help *h = ( FD_help * ) data; if ( ! h->is_shown ) { fl_show_form( h->help, FL_PLACE_CENTER | FL_FREE_SIZE, FL_FULLBORDER, "Gravity Demo Help" ); h->is_shown = 1; } } /*************************************** ***************************************/ static void close_callback( FL_OBJECT * obj FL_UNUSED_ARG, long data ) { FD_help *h = ( FD_help * ) data; fl_hide_form( h->help ); h->is_shown = 0; } /*************************************** ***************************************/ static FD_gravity * create_form_gravity( FD_help * help ) { FL_OBJECT *obj; FD_gravity *fdui = fl_malloc( sizeof *fdui ); const char *label[ ] = { "NW", "N", "NE", "W", "-", "E", "SW", "S", "SE" }; int i; int s = 25; int m = 5; fdui->grav = fl_bgn_form( FL_NO_BOX, 500, 400 ); obj = fl_add_box( FL_UP_BOX, 0, 0, w, h, "" ); fl_set_object_bw( obj, -1 ); fdui->box = obj = fl_add_box( FL_FRAME_BOX, ( w - bw ) / 2, ( h - bh ) / 2, bw, bh, "" ); fl_set_object_color( obj, FL_GREEN, FL_GREEN ); fl_bgn_group( ); for ( i = 0; i < 9; i++ ) { obj = fl_add_button( FL_RADIO_BUTTON, s * ( i % 3 ) + m, s * ( i / 3 ) + m, s, s, label[ i ] ); fl_set_object_bw( obj, -1 ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthWest ); fl_set_object_callback( obj, nw_callback, ( long ) ( gd + i ) ); fl_set_object_color( obj, FL_COL1, FL_MCOL ); fl_set_button( obj, fdui->box->nwgravity == g[ i ] ); } fl_end_group( ); fl_bgn_group( ); for ( i = 0; i < 9; i++ ) { obj = fl_add_button( FL_RADIO_BUTTON, s * ( i % 3 ) + w - 3 * s - m, s * ( i / 3 ) + h - 3 * s - m, s, s, label[ i ] ); fl_set_object_bw( obj, -1 ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fl_set_object_callback( obj, se_callback, ( long ) ( gd + i ) ); fl_set_object_color( obj, FL_COL1, FL_MCOL ); fl_set_button( obj, fdui->box->segravity == g[ i ] ); } fl_end_group( ); fdui->rx = obj = fl_add_button( FL_PUSH_BUTTON, m, h - s - m, 80, s, "X Resize" ); fl_set_object_bw( obj, -1 ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthWest, FL_SouthWest ); fl_set_object_callback( obj, rx_callback, ( long ) gd ); fl_set_object_color( obj, FL_COL1, FL_MCOL ); fl_set_button( obj, fdui->box->resize & FL_RESIZE_X ); fdui->ry = obj = fl_add_button( FL_PUSH_BUTTON, 2 * m + 80, h - s - m, 80, s, "Y Resize" ); fl_set_object_bw( obj, -1 ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthWest, FL_SouthWest ); fl_set_object_callback( obj, ry_callback, ( long ) gd ); fl_set_object_color( obj, FL_COL1, FL_MCOL ); fl_set_button( obj, fdui->box->resize & FL_RESIZE_Y ); obj = fl_add_button( FL_NORMAL_BUTTON, w - 85, 5, 80, s, "Help" ); fl_set_object_bw( obj, -1 ); fl_set_object_gravity( obj, FL_NorthEast, FL_NorthEast ); fl_set_object_callback( obj, help_callback, ( long ) help ); obj = fl_add_button( FL_NORMAL_BUTTON, 200, h - s - m, 80, s, "Reset" ); fl_set_object_bw( obj, -1 ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_South, FL_South ); fl_set_object_callback( obj, reset_callback, ( long ) gd ); obj = fl_add_button( FL_NORMAL_BUTTON, m + 280, h - s - m, 80, s, "Quit" ); fl_set_object_bw( obj, -1 ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_South, FL_South ); fl_end_form(); return fdui; } /*************************************** ***************************************/ static FD_help * create_form_help( void ) { FL_OBJECT *obj; FD_help *fdui = fl_malloc( sizeof *fdui ); size_t i; const char *text[ ] = { "Gravity and resize settings demonstration", "", "The interaction between gravity and resize settings", "can sometimes be difficult to understand This pro-", "gram allows you to test some of the effects.", "", "With the sets of buttons in the upper left hand and", "lower right hand corner you can set the gravity for", "the corresponding corners of the green rectangle.", "", "With the buttons labeled 'X Resize' and 'Y Resize'", "you can set if the rectangle may be scaled in x-", "and/or y-direction. Please note that for several", "combinations of gravity settings the resizing", "settings are not taken into account by XForms. In", "these cases the corresponding buttons are grayed", "out (but not deactivated)." }; fdui->help = fl_bgn_form( FL_NO_BOX, 345, 325 ); fdui->is_shown = 0; obj = fl_add_box( FL_UP_BOX, 0, 0, 345, 325, "" ); fl_set_object_bw( obj, -1 ); obj = fl_add_browser( FL_NORMAL_BROWSER, 5, 5, 335, 285, "" ); fl_set_object_bw( obj, -1 ); fl_set_object_color( obj, FL_WHITE, FL_WHITE ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); for ( i = 0; i < sizeof text / sizeof *text; i++ ) fl_add_browser_line( obj, text[ i ] ); obj = fl_add_button( FL_NORMAL_BUTTON, 133, 295, 80, 25, "Close" ); fl_set_object_bw( obj, -1 ); fl_set_object_gravity( obj, FL_South, FL_South ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_callback( obj, close_callback, ( long ) fdui ); fl_end_form(); return fdui; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_gravity *grav; FD_help *help; int i; fl_initialize( &argc, argv, "Gravity Demo", 0, 0 ); help = create_form_help( ); grav = create_form_gravity( help ); fl_set_app_mainform( grav->grav ); for ( i = 0; i < 9; i++ ) { gd[ i ].box = grav->box; gd[ i ].grav = g[ i ]; gd[ i ].rx = grav->rx; gd[ i ].ry = grav->ry; } fl_show_form( grav->grav, FL_PLACE_CENTER | FL_FREE_SIZE, FL_FULLBORDER, "Gravity Demo" ); fl_do_forms( ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/cursor.c0000644000175000017500000001032411203636407015020 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Cursor routines demo. * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) * */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "bm1.xbm" #include "bm2.xbm" int animated; typedef struct { FL_FORM * cursor; void * vdata; char * cdata; long ldata; } FD_cursor; extern FD_cursor * create_form_cursor( void ); /* callbacks for form cursor */ /*************************************** ***************************************/ void setcursor_cb( FL_OBJECT * ob, long data ) { fl_set_cursor( FL_ObjWin( ob ), data ); } /*************************************** ***************************************/ void setbitmapcursor_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { static int bitmapcur; if ( ! bitmapcur ) bitmapcur = fl_create_bitmap_cursor( ( char * ) bm1_bits, ( char * ) bm2_bits, bm1_width, bm1_height, bm1_width / 2, bm1_height / 2 ); fl_set_cursor( FL_ObjWin( ob ), bitmapcur ); } /*************************************** ***************************************/ void setanimatedcursor_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_cursor( FL_ObjWin(ob), animated ); } /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } int curs[ ] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1 }; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_cursor *fd_cursor; fl_set_border_width( -2 ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_cursor = create_form_cursor( ); /* fill-in form initialization code */ fl_set_cursor_color( XC_watch, FL_BLACK, FL_RED ); animated = fl_create_animated_cursor( curs, 100 ); fl_show_form( fd_cursor->cursor, FL_PLACE_CENTER, FL_FULLBORDER, "cursor" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ FD_cursor * create_form_cursor( void ) { FL_OBJECT *obj; FD_cursor *fdui = fl_calloc(1, sizeof *fdui ); fdui->cursor = fl_bgn_form( FL_NO_BOX, 325, 175 ); fl_add_box( FL_UP_BOX, 0 ,0, 325, 175, "" ); fl_add_frame( FL_EMBOSSED_FRAME, 10, 10, 305, 120, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 20, 20, 50, 25, "Hand" ); fl_set_object_callback( obj, setcursor_cb, XC_hand2 ); obj = fl_add_button( FL_NORMAL_BUTTON, 70, 20, 50, 25, "Watch" ); fl_set_object_callback( obj, setcursor_cb, XC_watch ); obj = fl_add_button( FL_NORMAL_BUTTON, 120, 20, 60, 25, "Invisible" ); fl_set_object_callback( obj, setcursor_cb, FL_INVISIBLE_CURSOR ); obj = fl_add_button( FL_NORMAL_BUTTON, 180, 20, 62, 25, "Animated" ); fl_set_object_callback( obj, setanimatedcursor_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 242, 20, 62, 25, "BitmapCur" ); fl_set_object_callback( obj, setbitmapcursor_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 90, 70, 140, 50, "DefaultCursor" ); fl_set_button_shortcut( obj, "Dd#d", 1); fl_set_object_callback( obj, setcursor_cb, FL_DEFAULT_CURSOR ); obj = fl_add_button( FL_NORMAL_BUTTON, 250, 140, 60, 25, "Done" ); fl_set_object_callback( obj, done_cb, 0 ); fl_end_form( ); fl_adjust_form_size( fdui->cursor ); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/demos/bm2.xbm0000644000175000017500000000043111171560225014523 0ustar jensjens#define bm2_width 16 #define bm2_height 16 static unsigned char bm2_bits[] = { 0x00, 0x00, 0x00, 0x57, 0x7c, 0x72, 0xfc, 0x52, 0xfc, 0x00, 0x7c, 0x01, 0x7c, 0x1f, 0xfc, 0x22, 0x40, 0x42, 0x40, 0x44, 0x40, 0x43, 0xc0, 0x40, 0x70, 0x40, 0x8c, 0x20, 0x00, 0x1f, 0x00, 0x00}; xforms-1.0.93sp1/demos/nmenu.c0000644000175000017500000001065511320662573014637 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of all four types of nmenu's. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include extern FL_FORM *create_form( void ); FL_OBJECT *menu[ 4 ], *abox[ 4 ]; int set[ 4 ]; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; int i; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = create_form( ); for ( i = 0; i < 4; i++ ) { fl_add_nmenu_items( menu[ i ], "Red%SR%r%s%d|Green%SG%r%s%d|Yellow%SY%r%s%d|" "Blue%SB%r%s%d|Purple%SP%r%s|Cyan%SC%r%s|" "White%SW%r%s", 1, "Rr#R#r", 1, "Gg#G#g", 1, "Yy#Y#y", 1, "Bb#B#b", 1, "Pp#P#p", 1, "Cc#C#c", 1, "Ww#W#w" ); fl_popup_entry_set_state( fl_get_nmenu_item_by_value( menu[ i ], i ), FL_POPUP_CHECKED ); set[ i ] = i; fl_set_object_color( abox[ i ], FL_RED + set[ i ], FL_BLACK ); } fl_show_form( form, FL_PLACE_CENTER, FL_TRANSIENT, "Nmenu" ); fl_do_forms( ); fl_hide_form( form ); fl_finish( ); return 0; } /*************************************** * m is the menu index 0 - 3 ***************************************/ static void menu_cb( FL_OBJECT * obj, long m ) { FL_POPUP_RETURN *r = fl_get_nmenu_item( obj ); int i; if ( set[ m ] == r->val ) return; for ( i = 0; i < 4; i++) { if ( i != m ) { /* enable the old selected color for other menus*/ fl_popup_entry_set_state( fl_get_nmenu_item_by_value( menu[ i ], set[ m ] ), 0 ); /* disable the currently selected color for other menus */ fl_popup_entry_set_state( fl_get_nmenu_item_by_value( menu[ i ], r->val ), FL_POPUP_DISABLED ); } } set[ m ] = r->val; fl_set_object_color( abox[ m ], FL_RED + r->val, FL_BLACK ); } /*************************************** ***************************************/ static void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ FL_FORM * create_form( void ) { FL_FORM *form; FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 444, 380 ); obj = fl_add_box( FL_BORDER_BOX, 0, 0, 444, 380, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 444, 29, "" ); fl_set_object_color( obj, FL_COL1, FL_COL1 ); menu[0] = obj = fl_add_nmenu( FL_NORMAL_NMENU, 2, 2, 110, 25, "Color 1" ); fl_set_object_shortcut( obj, "1#1", 1 ); fl_set_object_callback( obj, menu_cb, 0 ); menu[1] = obj = fl_add_nmenu( FL_NORMAL_TOUCH_NMENU, 112, 2, 110, 25, "Color 2" ); fl_set_object_shortcut( obj, "2#2", 1 ); fl_set_object_callback( obj, menu_cb, 1 ); menu[2] = obj = fl_add_nmenu( FL_BUTTON_NMENU, 222, 2, 110, 25, "Color 3" ); fl_set_object_shortcut( obj, "3#3", 1 ); fl_set_object_callback( obj, menu_cb, 2 ); menu[3] = obj = fl_add_nmenu( FL_BUTTON_TOUCH_NMENU, 332, 2, 110, 25, "Color 4" ); fl_set_object_shortcut( obj, "4#4", 1 ); fl_set_object_callback( obj, menu_cb, 3 ); abox[ 0 ] = obj = fl_add_box( FL_SHADOW_BOX, 20, 80, 70, 230, "" ); abox[ 1 ] = obj = fl_add_box( FL_SHADOW_BOX, 130, 80, 70, 230, "" ); abox[ 2 ] = obj = fl_add_box( FL_SHADOW_BOX, 240, 80, 70, 230, "" ); abox[ 3 ] = obj = fl_add_box( FL_SHADOW_BOX, 350, 80, 70, 230, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 310, 330, 110, 30, "Quit" ); fl_set_object_shortcut( obj, "Q#Q", 1 ); fl_set_object_callback( obj, done_cb, 0 ); fl_end_form( ); return form; } xforms-1.0.93sp1/demos/timerprec.c0000644000175000017500000000767711203636407015516 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Test the accuracy of timer * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include /**** Forms and Objects ****/ typedef struct { FL_FORM * form0; void * vdata; long ldata; FL_OBJECT * timer; FL_OBJECT * restart; FL_OBJECT * report; } FD_form0; static FD_form0 * create_form_form0( void ); /*************************************** ***************************************/ static void exit_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ static long start_sec, start_usec; static long end_sec, end_usec; /* timer expired */ /*************************************** ***************************************/ static void timer_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { char buf[ 128 ]; float df; FD_form0 *fd = ob->form->fdui; double timerval = fd->ldata * 0.001; fl_gettime( &end_sec, &end_usec ); df = end_sec - start_sec + ( end_usec - start_usec ) * 1.0e-6; sprintf( buf,"Timeout: %.3f Actual: %.3f DeltaE: %.3f", timerval, df, df - timerval ); fl_set_object_label( fd->report, buf ); } /*************************************** ***************************************/ static void start_timer( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_form0 *fd = ob->form->fdui; char buf[ 128 ]; fd->ldata += 200; sprintf( buf, "Timer accuracy testing %.3f sec ...", fd->ldata * 0.001 ); fl_set_object_label( fd->report, buf ); fl_gettime( &start_sec, &start_usec ); fl_set_timer( fd->timer, fd->ldata * 0.001 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_form0 *fd_form0; fl_initialize( &argc, argv, 0, 0, 0 ); fd_form0 = create_form_form0( ); /* fill-in form initialization code */ fd_form0->ldata = 2800; start_timer( fd_form0->timer, 0 ); /* show the first form */ fl_show_form( fd_form0->form0, FL_PLACE_CENTER, FL_FULLBORDER, "Timer object precision" ); fl_do_forms( ); return 0; } /* Form definition file generated with fdesign. */ /*************************************** ***************************************/ static FD_form0 * create_form_form0( void ) { FL_OBJECT *obj; FD_form0 *fdui = fl_calloc( 1, sizeof *fdui ); fdui->form0 = fl_bgn_form( FL_NO_BOX, 320, 130 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 320, 130, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 210, 80, 90, 35, "Done" ); fl_set_object_callback( obj, exit_cb, 0 ); fdui->restart = obj = fl_add_button( FL_TOUCH_BUTTON, 110, 80, 90, 35, "Restart" ); fl_set_object_callback( obj, start_timer, 0 ); fdui->timer = obj = fl_add_timer( FL_HIDDEN_TIMER, 10, 40, 100, 40, "Timer" ); fl_set_object_callback( obj, timer_cb, 0 ); fdui->report = obj = fl_add_text( FL_NORMAL_TEXT, 10, 20, 290, 50,"" ); fl_end_form( ); fdui->form0->fdui = fdui; return fdui; } xforms-1.0.93sp1/demos/sldinactive.c0000644000175000017500000000327311203636407016015 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of a slider that is not active */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *sl1, *sl2, *but, *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 150 ,300 ); sl1 = fl_add_slider( FL_VERT_SLIDER, 20, 20, 40, 180, "X" ); sl2 = fl_add_slider( FL_VERT_SLIDER, 90, 20, 40, 180, "1-X" ); fl_deactivate_object( sl2 ); but = fl_add_button( FL_NORMAL_BUTTON, 40, 250, 70, 30, "Exit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "Inactive Slider" ); do { obj = fl_do_forms( ); fl_set_slider_value( sl2, 1.0 - fl_get_slider_value( sl1 ) ); } while ( obj != but ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/demo05.c0000644000175000017500000000415411203636407014600 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of a slider. Every time the slider changes position it is returned by do_forms() and the text field showing its value is adapted. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" /*************************************** ***************************************/ void slider_cb( FL_OBJECT * ob, long data ) { char str[ 30 ]; sprintf( str, "%f", fl_get_slider_value( ob ) ); fl_set_object_label( ( FL_OBJECT * ) data, str ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *slider, *value; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 240, 400 ); value = fl_add_box( FL_DOWN_BOX, 120, 180, 100, 30, "" ); fl_set_object_lalign( value, FL_ALIGN_CENTER ); slider = fl_add_slider( FL_VERT_SLIDER, 40, 40, 60, 320, "" ); fl_set_slider_bounds( slider, -1, 1 ); fl_set_slider_value( slider, 0 ); fl_set_object_color( slider, FL_SLIDER_COL1, FL_GREEN ); fl_set_object_callback( slider, slider_cb, ( long ) value ); fl_add_button( FL_RETURN_BUTTON, 120, 290, 100, 30, "Exit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "Slider" ); fl_do_forms( ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/formbrowser.c0000644000175000017500000000752511316160513016056 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include "fd/formbrowser_gui.h" /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void hide_show_cb( FL_OBJECT * ob, long data ) { FD_mainform *fdui = ob->form->fdui; ( data ? fl_show_object : fl_hide_object )( fdui->formbrowser ); } /*************************************** ***************************************/ void reshow_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_hide_form( ob->form ); fl_show_form( ob->form, FL_PLACE_POSITION, FL_FULLBORDER, "formbrowser" ); } /*************************************** ***************************************/ void scroll_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { static int n; FD_mainform *fdui = ob->form->fdui; fl_set_object_label( ob, n % 2 ? "Jump" : "Smooth" ); fl_set_formbrowser_scroll( fdui->formbrowser, ++n % 2 ); } /*************************************** ***************************************/ void deactivate_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_mainform *fdui = ob->form->fdui; if ( fl_object_is_active( fdui->formbrowser ) ) { fl_set_object_label( ob, "Activate" ); fl_deactivate_object( fdui->formbrowser ); } else { fl_set_object_label( ob,"Deactivate" ); fl_activate_object( fdui->formbrowser ); } } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_buttonform *fd_buttonform; FD_staticform *fd_staticform; FD_mainform *fd_mainform; FD_valuatorform *fd_valuatorform; FD_choiceform *fd_choiceform; FD_inputform *fd_inputform; FD_big *fd_big; fl_set_border_width( -2 ); fl_initialize( &argc, argv, 0, 0, 0 ); fd_buttonform = create_form_buttonform( ); fd_staticform = create_form_staticform( ); fd_mainform = create_form_mainform( ); fd_valuatorform = create_form_valuatorform( ); fd_choiceform = create_form_choiceform( ); fd_inputform = create_form_inputform( ); fd_big = create_form_big( ); { float xx[ 5 ] = { 1, 2, 3, 4, 5 }; float yy[ 5 ] = { 1, 2, 3, 4, 5 }; fl_set_xyplot_data( fd_big->xyplot, xx, yy, 5, "title", "x", "y" ); } /* fill-in form initialization code */ /* fl_set_object_boxtype( fd_mainform->formbrowser, FL_SHADOW_BOX ); */ fl_addto_formbrowser( fd_mainform->formbrowser, fd_buttonform->buttonform ); fl_addto_formbrowser( fd_mainform->formbrowser, fd_valuatorform->valuatorform); fl_addto_formbrowser( fd_mainform->formbrowser, fd_big->big); fl_addto_formbrowser( fd_mainform->formbrowser, fd_choiceform->choiceform ); fl_addto_formbrowser( fd_mainform->formbrowser, fd_staticform->staticform ); /* show the first form */ fl_show_form( fd_mainform->mainform, FL_PLACE_CENTERFREE, FL_FULLBORDER, "buttonform" ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/newbutton.c0000644000175000017500000000627211203636407015537 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the use of user defined object class: CROSSBUTTON * * Form definition file generated with fdesign. * changed stub button to crossbutton */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "crossbut.h" #include /**** Forms and Objects ****/ typedef struct { FL_FORM * newbut; void * vdata; FL_OBJECT * bexit; } FD_newbut; extern FD_newbut *create_form_newbut(void); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_newbut *cbform ; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); cbform = create_form_newbut( ); fl_show_form( cbform->newbut, FL_PLACE_CENTER, FL_TRANSIENT, "newbutton" ); while( fl_do_forms( ) != cbform->bexit ) /* empty */; fl_finish( ); return 0; } /*************************************** ***************************************/ FD_newbut * create_form_newbut( void ) { FL_OBJECT *obj; FD_newbut *fdui = fl_malloc( sizeof *fdui ); int oldbw = fl_get_border_width( ); fl_set_border_width( -2 ); fdui->newbut = fl_bgn_form( FL_NO_BOX, 310, 190 ); fl_add_box( FL_UP_BOX, 0, 0, 310, 190, "" ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 40, 45, 100, 120, "CrossA" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_lstyle( obj ,FL_BOLD_STYLE ); obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 115, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_RED ); obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 85, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 55, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 180, 45, 100, 120, "CrossB" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 115, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_RED ); obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 85, 90, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 55, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fdui->bexit = fl_add_button( FL_NORMAL_BUTTON, 125, 10, 65, 25, "Exit" ); fl_end_form( ); fl_set_border_width( oldbw ); return fdui; } xforms-1.0.93sp1/demos/ndial.c0000644000175000017500000000547511211743031014574 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This is an example of the use of dials. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_FORM *form; FL_OBJECT * dials[ 3 ], * texts[ 3 ], * result; /*************************************** ***************************************/ void cb( FL_OBJECT * obj, long data ) { static int cols[ 3 ] = { 128, 128, 128 }; char str[ 4 ]; cols[ data ] = fl_get_dial_value( obj ); fl_mapcolor( FL_FREE_COL1, cols[ 0 ], cols[ 1 ], cols[ 2 ] ); fl_redraw_object( result ); sprintf( str, "%d", cols[ data ] ); fl_set_object_label( texts[ data ], str ); } /*************************************** ***************************************/ void makeform( void ) { FL_OBJECT *obj; const char *label[ 3 ] = { "Red", "Green", "Blue" }; FL_COLOR col[ 3 ] = { FL_RED, FL_GREEN, FL_BLUE }; int i; int y = 70; form = fl_bgn_form( FL_UP_BOX, 300, 330 ); obj = fl_add_button( FL_NORMAL_BUTTON, 45, 15, 210, 45, "Color Editor" ); fl_set_object_lsize( obj, FL_LARGE_SIZE ); for ( i = 0; i < 3; y += 85, i++ ) { dials[ i ] = obj = fl_add_dial( FL_NORMAL_DIAL, 30, y, 60, 60, label[ i ] ); fl_set_object_boxtype( obj, FL_UP_BOX ); fl_set_dial_bounds( obj, 0.0, 255.0 ); fl_set_dial_value( obj, 128.0 ); fl_set_object_color( obj, col[ i ], FL_DIAL_COL2 ); fl_set_object_callback( obj, cb, i ); fl_set_object_return( obj, FL_RETURN_CHANGED ); texts[ i ] = fl_add_box( FL_DOWN_BOX, 105, y + 17, 50, 25, "128" ); } result = fl_add_box( FL_DOWN_BOX, 180, 70, 90, 245, "" ); fl_set_object_color( result, FL_FREE_COL1, FL_FREE_COL1 ); fl_mapcolor( FL_FREE_COL1, 128, 128, 128 ); fl_set_object_dblbuffer( result, 1 ); /* to avoid flicker */ fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); makeform( ); fl_show_form( form, FL_PLACE_MOUSE, FL_TRANSIENT, "A Form" ); fl_do_forms( ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/select.c0000644000175000017500000000624411203636407014770 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" FL_FORM *form; FL_OBJECT *readyobj; /*************************************** ***************************************/ static int cb( FL_POPUP_RETURN *r ) { fprintf( stderr, "CallBack: %s\n", r->label ); return 0; } /*************************************** ***************************************/ void create_form( void ) { FL_OBJECT *sexobj, *childobj, *licenceobj, *marriedobj; FL_POPUP_ITEM items[ ] = { { "Male%SM", cb, "M", 0, 0 }, { "Female%SF", cb, "F", 0, 0 }, { NULL, NULL, NULL, 0, 0 } }; form = fl_bgn_form( FL_NO_BOX, 420, 360 ); fl_add_box( FL_UP_BOX, 0, 0, 420, 360, "" ); fl_add_input( FL_NORMAL_INPUT, 70, 300, 320, 30, "Name" ); fl_add_input( FL_NORMAL_INPUT, 70, 260, 320, 30, "Address" ); fl_add_input( FL_NORMAL_INPUT, 70, 220, 320, 30, "City" ); fl_add_input( FL_NORMAL_INPUT, 70, 180, 320, 30, "Country" ); sexobj = fl_add_select( FL_NORMAL_SELECT, 70, 130, 110, 30, "Sex"); fl_set_select_items( sexobj, items ); fl_set_object_shortcut( sexobj, "S", 1 ); childobj = fl_add_select( FL_MENU_SELECT, 280, 130, 110, 30, "Children" ); fl_add_select_items( childobj, "Zero|One|Two|Three|Four|Many" ); fl_set_object_shortcut( childobj, "C", 1 ); fl_popup_set_title( fl_get_select_popup( childobj ), "Kids" ); licenceobj = fl_add_select( FL_NORMAL_SELECT, 280, 80, 110, 30, "Licence" ); fl_add_select_items( licenceobj, "Yes|No" ); fl_set_select_policy( licenceobj, FL_POPUP_DRAG_SELECT ); marriedobj = fl_add_select( FL_DROPLIST_SELECT, 70, 80, 110, 27, "Married" ); fl_add_select_items( marriedobj, "Yes|No" ); readyobj = fl_add_button( FL_NORMAL_BUTTON, 150, 20, 140, 30, "Quit" ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *obj = NULL; fl_flip_yorigin( ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form( ); fl_show_form( form, FL_PLACE_CENTER | FL_FREE_SIZE, FL_TRANSIENT, "Select Object Demo" ); while ( ( obj = fl_do_forms( ) ) != readyobj ) /* empty */ ; fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/fbrowse.c0000644000175000017500000001105111316160074015145 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This demo shows the use of a browser and a file selector. * Good browser/scrollbar test * * This file is part of xforms package * T.C. Zhao and M. Overmars * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" typedef struct { FL_FORM * form; void * vdata; char * cdata; long ldata; FL_OBJECT * br; } FD_form; /*************************************** ***************************************/ void load_file( FL_OBJECT * ob, long arg FL_UNUSED_ARG ) { const char *fname; FD_form *fdui = ob->form->fdui; if ( ( fname = fl_show_file_selector( "File To Load", "", "*", "" ) ) ) { if ( ! fl_load_browser( fdui->br, fname ) ) fl_add_browser_line( fdui->br,"NO SUCH FILE!" ); } } /*************************************** ***************************************/ void set_size( FL_OBJECT * ob, long arg) { FD_form *fdui = ob->form->fdui; fl_set_browser_fontsize( fdui->br, arg ); } /*************************************** ***************************************/ void exit_program( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void hide_show( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_form *fdui = ob->form->fdui; if ( fl_object_is_visible( fdui->br ) ) fl_hide_object( fdui->br ); else fl_show_object( fdui->br ); } /*************************************** ***************************************/ FD_form * create_form( void ) { FL_OBJECT *obj; FL_Coord x = 20, dx = 80, dy = 28; FD_form *fdui = fl_calloc( 1, sizeof *fdui ); fdui->form = fl_bgn_form( FL_NO_BOX, 590, 610 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 590, 610, "" ); fdui->br = obj = fl_add_browser( FL_NORMAL_BROWSER, 20, 20, 550, 530, "" ); /* fl_set_object_boxtype( obj, FL_EMBOSSED_BOX ); */ obj = fl_add_button( FL_NORMAL_BUTTON, x, 565, dx-5, dy, "Load" ); fl_set_object_callback( obj, load_file, 0 ); x += dx ; obj = fl_add_lightbutton( FL_RADIO_BUTTON, x, 565, dx, dy, "Tiny" ); fl_set_object_callback( obj, set_size, FL_TINY_SIZE ); x += dx; obj = fl_add_lightbutton( FL_RADIO_BUTTON, x , 565, dx, dy, "Small" ); fl_set_object_callback( obj, set_size, FL_SMALL_SIZE ); fl_set_button( obj, FL_SMALL_SIZE == FL_BROWSER_FONTSIZE ); x += dx; obj = fl_add_lightbutton( FL_RADIO_BUTTON, x , 565, dx, dy, "Normal" ); fl_set_object_callback( obj, set_size, FL_NORMAL_SIZE ); fl_set_button( obj, FL_NORMAL_SIZE == FL_BROWSER_FONTSIZE ); x += dx; obj = fl_add_lightbutton( FL_RADIO_BUTTON, x , 565, dx, dy, "Large" ); fl_set_object_callback( obj, set_size, FL_LARGE_SIZE ); x += dx + 4; obj = fl_add_button( FL_NORMAL_BUTTON, x, 565, dx, dy, "Hide/Show" ); fl_set_object_callback( obj, hide_show, 0 ); x += dx + 5; obj = fl_add_button( FL_NORMAL_BUTTON, x, 565, 60, dy, "Exit" ); fl_set_object_callback( obj, exit_program, 0 ); fl_end_form(); fl_adjust_form_size( fdui->form ); fdui->form->fdui = fdui; return fdui; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_form *fdui; FL_OBJECT *o; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fdui = create_form( ); fl_clear_browser( fdui->br ); fl_add_browser_line( fdui->br, "LOAD A FILE." ); fl_set_browser_fontstyle( fdui->br,FL_FIXED_STYLE ); fl_show_form( fdui->form, FL_PLACE_FREE, FL_FULLBORDER, "Browser" ); o = fl_do_forms( ); fprintf( stderr, "%p %d %s\n", o, o->objclass, o->label ? o->label: "" ); fl_hide_form( fdui->form ); fl_free_form( fdui->form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/pmbrowse.c0000644000175000017500000000564011203636407015346 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Showing the use of non-modal file selector * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd/pmbrowse_gui.h" #include FD_ttt *fd_ttt; static int load_file( const char *, void * ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_ttt = create_form_ttt( ); fl_show_form( fd_ttt->ttt, FL_PLACE_CENTER, FL_TRANSIENT, "PixmapBrowser" ); fl_set_fselector_placement( FL_PLACE_FREE ); fl_set_fselector_callback( load_file, 0 ); fl_show_fselector( "Load a Pixmap file", NULL, "*.x?m", NULL ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ static int load_file( const char * fname, void * data FL_UNUSED_ARG ) { char *p; if ( ! fname || ! *fname ) { fprintf( stderr, "Missing file name\n" ); return 0; } if ( ! ( p = strrchr( fname, '.' ) ) ) { fprintf( stderr, "Missing file extension\n" ); return 0; } if ( ! strcmp( p + 1, "xpm" ) ) { fl_hide_object( fd_ttt->bm ); fl_free_pixmap_pixmap( fd_ttt->pm ); fl_set_pixmap_file( fd_ttt->pm, fname ); fl_show_object( fd_ttt->pm ); } else if ( ! strcmp( p + 1, "xbm" ) ) { fl_hide_object( fd_ttt->pm ); fl_set_bitmap_file( fd_ttt->bm, fname ); fl_show_object( fd_ttt->bm ); } else { fprintf( stderr, "Invalid file extension: %s\n", p + 1 ); return 0; } return 1; } /*************************************** ***************************************/ void done( FL_OBJECT * ob FL_UNUSED_ARG, long q FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void reload( FL_OBJECT * ob FL_UNUSED_ARG, long q FL_UNUSED_ARG ) { fl_set_fselector_placement( FL_PLACE_MOUSE ); fl_set_fselector_callback( load_file, 0 ); fl_show_fselector( "Load a Pix/bitMap file", NULL, NULL, NULL ); } xforms-1.0.93sp1/demos/secretinput.c0000644000175000017500000000360511203636407016054 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* Demo showing secret input fields */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *but, *password1, *password2, *info, *ret; char str[ 256 ]; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 400, 300 ); password1 = fl_add_input( FL_SECRET_INPUT, 140, 40, 160, 40, "Password 1:" ); password2 = fl_add_input( FL_SECRET_INPUT, 140, 100, 160, 40, "Password 2:" ); info = fl_add_box( FL_SHADOW_BOX, 20, 160, 360, 40, "" ); but = fl_add_button( FL_NORMAL_BUTTON, 280, 240, 100, 40, "Quit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_MOUSE, FL_NOBORDER, 0 ); do { ret = fl_do_forms( ); sprintf( str, "Password 1 is: %s , Password 2 is: %s", fl_get_input( password1 ), fl_get_input( password2 ) ); fl_set_object_label( info, str ); } while ( ret != but ); fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/bm1.xbm0000644000175000017500000000043611171560225014527 0ustar jensjens#define bm1_width 16 #define bm1_height 16 static unsigned char bm1_bits[] = { 0x00, 0x00, 0x00, 0x57, 0x7c, 0x72, 0xc4, 0x52, 0xc4, 0x00, 0x44, 0x01, 0x44, 0x1f, 0xfc, 0x22, 0x40, 0x42, 0x40, 0x44, 0x40, 0x43, 0xc0, 0x40, 0x70, 0x40, 0x8c, 0x20, 0x00, 0x1f, 0x00, 0x00 }; xforms-1.0.93sp1/demos/nnn.c0000644000175000017500000000672311203636407014304 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the use of user defined object class: CROSSBUTTON * * Form definition file generated with fdesign. * changed stub button to crossbutton */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "crossbut.h" #include #ifdef __VMS #include #endif /**** Forms and Objects ****/ typedef struct { FL_FORM * newbut; void * vdata; long ldata; FL_OBJECT * bexit; } FD_newbut; extern FD_newbut *create_form_newbut( void ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_newbut *cbform ; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); cbform = create_form_newbut( ); fl_show_form( cbform->newbut, FL_PLACE_CENTER, FL_TRANSIENT, "test" ); while( fl_do_forms( ) != cbform->bexit ) /* empty */ ; fl_hide_form( cbform->newbut ); fl_free_form( cbform->newbut ); free( cbform ); fprintf( stderr,"sleeping\n" ); sleep( 2 ); cbform = create_form_newbut( ); fl_show_form( cbform->newbut, FL_PLACE_CENTER, 0, 0 ); while( fl_do_forms() != cbform->bexit ) /* empty */; fl_finish( ); return 0; } /*************************************** ***************************************/ FD_newbut * create_form_newbut( void ) { FL_OBJECT *obj; FD_newbut *fdui = calloc( 1, sizeof *fdui ); fdui->newbut = fl_bgn_form( FL_NO_BOX, 310, 190 ); fl_add_box( FL_UP_BOX, 0, 0, 310, 190, "" ); fl_add_box( FL_FRAME_BOX, 40, 45, 100, 120, "" ); obj = fl_add_text( FL_NORMAL_TEXT, 50, 155, 50, 20, "CrossB" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 115, 80, 30, "cross1" ); fl_set_object_color( obj, FL_COL1, FL_RED ); obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 85, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); obj = fl_add_crossbutton( FL_RADIO_BUTTON, 50, 55, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); obj = fl_add_box( FL_FRAME_BOX, 180, 45, 100, 120, "" ); obj = fl_add_text( FL_NORMAL_TEXT, 190, 155, 50, 20, "CrossB" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 115, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_RED ); obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 85, 90, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); obj = fl_add_crossbutton( FL_PUSH_BUTTON, 190, 55, 80, 30, "Button" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fdui->bexit = fl_add_button( FL_NORMAL_BUTTON, 125, 10, 65, 25, "Exit" ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/crossbut.c0000644000175000017500000000644511203636407015360 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Routines implementing the "crossbutton" class * * ob->col1 is the color of the box. ob->col2 is the color of cross * * This file is part of xforms package * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "crossbut.h" /*************************************** * How to draw it ***************************************/ static void draw_crossbutton( FL_OBJECT * ob ) { FL_Coord xx, yy, ww, hh; FL_BUTTON_STRUCT *sp = ob->spec; /* if redraw is demanded by FL_ENTER, ignore it */ if ( sp->event == FL_ENTER ) return; /* draw the bounding box first */ fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); /* draw the box that contains the cross */ ww = hh = 0.5 * FL_min( ob->w, ob->h ) - 1; xx = ob->x + FL_BOUND_WIDTH; yy = ob->y + ( ob->h - hh ) / 2; /* if pushed, draw a down box with the cross */ if ( sp->val ) { fl_drw_box( FL_DOWN_BOX, xx, yy, ww, hh, ob->col1, ob->bw ); fl_drw_text( FL_ALIGN_CENTER, xx - 2, yy - 2, ww + 4, hh + 4, ob->col2, 0, 0, "@9plus"); } else fl_drw_box( FL_UP_BOX, xx, yy, ww, hh, ob->col1, ob->bw ); /* label */ if ( ob->align == FL_ALIGN_CENTER ) fl_drw_text( FL_ALIGN_LEFT, xx + ww + 3, ob->y, 0, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else fl_draw_object_label_outside( ob ); if ( ob->type == FL_RETURN_BUTTON ) fl_drw_text( FL_ALIGN_CENTER, ob->x + ob->w - 0.8 * ob->h, ob->y + 0.2 * ob->h, 0.6 * ob->h, 0.6 * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } /*************************************** * creation ***************************************/ FL_OBJECT * fl_create_crossbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; fl_add_button_class( FL_CROSSBUTTON, draw_crossbutton, 0 ); ob = fl_create_generic_button( FL_CROSSBUTTON, type, x, y,w, h, label ); ob->boxtype = FL_NO_BOX; ob->col2 = FL_BLACK; /* cross color */ return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_crossbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_crossbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } xforms-1.0.93sp1/demos/flclock.c0000644000175000017500000000452011203636407015121 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Built-in xforms clock * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include FL_FORM *fclock; /*************************************** ***************************************/ void exit_cb( FL_OBJECT * ob FL_UNUSED_ARG, long q FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void create_form_clock( void ) { FL_OBJECT *obj; if ( fclock ) return; fclock = fl_bgn_form( FL_NO_BOX, 500, 350 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 500, 350, "" ); obj = fl_add_clock( FL_DIGITAL_CLOCK, 185, 20, 150, 35, "" ); fl_set_object_boxtype( obj, FL_ROUNDED_BOX ); fl_set_object_color( obj, FL_COL1,FL_BLACK ); fl_set_object_lsize( obj, FL_MEDIUM_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_clock( FL_ANALOG_CLOCK, 30, 70, 220, 200, "" ); fl_set_object_boxtype( obj, FL_UP_BOX ); obj = fl_add_clock( FL_ANALOG_CLOCK, 260, 70, 220, 200, "" ); fl_set_object_boxtype( obj, FL_OVAL3D_UPBOX ); obj = fl_add_button( FL_NORMAL_BUTTON, 375, 300, 110, 35, "Exit" ); fl_set_object_callback( obj, exit_cb, 0 ); fl_end_form( ); fl_scale_form( fclock, 0.7, 0.7 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_clock( ); fl_show_form( fclock, FL_PLACE_CENTER, FL_TRANSIENT,"clocks" ); fl_do_forms( ); fl_finish( ); return 0; } xforms-1.0.93sp1/demos/demotest3.c0000644000175000017500000000453011203636407015414 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" /**** Forms and Objects ****/ typedef struct { FL_FORM *S; void *vdata; char *cdata; long ldata; } FD_S; FD_S *S; /*************************************** ***************************************/ void timeoutCB( int tid FL_UNUSED_ARG, void * stuff FL_UNUSED_ARG ) { fl_show_alert( "Standby", "This may abort", "with SEGV", 1 ); } /*************************************** ***************************************/ void pressedCB( FL_OBJECT * obj FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { int tid = fl_add_timeout( 300L, timeoutCB, NULL ); fprintf( stderr, "tid=%d\n", tid ); } /*************************************** ***************************************/ FD_S * create_form_S( void ) { FL_OBJECT *obj; FD_S *fdui = fl_calloc( 1, sizeof *fdui ); int old_unit = fl_get_coordunit( ); fl_set_coordunit( FL_COORD_centiMM ); fdui->S = fl_bgn_form( FL_NO_BOX, 10837, 8467 ); fl_add_box( FL_UP_BOX, 0, 0, 10837, 8467, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 1693, 1693, 7451, 4403, "Press Me" ); fl_set_object_callback( obj, pressedCB, 0 ); fl_end_form( ); fdui->S->fdui = fdui; fl_set_coordunit( old_unit ); return fdui; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "S", 0, 0 ); S = create_form_S( ); fl_show_form( S->S, FL_PLACE_CENTER, FL_FULLBORDER, "Crash Test" ); while ( 1 ) fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/popup.c0000644000175000017500000002105111311011603014626 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * popup tester * * This file is part of xforms package * T.C. Zhao and Mark Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" typedef struct { FL_FORM * pupform; void * vdata; char * cdata; long ldata; FL_OBJECT * menu; FL_OBJECT * button; FL_OBJECT * choice; FL_OBJECT * status; FL_OBJECT * done_cb; } FD_pupform; extern FD_pupform * create_form_pupform( void ); extern void menu_callback( FL_OBJECT *, long ); extern void dopup_callback( FL_OBJECT *, long ); extern void choice_callback( FL_OBJECT *, long ); static void init_menu( FL_OBJECT * ); static void init_choice( FL_OBJECT * ); FD_pupform *fd_pupform; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, 0, 0, 0 ); fd_pupform = create_form_pupform( ); /* fill-in form initialization code */ init_menu( fd_pupform->menu ); init_choice( fd_pupform->choice ); /* show the first form */ fl_show_form( fd_pupform->pupform, FL_PLACE_CENTER, FL_FULLBORDER, "pupform" ); fl_do_forms( ); return 0; } /********* MENU ***********************************************/ /*************************************** ***************************************/ void menu_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_pupform *fdui = ob->form->fdui; char buf[ 128 ]; sprintf( buf, "item %d (%s) selected", fl_get_menu( ob ), fl_get_menu_text( ob ) ); fl_set_object_label( fdui->status, buf ); } /* menu initialization entries. No callbacks for the item */ FL_PUP_ENTRY menu_entries[ ] = { { "Menu Item 1", NULL, NULL, 0 }, { "Menu Item 2", NULL, NULL, 0 }, { "_Menu Item 3", NULL, NULL, 0 }, { "/_Menu Item 4", NULL, NULL, 0 }, { "Menu Item 5", NULL, NULL, 0 }, { "Menu Item 6", NULL, NULL, 0 }, { "/Menu Item 7", NULL, NULL, 0 }, { "Menu Item 8", NULL, NULL, 0 }, { "/Menu Item 9", NULL, NULL, 0 }, { "Menu Item 10", NULL, NULL, 0 }, { "Menu Item 11", NULL, NULL, 0 }, { NULL, NULL, NULL, 0 }, { "Menu Item 13", NULL, NULL, 0 }, { NULL, NULL, NULL, 0 }, { NULL, NULL, NULL, 0 }, { "Menu Item 15", NULL, NULL, 0 }, { "menu Item 16", NULL, NULL, 0 }, { "menu Item 17", NULL, NULL, 0 }, { NULL, NULL, NULL, 0 } }; /*************************************** ***************************************/ static void menuitem_entercb( int n, void * data ) { char buf[ 128 ]; FD_pupform *fdui = data; sprintf( buf, "Entered %d (%s)", n, fl_get_menu_item_text( fdui->menu, n ) ); fl_set_object_label( fdui->status, buf ); } /*************************************** ***************************************/ static void init_menu( FL_OBJECT *menu ) { /* if no entercb is desired, set_menu_entries is much simpler */ #if 0 fl_set_menu_entries( menu, menu_entries ); #else int n = fl_newpup( FL_ObjWin( menu ) ); fl_setpup_entries( n, menu_entries ); fl_setpup_entercb( n, menuitem_entercb, menu->form->fdui ); // fl_setpup_bw( n, -2 ); fl_set_menu_popup( menu, n ); #endif } /*********** End of menu *************************/ /******* PopUP ***********************************/ static int pupID = -1; /*************************************** ***************************************/ static int pupitem_cb( int selected ) { char buf[ 128 ]; sprintf( buf,"Item %d (%s) selected", selected, fl_getpup_text( pupID, selected ) ); fl_set_object_label( fd_pupform->status, buf ); return selected; } FL_PUP_ENTRY pup_entries[ ] = { { "Popup item 1", pupitem_cb, "1", FL_PUP_RADIO }, { "Popup Item 2", pupitem_cb, "2", FL_PUP_RADIO }, { "Popup Item 3", pupitem_cb, "3", FL_PUP_RADIO }, { "/Popup Item 4", pupitem_cb, "4", FL_PUP_NONE }, { "Popup Item 5", pupitem_cb, NULL, FL_PUP_GRAY }, { "Popup Item 6", pupitem_cb, NULL, 0 }, { "Popup Item 7", pupitem_cb, NULL, 0 }, { "Popup Item 8", pupitem_cb, NULL, 0 }, { NULL, NULL, NULL, 0 }, { "Popup Item 10", pupitem_cb, NULL, FL_PUP_GRAY }, { "Popup Item 11", pupitem_cb, NULL, 0 }, { NULL, NULL, NULL, 0 } }; /*************************************** ***************************************/ static void pup_entercb( int n, void * data) { FD_pupform *fdui = data; char buf[ 128 ]; sprintf( buf, "Entered %d (%s)", n, pup_entries[ n - 1 ].text ); fl_set_object_label( fdui->status, buf ); } /*************************************** ***************************************/ void dopup_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( pupID < 0 ) { pupID = fl_newpup( FL_ObjWin( ob ) ); #if 0 int subm; subm = fl_newpup( FL_ObjWin( ob ) ); #else fl_setpup_entries( pupID, pup_entries ); #endif #if 0 fl_addtopup( pupID, "Popup item 1%f%s%R1", pupitem_cb, "1" ); fl_addtopup( pupID, "Popup item 2%f%s%r1", pupitem_cb, "2" ); fl_addtopup( pupID, "Popup item 3%l%f%s%r1", pupitem_cb, "3" ); fl_addtopup( pupID, "Popup item 4%l%f%s%m", pupitem_cb, "4", subm ); fl_addtopup( subm, "Popup Item 5%f%x5", pupitem_cb ); fl_addtopup( subm, "Popup Item 6%f%x6", pupitem_cb ); fl_addtopup( subm, "Popup Item 7%f%x7", pupitem_cb ); fl_addtopup( subm, "Popup Item 8%f%x8", pupitem_cb ); fl_addtopup( pupID, "Popup item 9%x9%f%i", pupitem_cb ); fl_addtopup( pupID, "Popup item 10%x10%f", pupitem_cb ); #endif fl_setpup_entercb( pupID, pup_entercb, ob->form->fdui ); #if 0 fl_setpup_entercb( subm, pup_entercb, ob->form->fdui ); #endif } /* since each item has its own callback, ignore the return value */ fl_dopup( pupID ); } /********* End of pup *****************/ /*************************************** ***************************************/ static void init_choice( FL_OBJECT *ob ) { fl_addto_choice( ob,"Choice1|Choice2|Choice3" ); fl_addto_choice( ob,"Choice4|Choice5|Choice6" ); fl_addto_choice( ob,"Choice7|Choice8|Choice9" ); } /*************************************** ***************************************/ void choice_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { char buf[ 128 ]; FD_pupform *fdui = ob->form->fdui; sprintf( buf, "%d (%s) selected", fl_get_choice( ob ), fl_get_choice_text( ob ) ); fl_set_object_label( fdui->status, buf ); } /* Form definition file generated with fdesign. */ #include /*************************************** ***************************************/ FD_pupform * create_form_pupform( void ) { FL_OBJECT *obj; FD_pupform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->pupform = fl_bgn_form( FL_NO_BOX, 320, 250 ); fl_add_box( FL_UP_BOX, 0, 0, 320, 250, "" ); fdui->menu = obj = fl_add_menu( FL_PULLDOWN_MENU, 20, 90, 60, 30, "Menu" ); fl_set_object_boxtype( obj, FL_FLAT_BOX ); fl_set_object_callback( obj, menu_callback, 0 ); fl_set_object_shortcut( obj, "#MM", 1 ); fdui->button = obj = fl_add_button( FL_MENU_BUTTON, 100, 90, 75, 30, "Button" ); fl_set_object_callback( obj, dopup_callback, 0 ); fl_set_object_shortcut( obj, "#BB", 1 ); fdui->choice = obj = fl_add_choice( FL_NORMAL_CHOICE2, 195, 90, 105, 30, "" ); fl_set_object_callback( obj, choice_callback, 0 ); fdui->status = obj = fl_add_text( FL_NORMAL_TEXT, 25, 30, 265, 30, "" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_dblbuffer( obj, 1 ); fdui->done_cb = obj = fl_add_button( FL_NORMAL_BUTTON, 210, 200, 85, 30, "Done" ); fl_end_form( ); fl_adjust_form_size( fdui->pupform ); fdui->pupform->fdui = fdui; return fdui; } xforms-1.0.93sp1/demos/lalign.c0000644000175000017500000001171711203636407014760 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Different label alignments * * This file is part of xforms package * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include /**** Forms and Objects ****/ #undef TEST_PIXMAP_ALIGN typedef struct { FL_FORM * form0; void * vdata; long ldata; FL_OBJECT * box; FL_OBJECT * inside; FL_OBJECT * center; } FD_form0; static FD_form0 * create_form_form0( void ); FD_form0 *fd_form0; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { int align; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_form0 = create_form_form0( ); /* fill-in form initialization code */ fl_set_form_dblbuffer( fd_form0->form0, 1 ); align = fd_form0->box->align | FL_ALIGN_INSIDE; if ( align != fd_form0->box->align ) fl_set_button( fd_form0->inside, 1 ); /* show the first form */ fl_show_form( fd_form0->form0, FL_PLACE_FREE, FL_FULLBORDER,"form0" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ static void align_cb( FL_OBJECT * ob FL_UNUSED_ARG, long n ) { if ( fl_get_button( fd_form0->inside ) ) n |= FL_ALIGN_INSIDE; #ifndef TEST_PIXMAP_ALIGN fl_set_object_lalign( fd_form0->box, n ); #else fl_set_pixmap_align( fd_form0->box, n, 3, 3 ); #endif } /*************************************** ***************************************/ static void inside_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( fl_get_button( ob ) ) fd_form0->box->align |= FL_ALIGN_INSIDE; else fd_form0->box->align &= ~FL_ALIGN_INSIDE; #ifdef TEST_PIXMAP_ALIGN fl_set_pixmap_align( fd_form0->box, fd_form0->box->align, 3, 3 ); #else fl_redraw_form( fd_form0->form0 ); #endif } /*************************************** ***************************************/ static FD_form0 * create_form_form0( void ) { FL_OBJECT *obj; FD_form0 *fdui = fl_calloc( 1, sizeof *fdui ); fdui->form0 = fl_bgn_form( FL_NO_BOX, 351, 180 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 351, 180, "" ); #ifndef TEST_PIXMAP_ALIGN fdui->box = obj = fl_add_box( FL_UP_BOX, 190, 40, 90, 55, "This is\na label" ); #else fdui->box = obj = fl_add_pixmap( FL_NORMAL_PIXMAP, 190, 35, 90, 60, "" ); fl_set_pixmap_file( obj, "crab.xpm" ); fl_set_object_boxtype( obj,FL_UP_BOX ); #endif fdui->inside = obj = fl_add_lightbutton( FL_PUSH_BUTTON, 20, 125, 90, 30, "Inside" ); fl_set_object_callback( obj, inside_cb, 0 ); fl_bgn_group(); obj = fl_add_button( FL_RADIO_BUTTON, 20, 20, 30, 30, "@#7->" ); fl_set_object_lcol( obj, FL_BLUE ); fl_set_object_callback( obj, align_cb, FL_ALIGN_LEFT_TOP ); obj = fl_add_button( FL_RADIO_BUTTON, 50, 20, 30, 30, "@#8->" ); fl_set_object_lcol( obj, FL_BLUE ); fl_set_object_callback( obj, align_cb, FL_ALIGN_TOP ); obj = fl_add_button( FL_RADIO_BUTTON, 80, 20, 30, 30, "@#9->" ); fl_set_object_lcol( obj, FL_BLUE ); fl_set_object_callback( obj, align_cb, FL_ALIGN_RIGHT_TOP ); obj = fl_add_button( FL_RADIO_BUTTON, 80, 50, 30, 30, "@#->" ); fl_set_object_lcol( obj, FL_BLUE ); fl_set_object_callback( obj, align_cb, FL_ALIGN_RIGHT ); fdui->center = obj = fl_add_button( FL_RADIO_BUTTON, 50, 50, 30, 30, "@circle" ); fl_set_object_lcol( obj, FL_RED ); fl_set_object_callback( obj, align_cb, FL_ALIGN_CENTER ); obj = fl_add_button( FL_RADIO_BUTTON, 20, 50, 30, 30, "@#<-" ); fl_set_object_lcol( obj, FL_BLUE ); fl_set_object_callback( obj, align_cb, FL_ALIGN_LEFT ); obj = fl_add_button( FL_RADIO_BUTTON, 20, 80, 30, 30, "@#1->" ); fl_set_object_lcol( obj, FL_BLUE ); fl_set_object_callback( obj, align_cb, FL_ALIGN_LEFT_BOTTOM ); obj = fl_add_button( FL_RADIO_BUTTON, 50, 80, 30, 30, "@#2->" ); fl_set_object_lcol( obj, FL_BLUE ); fl_set_object_callback( obj, align_cb, FL_ALIGN_BOTTOM ); obj = fl_add_button( FL_RADIO_BUTTON, 80, 80, 30, 30, "@#3->" ); fl_set_object_lcol( obj, FL_BLUE ); fl_set_object_callback( obj, align_cb, FL_ALIGN_RIGHT_BOTTOM ); fl_end_group( ); obj = fl_add_button( FL_NORMAL_BUTTON, 200, 135, 70, 30, "Done" ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/Makefile.in0000644000175000017500000023157211377311601015414 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am noinst_PROGRAMS = arrowbutton$(EXEEXT) borderwidth$(EXEEXT) \ boxtype$(EXEEXT) browserall$(EXEEXT) browserop$(EXEEXT) \ buttonall$(EXEEXT) butttypes$(EXEEXT) canvas$(EXEEXT) \ canvas2$(EXEEXT) chartall$(EXEEXT) chartstrip$(EXEEXT) \ choice$(EXEEXT) colbrowser$(EXEEXT) colsel$(EXEEXT) \ colsel1$(EXEEXT) counter$(EXEEXT) cursor$(EXEEXT) \ demo$(EXEEXT) demo05$(EXEEXT) demo06$(EXEEXT) demo27$(EXEEXT) \ demo33$(EXEEXT) demotest$(EXEEXT) demotest2$(EXEEXT) \ demotest3$(EXEEXT) dirlist$(EXEEXT) fbrowse$(EXEEXT) \ fbrowse1$(EXEEXT) fdial$(EXEEXT) flclock$(EXEEXT) \ folder$(EXEEXT) fonts$(EXEEXT) formbrowser$(EXEEXT) \ free1$(EXEEXT) freedraw$(EXEEXT) freedraw_leak$(EXEEXT) \ $(am__EXEEXT_1) goodies$(EXEEXT) grav$(EXEEXT) group$(EXEEXT) \ ibrowser$(EXEEXT) iconify$(EXEEXT) iconvert$(EXEEXT) \ inputall$(EXEEXT) invslider$(EXEEXT) itest$(EXEEXT) \ lalign$(EXEEXT) ldial$(EXEEXT) ll$(EXEEXT) longlabel$(EXEEXT) \ menu$(EXEEXT) minput$(EXEEXT) minput2$(EXEEXT) \ multilabel$(EXEEXT) ndial$(EXEEXT) newbutton$(EXEEXT) \ new_popup$(EXEEXT) nmenu$(EXEEXT) objinactive$(EXEEXT) \ objpos$(EXEEXT) objreturn$(EXEEXT) pmbrowse$(EXEEXT) \ popup$(EXEEXT) positioner$(EXEEXT) positionerXOR$(EXEEXT) \ preemptive$(EXEEXT) pup$(EXEEXT) pushbutton$(EXEEXT) \ pushme$(EXEEXT) rescale$(EXEEXT) scrollbar$(EXEEXT) \ secretinput$(EXEEXT) select$(EXEEXT) sld_alt$(EXEEXT) \ sld_radio$(EXEEXT) sldinactive$(EXEEXT) sldsize$(EXEEXT) \ sliderall$(EXEEXT) strsize$(EXEEXT) symbols$(EXEEXT) \ thumbwheel$(EXEEXT) timer$(EXEEXT) timerprec$(EXEEXT) \ timeoutprec$(EXEEXT) touchbutton$(EXEEXT) \ xyplotactive$(EXEEXT) xyplotall$(EXEEXT) xyplotover$(EXEEXT) \ yesno$(EXEEXT) yesno_cb$(EXEEXT) wwwl$(EXEEXT) subdir = demos ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @BUILD_GL_TRUE@am__EXEEXT_1 = gl$(EXEEXT) glwin$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_arrowbutton_OBJECTS = arrowbutton.$(OBJEXT) arrowbutton_OBJECTS = $(am_arrowbutton_OBJECTS) arrowbutton_LDADD = $(LDADD) am_borderwidth_OBJECTS = borderwidth.$(OBJEXT) borderwidth_OBJECTS = $(am_borderwidth_OBJECTS) borderwidth_LDADD = $(LDADD) am_boxtype_OBJECTS = boxtype.$(OBJEXT) boxtype_OBJECTS = $(am_boxtype_OBJECTS) boxtype_LDADD = $(LDADD) am_browserall_OBJECTS = browserall.$(OBJEXT) browserall_OBJECTS = $(am_browserall_OBJECTS) browserall_LDADD = $(LDADD) am_browserop_OBJECTS = browserop.$(OBJEXT) browserop_OBJECTS = $(am_browserop_OBJECTS) browserop_LDADD = $(LDADD) am_buttonall_OBJECTS = buttonall.$(OBJEXT) nodist_buttonall_OBJECTS = buttons_gui.$(OBJEXT) buttonall_OBJECTS = $(am_buttonall_OBJECTS) \ $(nodist_buttonall_OBJECTS) buttonall_LDADD = $(LDADD) am_butttypes_OBJECTS = butttypes.$(OBJEXT) nodist_butttypes_OBJECTS = butttypes_gui.$(OBJEXT) butttypes_OBJECTS = $(am_butttypes_OBJECTS) \ $(nodist_butttypes_OBJECTS) butttypes_LDADD = $(LDADD) am_canvas_OBJECTS = canvas.$(OBJEXT) canvas_OBJECTS = $(am_canvas_OBJECTS) canvas_LDADD = $(LDADD) am_canvas2_OBJECTS = canvas2.$(OBJEXT) canvas2_OBJECTS = $(am_canvas2_OBJECTS) canvas2_LDADD = $(LDADD) am_chartall_OBJECTS = chartall.$(OBJEXT) chartall_OBJECTS = $(am_chartall_OBJECTS) chartall_LDADD = $(LDADD) am_chartstrip_OBJECTS = chartstrip.$(OBJEXT) chartstrip_OBJECTS = $(am_chartstrip_OBJECTS) chartstrip_LDADD = $(LDADD) am_choice_OBJECTS = choice.$(OBJEXT) choice_OBJECTS = $(am_choice_OBJECTS) choice_LDADD = $(LDADD) am_colbrowser_OBJECTS = colbrowser.$(OBJEXT) colbrowser_OBJECTS = $(am_colbrowser_OBJECTS) colbrowser_LDADD = $(LDADD) am_colsel_OBJECTS = colsel.$(OBJEXT) colsel_OBJECTS = $(am_colsel_OBJECTS) colsel_LDADD = $(LDADD) am_colsel1_OBJECTS = colsel1.$(OBJEXT) colsel1_OBJECTS = $(am_colsel1_OBJECTS) colsel1_LDADD = $(LDADD) am_counter_OBJECTS = counter.$(OBJEXT) counter_OBJECTS = $(am_counter_OBJECTS) counter_LDADD = $(LDADD) am_cursor_OBJECTS = cursor.$(OBJEXT) cursor_OBJECTS = $(am_cursor_OBJECTS) cursor_LDADD = $(LDADD) am_demo_OBJECTS = demo.$(OBJEXT) demo_OBJECTS = $(am_demo_OBJECTS) demo_LDADD = $(LDADD) am_demo05_OBJECTS = demo05.$(OBJEXT) demo05_OBJECTS = $(am_demo05_OBJECTS) demo05_LDADD = $(LDADD) am_demo06_OBJECTS = demo06.$(OBJEXT) demo06_OBJECTS = $(am_demo06_OBJECTS) demo06_LDADD = $(LDADD) am_demo27_OBJECTS = demo27.$(OBJEXT) demo27_OBJECTS = $(am_demo27_OBJECTS) demo27_LDADD = $(LDADD) am_demo33_OBJECTS = demo33.$(OBJEXT) demo33_OBJECTS = $(am_demo33_OBJECTS) demo33_LDADD = $(LDADD) am_demotest_OBJECTS = demotest.$(OBJEXT) nodist_demotest_OBJECTS = folder_gui.$(OBJEXT) demotest_OBJECTS = $(am_demotest_OBJECTS) $(nodist_demotest_OBJECTS) demotest_LDADD = $(LDADD) am_demotest2_OBJECTS = demotest2.$(OBJEXT) demotest2_OBJECTS = $(am_demotest2_OBJECTS) demotest2_LDADD = $(LDADD) am_demotest3_OBJECTS = demotest3.$(OBJEXT) demotest3_OBJECTS = $(am_demotest3_OBJECTS) demotest3_LDADD = $(LDADD) am_dirlist_OBJECTS = dirlist.$(OBJEXT) nodist_dirlist_OBJECTS = fbtest_gui.$(OBJEXT) dirlist_OBJECTS = $(am_dirlist_OBJECTS) $(nodist_dirlist_OBJECTS) dirlist_LDADD = $(LDADD) am_fbrowse_OBJECTS = fbrowse.$(OBJEXT) fbrowse_OBJECTS = $(am_fbrowse_OBJECTS) fbrowse_LDADD = $(LDADD) am_fbrowse1_OBJECTS = fbrowse1.$(OBJEXT) fbrowse1_OBJECTS = $(am_fbrowse1_OBJECTS) fbrowse1_LDADD = $(LDADD) am_fdial_OBJECTS = fdial.$(OBJEXT) fdial_OBJECTS = $(am_fdial_OBJECTS) fdial_LDADD = $(LDADD) am_flclock_OBJECTS = flclock.$(OBJEXT) flclock_OBJECTS = $(am_flclock_OBJECTS) flclock_LDADD = $(LDADD) am_folder_OBJECTS = folder.$(OBJEXT) nodist_folder_OBJECTS = folder_gui.$(OBJEXT) folder_OBJECTS = $(am_folder_OBJECTS) $(nodist_folder_OBJECTS) folder_LDADD = $(LDADD) am_fonts_OBJECTS = fonts.$(OBJEXT) fonts_OBJECTS = $(am_fonts_OBJECTS) fonts_LDADD = $(LDADD) am_formbrowser_OBJECTS = formbrowser.$(OBJEXT) nodist_formbrowser_OBJECTS = formbrowser_gui.$(OBJEXT) formbrowser_OBJECTS = $(am_formbrowser_OBJECTS) \ $(nodist_formbrowser_OBJECTS) formbrowser_LDADD = $(LDADD) am_free1_OBJECTS = free1.$(OBJEXT) free1_OBJECTS = $(am_free1_OBJECTS) free1_LDADD = $(LDADD) am_freedraw_OBJECTS = freedraw.$(OBJEXT) freedraw_OBJECTS = $(am_freedraw_OBJECTS) freedraw_LDADD = $(LDADD) am_freedraw_leak_OBJECTS = freedraw_leak.$(OBJEXT) freedraw_leak_OBJECTS = $(am_freedraw_leak_OBJECTS) freedraw_leak_LDADD = $(LDADD) am_gl_OBJECTS = gl.$(OBJEXT) gl_OBJECTS = $(am_gl_OBJECTS) am__DEPENDENCIES_1 = gl_DEPENDENCIES = ../gl/libformsGL.la ../lib/libforms.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_glwin_OBJECTS = glwin.$(OBJEXT) glwin_OBJECTS = $(am_glwin_OBJECTS) glwin_DEPENDENCIES = ../gl/libformsGL.la ../lib/libforms.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_goodies_OBJECTS = goodies.$(OBJEXT) goodies_OBJECTS = $(am_goodies_OBJECTS) goodies_LDADD = $(LDADD) am_grav_OBJECTS = grav.$(OBJEXT) grav_OBJECTS = $(am_grav_OBJECTS) grav_LDADD = $(LDADD) am_group_OBJECTS = group.$(OBJEXT) group_OBJECTS = $(am_group_OBJECTS) group_LDADD = $(LDADD) am_ibrowser_OBJECTS = ibrowser.$(OBJEXT) ibrowser_OBJECTS = $(am_ibrowser_OBJECTS) ibrowser_DEPENDENCIES = ../image/libflimage.la ../lib/libforms.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_iconify_OBJECTS = iconify.$(OBJEXT) iconify_OBJECTS = $(am_iconify_OBJECTS) iconify_LDADD = $(LDADD) am_iconvert_OBJECTS = iconvert.$(OBJEXT) iconvert_OBJECTS = $(am_iconvert_OBJECTS) iconvert_DEPENDENCIES = ../image/libflimage.la ../lib/libforms.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_inputall_OBJECTS = inputall.$(OBJEXT) nodist_inputall_OBJECTS = inputall_gui.$(OBJEXT) inputall_OBJECTS = $(am_inputall_OBJECTS) $(nodist_inputall_OBJECTS) inputall_LDADD = $(LDADD) am_invslider_OBJECTS = invslider.$(OBJEXT) invslider_OBJECTS = $(am_invslider_OBJECTS) invslider_LDADD = $(LDADD) am_itest_OBJECTS = itest.$(OBJEXT) itest_OBJECTS = $(am_itest_OBJECTS) itest_DEPENDENCIES = ../image/libflimage.la ../lib/libforms.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_lalign_OBJECTS = lalign.$(OBJEXT) lalign_OBJECTS = $(am_lalign_OBJECTS) lalign_LDADD = $(LDADD) am_ldial_OBJECTS = ldial.$(OBJEXT) ldial_OBJECTS = $(am_ldial_OBJECTS) ldial_LDADD = $(LDADD) am_ll_OBJECTS = ll.$(OBJEXT) ll_OBJECTS = $(am_ll_OBJECTS) ll_DEPENDENCIES = ../image/libflimage.la ../lib/libforms.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_longlabel_OBJECTS = longlabel.$(OBJEXT) longlabel_OBJECTS = $(am_longlabel_OBJECTS) longlabel_LDADD = $(LDADD) am_menu_OBJECTS = menu.$(OBJEXT) menu_OBJECTS = $(am_menu_OBJECTS) menu_LDADD = $(LDADD) am_minput_OBJECTS = minput.$(OBJEXT) minput_OBJECTS = $(am_minput_OBJECTS) minput_LDADD = $(LDADD) am_minput2_OBJECTS = minput2.$(OBJEXT) minput2_OBJECTS = $(am_minput2_OBJECTS) minput2_LDADD = $(LDADD) am_multilabel_OBJECTS = multilabel.$(OBJEXT) multilabel_OBJECTS = $(am_multilabel_OBJECTS) multilabel_LDADD = $(LDADD) am_ndial_OBJECTS = ndial.$(OBJEXT) ndial_OBJECTS = $(am_ndial_OBJECTS) ndial_LDADD = $(LDADD) am_new_popup_OBJECTS = new_popup.$(OBJEXT) new_popup_OBJECTS = $(am_new_popup_OBJECTS) new_popup_LDADD = $(LDADD) am_newbutton_OBJECTS = newbutton.$(OBJEXT) crossbut.$(OBJEXT) newbutton_OBJECTS = $(am_newbutton_OBJECTS) newbutton_LDADD = $(LDADD) am_nmenu_OBJECTS = nmenu.$(OBJEXT) nmenu_OBJECTS = $(am_nmenu_OBJECTS) nmenu_LDADD = $(LDADD) am_objinactive_OBJECTS = objinactive.$(OBJEXT) objinactive_OBJECTS = $(am_objinactive_OBJECTS) objinactive_LDADD = $(LDADD) am_objpos_OBJECTS = objpos.$(OBJEXT) objpos_OBJECTS = $(am_objpos_OBJECTS) objpos_LDADD = $(LDADD) am_objreturn_OBJECTS = objreturn.$(OBJEXT) objreturn_OBJECTS = $(am_objreturn_OBJECTS) objreturn_LDADD = $(LDADD) am_pmbrowse_OBJECTS = pmbrowse.$(OBJEXT) nodist_pmbrowse_OBJECTS = pmbrowse_gui.$(OBJEXT) pmbrowse_OBJECTS = $(am_pmbrowse_OBJECTS) $(nodist_pmbrowse_OBJECTS) pmbrowse_LDADD = $(LDADD) am_popup_OBJECTS = popup.$(OBJEXT) popup_OBJECTS = $(am_popup_OBJECTS) popup_LDADD = $(LDADD) am_positioner_OBJECTS = positioner.$(OBJEXT) positioner_OBJECTS = $(am_positioner_OBJECTS) positioner_LDADD = $(LDADD) am_positionerXOR_OBJECTS = positionerXOR.$(OBJEXT) positionerXOR_OBJECTS = $(am_positionerXOR_OBJECTS) positionerXOR_LDADD = $(LDADD) am_preemptive_OBJECTS = preemptive.$(OBJEXT) preemptive_OBJECTS = $(am_preemptive_OBJECTS) preemptive_LDADD = $(LDADD) am_pup_OBJECTS = pup.$(OBJEXT) pup_OBJECTS = $(am_pup_OBJECTS) pup_LDADD = $(LDADD) am_pushbutton_OBJECTS = pushbutton.$(OBJEXT) pushbutton_OBJECTS = $(am_pushbutton_OBJECTS) pushbutton_LDADD = $(LDADD) am_pushme_OBJECTS = pushme.$(OBJEXT) pushme_OBJECTS = $(am_pushme_OBJECTS) pushme_LDADD = $(LDADD) am_rescale_OBJECTS = rescale.$(OBJEXT) rescale_OBJECTS = $(am_rescale_OBJECTS) rescale_LDADD = $(LDADD) am_scrollbar_OBJECTS = scrollbar.$(OBJEXT) nodist_scrollbar_OBJECTS = scrollbar_gui.$(OBJEXT) scrollbar_OBJECTS = $(am_scrollbar_OBJECTS) \ $(nodist_scrollbar_OBJECTS) scrollbar_LDADD = $(LDADD) am_secretinput_OBJECTS = secretinput.$(OBJEXT) secretinput_OBJECTS = $(am_secretinput_OBJECTS) secretinput_LDADD = $(LDADD) am_select_OBJECTS = select.$(OBJEXT) select_OBJECTS = $(am_select_OBJECTS) select_LDADD = $(LDADD) am_sld_alt_OBJECTS = sld_alt.$(OBJEXT) sld_alt_OBJECTS = $(am_sld_alt_OBJECTS) sld_alt_LDADD = $(LDADD) am_sld_radio_OBJECTS = sld_radio.$(OBJEXT) sld_radio_OBJECTS = $(am_sld_radio_OBJECTS) sld_radio_LDADD = $(LDADD) am_sldinactive_OBJECTS = sldinactive.$(OBJEXT) sldinactive_OBJECTS = $(am_sldinactive_OBJECTS) sldinactive_LDADD = $(LDADD) am_sldsize_OBJECTS = sldsize.$(OBJEXT) sldsize_OBJECTS = $(am_sldsize_OBJECTS) sldsize_LDADD = $(LDADD) am_sliderall_OBJECTS = sliderall.$(OBJEXT) sliderall_OBJECTS = $(am_sliderall_OBJECTS) sliderall_LDADD = $(LDADD) am_strsize_OBJECTS = strsize.$(OBJEXT) strsize_OBJECTS = $(am_strsize_OBJECTS) strsize_LDADD = $(LDADD) am_symbols_OBJECTS = symbols.$(OBJEXT) symbols_OBJECTS = $(am_symbols_OBJECTS) symbols_LDADD = $(LDADD) am_thumbwheel_OBJECTS = thumbwheel.$(OBJEXT) nodist_thumbwheel_OBJECTS = twheel_gui.$(OBJEXT) thumbwheel_OBJECTS = $(am_thumbwheel_OBJECTS) \ $(nodist_thumbwheel_OBJECTS) thumbwheel_LDADD = $(LDADD) am_timeoutprec_OBJECTS = timeoutprec.$(OBJEXT) timeoutprec_OBJECTS = $(am_timeoutprec_OBJECTS) timeoutprec_LDADD = $(LDADD) am_timer_OBJECTS = timer.$(OBJEXT) timer_OBJECTS = $(am_timer_OBJECTS) timer_LDADD = $(LDADD) am_timerprec_OBJECTS = timerprec.$(OBJEXT) timerprec_OBJECTS = $(am_timerprec_OBJECTS) timerprec_LDADD = $(LDADD) am_touchbutton_OBJECTS = touchbutton.$(OBJEXT) touchbutton_OBJECTS = $(am_touchbutton_OBJECTS) touchbutton_LDADD = $(LDADD) am_wwwl_OBJECTS = wwwl.$(OBJEXT) wwwl_OBJECTS = $(am_wwwl_OBJECTS) wwwl_LDADD = $(LDADD) am_xyplotactive_OBJECTS = xyplotactive.$(OBJEXT) xyplotactive_OBJECTS = $(am_xyplotactive_OBJECTS) xyplotactive_LDADD = $(LDADD) am_xyplotall_OBJECTS = xyplotall.$(OBJEXT) xyplotall_OBJECTS = $(am_xyplotall_OBJECTS) xyplotall_LDADD = $(LDADD) am_xyplotover_OBJECTS = xyplotover.$(OBJEXT) xyplotover_OBJECTS = $(am_xyplotover_OBJECTS) xyplotover_DEPENDENCIES = ../image/libflimage.la ../lib/libforms.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_yesno_OBJECTS = yesno.$(OBJEXT) yesno_OBJECTS = $(am_yesno_OBJECTS) yesno_LDADD = $(LDADD) am_yesno_cb_OBJECTS = yesno_cb.$(OBJEXT) yesno_cb_OBJECTS = $(am_yesno_cb_OBJECTS) yesno_cb_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(arrowbutton_SOURCES) $(borderwidth_SOURCES) \ $(boxtype_SOURCES) $(browserall_SOURCES) $(browserop_SOURCES) \ $(buttonall_SOURCES) $(nodist_buttonall_SOURCES) \ $(butttypes_SOURCES) $(nodist_butttypes_SOURCES) \ $(canvas_SOURCES) $(canvas2_SOURCES) $(chartall_SOURCES) \ $(chartstrip_SOURCES) $(choice_SOURCES) $(colbrowser_SOURCES) \ $(colsel_SOURCES) $(colsel1_SOURCES) $(counter_SOURCES) \ $(cursor_SOURCES) $(demo_SOURCES) $(demo05_SOURCES) \ $(demo06_SOURCES) $(demo27_SOURCES) $(demo33_SOURCES) \ $(demotest_SOURCES) $(nodist_demotest_SOURCES) \ $(demotest2_SOURCES) $(demotest3_SOURCES) $(dirlist_SOURCES) \ $(nodist_dirlist_SOURCES) $(fbrowse_SOURCES) \ $(fbrowse1_SOURCES) $(fdial_SOURCES) $(flclock_SOURCES) \ $(folder_SOURCES) $(nodist_folder_SOURCES) $(fonts_SOURCES) \ $(formbrowser_SOURCES) $(nodist_formbrowser_SOURCES) \ $(free1_SOURCES) $(freedraw_SOURCES) $(freedraw_leak_SOURCES) \ $(gl_SOURCES) $(glwin_SOURCES) $(goodies_SOURCES) \ $(grav_SOURCES) $(group_SOURCES) $(ibrowser_SOURCES) \ $(iconify_SOURCES) $(iconvert_SOURCES) $(inputall_SOURCES) \ $(nodist_inputall_SOURCES) $(invslider_SOURCES) \ $(itest_SOURCES) $(lalign_SOURCES) $(ldial_SOURCES) \ $(ll_SOURCES) $(longlabel_SOURCES) $(menu_SOURCES) \ $(minput_SOURCES) $(minput2_SOURCES) $(multilabel_SOURCES) \ $(ndial_SOURCES) $(new_popup_SOURCES) $(newbutton_SOURCES) \ $(nmenu_SOURCES) $(objinactive_SOURCES) $(objpos_SOURCES) \ $(objreturn_SOURCES) $(pmbrowse_SOURCES) \ $(nodist_pmbrowse_SOURCES) $(popup_SOURCES) \ $(positioner_SOURCES) $(positionerXOR_SOURCES) \ $(preemptive_SOURCES) $(pup_SOURCES) $(pushbutton_SOURCES) \ $(pushme_SOURCES) $(rescale_SOURCES) $(scrollbar_SOURCES) \ $(nodist_scrollbar_SOURCES) $(secretinput_SOURCES) \ $(select_SOURCES) $(sld_alt_SOURCES) $(sld_radio_SOURCES) \ $(sldinactive_SOURCES) $(sldsize_SOURCES) $(sliderall_SOURCES) \ $(strsize_SOURCES) $(symbols_SOURCES) $(thumbwheel_SOURCES) \ $(nodist_thumbwheel_SOURCES) $(timeoutprec_SOURCES) \ $(timer_SOURCES) $(timerprec_SOURCES) $(touchbutton_SOURCES) \ $(wwwl_SOURCES) $(xyplotactive_SOURCES) $(xyplotall_SOURCES) \ $(xyplotover_SOURCES) $(yesno_SOURCES) $(yesno_cb_SOURCES) DIST_SOURCES = $(arrowbutton_SOURCES) $(borderwidth_SOURCES) \ $(boxtype_SOURCES) $(browserall_SOURCES) $(browserop_SOURCES) \ $(buttonall_SOURCES) $(butttypes_SOURCES) $(canvas_SOURCES) \ $(canvas2_SOURCES) $(chartall_SOURCES) $(chartstrip_SOURCES) \ $(choice_SOURCES) $(colbrowser_SOURCES) $(colsel_SOURCES) \ $(colsel1_SOURCES) $(counter_SOURCES) $(cursor_SOURCES) \ $(demo_SOURCES) $(demo05_SOURCES) $(demo06_SOURCES) \ $(demo27_SOURCES) $(demo33_SOURCES) $(demotest_SOURCES) \ $(demotest2_SOURCES) $(demotest3_SOURCES) $(dirlist_SOURCES) \ $(fbrowse_SOURCES) $(fbrowse1_SOURCES) $(fdial_SOURCES) \ $(flclock_SOURCES) $(folder_SOURCES) $(fonts_SOURCES) \ $(formbrowser_SOURCES) $(free1_SOURCES) $(freedraw_SOURCES) \ $(freedraw_leak_SOURCES) $(gl_SOURCES) $(glwin_SOURCES) \ $(goodies_SOURCES) $(grav_SOURCES) $(group_SOURCES) \ $(ibrowser_SOURCES) $(iconify_SOURCES) $(iconvert_SOURCES) \ $(inputall_SOURCES) $(invslider_SOURCES) $(itest_SOURCES) \ $(lalign_SOURCES) $(ldial_SOURCES) $(ll_SOURCES) \ $(longlabel_SOURCES) $(menu_SOURCES) $(minput_SOURCES) \ $(minput2_SOURCES) $(multilabel_SOURCES) $(ndial_SOURCES) \ $(new_popup_SOURCES) $(newbutton_SOURCES) $(nmenu_SOURCES) \ $(objinactive_SOURCES) $(objpos_SOURCES) $(objreturn_SOURCES) \ $(pmbrowse_SOURCES) $(popup_SOURCES) $(positioner_SOURCES) \ $(positionerXOR_SOURCES) $(preemptive_SOURCES) $(pup_SOURCES) \ $(pushbutton_SOURCES) $(pushme_SOURCES) $(rescale_SOURCES) \ $(scrollbar_SOURCES) $(secretinput_SOURCES) $(select_SOURCES) \ $(sld_alt_SOURCES) $(sld_radio_SOURCES) $(sldinactive_SOURCES) \ $(sldsize_SOURCES) $(sliderall_SOURCES) $(strsize_SOURCES) \ $(symbols_SOURCES) $(thumbwheel_SOURCES) \ $(timeoutprec_SOURCES) $(timer_SOURCES) $(timerprec_SOURCES) \ $(touchbutton_SOURCES) $(wwwl_SOURCES) $(xyplotactive_SOURCES) \ $(xyplotall_SOURCES) $(xyplotover_SOURCES) $(yesno_SOURCES) \ $(yesno_cb_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ # menubar # Most of these demos link against libforms only. For them this default is # sufficient: LDFLAGS = ../lib/libforms.la $(X_LIBS) $(X_PRE_LIBS) $(XPM_LIB) -lX11 $(LIBS) $(X_EXTRA_LIBS) LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = 01Readme iconvert.1 demo.menu test.ps \ bm1.xbm bm2.xbm newmail.xbm nomail.xbm picture.xbm srs.xbm \ crab45.xpm crab_tran.xpm crab.xpm porsche.xpm \ test.xpm xconq.xpm xterm.xpm SUBDIRS = fd SUFFIXES = .fd .c # forms.h is a generated file INCLUDES = -I../lib -I../lib/include -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/image $(X_CFLAGS) @BUILD_GL_FALSE@GL = @BUILD_GL_TRUE@GL = gl glwin arrowbutton_SOURCES = arrowbutton.c borderwidth_SOURCES = borderwidth.c boxtype_SOURCES = boxtype.c browserall_SOURCES = browserall.c browserop_SOURCES = browserop.c buttonall_SOURCES = buttonall.c nodist_buttonall_SOURCES = fd/buttons_gui.c fd/buttons_gui.h butttypes_SOURCES = butttypes.c nodist_butttypes_SOURCES = fd/butttypes_gui.c fd/butttypes_gui.h canvas_SOURCES = canvas.c canvas2_SOURCES = canvas2.c chartall_SOURCES = chartall.c chartstrip_SOURCES = chartstrip.c choice_SOURCES = choice.c colbrowser_SOURCES = colbrowser.c colsel_SOURCES = colsel.c colsel1_SOURCES = colsel1.c counter_SOURCES = counter.c cursor_SOURCES = cursor.c demo_SOURCES = demo.c demo05_SOURCES = demo05.c demo06_SOURCES = demo06.c demo27_SOURCES = demo27.c demo33_SOURCES = demo33.c demotest_SOURCES = demotest.c nodist_demotest_SOURCES = fd/folder_gui.c fd/folder_gui.h demotest2_SOURCES = demotest2.c demotest3_SOURCES = demotest3.c dirlist_SOURCES = dirlist.c nodist_dirlist_SOURCES = fd/fbtest_gui.c fd/fbtest_gui.h fbrowse_SOURCES = fbrowse.c fbrowse1_SOURCES = fbrowse1.c fdial_SOURCES = fdial.c flclock_SOURCES = flclock.c folder_SOURCES = folder.c nodist_folder_SOURCES = fd/folder_gui.c fd/folder_gui.h fonts_SOURCES = fonts.c formbrowser_SOURCES = formbrowser.c nodist_formbrowser_SOURCES = fd/formbrowser_gui.c fd/formbrowser_gui.h free1_SOURCES = free1.c freedraw_SOURCES = freedraw.c freedraw_leak_SOURCES = freedraw_leak.c gl_SOURCES = gl.c gl_LDADD = ../gl/libformsGL.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) -lGL -lX11 $(LIBS) $(X_EXTRA_LIBS) glwin_SOURCES = glwin.c glwin_LDADD = ../gl/libformsGL.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) -lGL -lX11 $(LIBS) $(X_EXTRA_LIBS) goodies_SOURCES = goodies.c grav_SOURCES = grav.c group_SOURCES = group.c ibrowser_SOURCES = ibrowser.c ibrowser_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) iconify_SOURCES = iconify.c iconvert_SOURCES = iconvert.c iconvert_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) inputall_SOURCES = inputall.c nodist_inputall_SOURCES = fd/inputall_gui.c fd/inputall_gui.h invslider_SOURCES = invslider.c itest_SOURCES = itest.c itest_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) lalign_SOURCES = lalign.c ldial_SOURCES = ldial.c ll_SOURCES = ll.c ll_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) longlabel_SOURCES = longlabel.c menu_SOURCES = menu.c #menubar_SOURCES = menubar.c minput_SOURCES = minput.c minput2_SOURCES = minput2.c multilabel_SOURCES = multilabel.c ndial_SOURCES = ndial.c newbutton_SOURCES = newbutton.c crossbut.c new_popup_SOURCES = new_popup.c nmenu_SOURCES = nmenu.c objinactive_SOURCES = objinactive.c objpos_SOURCES = objpos.c objreturn_SOURCES = objreturn.c pmbrowse_SOURCES = pmbrowse.c nodist_pmbrowse_SOURCES = fd/pmbrowse_gui.c fd/pmbrowse_gui.h popup_SOURCES = popup.c positioner_SOURCES = positioner.c positionerXOR_SOURCES = positionerXOR.c preemptive_SOURCES = preemptive.c pup_SOURCES = pup.c pushbutton_SOURCES = pushbutton.c pushme_SOURCES = pushme.c rescale_SOURCES = rescale.c scrollbar_SOURCES = scrollbar.c nodist_scrollbar_SOURCES = fd/scrollbar_gui.c fd/scrollbar_gui.h secretinput_SOURCES = secretinput.c select_SOURCES = select.c sld_alt_SOURCES = sld_alt.c sld_radio_SOURCES = sld_radio.c sldinactive_SOURCES = sldinactive.c sldsize_SOURCES = sldsize.c sliderall_SOURCES = sliderall.c strsize_SOURCES = strsize.c symbols_SOURCES = symbols.c thumbwheel_SOURCES = thumbwheel.c nodist_thumbwheel_SOURCES = fd/twheel_gui.c fd/twheel_gui.h timer_SOURCES = timer.c timerprec_SOURCES = timerprec.c timeoutprec_SOURCES = timeoutprec.c touchbutton_SOURCES = touchbutton.c xyplotactive_SOURCES = xyplotactive.c xyplotall_SOURCES = xyplotall.c xyplotover_SOURCES = xyplotover.c xyplotover_LDADD = ../image/libflimage.la ../lib/libforms.la \ $(X_LIBS) $(X_PRE_LIBS) $(JPEG_LIB) $(XPM_LIB) -lX11 $(LIBS) \ $(X_EXTRA_LIBS) yesno_SOURCES = yesno.c yesno_cb_SOURCES = yesno_cb.c wwwl_SOURCES = wwwl.c all: all-recursive .SUFFIXES: .SUFFIXES: .fd .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign demos/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign demos/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list arrowbutton$(EXEEXT): $(arrowbutton_OBJECTS) $(arrowbutton_DEPENDENCIES) @rm -f arrowbutton$(EXEEXT) $(LINK) $(arrowbutton_OBJECTS) $(arrowbutton_LDADD) $(LIBS) borderwidth$(EXEEXT): $(borderwidth_OBJECTS) $(borderwidth_DEPENDENCIES) @rm -f borderwidth$(EXEEXT) $(LINK) $(borderwidth_OBJECTS) $(borderwidth_LDADD) $(LIBS) boxtype$(EXEEXT): $(boxtype_OBJECTS) $(boxtype_DEPENDENCIES) @rm -f boxtype$(EXEEXT) $(LINK) $(boxtype_OBJECTS) $(boxtype_LDADD) $(LIBS) browserall$(EXEEXT): $(browserall_OBJECTS) $(browserall_DEPENDENCIES) @rm -f browserall$(EXEEXT) $(LINK) $(browserall_OBJECTS) $(browserall_LDADD) $(LIBS) browserop$(EXEEXT): $(browserop_OBJECTS) $(browserop_DEPENDENCIES) @rm -f browserop$(EXEEXT) $(LINK) $(browserop_OBJECTS) $(browserop_LDADD) $(LIBS) buttonall$(EXEEXT): $(buttonall_OBJECTS) $(buttonall_DEPENDENCIES) @rm -f buttonall$(EXEEXT) $(LINK) $(buttonall_OBJECTS) $(buttonall_LDADD) $(LIBS) butttypes$(EXEEXT): $(butttypes_OBJECTS) $(butttypes_DEPENDENCIES) @rm -f butttypes$(EXEEXT) $(LINK) $(butttypes_OBJECTS) $(butttypes_LDADD) $(LIBS) canvas$(EXEEXT): $(canvas_OBJECTS) $(canvas_DEPENDENCIES) @rm -f canvas$(EXEEXT) $(LINK) $(canvas_OBJECTS) $(canvas_LDADD) $(LIBS) canvas2$(EXEEXT): $(canvas2_OBJECTS) $(canvas2_DEPENDENCIES) @rm -f canvas2$(EXEEXT) $(LINK) $(canvas2_OBJECTS) $(canvas2_LDADD) $(LIBS) chartall$(EXEEXT): $(chartall_OBJECTS) $(chartall_DEPENDENCIES) @rm -f chartall$(EXEEXT) $(LINK) $(chartall_OBJECTS) $(chartall_LDADD) $(LIBS) chartstrip$(EXEEXT): $(chartstrip_OBJECTS) $(chartstrip_DEPENDENCIES) @rm -f chartstrip$(EXEEXT) $(LINK) $(chartstrip_OBJECTS) $(chartstrip_LDADD) $(LIBS) choice$(EXEEXT): $(choice_OBJECTS) $(choice_DEPENDENCIES) @rm -f choice$(EXEEXT) $(LINK) $(choice_OBJECTS) $(choice_LDADD) $(LIBS) colbrowser$(EXEEXT): $(colbrowser_OBJECTS) $(colbrowser_DEPENDENCIES) @rm -f colbrowser$(EXEEXT) $(LINK) $(colbrowser_OBJECTS) $(colbrowser_LDADD) $(LIBS) colsel$(EXEEXT): $(colsel_OBJECTS) $(colsel_DEPENDENCIES) @rm -f colsel$(EXEEXT) $(LINK) $(colsel_OBJECTS) $(colsel_LDADD) $(LIBS) colsel1$(EXEEXT): $(colsel1_OBJECTS) $(colsel1_DEPENDENCIES) @rm -f colsel1$(EXEEXT) $(LINK) $(colsel1_OBJECTS) $(colsel1_LDADD) $(LIBS) counter$(EXEEXT): $(counter_OBJECTS) $(counter_DEPENDENCIES) @rm -f counter$(EXEEXT) $(LINK) $(counter_OBJECTS) $(counter_LDADD) $(LIBS) cursor$(EXEEXT): $(cursor_OBJECTS) $(cursor_DEPENDENCIES) @rm -f cursor$(EXEEXT) $(LINK) $(cursor_OBJECTS) $(cursor_LDADD) $(LIBS) demo$(EXEEXT): $(demo_OBJECTS) $(demo_DEPENDENCIES) @rm -f demo$(EXEEXT) $(LINK) $(demo_OBJECTS) $(demo_LDADD) $(LIBS) demo05$(EXEEXT): $(demo05_OBJECTS) $(demo05_DEPENDENCIES) @rm -f demo05$(EXEEXT) $(LINK) $(demo05_OBJECTS) $(demo05_LDADD) $(LIBS) demo06$(EXEEXT): $(demo06_OBJECTS) $(demo06_DEPENDENCIES) @rm -f demo06$(EXEEXT) $(LINK) $(demo06_OBJECTS) $(demo06_LDADD) $(LIBS) demo27$(EXEEXT): $(demo27_OBJECTS) $(demo27_DEPENDENCIES) @rm -f demo27$(EXEEXT) $(LINK) $(demo27_OBJECTS) $(demo27_LDADD) $(LIBS) demo33$(EXEEXT): $(demo33_OBJECTS) $(demo33_DEPENDENCIES) @rm -f demo33$(EXEEXT) $(LINK) $(demo33_OBJECTS) $(demo33_LDADD) $(LIBS) demotest$(EXEEXT): $(demotest_OBJECTS) $(demotest_DEPENDENCIES) @rm -f demotest$(EXEEXT) $(LINK) $(demotest_OBJECTS) $(demotest_LDADD) $(LIBS) demotest2$(EXEEXT): $(demotest2_OBJECTS) $(demotest2_DEPENDENCIES) @rm -f demotest2$(EXEEXT) $(LINK) $(demotest2_OBJECTS) $(demotest2_LDADD) $(LIBS) demotest3$(EXEEXT): $(demotest3_OBJECTS) $(demotest3_DEPENDENCIES) @rm -f demotest3$(EXEEXT) $(LINK) $(demotest3_OBJECTS) $(demotest3_LDADD) $(LIBS) dirlist$(EXEEXT): $(dirlist_OBJECTS) $(dirlist_DEPENDENCIES) @rm -f dirlist$(EXEEXT) $(LINK) $(dirlist_OBJECTS) $(dirlist_LDADD) $(LIBS) fbrowse$(EXEEXT): $(fbrowse_OBJECTS) $(fbrowse_DEPENDENCIES) @rm -f fbrowse$(EXEEXT) $(LINK) $(fbrowse_OBJECTS) $(fbrowse_LDADD) $(LIBS) fbrowse1$(EXEEXT): $(fbrowse1_OBJECTS) $(fbrowse1_DEPENDENCIES) @rm -f fbrowse1$(EXEEXT) $(LINK) $(fbrowse1_OBJECTS) $(fbrowse1_LDADD) $(LIBS) fdial$(EXEEXT): $(fdial_OBJECTS) $(fdial_DEPENDENCIES) @rm -f fdial$(EXEEXT) $(LINK) $(fdial_OBJECTS) $(fdial_LDADD) $(LIBS) flclock$(EXEEXT): $(flclock_OBJECTS) $(flclock_DEPENDENCIES) @rm -f flclock$(EXEEXT) $(LINK) $(flclock_OBJECTS) $(flclock_LDADD) $(LIBS) folder$(EXEEXT): $(folder_OBJECTS) $(folder_DEPENDENCIES) @rm -f folder$(EXEEXT) $(LINK) $(folder_OBJECTS) $(folder_LDADD) $(LIBS) fonts$(EXEEXT): $(fonts_OBJECTS) $(fonts_DEPENDENCIES) @rm -f fonts$(EXEEXT) $(LINK) $(fonts_OBJECTS) $(fonts_LDADD) $(LIBS) formbrowser$(EXEEXT): $(formbrowser_OBJECTS) $(formbrowser_DEPENDENCIES) @rm -f formbrowser$(EXEEXT) $(LINK) $(formbrowser_OBJECTS) $(formbrowser_LDADD) $(LIBS) free1$(EXEEXT): $(free1_OBJECTS) $(free1_DEPENDENCIES) @rm -f free1$(EXEEXT) $(LINK) $(free1_OBJECTS) $(free1_LDADD) $(LIBS) freedraw$(EXEEXT): $(freedraw_OBJECTS) $(freedraw_DEPENDENCIES) @rm -f freedraw$(EXEEXT) $(LINK) $(freedraw_OBJECTS) $(freedraw_LDADD) $(LIBS) freedraw_leak$(EXEEXT): $(freedraw_leak_OBJECTS) $(freedraw_leak_DEPENDENCIES) @rm -f freedraw_leak$(EXEEXT) $(LINK) $(freedraw_leak_OBJECTS) $(freedraw_leak_LDADD) $(LIBS) gl$(EXEEXT): $(gl_OBJECTS) $(gl_DEPENDENCIES) @rm -f gl$(EXEEXT) $(LINK) $(gl_OBJECTS) $(gl_LDADD) $(LIBS) glwin$(EXEEXT): $(glwin_OBJECTS) $(glwin_DEPENDENCIES) @rm -f glwin$(EXEEXT) $(LINK) $(glwin_OBJECTS) $(glwin_LDADD) $(LIBS) goodies$(EXEEXT): $(goodies_OBJECTS) $(goodies_DEPENDENCIES) @rm -f goodies$(EXEEXT) $(LINK) $(goodies_OBJECTS) $(goodies_LDADD) $(LIBS) grav$(EXEEXT): $(grav_OBJECTS) $(grav_DEPENDENCIES) @rm -f grav$(EXEEXT) $(LINK) $(grav_OBJECTS) $(grav_LDADD) $(LIBS) group$(EXEEXT): $(group_OBJECTS) $(group_DEPENDENCIES) @rm -f group$(EXEEXT) $(LINK) $(group_OBJECTS) $(group_LDADD) $(LIBS) ibrowser$(EXEEXT): $(ibrowser_OBJECTS) $(ibrowser_DEPENDENCIES) @rm -f ibrowser$(EXEEXT) $(LINK) $(ibrowser_OBJECTS) $(ibrowser_LDADD) $(LIBS) iconify$(EXEEXT): $(iconify_OBJECTS) $(iconify_DEPENDENCIES) @rm -f iconify$(EXEEXT) $(LINK) $(iconify_OBJECTS) $(iconify_LDADD) $(LIBS) iconvert$(EXEEXT): $(iconvert_OBJECTS) $(iconvert_DEPENDENCIES) @rm -f iconvert$(EXEEXT) $(LINK) $(iconvert_OBJECTS) $(iconvert_LDADD) $(LIBS) inputall$(EXEEXT): $(inputall_OBJECTS) $(inputall_DEPENDENCIES) @rm -f inputall$(EXEEXT) $(LINK) $(inputall_OBJECTS) $(inputall_LDADD) $(LIBS) invslider$(EXEEXT): $(invslider_OBJECTS) $(invslider_DEPENDENCIES) @rm -f invslider$(EXEEXT) $(LINK) $(invslider_OBJECTS) $(invslider_LDADD) $(LIBS) itest$(EXEEXT): $(itest_OBJECTS) $(itest_DEPENDENCIES) @rm -f itest$(EXEEXT) $(LINK) $(itest_OBJECTS) $(itest_LDADD) $(LIBS) lalign$(EXEEXT): $(lalign_OBJECTS) $(lalign_DEPENDENCIES) @rm -f lalign$(EXEEXT) $(LINK) $(lalign_OBJECTS) $(lalign_LDADD) $(LIBS) ldial$(EXEEXT): $(ldial_OBJECTS) $(ldial_DEPENDENCIES) @rm -f ldial$(EXEEXT) $(LINK) $(ldial_OBJECTS) $(ldial_LDADD) $(LIBS) ll$(EXEEXT): $(ll_OBJECTS) $(ll_DEPENDENCIES) @rm -f ll$(EXEEXT) $(LINK) $(ll_OBJECTS) $(ll_LDADD) $(LIBS) longlabel$(EXEEXT): $(longlabel_OBJECTS) $(longlabel_DEPENDENCIES) @rm -f longlabel$(EXEEXT) $(LINK) $(longlabel_OBJECTS) $(longlabel_LDADD) $(LIBS) menu$(EXEEXT): $(menu_OBJECTS) $(menu_DEPENDENCIES) @rm -f menu$(EXEEXT) $(LINK) $(menu_OBJECTS) $(menu_LDADD) $(LIBS) minput$(EXEEXT): $(minput_OBJECTS) $(minput_DEPENDENCIES) @rm -f minput$(EXEEXT) $(LINK) $(minput_OBJECTS) $(minput_LDADD) $(LIBS) minput2$(EXEEXT): $(minput2_OBJECTS) $(minput2_DEPENDENCIES) @rm -f minput2$(EXEEXT) $(LINK) $(minput2_OBJECTS) $(minput2_LDADD) $(LIBS) multilabel$(EXEEXT): $(multilabel_OBJECTS) $(multilabel_DEPENDENCIES) @rm -f multilabel$(EXEEXT) $(LINK) $(multilabel_OBJECTS) $(multilabel_LDADD) $(LIBS) ndial$(EXEEXT): $(ndial_OBJECTS) $(ndial_DEPENDENCIES) @rm -f ndial$(EXEEXT) $(LINK) $(ndial_OBJECTS) $(ndial_LDADD) $(LIBS) new_popup$(EXEEXT): $(new_popup_OBJECTS) $(new_popup_DEPENDENCIES) @rm -f new_popup$(EXEEXT) $(LINK) $(new_popup_OBJECTS) $(new_popup_LDADD) $(LIBS) newbutton$(EXEEXT): $(newbutton_OBJECTS) $(newbutton_DEPENDENCIES) @rm -f newbutton$(EXEEXT) $(LINK) $(newbutton_OBJECTS) $(newbutton_LDADD) $(LIBS) nmenu$(EXEEXT): $(nmenu_OBJECTS) $(nmenu_DEPENDENCIES) @rm -f nmenu$(EXEEXT) $(LINK) $(nmenu_OBJECTS) $(nmenu_LDADD) $(LIBS) objinactive$(EXEEXT): $(objinactive_OBJECTS) $(objinactive_DEPENDENCIES) @rm -f objinactive$(EXEEXT) $(LINK) $(objinactive_OBJECTS) $(objinactive_LDADD) $(LIBS) objpos$(EXEEXT): $(objpos_OBJECTS) $(objpos_DEPENDENCIES) @rm -f objpos$(EXEEXT) $(LINK) $(objpos_OBJECTS) $(objpos_LDADD) $(LIBS) objreturn$(EXEEXT): $(objreturn_OBJECTS) $(objreturn_DEPENDENCIES) @rm -f objreturn$(EXEEXT) $(LINK) $(objreturn_OBJECTS) $(objreturn_LDADD) $(LIBS) pmbrowse$(EXEEXT): $(pmbrowse_OBJECTS) $(pmbrowse_DEPENDENCIES) @rm -f pmbrowse$(EXEEXT) $(LINK) $(pmbrowse_OBJECTS) $(pmbrowse_LDADD) $(LIBS) popup$(EXEEXT): $(popup_OBJECTS) $(popup_DEPENDENCIES) @rm -f popup$(EXEEXT) $(LINK) $(popup_OBJECTS) $(popup_LDADD) $(LIBS) positioner$(EXEEXT): $(positioner_OBJECTS) $(positioner_DEPENDENCIES) @rm -f positioner$(EXEEXT) $(LINK) $(positioner_OBJECTS) $(positioner_LDADD) $(LIBS) positionerXOR$(EXEEXT): $(positionerXOR_OBJECTS) $(positionerXOR_DEPENDENCIES) @rm -f positionerXOR$(EXEEXT) $(LINK) $(positionerXOR_OBJECTS) $(positionerXOR_LDADD) $(LIBS) preemptive$(EXEEXT): $(preemptive_OBJECTS) $(preemptive_DEPENDENCIES) @rm -f preemptive$(EXEEXT) $(LINK) $(preemptive_OBJECTS) $(preemptive_LDADD) $(LIBS) pup$(EXEEXT): $(pup_OBJECTS) $(pup_DEPENDENCIES) @rm -f pup$(EXEEXT) $(LINK) $(pup_OBJECTS) $(pup_LDADD) $(LIBS) pushbutton$(EXEEXT): $(pushbutton_OBJECTS) $(pushbutton_DEPENDENCIES) @rm -f pushbutton$(EXEEXT) $(LINK) $(pushbutton_OBJECTS) $(pushbutton_LDADD) $(LIBS) pushme$(EXEEXT): $(pushme_OBJECTS) $(pushme_DEPENDENCIES) @rm -f pushme$(EXEEXT) $(LINK) $(pushme_OBJECTS) $(pushme_LDADD) $(LIBS) rescale$(EXEEXT): $(rescale_OBJECTS) $(rescale_DEPENDENCIES) @rm -f rescale$(EXEEXT) $(LINK) $(rescale_OBJECTS) $(rescale_LDADD) $(LIBS) scrollbar$(EXEEXT): $(scrollbar_OBJECTS) $(scrollbar_DEPENDENCIES) @rm -f scrollbar$(EXEEXT) $(LINK) $(scrollbar_OBJECTS) $(scrollbar_LDADD) $(LIBS) secretinput$(EXEEXT): $(secretinput_OBJECTS) $(secretinput_DEPENDENCIES) @rm -f secretinput$(EXEEXT) $(LINK) $(secretinput_OBJECTS) $(secretinput_LDADD) $(LIBS) select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) @rm -f select$(EXEEXT) $(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) sld_alt$(EXEEXT): $(sld_alt_OBJECTS) $(sld_alt_DEPENDENCIES) @rm -f sld_alt$(EXEEXT) $(LINK) $(sld_alt_OBJECTS) $(sld_alt_LDADD) $(LIBS) sld_radio$(EXEEXT): $(sld_radio_OBJECTS) $(sld_radio_DEPENDENCIES) @rm -f sld_radio$(EXEEXT) $(LINK) $(sld_radio_OBJECTS) $(sld_radio_LDADD) $(LIBS) sldinactive$(EXEEXT): $(sldinactive_OBJECTS) $(sldinactive_DEPENDENCIES) @rm -f sldinactive$(EXEEXT) $(LINK) $(sldinactive_OBJECTS) $(sldinactive_LDADD) $(LIBS) sldsize$(EXEEXT): $(sldsize_OBJECTS) $(sldsize_DEPENDENCIES) @rm -f sldsize$(EXEEXT) $(LINK) $(sldsize_OBJECTS) $(sldsize_LDADD) $(LIBS) sliderall$(EXEEXT): $(sliderall_OBJECTS) $(sliderall_DEPENDENCIES) @rm -f sliderall$(EXEEXT) $(LINK) $(sliderall_OBJECTS) $(sliderall_LDADD) $(LIBS) strsize$(EXEEXT): $(strsize_OBJECTS) $(strsize_DEPENDENCIES) @rm -f strsize$(EXEEXT) $(LINK) $(strsize_OBJECTS) $(strsize_LDADD) $(LIBS) symbols$(EXEEXT): $(symbols_OBJECTS) $(symbols_DEPENDENCIES) @rm -f symbols$(EXEEXT) $(LINK) $(symbols_OBJECTS) $(symbols_LDADD) $(LIBS) thumbwheel$(EXEEXT): $(thumbwheel_OBJECTS) $(thumbwheel_DEPENDENCIES) @rm -f thumbwheel$(EXEEXT) $(LINK) $(thumbwheel_OBJECTS) $(thumbwheel_LDADD) $(LIBS) timeoutprec$(EXEEXT): $(timeoutprec_OBJECTS) $(timeoutprec_DEPENDENCIES) @rm -f timeoutprec$(EXEEXT) $(LINK) $(timeoutprec_OBJECTS) $(timeoutprec_LDADD) $(LIBS) timer$(EXEEXT): $(timer_OBJECTS) $(timer_DEPENDENCIES) @rm -f timer$(EXEEXT) $(LINK) $(timer_OBJECTS) $(timer_LDADD) $(LIBS) timerprec$(EXEEXT): $(timerprec_OBJECTS) $(timerprec_DEPENDENCIES) @rm -f timerprec$(EXEEXT) $(LINK) $(timerprec_OBJECTS) $(timerprec_LDADD) $(LIBS) touchbutton$(EXEEXT): $(touchbutton_OBJECTS) $(touchbutton_DEPENDENCIES) @rm -f touchbutton$(EXEEXT) $(LINK) $(touchbutton_OBJECTS) $(touchbutton_LDADD) $(LIBS) wwwl$(EXEEXT): $(wwwl_OBJECTS) $(wwwl_DEPENDENCIES) @rm -f wwwl$(EXEEXT) $(LINK) $(wwwl_OBJECTS) $(wwwl_LDADD) $(LIBS) xyplotactive$(EXEEXT): $(xyplotactive_OBJECTS) $(xyplotactive_DEPENDENCIES) @rm -f xyplotactive$(EXEEXT) $(LINK) $(xyplotactive_OBJECTS) $(xyplotactive_LDADD) $(LIBS) xyplotall$(EXEEXT): $(xyplotall_OBJECTS) $(xyplotall_DEPENDENCIES) @rm -f xyplotall$(EXEEXT) $(LINK) $(xyplotall_OBJECTS) $(xyplotall_LDADD) $(LIBS) xyplotover$(EXEEXT): $(xyplotover_OBJECTS) $(xyplotover_DEPENDENCIES) @rm -f xyplotover$(EXEEXT) $(LINK) $(xyplotover_OBJECTS) $(xyplotover_LDADD) $(LIBS) yesno$(EXEEXT): $(yesno_OBJECTS) $(yesno_DEPENDENCIES) @rm -f yesno$(EXEEXT) $(LINK) $(yesno_OBJECTS) $(yesno_LDADD) $(LIBS) yesno_cb$(EXEEXT): $(yesno_cb_OBJECTS) $(yesno_cb_DEPENDENCIES) @rm -f yesno_cb$(EXEEXT) $(LINK) $(yesno_cb_OBJECTS) $(yesno_cb_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arrowbutton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/borderwidth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boxtype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/browserall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/browserop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buttonall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buttons_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/butttypes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/butttypes_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canvas2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chartall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chartstrip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/choice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colbrowser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colsel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colsel1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/counter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crossbut.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo05.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo06.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo27.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo33.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demotest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demotest2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demotest3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbrowse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbrowse1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbtest_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flclock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/folder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/folder_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fonts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formbrowser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formbrowser_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freedraw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freedraw_leak.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glwin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goodies.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grav.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ibrowser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inputall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inputall_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invslider.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lalign.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/longlabel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minput2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multilabel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/new_popup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newbutton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nmenu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objinactive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objpos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objreturn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pmbrowse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pmbrowse_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/positioner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/positionerXOR.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preemptive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pushbutton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pushme.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rescale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrollbar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrollbar_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secretinput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sld_alt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sld_radio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sldinactive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sldsize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sliderall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbols.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thumbwheel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeoutprec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timerprec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/touchbutton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twheel_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wwwl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xyplotactive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xyplotall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xyplotover.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno_cb.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< buttons_gui.o: fd/buttons_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT buttons_gui.o -MD -MP -MF $(DEPDIR)/buttons_gui.Tpo -c -o buttons_gui.o `test -f 'fd/buttons_gui.c' || echo '$(srcdir)/'`fd/buttons_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/buttons_gui.Tpo $(DEPDIR)/buttons_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/buttons_gui.c' object='buttons_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o buttons_gui.o `test -f 'fd/buttons_gui.c' || echo '$(srcdir)/'`fd/buttons_gui.c buttons_gui.obj: fd/buttons_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT buttons_gui.obj -MD -MP -MF $(DEPDIR)/buttons_gui.Tpo -c -o buttons_gui.obj `if test -f 'fd/buttons_gui.c'; then $(CYGPATH_W) 'fd/buttons_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/buttons_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/buttons_gui.Tpo $(DEPDIR)/buttons_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/buttons_gui.c' object='buttons_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o buttons_gui.obj `if test -f 'fd/buttons_gui.c'; then $(CYGPATH_W) 'fd/buttons_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/buttons_gui.c'; fi` butttypes_gui.o: fd/butttypes_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT butttypes_gui.o -MD -MP -MF $(DEPDIR)/butttypes_gui.Tpo -c -o butttypes_gui.o `test -f 'fd/butttypes_gui.c' || echo '$(srcdir)/'`fd/butttypes_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/butttypes_gui.Tpo $(DEPDIR)/butttypes_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/butttypes_gui.c' object='butttypes_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o butttypes_gui.o `test -f 'fd/butttypes_gui.c' || echo '$(srcdir)/'`fd/butttypes_gui.c butttypes_gui.obj: fd/butttypes_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT butttypes_gui.obj -MD -MP -MF $(DEPDIR)/butttypes_gui.Tpo -c -o butttypes_gui.obj `if test -f 'fd/butttypes_gui.c'; then $(CYGPATH_W) 'fd/butttypes_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/butttypes_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/butttypes_gui.Tpo $(DEPDIR)/butttypes_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/butttypes_gui.c' object='butttypes_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o butttypes_gui.obj `if test -f 'fd/butttypes_gui.c'; then $(CYGPATH_W) 'fd/butttypes_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/butttypes_gui.c'; fi` folder_gui.o: fd/folder_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT folder_gui.o -MD -MP -MF $(DEPDIR)/folder_gui.Tpo -c -o folder_gui.o `test -f 'fd/folder_gui.c' || echo '$(srcdir)/'`fd/folder_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/folder_gui.Tpo $(DEPDIR)/folder_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/folder_gui.c' object='folder_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o folder_gui.o `test -f 'fd/folder_gui.c' || echo '$(srcdir)/'`fd/folder_gui.c folder_gui.obj: fd/folder_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT folder_gui.obj -MD -MP -MF $(DEPDIR)/folder_gui.Tpo -c -o folder_gui.obj `if test -f 'fd/folder_gui.c'; then $(CYGPATH_W) 'fd/folder_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/folder_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/folder_gui.Tpo $(DEPDIR)/folder_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/folder_gui.c' object='folder_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o folder_gui.obj `if test -f 'fd/folder_gui.c'; then $(CYGPATH_W) 'fd/folder_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/folder_gui.c'; fi` fbtest_gui.o: fd/fbtest_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbtest_gui.o -MD -MP -MF $(DEPDIR)/fbtest_gui.Tpo -c -o fbtest_gui.o `test -f 'fd/fbtest_gui.c' || echo '$(srcdir)/'`fd/fbtest_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbtest_gui.Tpo $(DEPDIR)/fbtest_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/fbtest_gui.c' object='fbtest_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbtest_gui.o `test -f 'fd/fbtest_gui.c' || echo '$(srcdir)/'`fd/fbtest_gui.c fbtest_gui.obj: fd/fbtest_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbtest_gui.obj -MD -MP -MF $(DEPDIR)/fbtest_gui.Tpo -c -o fbtest_gui.obj `if test -f 'fd/fbtest_gui.c'; then $(CYGPATH_W) 'fd/fbtest_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/fbtest_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fbtest_gui.Tpo $(DEPDIR)/fbtest_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/fbtest_gui.c' object='fbtest_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbtest_gui.obj `if test -f 'fd/fbtest_gui.c'; then $(CYGPATH_W) 'fd/fbtest_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/fbtest_gui.c'; fi` formbrowser_gui.o: fd/formbrowser_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT formbrowser_gui.o -MD -MP -MF $(DEPDIR)/formbrowser_gui.Tpo -c -o formbrowser_gui.o `test -f 'fd/formbrowser_gui.c' || echo '$(srcdir)/'`fd/formbrowser_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/formbrowser_gui.Tpo $(DEPDIR)/formbrowser_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/formbrowser_gui.c' object='formbrowser_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o formbrowser_gui.o `test -f 'fd/formbrowser_gui.c' || echo '$(srcdir)/'`fd/formbrowser_gui.c formbrowser_gui.obj: fd/formbrowser_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT formbrowser_gui.obj -MD -MP -MF $(DEPDIR)/formbrowser_gui.Tpo -c -o formbrowser_gui.obj `if test -f 'fd/formbrowser_gui.c'; then $(CYGPATH_W) 'fd/formbrowser_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/formbrowser_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/formbrowser_gui.Tpo $(DEPDIR)/formbrowser_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/formbrowser_gui.c' object='formbrowser_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o formbrowser_gui.obj `if test -f 'fd/formbrowser_gui.c'; then $(CYGPATH_W) 'fd/formbrowser_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/formbrowser_gui.c'; fi` inputall_gui.o: fd/inputall_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inputall_gui.o -MD -MP -MF $(DEPDIR)/inputall_gui.Tpo -c -o inputall_gui.o `test -f 'fd/inputall_gui.c' || echo '$(srcdir)/'`fd/inputall_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/inputall_gui.Tpo $(DEPDIR)/inputall_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/inputall_gui.c' object='inputall_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inputall_gui.o `test -f 'fd/inputall_gui.c' || echo '$(srcdir)/'`fd/inputall_gui.c inputall_gui.obj: fd/inputall_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inputall_gui.obj -MD -MP -MF $(DEPDIR)/inputall_gui.Tpo -c -o inputall_gui.obj `if test -f 'fd/inputall_gui.c'; then $(CYGPATH_W) 'fd/inputall_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/inputall_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/inputall_gui.Tpo $(DEPDIR)/inputall_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/inputall_gui.c' object='inputall_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inputall_gui.obj `if test -f 'fd/inputall_gui.c'; then $(CYGPATH_W) 'fd/inputall_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/inputall_gui.c'; fi` pmbrowse_gui.o: fd/pmbrowse_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pmbrowse_gui.o -MD -MP -MF $(DEPDIR)/pmbrowse_gui.Tpo -c -o pmbrowse_gui.o `test -f 'fd/pmbrowse_gui.c' || echo '$(srcdir)/'`fd/pmbrowse_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pmbrowse_gui.Tpo $(DEPDIR)/pmbrowse_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/pmbrowse_gui.c' object='pmbrowse_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pmbrowse_gui.o `test -f 'fd/pmbrowse_gui.c' || echo '$(srcdir)/'`fd/pmbrowse_gui.c pmbrowse_gui.obj: fd/pmbrowse_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pmbrowse_gui.obj -MD -MP -MF $(DEPDIR)/pmbrowse_gui.Tpo -c -o pmbrowse_gui.obj `if test -f 'fd/pmbrowse_gui.c'; then $(CYGPATH_W) 'fd/pmbrowse_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/pmbrowse_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pmbrowse_gui.Tpo $(DEPDIR)/pmbrowse_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/pmbrowse_gui.c' object='pmbrowse_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pmbrowse_gui.obj `if test -f 'fd/pmbrowse_gui.c'; then $(CYGPATH_W) 'fd/pmbrowse_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/pmbrowse_gui.c'; fi` scrollbar_gui.o: fd/scrollbar_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT scrollbar_gui.o -MD -MP -MF $(DEPDIR)/scrollbar_gui.Tpo -c -o scrollbar_gui.o `test -f 'fd/scrollbar_gui.c' || echo '$(srcdir)/'`fd/scrollbar_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/scrollbar_gui.Tpo $(DEPDIR)/scrollbar_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/scrollbar_gui.c' object='scrollbar_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o scrollbar_gui.o `test -f 'fd/scrollbar_gui.c' || echo '$(srcdir)/'`fd/scrollbar_gui.c scrollbar_gui.obj: fd/scrollbar_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT scrollbar_gui.obj -MD -MP -MF $(DEPDIR)/scrollbar_gui.Tpo -c -o scrollbar_gui.obj `if test -f 'fd/scrollbar_gui.c'; then $(CYGPATH_W) 'fd/scrollbar_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/scrollbar_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/scrollbar_gui.Tpo $(DEPDIR)/scrollbar_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/scrollbar_gui.c' object='scrollbar_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o scrollbar_gui.obj `if test -f 'fd/scrollbar_gui.c'; then $(CYGPATH_W) 'fd/scrollbar_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/scrollbar_gui.c'; fi` twheel_gui.o: fd/twheel_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT twheel_gui.o -MD -MP -MF $(DEPDIR)/twheel_gui.Tpo -c -o twheel_gui.o `test -f 'fd/twheel_gui.c' || echo '$(srcdir)/'`fd/twheel_gui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/twheel_gui.Tpo $(DEPDIR)/twheel_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/twheel_gui.c' object='twheel_gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o twheel_gui.o `test -f 'fd/twheel_gui.c' || echo '$(srcdir)/'`fd/twheel_gui.c twheel_gui.obj: fd/twheel_gui.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT twheel_gui.obj -MD -MP -MF $(DEPDIR)/twheel_gui.Tpo -c -o twheel_gui.obj `if test -f 'fd/twheel_gui.c'; then $(CYGPATH_W) 'fd/twheel_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/twheel_gui.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/twheel_gui.Tpo $(DEPDIR)/twheel_gui.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fd/twheel_gui.c' object='twheel_gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o twheel_gui.obj `if test -f 'fd/twheel_gui.c'; then $(CYGPATH_W) 'fd/twheel_gui.c'; else $(CYGPATH_W) '$(srcdir)/fd/twheel_gui.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) 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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-noinstPROGRAMS ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am buttonall.$(OBJEXT): fd/buttons_gui.c butttypes.$(OBJEXT): fd/butttypes_gui.c demotest.$(OBJEXT): fd/folder_gui.c dirlist.$(OBJEXT): fd/fbtest_gui.c folder.$(OBJEXT): fd/folder_gui.c formbrowser.$(OBJEXT): fd/formbrowser_gui.c ibrowser.$(OBJEXT): fd/ibrowser_gui.c inputall.$(OBJEXT): fd/inputall_gui.c itest.$(OBJEXT): fd/is_gui.c pmbrowse.$(OBJEXT): fd/pmbrowse_gui.c scrollbar.$(OBJEXT): fd/scrollbar_gui.c thumbwheel.$(OBJEXT): fd/twheel_gui.c .fd.c: ../fdesign/fdesign ../fdesign/fdesign -dir fd -convert $< # 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: xforms-1.0.93sp1/demos/touchbutton.c0000644000175000017500000000547111203636407016070 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of a touch buttons. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" static void show_val( FL_OBJECT *, long ); FL_OBJECT *valobj; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 360, 140); obj = fl_add_button( FL_TOUCH_BUTTON, 50, 30, 40, 30, "@<<" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_color( obj, FL_COL1, FL_INDIANRED ); fl_set_object_callback( obj, show_val, -5 ); fl_set_button_shortcut( obj, "1", 0 ); obj = fl_add_button( FL_TOUCH_BUTTON, 90, 30, 40, 30, "@<" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_color( obj, FL_COL1, FL_INDIANRED ); fl_set_object_callback( obj, show_val, -1 ); fl_set_button_shortcut( obj, "2", 0 ); valobj = obj = fl_add_box( FL_BORDER_BOX, 130, 30, 100, 30, "" ); fl_set_object_color( obj, FL_LEFT_BCOL, FL_LEFT_BCOL ); obj = fl_add_button( FL_TOUCH_BUTTON, 230, 30, 40, 30, "@>" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_color( obj, FL_COL1, FL_INDIANRED ); fl_set_object_callback( obj, show_val, 1 ); fl_set_button_shortcut( obj, "3", 0 ); obj = fl_add_button( FL_TOUCH_BUTTON, 270, 30, 40, 30, "@>>" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_callback( obj, show_val, 5 ); fl_set_object_color( obj, FL_COL1, FL_INDIANRED ); fl_set_button_shortcut( obj, "4", 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 220, 90, 100, 30, "Exit" ); fl_end_form( ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "Touch Buttons" ); fl_do_forms( ); fl_finish( ); return 0; } /*************************************** ***************************************/ static void show_val( FL_OBJECT * ob FL_UNUSED_ARG, long delta ) { static int val = 0; char str[ 32 ]; val += delta; sprintf( str,"%d", val ); fl_set_object_label( valobj, str ); } xforms-1.0.93sp1/demos/srs.xbm0000644000175000017500000001116411171560225014657 0ustar jensjens#define sorceress_width 75 #define sorceress_height 75 static unsigned char sorceress_bits[] = { 0xfc, 0x7e, 0x40, 0x20, 0x90, 0x00, 0x07, 0x80, 0x23, 0x00, 0x00, 0xc6, 0xc1, 0x41, 0x98, 0xb8, 0x01, 0x07, 0x66, 0x00, 0x15, 0x9f, 0x03, 0x47, 0x8c, 0xc6, 0xdc, 0x7b, 0xcc, 0x00, 0xb0, 0x71, 0x0e, 0x4d, 0x06, 0x66, 0x73, 0x8e, 0x8f, 0x01, 0x18, 0xc4, 0x39, 0x4b, 0x02, 0x23, 0x0c, 0x04, 0x1e, 0x03, 0x0c, 0x08, 0xc7, 0xef, 0x08, 0x30, 0x06, 0x07, 0x1c, 0x02, 0x06, 0x30, 0x18, 0xae, 0xc8, 0x98, 0x3f, 0x78, 0x20, 0x06, 0x02, 0x20, 0x60, 0xa0, 0xc4, 0x1d, 0xc0, 0xff, 0x41, 0x04, 0xfa, 0x63, 0x80, 0xa1, 0xa4, 0x3d, 0x00, 0x84, 0xbf, 0x04, 0x0f, 0x06, 0xfc, 0xa1, 0x34, 0x6b, 0x01, 0x1c, 0xc9, 0x05, 0x06, 0xc7, 0x06, 0xbe, 0x11, 0x1e, 0x43, 0x30, 0x91, 0x05, 0xc3, 0x61, 0x02, 0x30, 0x1b, 0x30, 0xcc, 0x20, 0x11, 0x00, 0xc1, 0x3c, 0x03, 0x20, 0x0a, 0x00, 0xe8, 0x60, 0x21, 0x00, 0x61, 0x1b, 0xc1, 0x63, 0x08, 0xf0, 0xc6, 0xc7, 0x21, 0x03, 0xf8, 0x08, 0xe1, 0xcf, 0x0a, 0xfc, 0x4d, 0x99, 0x43, 0x07, 0x3c, 0x0c, 0xf1, 0x9f, 0x0b, 0xfc, 0x5b, 0x81, 0x47, 0x02, 0x16, 0x04, 0x31, 0x1c, 0x0b, 0x1f, 0x17, 0x89, 0x4d, 0x06, 0x1a, 0x04, 0x31, 0x38, 0x02, 0x07, 0x56, 0x89, 0x49, 0x04, 0x0b, 0x04, 0xb1, 0x72, 0x82, 0xa1, 0x54, 0x9a, 0x49, 0x04, 0x1d, 0x66, 0x50, 0xe7, 0xc2, 0xf0, 0x54, 0x9a, 0x58, 0x04, 0x0d, 0x62, 0xc1, 0x1f, 0x44, 0xfc, 0x51, 0x90, 0x90, 0x04, 0x86, 0x63, 0xe0, 0x74, 0x04, 0xef, 0x31, 0x1a, 0x91, 0x00, 0x02, 0xe2, 0xc1, 0xfd, 0x84, 0xf9, 0x30, 0x0a, 0x91, 0x00, 0x82, 0xa9, 0xc0, 0xb9, 0x84, 0xf9, 0x31, 0x16, 0x81, 0x00, 0x42, 0xa9, 0xdb, 0x7f, 0x0c, 0xff, 0x1c, 0x16, 0x11, 0x00, 0x02, 0x28, 0x0b, 0x07, 0x08, 0x60, 0x1c, 0x02, 0x91, 0x00, 0x46, 0x29, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x16, 0x11, 0x02, 0x06, 0x29, 0x04, 0x00, 0x00, 0x00, 0x10, 0x16, 0x91, 0x06, 0xa6, 0x2a, 0x04, 0x00, 0x00, 0x00, 0x18, 0x24, 0x91, 0x04, 0x86, 0x2a, 0x04, 0x00, 0x00, 0x00, 0x18, 0x27, 0x93, 0x04, 0x96, 0x4a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x02, 0x91, 0x04, 0x86, 0x4a, 0x0c, 0x00, 0x00, 0x00, 0x1e, 0x23, 0x93, 0x04, 0x56, 0x88, 0x08, 0x00, 0x00, 0x00, 0x90, 0x21, 0x93, 0x04, 0x52, 0x0a, 0x09, 0x80, 0x01, 0x00, 0xd0, 0x21, 0x95, 0x04, 0x57, 0x0a, 0x0f, 0x80, 0x27, 0x00, 0xd8, 0x20, 0x9d, 0x04, 0x5d, 0x08, 0x1c, 0x80, 0x67, 0x00, 0xe4, 0x01, 0x85, 0x04, 0x79, 0x8a, 0x3f, 0x00, 0x00, 0x00, 0xf4, 0x11, 0x85, 0x06, 0x39, 0x08, 0x7d, 0x00, 0x00, 0x18, 0xb7, 0x10, 0x81, 0x03, 0x29, 0x12, 0xcb, 0x00, 0x7e, 0x30, 0x28, 0x00, 0x85, 0x03, 0x29, 0x10, 0xbe, 0x81, 0xff, 0x27, 0x0c, 0x10, 0x85, 0x03, 0x29, 0x32, 0xfa, 0xc1, 0xff, 0x27, 0x94, 0x11, 0x85, 0x03, 0x28, 0x20, 0x6c, 0xe1, 0xff, 0x07, 0x0c, 0x01, 0x85, 0x01, 0x28, 0x62, 0x5c, 0xe3, 0x8f, 0x03, 0x4e, 0x91, 0x80, 0x05, 0x39, 0x40, 0xf4, 0xc2, 0xff, 0x00, 0x9f, 0x91, 0x84, 0x05, 0x31, 0xc6, 0xe8, 0x07, 0x7f, 0x80, 0xcd, 0x00, 0xc4, 0x04, 0x31, 0x06, 0xc9, 0x0e, 0x00, 0xc0, 0x48, 0x88, 0xe0, 0x04, 0x79, 0x04, 0xdb, 0x12, 0x00, 0x30, 0x0c, 0xc8, 0xe4, 0x04, 0x6d, 0x06, 0xb6, 0x23, 0x00, 0x18, 0x1c, 0xc0, 0x84, 0x04, 0x25, 0x0c, 0xff, 0xc2, 0x00, 0x4e, 0x06, 0xb0, 0x80, 0x04, 0x3f, 0x8a, 0xb3, 0x83, 0xff, 0xc3, 0x03, 0x91, 0x84, 0x04, 0x2e, 0xd8, 0x0f, 0x3f, 0x00, 0x00, 0x5f, 0x83, 0x84, 0x04, 0x2a, 0x70, 0xfd, 0x7f, 0x00, 0x00, 0xc8, 0xc0, 0x84, 0x04, 0x4b, 0xe2, 0x2f, 0x01, 0x00, 0x08, 0x58, 0x60, 0x80, 0x04, 0x5b, 0x82, 0xff, 0x01, 0x00, 0x08, 0xd0, 0xa0, 0x84, 0x04, 0x72, 0x80, 0xe5, 0x00, 0x00, 0x08, 0xd2, 0x20, 0x44, 0x04, 0xca, 0x02, 0xff, 0x00, 0x00, 0x08, 0xde, 0xa0, 0x44, 0x04, 0x82, 0x02, 0x6d, 0x00, 0x00, 0x08, 0xf6, 0xb0, 0x40, 0x02, 0x82, 0x07, 0x3f, 0x00, 0x00, 0x08, 0x44, 0x58, 0x44, 0x02, 0x93, 0x3f, 0x1f, 0x00, 0x00, 0x30, 0x88, 0x4f, 0x44, 0x03, 0x83, 0x23, 0x3e, 0x00, 0x00, 0x00, 0x18, 0x60, 0xe0, 0x07, 0xe3, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x70, 0x70, 0xe4, 0x07, 0xc7, 0x1b, 0xfe, 0x01, 0x00, 0x00, 0xe0, 0x3c, 0xe4, 0x07, 0xc7, 0xe3, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0x1f, 0xfc, 0x07, 0xc7, 0x03, 0xf8, 0x33, 0x00, 0xc0, 0xf0, 0x07, 0xff, 0x07, 0x87, 0x02, 0xfc, 0x43, 0x00, 0x60, 0xf0, 0xff, 0xff, 0x07, 0x8f, 0x06, 0xbe, 0x87, 0x00, 0x30, 0xf8, 0xff, 0xff, 0x07, 0x8f, 0x14, 0x9c, 0x8f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x9f, 0x8d, 0x8a, 0x0f, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0xbf, 0x0b, 0x80, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x07, 0x7f, 0x3a, 0x80, 0x3f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x07, 0xff, 0x20, 0xc0, 0x3f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x07, 0xff, 0x01, 0xe0, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x07, 0xff, 0x0f, 0xf8, 0xff, 0x40, 0xe0, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0xff, 0x40, 0xf0, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0xff, 0x41, 0xf0, 0xff, 0xff, 0xff, 0x07}; xforms-1.0.93sp1/demos/glwin.c0000644000175000017500000001377611320106261014627 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * OpenGL rendering in its own window * * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include "GL/glx.h" #include "GL/gl.h" #include "include/forms.h" #include "gl/glcanvas.h" #include extern Window fl_glwincreate( int *, GLXContext *, int, int ); /* Forms and Objects */ typedef struct { FL_FORM * glcontrol; void * vdata; char * cdata; long ldata; FL_OBJECT * polybutt; } FD_glcontrol; extern FD_glcontrol *create_form_glcontrol( void ); extern int handle_expose( XEvent *, void * ); int prim = GL_POLYGON; /* GL primitive to draw */ Window glwin; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_glcontrol *fd_glcontrol; GLXContext context; int config[ ] = { GLX_RGBA, GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None }; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_glcontrol = create_form_glcontrol( ); if ( ! ( glwin = fl_glwincreate( config, &context, 250, 250 ) ) ) { fprintf( stderr, "GLWin: Can't create OpenGL window\n" ); exit( 0 ); } fl_add_event_callback( glwin, Expose, handle_expose, 0 ); fl_winshow( glwin ); /* show the first form */ fl_set_button( fd_glcontrol->polybutt, 1 ); fl_show_form( fd_glcontrol->glcontrol, FL_PLACE_CENTER, FL_FULLBORDER, "glcontrol" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ static void draw_cube( void ) { glColor3f( 1.0, 0.0, 0.0 ); glBegin( prim ); glVertex3f( 1.0, 1.0, 1.0 ); glVertex3f( 1.0, -1.0, 1.0 ); glVertex3f( 1.0, -1.0, -1.0 ); glVertex3f( 1.0, 1.0, -1.0 ); glEnd( ); glBegin( prim ); glVertex3f( -1.0, 1.0, 1.0 ); glVertex3f( -1.0, 1.0, -1.0 ); glVertex3f( -1.0, -1.0, -1.0 ); glVertex3f( -1.0, -1.0, 1.0 ); glEnd( ); /* Y faces */ glColor3f( 0.0, 1.0, 0.0 ); glBegin( prim ); glVertex3f( 1.0, 1.0, 1.0 ); glVertex3f( 1.0, 1.0, -1.0 ); glVertex3f( -1.0, 1.0, -1.0 ); glVertex3f( -1.0, 1.0, 1.0 ); glEnd( ); glBegin( prim ); glVertex3f( 1.0, -1.0, 1.0 ); glVertex3f( -1.0, -1.0, 1.0 ); glVertex3f( -1.0, -1.0, -1.0 ); glVertex3f( 1.0, -1.0, -1.0 ); glEnd( ); /* Z faces */ glColor3f( 0.0, 0.0, 1.0 ); glBegin( prim ); glVertex3f( 1.0, 1.0, 1.0 ); glVertex3f( -1.0, 1.0, 1.0 ); glVertex3f( -1.0, -1.0, 1.0 ); glVertex3f( 1.0, -1.0, 1.0 ); glEnd( ); glBegin( prim ); glVertex3f( 1.0, 1.0, -1.0 ); glVertex3f( 1.0,-1.0, -1.0 ); glVertex3f( -1.0,-1.0, -1.0 ); glVertex3f( -1.0, 1.0, -1.0 ); glEnd( ); } /*************************************** ***************************************/ int animate( XEvent * ev, void * data FL_UNUSED_ARG ) { static GLfloat xrot, yrot, zrot; glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix( ); glRotatef( xrot, 1.0, 0.0, 0.0 ); glRotatef( yrot, 0.0, 1.0, 0.0 ); glRotatef( zrot, 0.0, 0.0, 1.0 ); glTranslatef( -1.0,1.2,-0.5 ); draw_cube( ); glPopMatrix( ); glFinish( ); if ( ev->type != Expose ) { xrot += 10.0; yrot += 7.0; zrot -= 3.0; } glXSwapBuffers( fl_display, glwin ); return 0; } /*************************************** * Initialization and expose handler ***************************************/ int handle_expose( XEvent * xev, void * data FL_UNUSED_ARG ) { FL_Coord w ,h ; fl_get_winsize( glwin, &w, &h ); glViewport( 0,0, w, h ); glClearColor( 0.0,0.0,0.0,0.0 ); glMatrixMode( GL_PROJECTION ); glLoadIdentity( ); glFrustum( -1.0, 1.0, -1.0, 1.0, 1.0, 10.0 ); glTranslatef( 0.0, 0.0, -5.0 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity( ); glCullFace( GL_BACK ); glEnable( GL_CULL_FACE ); glShadeModel( GL_FLAT ); animate( xev, 0 ); return 0; } /* Form definition generated by fdesign */ /* callback functions */ /*************************************** ***************************************/ void change_primitive( FL_OBJECT * ob FL_UNUSED_ARG, long data ) { prim = data; } /*************************************** ***************************************/ void animate_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_idle_callback( fl_get_button( ob ) ? animate:0, 0 ); } /*************************************** ***************************************/ FD_glcontrol * create_form_glcontrol( void ) { FL_OBJECT *obj; FD_glcontrol *fdui = fl_calloc( 1, sizeof *fdui ); fdui->glcontrol = fl_bgn_form( FL_NO_BOX, 241, 121 ); fl_add_box( FL_UP_BOX, 0, 0, 241, 121, "" ); fl_add_frame( FL_ENGRAVED_FRAME, 20, 26, 90, 70, "" ); fdui->polybutt = obj = fl_add_checkbutton( FL_RADIO_BUTTON, 30, 61, 70, 30, "Polygon" ); fl_set_object_callback( obj, change_primitive, GL_POLYGON ); obj = fl_add_checkbutton( FL_RADIO_BUTTON, 30, 31, 70, 30, "Line" ); fl_set_object_callback( obj, change_primitive, GL_LINE_LOOP ); obj = fl_add_button( FL_NORMAL_BUTTON, 150, 21, 80, 30, "Done" ); fl_set_button_shortcut( obj, "Dd", 1 ); obj = fl_add_roundbutton( FL_PUSH_BUTTON, 150, 71, 80, 30, "Animate" ); fl_set_object_callback( obj, animate_callback, 0 ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/minput2.c0000644000175000017500000000747611315744721015122 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Input return setting and raw callback. Terrible hack. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include extern void howreturn_callback( FL_OBJECT *, long ); extern void input_callback( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * inputform; void * vdata; long ldata; FL_OBJECT * input1; FL_OBJECT * howreturn; FL_OBJECT * status; FL_OBJECT * input2; } FD_inputform; extern FD_inputform *create_form_inputform( void ); /* end of minput.h */ FD_inputform *ui; /*************************************** ***************************************/ int peek_event( FL_FORM * form FL_UNUSED_ARG, void * xev ) { if ( ( ( XEvent * )xev )->type == KeyPress ) { fl_set_object_label( ui->status, "keyboard input" ); fl_XFlush( ); /* necessary to show the label? */ fl_msleep( 50 ); } return 0; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); ui = create_form_inputform( ); fl_register_raw_callback( ui->inputform, KeyPressMask, peek_event ); fl_show_form( ui->inputform, FL_PLACE_CENTER, FL_TRANSIENT, "Input" ); fl_do_forms( ); fl_finish( ); return 0; } /*************************************** ***************************************/ void input_callback( FL_OBJECT * ob FL_UNUSED_ARG, long data ) { char buf[ 32 ]; sprintf( buf, "Input%ld returned", data ); fl_set_object_label( ui->status, buf ); fl_XFlush( ); fl_msleep( 50 ); } /*************************************** ***************************************/ void howreturn_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_input_return( ui->input1, fl_get_button( ob ) ); fl_set_input_return( ui->input2, fl_get_button( ob ) ); } /*************************************** ***************************************/ FD_inputform * create_form_inputform( void ) { FL_OBJECT *obj; FD_inputform *fdui = fl_calloc( 1, sizeof *fdui ); fdui->inputform = fl_bgn_form( FL_NO_BOX, 475, 485 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 475, 485, "" ); fdui->input1 = obj = fl_add_input( FL_MULTILINE_INPUT, 15, 275, 350, 180, "" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, input_callback, 1 ); fdui->howreturn = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 375, 435, 80, 35, "always\nreturn" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, howreturn_callback, 0 ); fdui->status = obj = fl_add_text( FL_NORMAL_TEXT, 20, 15, 270, 30, "" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_add_button( FL_NORMAL_BUTTON, 375, 15, 80, 35, "Done" ); fdui->input2 = obj = fl_add_input( FL_MULTILINE_INPUT, 15, 60, 349, 185, "" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, input_callback, 2 ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/crossbut.h0000644000175000017500000000223511171560225015354 0ustar jensjens/* * * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ /* * Class Crossbutton header file */ #ifndef CROSSBUT_H #define CROSSBUT_H #define FL_CROSSBUTTON (FL_USER_CLASS_START + 1) #define FL_CROSSBUTTON_BW 2 extern FL_OBJECT *fl_add_crossbutton(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); extern FL_OBJECT *fl_create_crossbutton(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); #endif xforms-1.0.93sp1/demos/counter.c0000644000175000017500000000577411203636407015177 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This is an example of the use of counters. * * This file is part of xforms package * T.C. Zhao and M. Overmars */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" FL_FORM *form; FL_OBJECT *result, *co[ 3 ]; /*************************************** ***************************************/ void color_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { int c[ 3 ]; int i; for ( i = 0; i < 3; i++ ) c[ i ] = fl_get_counter_value( co[ i ] ); fl_mapcolor( FL_FREE_COL1, c[ 0 ], c[ 1 ], c[ 2 ] ); fl_redraw_object( result ); } /*************************************** ***************************************/ void create_form_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 480, 200 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 480, 200, "" ); result = obj = fl_add_box( FL_DOWN_BOX, 310, 20, 150, 160, "" ); fl_set_object_dblbuffer( result, 1 ); co[ 0 ] = obj = fl_add_counter( FL_NORMAL_COUNTER, 20, 20, 270, 30, "" ); fl_set_object_color( obj, FL_INDIANRED, FL_RED ); fl_set_object_callback( obj, color_change, 0 ); co[ 1 ] = obj = fl_add_counter( FL_NORMAL_COUNTER, 20, 60, 270, 30, "" ); fl_set_object_color( obj, FL_PALEGREEN, FL_GREEN ); fl_set_object_callback( obj, color_change, 0 ); co[ 2 ] = obj = fl_add_counter( FL_NORMAL_COUNTER, 20, 100, 270, 30, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_BLUE ); fl_set_object_callback( obj, color_change, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 100, 150, 110, 30, "Exit" ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { int i; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form_form( ); fl_set_object_color( result, FL_FREE_COL1, FL_FREE_COL1 ); for ( i = 0; i < 3; i++ ) { fl_set_counter_bounds( co[ i ], 0.0, 255.0 ); fl_set_counter_step( co[ i ], 1.0, 10.0 ); fl_set_counter_precision( co[ i ], 0 ); fl_set_counter_return( co[ i ], 1 ); } fl_call_object_callback( co[ 0 ] ); fl_show_form( form, FL_PLACE_CENTER, FL_TRANSIENT, "Counter" ); fl_do_forms( ); return 0; } xforms-1.0.93sp1/demos/timeoutprec.c0000644000175000017500000000724611203636407016054 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Test the accuracy of timeouts */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include /**** Forms and Objects ****/ typedef struct { FL_FORM * form; int timer_id; void * vdata; long ldata; FL_OBJECT * timer; FL_OBJECT * restart; FL_OBJECT * report; } FD_form; static FD_form * create_form_form( void ); static long start_sec, start_usec; static long end_sec, end_usec; /*************************************** ***************************************/ static void exit_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** * timer expired ***************************************/ static void timer_cb( int id FL_UNUSED_ARG, void * data ) { char buf[ 128 ]; double df; FD_form *fd = data; double timerval = 1.0e-3 * fd->ldata; fd->timer_id = 0; fl_gettime( &end_sec, &end_usec ); df = end_sec - start_sec + 1.0e-6 * ( end_usec - start_usec ); sprintf( buf,"Timeout: %.3f Actual: %.3f DeltaE: %.3f", timerval, df, df - timerval ); fl_set_object_label( fd->report, buf ); } /*************************************** ***************************************/ static void start_timer( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_form *fd = ob->form->fdui; char buf[ 128 ]; if ( fd->timer_id ) fl_remove_timeout( fd->timer_id ); fd->ldata += 200; sprintf( buf, "Timer accuracy testing %.3f sec ...", fd->ldata * 0.001 ); fl_set_object_label( fd->report, buf ); fl_gettime( &start_sec, &start_usec ); fd->timer_id = fl_add_timeout( fd->ldata, timer_cb, fd ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_form *fd_form; fl_initialize( &argc, argv, 0, 0, 0 ); fd_form = create_form_form( ); /* fill-in form initialization code */ fd_form->ldata = 800; start_timer( fd_form->report, 0 ); /* show the first form */ fl_show_form( fd_form->form, FL_PLACE_CENTER, FL_FULLBORDER, "Timeout precision" ); fl_do_forms( ); return 0; } /*************************************** ***************************************/ static FD_form * create_form_form(void) { FL_OBJECT *obj; FD_form *fdui = fl_calloc( 1, sizeof *fdui ); fdui->form = fl_bgn_form( FL_NO_BOX, 320, 130 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 320, 130, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 210, 80, 90, 35, "Done" ); fl_set_object_callback( obj, exit_cb, 0 ); fdui->restart = obj = fl_add_button( FL_TOUCH_BUTTON, 110, 80, 90, 35, "Restart" ); fl_set_object_callback( obj, start_timer, 0 ); fdui->report = obj = fl_add_text( FL_NORMAL_TEXT, 10, 20, 290, 50,"" ); fl_end_form( ); fdui->form->fdui = fdui; return fdui; } xforms-1.0.93sp1/demos/symbols.c0000644000175000017500000000612111203636407015173 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Show the built-in symbols * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include char *symbols[ ] = { "@>", "@<-", "@9->", "@DnLine", "@8>", "@circle", "@->|", "@>>", "@square", "@4->|", "@8->|", "@<->", "@UpArrow", "@9+", "@->", "@<", "@DnArrow", "@+", "@-->", "@line", "@3->", "@UpLine", "@>|", "@2-->", "@4>|", "@8>|", "@=", "@menu", "@8=", "@|>", "@2|>", "@-32|>", "@+32|>", "@-2circle", NULL }; #define N ( sizeof symbols / sizeof * symbols - 1 ) /*************************************** ***************************************/ static void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { exit( 0 ); } /*************************************** ***************************************/ FL_FORM * make_symbols( void ) { char **p, buf[ 32 ]; int x0 = 10, y0 = 10, dx = 35, dy = 35, ty = 17, n = 7; int xsep = 15, ysep = 5; int x, y, i, w, h; FL_OBJECT *obj; FL_FORM *form; form = fl_bgn_form( FL_FLAT_BOX, w = 2 * x0 + n * dx + ( n - 1 ) * xsep, h = 2 * y0 + ( 1 + N / n - ! ( N % n ) ) * ( dy + ty + ysep ) ); obj = fl_add_button( FL_HIDDEN_BUTTON, 0, 0, w, h, "" ); fl_set_object_callback( obj, done_cb, 0 ); for ( x = x0, y = y0, i = 1, p = symbols; *p; p++, i++ ) { obj = fl_add_box( FL_UP_BOX, x, y, dx, dy, *p ); fl_set_object_lcol( obj, FL_BOTTOM_BCOL ); strcat( strcpy( buf, " ") , *p ); fl_add_box( FL_FLAT_BOX, x, y + dy, dx, ty, buf ); if ( i % n == 0 ) { static int j = 1; x = x0; y = y0 + j * ( dy + ty + ysep + 1); j++; } else x += dx + xsep; } fl_end_form( ); fl_adjust_form_size( form ); return form; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; fl_initialize( &argc, argv , 0, 0, 0 ); form = make_symbols( ); fl_show_form( form, FL_PLACE_FREE, FL_FULLBORDER, "test" ); while ( fl_do_forms( ) ) /* empty */; return 0; } xforms-1.0.93sp1/demos/objinactive.c0000644000175000017500000001024711203636407016004 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* Demo showing activating and deactivating objects */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" FL_FORM *form; FL_OBJECT *button1, *button2, *button3, *button4, *group, *firstbut; /*************************************** ***************************************/ void exit_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ void setit( FL_OBJECT * obj, int val ) { if ( val ) { fl_set_object_lcol( obj, FL_BLACK ); fl_activate_object( obj ); } else { fl_set_object_lcol( obj, FL_INACTIVE ); fl_deactivate_object( obj ); } } /*************************************** ***************************************/ void doit( int b1, int b2, int b3, int b4 ) { setit( button1, b1 ); setit( button2, b2 ); setit( button3, b3 ); setit( button4, b4 ); } /*************************************** ***************************************/ void set_active( FL_OBJECT * obj FL_UNUSED_ARG, long arg) { switch ( arg ) { case 0 : doit( 1, 1, 1, 1 ); break; case 1 : doit( 0, 0, 0, 0 ); break; case 2 : doit( 0, 1, 0, 1 ); break; case 3 : doit( 1, 0, 1, 0 ); break; } } /*************************************** ***************************************/ void create_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 420, 230 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 420, 230, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); button1 = obj = fl_add_button( FL_NORMAL_BUTTON, 20, 170, 150, 40, "Button 1" ); fl_set_object_lsize( obj ,FL_LARGE_SIZE ); fl_set_button_shortcut( obj, "1", 1 ); button2 = obj = fl_add_button( FL_NORMAL_BUTTON, 20, 120, 150, 40, "Button 2" ); fl_set_object_lsize( obj, FL_LARGE_SIZE ); fl_set_button_shortcut( obj, "2", 1 ); button3 = obj = fl_add_button( FL_NORMAL_BUTTON, 20, 70, 150, 40, "Button 3" ); fl_set_object_lsize( obj, FL_LARGE_SIZE ); fl_set_button_shortcut( obj, "3", 1 ); button4 = obj = fl_add_button( FL_NORMAL_BUTTON, 20, 20, 150, 40, "Button 4" ); fl_set_button_shortcut( obj, "4", 1 ); fl_set_object_lsize( obj,FL_LARGE_SIZE ); group = fl_bgn_group( ); firstbut = obj = fl_add_lightbutton( FL_RADIO_BUTTON, 260, 180, 140, 30, "All active" ); fl_set_object_callback( obj, set_active, 0 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 260, 150, 140, 30, "Non active" ); fl_set_object_callback( obj, set_active, 1 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 260, 120, 140 ,30, "Even active" ); fl_set_object_callback(obj, set_active, 2 ); obj = fl_add_lightbutton( FL_RADIO_BUTTON, 260, 90, 140, 30, "Odd active" ); fl_set_object_callback( obj, set_active, 3 ); fl_end_group( ); obj = fl_add_button( FL_NORMAL_BUTTON, 270, 20, 130, 30, "Quit" ); fl_set_object_callback( obj, exit_cb, 0 ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form( ); fl_set_button( firstbut, 1 ); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, NULL ); while ( fl_do_forms( ) ) /* empty */ ; return 0; } xforms-1.0.93sp1/demos/choice.c0000644000175000017500000000604511203636407014742 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This demo shows the use of choice objects. * * This file is part of xforms package * M. Overmars and T.C. Zhao (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" FL_FORM *form; FL_OBJECT *sexobj, *childobj, *licenceobj, *marriedobj, *readyobj; /*************************************** ***************************************/ static void cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fprintf( stderr, "CallBack: %d\n", fl_get_choice( ob ) ); } /*************************************** ***************************************/ void create_form( void ) { form = fl_bgn_form( FL_NO_BOX, 420, 360 ); fl_add_box( FL_UP_BOX, 0, 0, 420, 360, "" ); fl_add_input( FL_NORMAL_INPUT, 70, 300, 320, 30, "Name" ); fl_add_input( FL_NORMAL_INPUT, 70, 260, 320, 30, "Address" ); fl_add_input( FL_NORMAL_INPUT, 70, 220, 320, 30, "City" ); fl_add_input( FL_NORMAL_INPUT, 70, 180, 320, 30, "Country" ); sexobj = fl_add_choice( FL_NORMAL_CHOICE, 70, 130, 110, 30, "Sex"); fl_set_choice_notitle( sexobj, 1 ); fl_set_object_shortcut( sexobj, "S", 1 ); childobj = fl_add_choice( FL_NORMAL_CHOICE2, 280, 130, 110, 30, "Children" ); licenceobj = fl_add_choice( FL_NORMAL_CHOICE, 280, 80, 110, 30, "Licence" ); marriedobj = fl_add_choice( FL_DROPLIST_CHOICE, 70, 80, 110, 27, "Married" ); fl_set_object_callback( marriedobj, cb, 0 ); fl_set_object_boxtype( marriedobj, FL_UP_BOX ); readyobj = fl_add_button( FL_NORMAL_BUTTON, 150, 20, 140, 30, "Quit" ); fl_end_form( ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_OBJECT *obj = NULL; fl_flip_yorigin( ); fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form( ); fl_addto_choice( sexobj,"Male" ); fl_addto_choice( sexobj,"Female" ); fl_addto_choice( childobj, "Zero|One|Two|Three|Four|Many" ); fl_addto_choice( licenceobj, "Yes" ); fl_addto_choice( licenceobj, "No" ); fl_addto_choice( marriedobj, "Yes" ); fl_addto_choice( marriedobj, "No" ); fl_show_form( form, FL_PLACE_CENTER | FL_FREE_SIZE, FL_TRANSIENT, "ChoiceDemo" ); while ( ( obj = fl_do_forms( ) ) != readyobj ) /* empty */ ; fl_hide_form( form ); return 0; } xforms-1.0.93sp1/demos/demo.menu0000644000175000017500000000657711375567752015210 0ustar jensjens# Menu description file for the generic demo program # # Each line consists of three fields, separated by : # # - menu name : To which the item belongs (starts with @) # - item name : Placed on button. (use \n for newline) # - command name: To be executed. Use a menu name to define a submenu. # # @main indicates the main menu. # @main:Simple\nDemos:@simple @simple:Push Me:pushme @simple:A Question:yesno @simple:A Slider:demo05 @simple:Input\nFields:demo06 @main:Object\nClasses:@objects @objects:Buttons:@buttons @buttons:Push\nButtons:pushbutton @buttons:Touch\nButtons:touchbutton @buttons:Different\nButtons:buttonall @buttons:Button\nTypes:butttypes @buttons:Arrow\nButtons:arrowbutton @buttons:Radio\nButtons:demo06 @objects:Sliders\nand\nScrollbars:@sliders @sliders:Simple\nSlider:demo05 @sliders:Inverted\nSlider:invslider @sliders:All\nSliders\nTypes:sliderall @sliders:All\nScrollbars\nTypes:scrollbar @sliders:Non-Active\nSlider:sldinactive @sliders:Slider\nSize:sldsize @objects:Input\nFields:@input @input:Simple\nInput:demo06 @input:Multiline\nInput:minput @input:Secret\nInput:secretinput @input:All\nInput:inputall @objects:Browsers:@browsers @browsers:Simple\nBrowser:fbrowse1 @browsers:Browser\nTypes:browserall @browsers:Changing\nBrowser\nLines:browserop @objects:Charts:@chart @chart:All\nCharts:chartall @chart:Strip\nCharts:chartstrip @objects:Tabbed\nFolder:folder @objects:Dial:@dial @dial:Normal\nDial:ndial @dial:Fill\nDial:fdial @dial:Line\nDial:ldial @objects:Counter:@counter @counter:Normal\nCounter:counter @objects:Other\nObjects:@other @other:Menus\nAnd\nChoices:@menu @menu:Nmenu:nmenu @menu:Select:select @menu:Choice\n(deprecated):choice @other:Canvas:@canvas @canvas:Normal\nCanvas:canvas @canvas:OpenGL\nCanvas:gl @other:Positioner:@positioner @positioner:Normal\nPositioner:positioner @positioner:Overlay\nPositioner:positionerXOR @other:XYPlot:@xyplot @xyplot:XYPlot\nTypes:xyplotall @xyplot:Active\nXYPlot:xyplotactive @xyplot:Overlayed\nXYPlot:xyplotover @other:PopUp\nMenus:pup @other:Timer\nObjects:@Timer @Timer:Timer:timer @Timer:Timer\nAccuracy:timerprec @other:New Object:newbutton @other:Free\nObject:free1 @other:More\nObjects:@more @more:Bitmaps:demo33 @main:Attributes:@attribs @attribs:All\nBoxtypes:boxtype @attribs:Border\nWidth:borderwidth @attribs:All\nSymbols:symbols @attribs:Fonts and\nSizes:fonts @attribs:Scaling\nForms:rescale @attribs:Multi-Line\nLabels:multilabel @attribs:Long\nLabels:longlabel @attribs:Activating\nObjects:objinactive @attribs:Label\nAlign:lalign @main:Goodies:@goodies @goodies:Simple\nGoodies:goodies # @goodies:Soft\nButtonbox:demo26 @main:Nice\nDemos:@nice @nice:Drawing\nProgram:demo27 @nice:File\nBrowser:fbrowse @nice:Color\nEditor:ldial @nice:Nicer\nDrawing\nProgram:freedraw @nice:Color\nMap:colsel1 @nice:Color\nBrowser:colbrowser @nice:Pixmap\nBrowser:pmbrowse @nice:WWW\nbrowser\nLauncher:wwwl @main:Miscellaneous\nDemos:@Misc @Misc:Iconify\nvia WM:iconify @Misc:Cursor:cursor @Misc:Preemptive\nHandler:preemptive @Misc:Object\nReturn\nBehaviour:objreturn @Misc:Move\nObject:objpos @Misc:Object\nGroups:group @Misc:Form\nResizing:grav xforms-1.0.93sp1/demos/demotest.c0000644000175000017500000001147511316160445015336 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Tabbed folder demo and tester * * This file is part of xforms package * T.C. Zhao and M. Overmars * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd/folder_gui.h" #include /* callback routines */ /*************************************** ***************************************/ void hide_show_cb( FL_OBJECT * ob, long data ) { FD_mainform *fdui = ob->form->fdui; ( data ? fl_show_object : fl_hide_object )( fdui->folder ); } /*************************************** ***************************************/ void reshow_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_hide_form( ob->form ); fl_show_form( ob->form, FL_PLACE_CENTER, FL_FULLBORDER, "TabFolder" ); } /*************************************** ***************************************/ void set_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_mainform *fdui = ob->form->fdui; int n = fl_get_active_folder_number( fdui->folder ); fl_set_folder_bynumber( fdui->folder, n % 5 + 1 ); } /*************************************** ***************************************/ void deactivate_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_mainform *fdui = ob->form->fdui; if ( fl_object_is_active( fdui->folder ) ) { fl_set_object_label( ob, "Activate" ); fl_deactivate_object( fdui->folder ); } else { fl_set_object_label( ob, "Deactivate" ); fl_activate_object( fdui->folder ); } } /*************************************** ***************************************/ void done_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { #if 0 fl_hide_form( ob->form ); fl_free_form( ob->form ); if ( fl_show_question( "Do you want to quit ?", 0 ) ) exit( 0 ); fprintf( stderr, "will quit after 5 seconds\n" ); fl_msleep( 5000 ); #endif fl_finish( ); exit( 0 ); } static void make_folder( FL_OBJECT * ); /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FD_mainform *fd_mainform; fl_set_border_width( -2 ); fl_initialize( &argc, argv, 0, 0, 0 ); fd_mainform = create_form_mainform( ); make_folder( fd_mainform->folder ); /* show the first form */ fl_show_form( fd_mainform->mainform, FL_PLACE_CENTER, FL_FULLBORDER, "TabFolder" ); while ( fl_do_forms( ) ) /* empty */ ; return 0; } /*************************************** ***************************************/ static void make_folder( FL_OBJECT * folder FL_UNUSED_ARG ) { FD_buttonform *fd_buttonform; FD_staticform *fd_staticform; FD_valuatorform *fd_valuatorform; FD_choiceform *fd_choiceform; FD_inputform *fd_inputform; float y[ 6 ] = { 5.5, 4, 4.5, 3.8, 4, 5 }; char *label[ ] = { "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" }; size_t i; int xx, yy, ww, hh; fd_buttonform = create_form_buttonform( ); fd_staticform = create_form_staticform( ); fd_valuatorform = create_form_valuatorform( ); fd_choiceform = create_form_choiceform( ); fd_inputform = create_form_inputform( ); /* form initialization code */ for ( i = 0; i < sizeof y / sizeof *y; i++ ) fl_add_chart_value( fd_staticform->chart, y[ i ], label[ i ], i + 1 ); fl_addto_menu( fd_choiceform->pulldown, "MenuEntry1|MenuEntry2|MenuEntry3|MenuEntry4" ); fl_addto_menu( fd_choiceform->pushmenu, "MenuEntry1|MenuEntry2|MenuEntry3" ); fl_addto_choice( fd_choiceform->choice, "Choice1|Choice2|Choice3|Choice4|Choice5|Choice6" ); fl_load_browser( fd_choiceform->browser, "01Readme" ); fl_get_folder_area( folder, &xx, &yy, &ww, &hh ); fl_addto_tabfolder( folder, "ButtonObj", fd_buttonform->buttonform ); fl_addto_tabfolder( folder, "StaticObj", fd_staticform->staticform ); fl_addto_tabfolder( folder, "ValuatorObj", fd_valuatorform->valuatorform ); fl_addto_tabfolder( folder, "ChoiceObj", fd_choiceform->choiceform ); fl_addto_tabfolder( folder, "InputObj", fd_inputform->inputform ); fl_get_folder_area( folder, &xx, &yy, &ww, &hh ); } xforms-1.0.93sp1/demos/boxtype.c0000644000175000017500000002014211203636407015174 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * This demo show the different boxtypes. Note that some * boxtypes are not appropriate for some objects * * This file is part of xforms package. * M. Overmars and T.C. Zhao (1997) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" static int border = FL_TRANSIENT; typedef struct { int val; char * name; } VN_struct; #define VN( a ) { a, #a } static VN_struct gmode[ ] = { VN( StaticGray ), VN( GrayScale ), VN( StaticColor ), VN( PseudoColor ), VN( TrueColor ), VN( DirectColor ), }; static VN_struct btypes[ ]= { { FL_NO_BOX, "No box" }, { FL_UP_BOX, "Up box" }, { FL_DOWN_BOX, "Down box" }, { FL_BORDER_BOX, "Border box" }, { FL_SHADOW_BOX, "Shadow box" }, { FL_FLAT_BOX, "Flat box" }, { FL_FRAME_BOX, "Frame box" }, { FL_EMBOSSED_BOX, "Embossed box" }, { FL_ROUNDED_BOX, "Rounded box" }, { FL_RFLAT_BOX, "Rflat box" }, { FL_RSHADOW_BOX, "Rshadow box" }, { FL_OVAL_BOX, "Oval box" }, { FL_ROUNDED3D_UPBOX, "Rounded 3D up box" }, { FL_ROUNDED3D_DOWNBOX, "Rounded 3D down box" }, { FL_OVAL3D_UPBOX, "Oval 3D up box" }, { FL_OVAL3D_DOWNBOX, "Oval 3D down box" }, /* sentinel */ { -1, NULL } }; #include "srs.xbm" /*************** Callback **********************/ FL_FORM *form; FL_OBJECT *tobj[ 18 ], *exitob, *btypeob, *modeob; /*************************************** ***************************************/ void boxtype_cb( FL_OBJECT * ob, long arg FL_UNUSED_ARG ) { size_t i; int req_bt = fl_get_select_item( ob )->val; static int lastbt = -1; if ( lastbt != req_bt ) { fl_freeze_form( form ); fl_redraw_form( form ); for ( i = 0; i < sizeof tobj / sizeof *tobj; i++ ) fl_set_object_boxtype( tobj[ i ], btypes[ req_bt ].val ); fl_unfreeze_form ( form ); lastbt = req_bt; } } /*************************************** ***************************************/ void mode_cb( FL_OBJECT * ob, long arg FL_UNUSED_ARG ) { static int lval = -1; int val = fl_get_select_item( ob )->val; if ( val == lval ) return; fl_hide_form ( form ); fl_set_graphics_mode( gmode[ val ].val, 0 ); fl_show_form( form, FL_PLACE_GEOMETRY, border, "Box types" ); lval = val; } /*************** Creation Routines *********************/ /*************************************** ***************************************/ void create_form( void ) { FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 720, 520 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 720, 520, "" ); fl_set_object_color( obj, FL_BLUE, FL_COL1 ); obj = fl_add_box( FL_DOWN_BOX, 10, 90, 700, 420, "" ); fl_set_object_color( obj, FL_COL1, FL_COL1 ); obj = fl_add_box( FL_DOWN_BOX, 10, 10, 700, 70, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); tobj[ 0 ] = fl_add_box( FL_UP_BOX, 30, 110, 110, 110, "Box" ); tobj[ 1 ] = fl_add_text( FL_NORMAL_TEXT, 30, 240, 110, 30, "Text" ); tobj[ 2 ] = fl_add_bitmap( FL_NORMAL_BITMAP, 40, 280, 90, 80, "Bitmap" ); fl_set_object_lcol( tobj[ 2 ], FL_BLUE ); tobj[ 3 ] = fl_add_chart(FL_BAR_CHART, 160, 110, 160, 110, "Chart"); tobj[ 4 ] = fl_add_clock( FL_ANALOG_CLOCK, 40, 390, 90, 90, "Clock" ); fl_set_object_dblbuffer( tobj[4], 1 ); tobj[ 5 ] = fl_add_button( FL_NORMAL_BUTTON, 340, 110, 120, 30, "Button" ); tobj[ 6 ] = fl_add_lightbutton( FL_PUSH_BUTTON, 340, 150, 120, 30, "Lightbutton" ); tobj[ 7 ] = fl_add_roundbutton( FL_PUSH_BUTTON, 340, 190, 120, 30, "Roundbutton" ); tobj[ 8 ] = fl_add_slider( FL_VERT_SLIDER, 160, 250, 40, 230, "Slider" ); tobj[ 9 ] = fl_add_valslider( FL_VERT_SLIDER, 220, 250, 40, 230, "Valslider" ); tobj[ 10 ] = fl_add_dial( FL_LINE_DIAL, 280, 250, 100, 100, "Dial" ); tobj[ 11 ] = fl_add_positioner( FL_NORMAL_POSITIONER, 280, 380, 150, 100, "Positioner" ); tobj[ 12 ] = fl_add_counter( FL_NORMAL_COUNTER, 480, 110, 210, 30, "Counter" ); tobj[ 13 ] = fl_add_input( FL_NORMAL_INPUT, 520, 170, 170, 30, "Input" ); tobj[ 14 ] = fl_add_menu( FL_PUSH_MENU, 400, 240, 100, 30, "Menu" ); tobj[ 15 ] = fl_add_select( FL_NORMAL_SELECT, 580, 250, 110, 30, "Select" ); tobj[ 16 ] = fl_add_timer( FL_VALUE_TIMER, 580, 210, 110, 30, "Timer" ); fl_set_object_dblbuffer( tobj[ 16 ], 1 ); tobj[ 17 ] = fl_add_browser( FL_NORMAL_BROWSER, 450, 300, 240, 180, "Browser" ); exitob = fl_add_button( FL_NORMAL_BUTTON, 590, 30, 100, 30, "Exit" ); btypeob = fl_add_select( FL_NORMAL_SELECT, 110, 30, 130, 30, "Boxtype" ); fl_set_object_callback( btypeob, boxtype_cb, 0 ); fl_popup_set_title( fl_get_select_popup( btypeob ), "Boxtype" ); modeob = fl_add_select( FL_NORMAL_SELECT, 370, 30, 130, 30, "Graphics mode" ); fl_set_object_callback( modeob, mode_cb, 0 ); fl_popup_set_title( fl_get_select_popup( modeob ), "Graphics mode" ); fl_end_form ( ); } /*************** Main Routine ***********************/ char *browserlines[ ] = { " ", "@C1@c@l@bObjects Demo", " ", "This demo shows you most", "objects that currently", "exist in the Forms Library.", " ", "You can change the boxtype", "of the different objects", "using the buttons at the", "top of the form. Note that", "some combinations might not", "look too good. Also realize", "that for all object classes", "many different types are", "available with different", "behaviour.", " ", "With this demo you can also", "see the effect of the drawing", "mode on the appearance of the", "objects.", 0 }; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_COLOR c = FL_BLACK; char **p; VN_struct *vn; int i; VN_struct *g = gmode, *gs = g + sizeof gmode / sizeof *gmode; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); create_form( ); fl_set_bitmap_data( tobj[ 2 ], sorceress_width, sorceress_height, sorceress_bits ); fl_add_chart_value( tobj[ 3 ], 15, "Item 1", c++ ); fl_add_chart_value( tobj[ 3 ], 5, "Item 2", c++ ); fl_add_chart_value( tobj[ 3 ], -10, "Item 3", c++ ); fl_add_chart_value( tobj[ 3 ], 25, "Item 4", c++ ); fl_set_menu( tobj[ 14 ], "Item 1|Item 2|Item 3|Item 4|item 5" ); fl_add_select_items( tobj[ 15 ], "Item 1" ); fl_add_select_items( tobj[ 15 ], "Item 2" ); fl_add_select_items( tobj[ 15 ], "Item 3" ); fl_add_select_items( tobj[ 15 ], "Item 4" ); fl_add_select_items( tobj[ 15 ], "Item 5" ); fl_set_timer( tobj[ 16 ], 1000.0 ); for ( p = browserlines; *p; p++ ) fl_add_browser_line( tobj[ 17 ], *p ); for ( vn = btypes; vn->val >= 0; vn++ ) fl_add_select_items( btypeob, vn->name ); for ( i = 1; g < gs; g++, i++ ) { FL_POPUP_ENTRY *item = fl_add_select_items( modeob, g->name ); if ( ! fl_mode_capable( g->val, 0 ) ) fl_popup_entry_set_state( item, FL_POPUP_DISABLED ); } fl_set_select_item( modeob, fl_get_select_item_by_value( modeob, fl_vmode ) ); fl_set_select_item( btypeob, fl_get_select_item_by_value( btypeob, 1 ) ); boxtype_cb( btypeob, 0 ); fl_show_form ( form, FL_PLACE_MOUSE, border, "Box types" ); while ( fl_do_forms ( ) != exitob ) /* empty */; fl_finish( ); return 0; } xforms-1.0.93sp1/demos/menu.c0000644000175000017500000001204011242235334014441 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* This demo shows the use of menu's. * The first two are PUSH_MENUs (pop-up). * The third one is PULLDOWN_MENU * and the last one is TOUCH_MENU * * a confusing demo, but a good testing program .. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include extern FL_FORM *create_form(void); FL_OBJECT *menu[ 4 ], *abox[ 4 ]; int set[ 4 ]; /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; int i, j; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = create_form( ); /* fl_setpup_color( FL_SLATEBLUE, FL_BLACK ); */ for ( i = 0; i < 4; i++ ) { fl_show_menu_symbol( menu[ i ], 1 ); fl_set_menu( menu[ i ], "Red%r1|Green%r1|Yellow%r1|Blue%r1|Purple%r1|" "Cyran%r1|White%r1"); fl_set_menu_item_shortcut( menu[ i ], 1, "Rr#R#r" ); fl_set_menu_item_shortcut( menu[ i ], 2, "Gg#G#g" ); fl_set_menu_item_shortcut( menu[ i ], 3, "Yy#Y#y" ); fl_set_menu_item_shortcut( menu[ i ], 4, "Bb#B#b" ); fl_set_menu_item_shortcut( menu[ i ], 5, "Pp#P#p" ); fl_set_menu_item_shortcut( menu[ i ], 6, "Cc#C#c" ); fl_set_menu_item_shortcut( menu[ i ], 7, "Ww#W#w" ); /* Initially the last three entries are enabled */ for ( j = 5; j <= 7; j++ ) fl_set_menu_item_mode( menu[ i ], j, FL_PUP_RADIO ); /* The first four are disabled except the item (i+1) */ for ( j = 1; j <= 4; j++ ) fl_set_menu_item_mode( menu[ i ], j, FL_PUP_GREY | FL_PUP_RADIO ); set[ i ] = i + 1; fl_set_object_color( abox[ i ], FL_BLACK + set[ i ], FL_BLACK ); fl_set_menu_item_mode( menu[ i ], set[ i ], FL_PUP_CHECK | FL_PUP_RADIO ); } fl_show_form( form, FL_PLACE_CENTER, FL_TRANSIENT, "Menu" ); fl_do_forms( ); fl_hide_form( form ); return 0; } /*************************************** * m is the menu index 0 - 3 ***************************************/ static void menu_cb( FL_OBJECT * obj, long m ) { int i, item = fl_get_menu( obj ); if ( item <= 0 || set[ m ] == item ) return; for ( i = 0; i < 4; i++) { if ( i != m ) { /* enable the old selected color for other menus*/ fl_set_menu_item_mode( menu[ i ], set[ m ], FL_PUP_RADIO ); /* disable the currently selected color for other menus */ fl_set_menu_item_mode( menu[ i ], item, FL_PUP_GRAY | FL_PUP_RADIO ); } } set[ m ] = item; fl_set_object_color( abox[ m ], FL_BLACK + item, FL_BLACK ); } /*************************************** ***************************************/ static void done_cb( FL_OBJECT * obj FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_finish( ); exit( 0 ); } /*************************************** ***************************************/ FL_FORM * create_form( void ) { FL_FORM *form; FL_OBJECT *obj; form = fl_bgn_form( FL_NO_BOX, 440, 380 ); obj = fl_add_box( FL_BORDER_BOX, 0, 0, 440, 380, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); menu[ 0 ] = obj = fl_add_menu( FL_PUSH_MENU, 0, 0, 110, 30, "Color 1" ); fl_set_menu_notitle( obj, 1 ); fl_set_object_shortcut( obj, "1#1", 1 ); fl_set_object_callback( obj, menu_cb, 0 ); menu[ 1 ] = obj = fl_add_menu( FL_PUSH_MENU, 110, 0, 110, 30, "Color 2" ); fl_set_object_shortcut( obj, "2#2", 1 ); fl_set_object_callback( obj, menu_cb, 1 ); menu[ 2 ] = obj = fl_add_menu( FL_PULLDOWN_MENU, 220, 0, 110, 30, "Color 3" ); fl_set_object_shortcut( obj, "3#3", 1 ); fl_set_object_callback( obj, menu_cb, 2 ); menu[ 3 ] = obj = fl_add_menu( FL_TOUCH_MENU, 330, 0, 110, 30, "Color 4" ); fl_set_object_shortcut( obj, "4#4", 1 ); fl_set_object_callback( obj, menu_cb, 3 ); abox[ 0 ] = obj = fl_add_box( FL_SHADOW_BOX, 20, 80, 70, 230, "" ); abox[ 1 ] = obj = fl_add_box( FL_SHADOW_BOX, 130, 80, 70, 230, "" ); abox[ 2 ] = obj = fl_add_box( FL_SHADOW_BOX, 240, 80, 70, 230, "" ); abox[ 3 ] = obj = fl_add_box( FL_SHADOW_BOX, 350, 80, 70, 230, "" ); obj = fl_add_button( FL_NORMAL_BUTTON, 310, 330, 110, 30, "Quit" ); fl_set_object_shortcut( obj, "Q#Q", 1 ); fl_set_object_callback( obj, done_cb, 0 ); fl_end_form( ); fl_scale_form( form, 0.9, 0.9 ); fl_adjust_form_size( form ); return form; } xforms-1.0.93sp1/demos/preemptive.c0000644000175000017500000001502211376177531015674 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * Demo showing the use of preemptive and post-object handler, * and one possible way of implementing a "tool tip" * * This file is part of xforms package * T.C. Zhao and M. Overmars (1997) * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include typedef struct { FL_FORM * form0; void * vdata; char * cdata; long ldata; FL_OBJECT * butt; FL_OBJECT * enter; FL_OBJECT * leave; FL_OBJECT * push; FL_OBJECT * release; FL_OBJECT * peek; FL_OBJECT * override; FL_OBJECT * event; FL_OBJECT * done; } FD_form0; extern FD_form0 *create_form_form0( void ); FD_form0 *fd_form0; /*************************************** * Which event to take over is better kept in a state varible * even though query of the status via fl_get_button is cheap ***************************************/ int preemptive_handler( FL_OBJECT * ob FL_UNUSED_ARG, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * xev FL_UNUSED_ARG ) { int override = fl_get_button( fd_form0->override ); char buf[ 128 ]; char *what = override ? "preempted" : "detected"; switch( event ) { case FL_ENTER: if ( fl_get_button(fd_form0->enter ) ) { sprintf( buf,"%s %s", "FL_ENTER", what ); fl_set_object_label( fd_form0->event, buf ); return override ? FL_PREEMPT : 0; } break; case FL_LEAVE: if ( fl_get_button( fd_form0->leave ) ) { sprintf( buf,"%s %s", "FL_LEAVE", what); fl_set_object_label( fd_form0->event, buf ); return override ? FL_PREEMPT : 0; } break; case FL_PUSH: case FL_MOTION: /* one of the quirks of the button class */ if ( fl_get_button( fd_form0->push ) ) { sprintf( buf,"%s %s", "FL_PUSH", what ); fl_set_object_label( fd_form0->event, buf ); return override ? FL_PREEMPT : 0; } break; case FL_RELEASE: if ( fl_get_button( fd_form0->release ) ) { sprintf( buf,"%s %s", "FL_RELEASE", what ); fl_set_object_label( fd_form0->event, buf ); return override ? FL_PREEMPT : 0; } break; } return 0; } #define INTERVAL 800 /* wait this long before showing tip */ static int timeoutID; /* we can also use ob->u_ldata to hold it */ /*************************************** ***************************************/ static void do_tips( int id FL_UNUSED_ARG, void * p ) { FL_OBJECT *ob = p; fl_show_oneliner( ob->u_vdata, ob->form->x + ob->x, ob->form->y + ob->y + ob->h + 1 ); timeoutID = fl_add_timeout( INTERVAL, do_tips, ob ); } /*************************************** * Use the post handler as a tipper ***************************************/ int post_handler( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * xev FL_UNUSED_ARG ) { if ( ! ob->u_vdata ) return 0; if ( event == FL_ENTER ) timeoutID = fl_add_timeout( INTERVAL,do_tips, ob ); else if ( event == FL_LEAVE || event == FL_PUSH ) { fl_hide_oneliner( ); if( timeoutID ) { fl_remove_timeout( timeoutID ); timeoutID = 0; } } return 0; } /*************************************** ***************************************/ void set_tip( FL_OBJECT * ob, char * s ) { ob->u_vdata = s; fl_set_object_posthandler( ob, post_handler ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { fl_initialize( &argc, argv, "FormDemo", 0, 0 ); fd_form0 = create_form_form0( ); /* Fill-in form initialization code */ fl_set_button( fd_form0->peek, 1 ); fl_set_button( fd_form0->enter, 1 ); fl_set_button( fd_form0->leave, 1 ); fl_set_button( fd_form0->push, 1 ); fl_set_button( fd_form0->release, 1 ); fl_set_object_prehandler( fd_form0->butt, preemptive_handler ); set_tip( fd_form0->done, "Want to quit ?\nPress me" ); set_tip( fd_form0->peek, "Turn preempting off" ); set_tip( fd_form0->override, "Turn preempting on" ); /* Show the first form */ fl_show_form( fd_form0->form0, FL_PLACE_CENTER, FL_TRANSIENT, "Preemptive" ); while ( fl_do_forms( ) != fd_form0->done ) /* empty */ ; return 0; } /*************************************** ***************************************/ FD_form0 * create_form_form0( void ) { FL_OBJECT *obj; FD_form0 *fdui = fl_calloc(1, sizeof *fdui ); fdui->form0 = fl_bgn_form(FL_NO_BOX, 320, 250); fl_add_box( FL_UP_BOX, 0, 0, 320, 250, "" ); fl_add_frame( FL_ENGRAVED_FRAME, 200, 70, 95, 100, "" ); fdui->butt = fl_add_button( FL_NORMAL_BUTTON, 20, 70, 170, 100, "A Button" ); fdui->enter = fl_add_checkbutton( FL_PUSH_BUTTON, 210, 70, 45, 30, "Enter" ); fdui->leave = fl_add_checkbutton( FL_PUSH_BUTTON, 210, 95, 40, 30, "Leave" ); fdui->push = fl_add_checkbutton( FL_PUSH_BUTTON, 210, 120, 50, 30, "Push" ); fdui->release = fl_add_checkbutton( FL_PUSH_BUTTON, 210, 140, 60, 30, "Release" ); obj = fl_add_text( FL_NORMAL_TEXT, 55, 15, 220, 30, "Pre-emptive Handler" ); fl_set_object_lsize( obj, FL_MEDIUM_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->peek = obj = fl_add_checkbutton( FL_RADIO_BUTTON, 150, 40, 35, 30, "Peek" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fdui->override = obj = fl_add_checkbutton( FL_RADIO_BUTTON, 210, 40, 35, 30, "Override" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fdui->event = fl_add_box( FL_FLAT_BOX, 40, 180, 245, 25, "" ); fdui->done = fl_add_button( FL_NORMAL_BUTTON, 170, 210, 100, 30, "Done" ); fl_end_form( ); return fdui; } xforms-1.0.93sp1/demos/sld_alt.c0000644000175000017500000000555411203636407015136 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" static FL_OBJECT *sl, *but1, *but2, *but3; /*************************************** ***************************************/ static void slider_callback( FL_OBJECT * a, long b FL_UNUSED_ARG ) { double val = fl_get_slider_value( a ); fl_set_button( but1, 0 ); fl_set_button( but2, 0 ); fl_set_button( but3, 0 ); if ( val <= 0.01 ) fl_set_button( but1, 1 ); else if ( val >= 0.49 && val <= 0.51 ) fl_set_button( but2, 1 ); else if ( val >= 0.99 ) fl_set_button( but3, 1 ); } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *but, *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 300, 300 ); sl = fl_add_slider( FL_VERT_SLIDER, 40, 40, 60, 220, "X" ); fl_set_slider_value( sl, 0.5 ); fl_set_object_callback( sl, slider_callback, 0 ); but1 = fl_add_lightbutton( FL_PUSH_BUTTON, 140, 220, 120, 40, "0.0" ); but2 = fl_add_lightbutton( FL_PUSH_BUTTON, 140, 160, 120, 40, "0.5" ); fl_set_button( but2, 1 ); but3 = fl_add_lightbutton( FL_PUSH_BUTTON, 140, 100, 120, 40, "1.0" ); but = fl_add_button( FL_NORMAL_BUTTON, 140, 40, 120, 40, "Exit" ); fl_end_form(); fl_show_form( form, FL_PLACE_CENTER, FL_NOBORDER, "slRadio" ); while ( ( obj = fl_do_forms( ) ) != but ) if ( obj == but1 ) { if ( fl_get_button( but1 ) ) { fl_set_slider_value( sl, 0.0 ); fl_set_button( but2, 0 ); fl_set_button( but3, 0 ); } else fl_set_button( but1, 1 ); } else if ( obj == but2 ) { if ( fl_get_button( but2 ) ) { fl_set_slider_value( sl, 0.5 ); fl_set_button( but1, 0 ); fl_set_button( but3, 0 ); } else fl_set_button( but2, 1 ); } else if ( obj == but3 ) { if ( fl_get_button( but3 ) ) { fl_set_slider_value( sl, 1.0 ); fl_set_button( but1, 0 ); fl_set_button( but2, 0 ); } else fl_set_button( but3, 1 ); } fl_finish( ); return 0; } xforms-1.0.93sp1/demos/demo33.c0000644000175000017500000000305311203636407014576 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* Testing bitmaps Class. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "srs.xbm" /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { FL_FORM *form; FL_OBJECT *obj; fl_initialize( &argc, argv, "FormDemo", 0, 0 ); form = fl_bgn_form( FL_UP_BOX, 200, 200 ); obj = fl_add_bitmap( FL_NORMAL_BITMAP, 50, 50, 100, 100, "A bitmap" ); fl_set_object_lcol( obj, FL_BLUE ); fl_add_button( FL_HIDDEN_BUTTON, 50, 50, 100, 100, "" ); fl_end_form( ); fl_set_bitmap_data( obj, sorceress_width, sorceress_height, sorceress_bits ); fl_show_form( form, FL_PLACE_MOUSE, FL_NOBORDER, "X Bitmap" ); fl_do_forms( ) ; fl_hide_form( form ); fl_finish( ); return 0; } xforms-1.0.93sp1/ChangeLog0000644000175000017500000025320511376514610014013 0ustar jensjens2010-05-24 Jens Thoms Toerring * lib/spinner.c: Werner Heisch found a bug in the float spinner that kept the user from editing the value. 2010-05-23 Jens Thoms Toerring * lib/flinternals.h, browser.c, objects.c, input.c: Moved duplicate code in brower and input module into a function in objects.c. 2010-05-22 Jens Thoms Toerring * doc: Paul Nicholson put a lot of work into correcting all kinds of issue with the documentation! * lib/input.c: in some situations in a multi-line input object parts of the scrollbar were drawn even though no scrollbars were suposed to be shown. * lib/xyplot.c: Active xyplot was broken. * lib/box.c: If label is inside of box it's now clipped to the inside of the box and never draws outside of it. 2010-05-21 Jens Thoms Toerring * doc: Many spelling errors etc. removed that Paul Nicholson had pointed out. * fdesign: deprecated values from alignment label menu in the form for editing object attributes removed. * lib/forms.c: Bug with resizing scrollbars on resize of form that Paul Nicholson pointed out fixed. * fdesign/fd_attribs.c: Another bug found by Paul Nicholson: when in changing the type of an object with childs and then undoing the change immediately ("Attributes" form still open and clicking "Cancel") fdesign crashed. Hopefully fixed now. 2010-05-19 Jens Thoms Toerring * fdesign: small changes (mostly to fd/ui_theforms.fd) to get rid of annoying flicker in the control window when adding a new object in the other window. 2010-05-18 Jens Thoms Toerring lib/objects.c: Another bug found by Serge Bromow fixed: shortcuts with ALT key had stopped to work. 2010-05-17 Jens Thoms Toerring * lib/tbox.c: As Serge Bromow pointed out in the functions fl_set_browser_topline(), fl_set_browser_bottomline() and fl_set_browser_centerline() there was a missing check for the browser being empty, resulting in dereferencing a NULL pointer. 2010-05-15 Jens Thoms Toerring * lib/handling.c, lib/include/Basic.h: After intensive discussions with Serge Bromow added new funtion that allows to switch back to the pre-1.0.91 behavior concerning when an interaction with an input object is considered to have ended. 2010-05-07 Jens Thoms Toerring * lib/tbox.c: As Marcus D. Leech pointed out setting colors for a browser via fl_set_object_color() didn't work for the font color (always black), hopefully fixed * doc/part6_images.texi: Some more typos etc. found by LukenShiro removed 2010-05-05 Jens Thoms Toerring * doc/part6_images.texi: A number of typos etc. found by LukenShiro removed. 2010-05-04 Jens Thoms Toerring * image/image.c: LukenShiro pointed out a deviation between the diocumented return type of the flimage_free() function. It now returns void as already documented. * lib/font.c: Fix for (rather hypothetical buffer) overrun in get_fname(). 2010-03-14 Jens Thoms Toerring * clipboard.c: Converted error message into warning printed out when a selectio request is made to the XForms program for a type of Atom that XForms doesn't support. Thanks to Mark Adler for pointing out the problem. 2010-03-09 Jens Thoms Toerring * Several changes to the way things redrawn - there were some problems with redrawing labels that needed several changes to get it right (again). * Some unused stuff removed from include files * Corrections in the documentation 2010-01-09 Jens Thoms Toerring * Lots of clean-up in header files to address inconsistencies (and in some cases also function prototypes had to be changed) as pointed out by LukenShiro. * lib/input.c: Bug with return behaviour of FL_MULTI_INPUT objects fixed. * lib/popup.c, lib/nmenu.c: Functions added for adding and modifying popup entries using a FL_POPUP_ITEM added. * lib/objects.c: Several getter functions for object properties added * gl/glcanvas.c: Bug about missing requested event and pointed out by Dave Strang fixed. 2009-12-21 Jens Thoms Toerring Some problems with new forms.h pointed out by Lukenshiro and Luis Balona cleaned up. 2009-12-14 Jens Thoms Toerring Some more clean-up in header files (and documentation) 2009-12-13 Jens Thoms Toerring demos/thumbwheel.c: Bug fixed as pointed out by LukeShiro images/flimage.h: Removed useless declaration of fl_basename() as proposed by LukenShiro several include files: Removed useless members from a number of structures and enums, adjusted return types of a few functions to fit the documentation, all as part of the clean up for the new SO version since this just th right moment to get rid of garbage. 2009-11-30 Jens Thoms Toerring * configure.ac: Updated SO_VERSION since the library isn't compatible anymore with the 1.0.90 release and this lead to trouble for Debian (at least). * lib/spinner.c, lib/handling.c: Updates to eliminate a bug detected by Werner Heisch that kept spinner objects from working correctly if they are the only input object in a form. 2009-11-23 Jens Thoms Toerring * lib/fselect.c: Improved algorithm for finding file to be shown selected on changes of input field 2009-11-20 Jens Thoms Toerring * lib/positioner lib/include/positioner.h: Added a new type of positioner (FL_INVISIBLE_POSITIONER) that's completely invisible to put on top of other objects. The idea for that came from Werner Heisch. * fdesign/fd_superspec.c: Werner Heisch found that changing copied menu and choice object entries also change the ones of the object copied from. Bug hopefully fixed. * lib/fselect.c: When entering text into the input object of a file selector now a fitting file/directory (if one exists) will now be selected automatically in the browser. 2009-11-03 Jens Thoms Toerring lib/xyplot.c: As Jussi Elorante noticed posthandlers didn't work with XYPLOT objects. This now should be fixed. Peter S. Galbraith pointed out that building the documen- tation in info format didn't work properly. 2009-09-21 Jens Thoms Toerring * fdesign/fd_forms.c, fdesign/fd_groups.c, fdesign/fd_super.c: Two bugs in fdesign, found by Werner Heisch, removed. 2009-09-20 Jens Thoms Toerring Minor corrections in the documentation. 2009-09-16 Jens Thoms Toerring * lib/include/Basic.h: Removed a nonexistent color that had made it into the list of colors as Werner Heisch pointed out. 2009-09-15 Jens Thoms Toerring * lib/events.c: general callbacks for events for user generated windows weren't called anymore, repaired. * lib/include/xpopup.h: Broken define Rouben Rostamian found for the fl_setpup_default_checkcolor() repaired. 2009-09-14 Jens Thoms Toerring * lib/thumwheel.c, lib/validator.c: Fixed return behaviour of thumbwheel. 2009-09-13 Jens Thoms Toerring * lib/input.c: Further problems with beep and input objects removed. 2009-09-12 Jens Thoms Toerring * fdesign/sp_spinner.c: Added forgotten output to C file for setting colors and text size and style. * lib/input.c: Removed beep on valid input into FL_INT_INPUT and FL_FLOAT_INPUT objects. 2009-09-11 Jens Thoms Toerring * lib/flcolor.c, lib/include/Basic.h: New pre-defined colors added as proposed and assembled by Rob Carpenter. * lib/spinner.c: Corrections to return behaviour of spinner objects as pointed out by Werner Heisch. 2009-09-08 Jens Thoms Toerring * lib/input.c: Bug in copy-and-paste and found by Werner Heisch repaired. * lib/include/zzz.h: defines of 'TRUE' and 'FALSE' relaced by 'FL_TRUE' and 'FL_FALSE' to avoid problems for other programs that may define them on their own (thanks to Serge Bromow for pointing out that this can be a real problem). 2009-09-06 Jens Thoms Toerring Some more bugs in fdesign, found by Werner Heisch, removed. Most important: bitmaps weren't drawn correctly. * lib/bitmap.c: fl_set_bitmapbutton_file() removed, is now an alias for fl_set_bitmap_file() * lib/sysdep.c: fl_now() doesn't add a trailing '\n' anymore 2009-09-05 Jens Thoms Toerring Several bugs reported by Werner Heisch in fdesign fixed. Input of form and group names is now checked for being a valid C identifier. 2009-09-03 Jens Thoms Toerring * lib/util.c: Removed function fli_get_string() which was just a duplication of fli_print_to_string() 2009-09-01 Jens Thoms Toerring Tabs replaced by spaces. Repairs to fd2ps that had stopped working (output doesn't look too nice yet, changing that will probably take quite a bit of work...) 2009-08-30 Jens Thoms Toerring Support for spinner objects built into fdesign. 2009-08-28 Jens Thoms Toerring Dependence of form size on snap grid setting in fdesign removed since it led to unpleasant effects under KDE, form size can now be set directly via a popup window. Some more bugs with new way of reading .fd files removed. * lib/browser.c: Missing redraw of scrollbar added in fl_show_browser_line() (thanks to Werner Heisch for noticing and telling me about it), 2009-08-26 Jens Thoms Toerring * README: updated to reflect new mailing list location and homepage 2009-08-25 Jens Thoms Toerring A number of bugs in the new code for reading in .fd-Files pointed out by Werder Heisch have been removed. 2009-08-22 Jens Thoms Toerring Thanks to lots of input (patches and discussions) by Werner Heisch the way .fd files get read in and analyzed has been changed to be a lot more liberal of what is accepted as well as spitting out reasonable error messages and warnings if things go awry. New files added are fdesign/fd_file_fun.c and fdesign/sp_util.c and lots of others have been changed. 2009-08-13 Jens Thoms Toerring * fdesign/fd_printC.c: Some corrections/bug fixes * Bit of clean-up all over the place;-) 2009-08-06 Jens Thoms Toerring * lib/Makefile.am, gl/Makefile.am, image/Makefile.am: Applied patch send by Rex Dieter that changes the way the dynamic libraries get created so that linking explicitely against libX11.so and ibXpm.so (and possibly others) isn't necessary anymore when linking against libforms.so. 2009-07-12 Jens Thoms Toerring * lib/objects.c: Bug in convertion of string to shortcut characters removed 2009-07-11 Jens Thoms Toerring * Bit of cleanup of error handling 2009-07-10 Jens Thoms Toerring * lib/forms.c: Forms.c split into two, forms.c and handling.c 2009-07-09 Jens Thoms Toerring * lib/events.c: Bug found by Werner Heisch when using fdesign under KDE/Gnome removed 2009-07-05 Jens Thoms Toerring * lib/forms.c: Hack added to correct drawing of formbrowser objects * lib/input.c: Cursor was sometimes not drawn at the correct position 2009-07-05 Jens Thoms Toerring * lib/tbox.c: Some adjustments to redraw of textbox 2009-07-04 Jens Thoms Toerring * Bugs found by Werner Heisch in fdesign fixed. 2009-07-03 Jens Thoms Toerring * Some bugs in code for drawing of folder and formbrowser objects repaired. * Mistakes in documentation removed. 2009-07-01 Jens Thoms Toerring * Several bugs in fdesign removed * lib/tbox.c: Realculation of horizontal offset after removal of longest line fixed 2009-06-29 Jens Thoms Toerring * Some bugs found by Werner Heisch in the new browser implementation corrected. * Some issues with fdesign and browsers removed. * lib/scrolbar.c: Cleanup due to compiler warning 2009-06-12 Jens Thoms Toerring * lib/tbox.c: Some corner cases for browsers corrected. 2009-06-10 Jens Thoms Toerring * lib/tbox.c: Bug in handling of new lines and appending to existing lines fixed to make it work like earlier versions. 2009-06-09 Jens Thoms Toerring Several bug-fixes and changes all over the place to get everything working again. Flag '--enable-bwc-bs-hack' added to 'configure' to allow compliation for programs that rely on the tradi- tional behaviour of browsers and scrollbars, i.e. that they don't report changes via e.g. fl_do_forms() but do invoke a callback if installed. 2009-06-04 Jens Thoms Toerring lib/tbox.c: Replacement for lib/textbox.c used in all browsers. 2009-05-21 Jens Thoms Toerring Lots of changes to the event handling system. The handler routines for objects now are supposed to return information about what happend (changes, end of interaction) instead of just 1 or 0 (which indicated if the user application was to be notified or not. Using the new system makes it easier to use objects that consist of child objects e.g. when dealing with callbacks for these kinds of objects. 2009-05-17 Jens Thoms Toerring * lib/events.c: Bug fixed that resulted in crashes when in the callback for an object the object itself got deleted. * lib/input.c: fl_validate_input() function added. * configure.ac, config/common.am, config/texinfo.tex, doc/Makefile.am: Documentation added to built system 2009-05-16 Jens Thoms Toerring * lib/events.c: Objects consisting just of child objects weren't handled correctly in that they never got returned by fl_do_forms(). * lib/browser.c, lib/formbrowser.c, lib/scrollbar.c, lib/tabfolder.c: these objects now get created with a default callback that does nothing to keep them reported by fl_do_forms() (for backward compatibility reasons). Also quite a bit of cleanup in lib/browser.c * lib/spinner.c, lib/include/spinner.h, lib/private/pspinner.h: new widget added, very similar to counter object (but realized just using already existing objects). * lib/child.c, lib/include/Basic.h: fl_add_child() is am exported function now (again) since it might be rather useful for creating new, composite widgets. 2009-05-13 Jens Thoms Toerring * fdesign/Makefile: Added a few include directories in order to allow fdesign's fd files when newly converted with fdesign to be compiled without manual changes. 2009-05-08 Jens Thoms Toerring * lib/forms.c, lib/objects.c, lib/flinternals.h: Using the return key to activate a FL_RETURN_BUTTON object in a form with a single input object works again. 2009-05-08 Jens Thoms Toerring * configure.ac: check for nanosleep too * lib/sysdep.c (fl_msleep): use HAVE_NONOSLEEP 2009-05-06 Jens Thoms Toerring * lib/form.c: Changed return type of the functions fl_show_form(), fl_prepare_form_window() and fl_show_form_window() to 'Window' to reflect what was (mostly) said in the documentation. That also required including X11 header files already in lib/include/Basic.h instead of lib/include/XBasic.h. fl_prepare_form_window() now returns 'None' on failure instead of -1. Also the type of the 'window' member of the FL_FORM structure is now 'Window' instead of 'unsigned long' and that of 'icon_pixmap' and 'icon_mask' is 'Pixmap'. FL_TRIANGLE_* macros renamed to FLI_TRIANGLE_* and moved to lib/flinternal.h. 2009-05-06 Jens Thoms Toerring * Just a bit of code cleanup in fdesign and minor changes of the documentation. 2009-05-04 Jens Thoms Toerring * lib/signal.c: in handle_signal() a caught signal could lead to an infinite loop when the handling function did something that put it back into the main loop. * Some improvements of teh documentation 2009-05-03 Jens Thoms Toerring * fdesign/fd_attribs.c: Bug that kept composite objects from being selected after type change in fdesign removed. Length of labels is now unlimited. 2009-05-02 Jens Thoms Toerring * Some missing figures added to documentation. 2009-04-16 Jens Thoms Toerring Git repository added. 2009-03-27 Jens Thoms Toerring * fdesign/fd_main.c, fdesign/fd_printC.c: As Rob Carpenter noticed doesn't get inclued in the files generated by fdesign when a glcanvas object exists. Changed that so that both and (but only if required) get included in the header file created by fdesign. 2009-01-26 Jens Thoms Toerring * lib/include/AAA.h.in: Contact address etc. corrected. 2009-01-25 Jens Thoms Toerring * doc/images/: Some new figures added. 2009-01-21 Jens Thoms Toerring * fdesign/fd_spec.c, fdesign/fd_super.c: Removed lots of potential buffer overruns and restriction on number of lines/entries that could be used for browser, menu and choice objects. * lib/utils: Added function for reading in lines of arbitrary length from a file and a function with similar functionality as GNUs asprintf(). 2009-01-16 Jens Thoms Toerring * image/image_disp.c: Tried to correct display of images on machines where the COMPOSITE extension is supported. As Luis Balona noticed on these systems images dispayed with the itest demo program appear half-transparent. Probably not solved but looks a bit better now... * image/image_jpeg.c: Bug in identification of JPEG images corrected. 2009-01-11 Jens Thoms Toerring * lib/nmenu.c, lib/include/nmenu.h, lib/private/pnmenu.h: New type of menus based on the new popup code. * lib/private/pselect.h: Small correction to get the knob of browser sliders drawn correctly. 2009-01-03 Jens Thoms Toerring * lib/select.c: Corrections and additions of new functions for select objects. * demos: Changes to a number of demo programs to use select instead of choice objects. * doc: Updates of some of the files of the documentation. 2009-01-02 Jens Thoms Toerring * lib/select.c, lib/include/select.h, lib/private/pselect.h: Files for the new select object added that is supposed to replace the old choice object and is based on the new popup code recently added. * doc/part3_choice_objects.texi, doc/part3_deprecated_objects.texi: Documentation of choice objects moved from that for choice objects to that for deprecated objects and documenttation for the new select object was added to that for choice objects. 2008-12-28 Jens Thoms Toerring * fdesign/fd_printC.c: Applied a patch Werner Heisch send in for a bug that resulted in the label alignment getting set incorrectly (always ended up as FL_ALIGN_CENTER). 2008-12-27 Jens Thoms Toerring * doc: Reassembly of documentation in texinfo format more or less complete. Still missing are most of the figures. * lib/include/popup.h: File has been renamed xpopup.h. * lib/popup.c, lib/include/popup.h, demo/new_popup.c: New implementation of popups, supposed to replace old Xpopups. Still missing: reimplementation of menu and choice objects based on the new Popup class. * lib/forms.c: fl_end_group() now returns void instead of a pseudo-object that never should be used by the user. 2008-12-10 Jens Thoms Toerring * lib/xpopup.c: Found that FL_PUP_GREY and FL_PUP_INACTIVE are actually the same, so removed all uses of FL_PUP_INACTIVE. 2008-12-01 Jens Thoms Toerring * doc: New directory with first parts of rewrite of docu- mentation in texi format. * lib/counter.c: Rob Carpenter noticed that it sometimes can be difficult to use a counter to just change it by a single step. Thus, according to his suggstions, the first step now takes longer and the time between following steps gets smaller and smaller until a final minimum timeout is reached (initial timeout is 600 ms and final is 50 ms per default). The fl_get_counter_repeat() and fl_set_counter_repeat() are now for the initial timeout and the final timeout can be controlled vianew functions fl_set_counter_min_repeat()/fl_get_counter_min_repeat(). To switch back to the old behaviour use the functions fl_set_counter_speedup()/fl_get_counter_speedup() and set the initial and final rate to the same value. If speed-up is switched off but initial and final timeouts differ the initial timeout is used for the first step and the final timeout for all following steps. * lib/choice.c: Choices didn't react immediately to a click with the middle or left mouse button. Now the selected entry will change immediately and continue to change slowly when the mouse button is kept pressed down. * fdesign/fd_forms.c: Rob Carpenter and Werner Heisch found that while loading .fd file a spurious "Failure to read file" warning gets emitted. 2008-11-22 Jens Thoms Toerring * lib/appwin.c, lib/events.c: Small changes to clean up a few things that did look a bit confusing. 2008-11-11 Jens Thoms Toerring Cosmetic changes to a number of files to pacify the newest gcc/libc combination about issues with disre- garded return values of standard input/output func- tions (fgets(), fread(), fwrite(), sscanf() etc.) 2008-11-10 Jens Thoms Toerring * lib/textbox.c: Another bug Rob Carpenter found: when trying to scroll in an empty browser the program crashed with a segmentation fault due to miscalculation of the number of the topmost line of text. 2008-11-04 Jens Thoms Toerring * lib/objects.c: Rob Carpenter pointed out another bug that resulted in extremely slow redraws of objects and was due to a off-by-one error in the calculation of the bounding box of objects (which in turn made non-overlap- ping objects appear to overlap. 2008-10-27 Jens Thoms Toerring * lib/button.c: Bug in function for selecting which mouse buttons a button reacts to fixed. 2008-10-20 Jens Thoms Toerring * lib/forms.c: Added function fl_form_is_iconified() that returns if a forms window is in iconfied state. Thanks to Serge Bromow for propose a function like that. 2008-10-18 Jens Thoms Toerring * lib/forms.c, lib/tooltip.c: Bug removed that led to multiple deletes of tooltip form in the fl_finish() function. 2008-09-24 Jens Thoms Toerring * lib/clock.c: FL_POINT array in draw_hand() was one element too short. 2008-09-22 Jens Thoms Toerring * Further code cleanup * Update of man page 2008-09-21 Jens Thoms Toerring * Bits of code clean-up in several places. 2008-09-17 Jens Thoms Toerring * lib/objects.c: Added removal of tooltip when object gets deleted. 2008-09-16 Jens Thoms Toerring * lib/win.c, lib/forms.c: Code for showing a form was changed. The previous code made the assumption that all window managers would reparent the form window withing a window with the decorations, but this is not necessary the case (e.g. metacity, the default window manager of Gnome). This led to inconsistencies in the positioning of forms with different window managers. Also positioning forms with negative values for x and y (to position a window with its right or bottom border relative to the right or bottom of the screen didn't work correctly. 2008-08-04 Jens Thoms Toerring * lib/goodie_choice.c: Bug in setting the buttons texts removed. 2008-08-03 Jens Thoms Toerring * lib/forms.c, lib/objects.c: Removed bug pointed out by J. P. Mellor that allowed selecting and editing input objects even when the were deactivated. * fdesign/fd_attribs.c: Removed a bug pointed out by Werner Heisch that crashed fdesign if the type of an object was changed. * fdesign/fd_attribs.c: Bug in fdesign fixed that led to crash when the type of a composite object was changed and then Restore or Cancel was clicked. 2008-07-05 Jens Thoms Toerring * lib/menu.c: Thanks to a lot of input from Jason Cipriani several changes were made concerning the ability to set menu item IDs and callback functions for menu items. This includes slight changes to the prototype of the three functions fl_set_menu(), fl_addto_menu() and fl_replace_menu_item(). All of them now accept in addition to their traditional arguments an unspecified number of extra arguments. Also tow new functions were added: fl_set_menu_item_callback( ) fl_set_menu_item_id( ) Please see the file 'New_Features.txt' for a more complete description. * fdesign: Support for setting menu item IDs and menu item callbacks has been added. 2008-07-03 Jens Thoms Toerring * lib/forms.c: for radio buttons an associated callback function wasn't called on a click on an already pressed radio button as Luis Balona found out. Since this isn't the bahaviour of older XForms version this could lead to problems for applictaions that expect the old behaviour, so the behaviour was switched back to the old one. * config/: on "make maintainer-mode the scripts install-sh, missing and mkinstalldirs got deleted. While the first two were generated automatically during the autoconf process the last wasn't which led to a warning when running configure. Thus the 'mkinstalldirs' (from automake 1.10) was added. 2008-07-02 Jens Thoms Toerring * lib/xpopup.c, lib/menu.c: Tried to fix a bug resulting in artefacts with menus on some machines as Luis Balona pointed out. 2008-06-30 Jens Thoms Toerring * lib/objects.c: Removed a bug in the calculation of size of the bounding of an object. Thanks to Rob Carpenter for sending me example code that did show the problem nicely. * lib/forms.c, lib/objects.c: Added some code to speed up freeing of forms (overlap of objects does not get recalculated anymore, which could take a considerable time for forms with many objects). 2008-06-29 Jens Thoms Toerring * lib/object.c, lib/button.c, lib/xpopup.c: Fixed two bugs found by Luis Balona that under certain circumstances led to a segmentation fault. * config/ltmain.sh, config/libtool.m4, config/config.guess, config/config.sub: Updated libtool files from version 1.4.3 to 1.5.26 since Raphael Straub, the maintainer of the MacPorts port of XForms, pointed out that compilation of fdesign on Mac OSX failed due to a problem with the old libtool version. 2008-06-22 Jens Thoms Toerring * lib/xsupport.c: Code cleanup. * lib/pixmap.c: Changed code for drawing a pixmap to take the current clipping setting unto account. Many thanks To Werner Heisch for explaining the problem with a lot of screentshots and several example programs that did show what went wrong! * lib/bitmap.c: Made bitmap buttons behave like normal buttons, just with a bitmap drawn on top of it. The foreground color of the bitmap is the same as the label color (and never changes). Also changed the code for drawing a bitmap to take account fo the current clipping setting. 2008-06-17 Jens Thoms Toerring * lib/pixmap.c: Made pixmap buttons behave like normal buttons, just with a pixmap drawn on top of it (which may get changed when the button receives or loses the focus). * lib/objects.c: Made some changes to the redraw of objects when a "lower" object gets redrawn and thus an object on top of it also needs to be redrawn. 2008-05-31 Jens Thoms Toerring * lib/pixmap.c: As Werner Heinsch pointed out the display of partially transparent pixmaps was broken due to a bug I had introduced when cleaning up the code for redraw. Moreover, already in 1.0.90 the pixmap of a pixmap button was exchanged for the focus pixmap when the button was pressed, which wasn't what the documentation said. Code changed to avoid that. * lib/objects.c: The code for determining if two objects intersect was broken and reported all objects to intersect, which then resulted in a lot of useless redraws. Hopefully fixed. 2008-05-24 Jens Thoms Toerring * Got rid of some compiler warnings removed. * lib/fldraw.c: As Andrea Scopece pointed out colors of box borders weren't correct and the shadow wasn't drawn for for shadow boxes with a border width of 1 or -1. Added his proposed patches. 2008-05-17 Jens Thoms Toerring * lib/goodies.c, lib/goodie_*.c: Some code cleanup and made sure that memory allocated gets released. 2008-05-16 Jens Thoms Toerring * lib/objects.c: Removed a bug that has been pointed out by Werner Heisch with a small demo program: if an object is partially or even fully hidden by another object and gets redrawn it got drawn above the object it was supposed to be (more or less) hidden by, thus obscuring the "upper" object. * lib/pixmap.c: It could happen that parts of a pixmap got drawn outside of the object that it belongs to. That in turn could mess up redrawing (e.g. if the pixmap object got hidden). Thus now only that part of a pixmap that fits inside the object gets drawn. 2008-05-15 Jens Thoms Toerring * lib/textbox.c: The functions fl_addto_browser() and fl_addto_browser_chars() didn't worlk correctly anymore. When lines where appended the browser wasn't shifted to display the new line. Thanks to Werner Heisch for pointing out the problem. 2008-05-12 Jens Thoms Toerring * lib/goodie_alert.c: Removed restriction on the maximum length of the alert message. Added new function void fl_show_alert2( int c, const char * fmt, ... ) The first argument is the same as the last of fl_show_alert(), indicating if the alert box is to be centered on the screen. The second one is a printf()- like format string, followed by as many further arguments as there are format specifiers in the 'fmt' argument. The title and the alert message are taken from the resulting string, where the first form-feed character ('\f') embedded in the string is used as the separator between the title and the message. 2008-05-10 Jens Thoms Toerring * lib/menu.c: Changed the default font style of menus from FL_BOLD_STYLE to FL_NORMAL_STYLE and menu entries from FL_BOLDITALIC_STYLE also to FL_NORMAL_STYLE. * lib/xpopup.c: Changed the default font style of both popup entries as well as the title from FL_BOLDITALIC_STYLE to FL_NORMAL_STYLE. * lib/flcolor.c: Made the default background color a bit lighter. 2008-05-09 Jens Thoms Toerring * lib/objects.c: Removed bug that kept canvases from being hidden and tabfolders from being re-shown correctly. This was especially annoying with fdesign as Rob Carpenter pointed out. * lib/forms.c: Added a new function int fl_get_decoration_sizes( FL_FORM * form, int * top, int * right, int * bottom, int * left ); which returns the widths of the additional decorations the window manager puts around a forms window. This function can be useful if e.g. one wants to store the position of a window in a file and use the position the next time the program is started. If one stores the forms position and uses that to place the window it will appear to be shifted by the size of the top and left decoration. So instead storing the forms position one has to correct it for the decoration sizes. * everywhere: further clean up (getting internal stuff separated from stuff that belongs to API) 2008-05-08 Jens Thoms Toerring * lib.objects.c, lib/childs.c: Rewrite of the functions for hidding an object. Some adjustments to the code for freeing objects to set the focus correctly. * lib/flresource.c: Changed the name of the option to set the debug level from 'debug' to 'fldebug' since it's too likely that a program using XForms also has a 'debug' option which would get over- written by XForms option. Also added a 'flhelp' option that outputs the options that XForms accepts and then calls exit(1). Thanks to Andrea Scopece for contributing this. 2008-05-07 Jens Thoms Toerring * lib/objects.c, lib/child.c: Handling of child objects corrected - valgrind was reporting an error with the old code (access to already re- leased memory) and the code was rather buggy and inconsistent anyway. * lib/xpopup.c: Changed a XFhlush() to XSync() after a popup was opened - without it an Map- Notify was sometimes passed back to the user program (happened due to a fix to a different bug in lib/events.c). * fdesign: Tried to make the fdesign GUI look a bit nicer (thinner borders etc.). Some changes to generated output files (format, call of fl_free() on the different fdui's at the end of the main() function etc.). 2008-05-05 Jens Thoms Toerring * further clean-up of header files and renaming of functions and macros usied only internally. 2008-05-04 Jens Thoms Toerring * fdesign/fd_forms.c: Removed limit on number of forms that can be created or read from a file. Few changes to error handling. * fdesign/fd_control.c: Removed limit on number of objects in a form that can be dealt with. * fdesign/fd_groups.c: Removed limit on number of groups that can be dealt with. * fdesign/fd/ui_theforms.fd: Changed browser for groups to be a multi instead of hold browser. * lib/events.c: Bug I had ontroduced in function fl_handle_event_callbacks() repaired. Thanks to Andrea Scopece for pointing out the problem. * everywhere: started attempt to distinguish clearly between functions, variables, and macros belonging to the API and those only used internally to the library by having API names start with 'fl_' (or 'FL_') while internal names start with 'fli_' (or FLI_'). Also removed doubly declared or non-existent functions in lib/flinternal.h. 2008-05-01 Jens Thoms Toerring * lib/goodies_msg.c: New function fl_show_msg() now works. 2008-04-30 Jens Thoms Toerring * lib/goodie_msg.c: Added function void fl_show_msg( const char * fmt, ... ) The first argument is a printf-like format string, followed by as many arguments as required by the format specifiers in the format string. This simplfies outputting freely formatted messages. Changed fl_show_message() to avoid an upper limit of 2048 characters on the total length of the three strings passed to it. Added #defines for fl_hide_messages and fl_hide_msg - they are just alternative names for fl_hide_message(). 2008-04-29 Jens Thoms Toerring * lib/fselect.c: If a callback for a file selector is installed the prompt line and the input field aren't shown anymore. As Andrea Scopece pointed out the input field can't be used at all for file selectors with a callback (only a double click in the browser works) so it doesn't make sense to show it. * lib/n2a.c: This file isn't needed anymore - the only of its functions used at all, fl_itoa(), was used in only a single place (lib/errmsg.c) and got replaced by sprintf(). * image/image_proc.c: Bug fixed in flimage_tint() that led to writes past the end of an array. 2008-04-28 Jens Thoms Toerring * lib/forms.c: Jumping backwards with Shift- through a set of input objects now works even if there are non-input objects in between. * demos/browserop.c: Bug removed that only surfaced now since clicking onto a button makes an input object lose the focus. * lib/canvas.c, lib/forms.c: On hiding a form it was forgotten to unmap the windows of canvases belonging to that form and to reset the ID of these windows. Resulted in an XError on unhiding the form. Thanks to Andrea Scopece for finding this bug. 2008-04-27 Jens Thoms Toerring * lib/input.c: Correct leap year handling in date input validator. Multi-line input field don't receive a anymore (which never did work anyway). * lib/forms.c: can now also be used to move the focus out of a multi-line input field and into the next input field. * lib/version.c: The version output now contains the full copyright information, not just the first three lines. 2008-04-26 Jens Thoms Toerring * lib/flresource.c: Library version information wasn't output when the '-flversion' option was given. Repaired by a patch Andrea Scopece send. * lib/forms.c: Scrollbars had been extempt from resizing due to the wrong assumption that they always would be childs of a composite object, which isn't the case. Thanks to Andrea Scopece for finding this problem. * lib/scrollbar.c: Horizontal scrollbars now only get resized in x-direction per default, verticall ones in y-direction only. 2008-04-22 Jens Thoms Toerring * lib/async_io.c: Removed a bug pointed out by Andrea Scopece that resulted in a segmentation fault in the 'demo' program. This also needed some changes in the files lib/flresource.c and lib/flinternal.h (where also all remains from be.c were removed). 2008-04-20 Jens Thoms Toerring * lib/flresource.c: Removed setting of the machines locale setting as default for the program. This change had already been discussed by Jean-Marc and Angus back in 2004 but never actually done. * lib/fselect.c: Programs doesn't crash anymore when fl_set_directory() gets passed a NULL pointer. * lib/buttons.c: Bug repaired that kept buttons from becoming highlighted when the mouse was moved nto them (and vice versa). * lib/formbrowser.c: Changed the handling of the scroll- bars to hopefully make it work correctly even when the form gets resized. 2008-04-13 Jens Thoms Toerring * fdesign/fd/*.c, fdesign/spec/*.c: Replaced '#include "forms.h"' with '#include "include/forms.h" to avoid compilation problems Peter Galbraith pointed out. * fdesign/fd_printC.c: In created C files we now have '#include ' instead of '#include "forms.h"'. 2008-04-10 Jens Thoms Toerring * lib/buttons.c: Removed code that enforced on of a set of radio buttons to be set - thus led to problems for some older applications. Also emoved restriction that buttons only react to a click with the left mouse button per default. Instead added two new public functions fl_set_button_mouse_buttons() fl_get_button_mouse_buttons() that allow to set and query the mouse buttons a button will react to. dfault is to react to all mouse buttons. * fdesign/sp_buttons.c, fdesign/fd_spec.c: Added support for setting the mouse buttons a button reacts to via fdesign (click the "Spec" tab rider in the attributes window). * fdesign/fd_main.c: Added option '-xforms-version' to print out the version of the library being used. * lib/tabfolder.c: All memory now gets released on call of fl_finish(). * lib/symbols.c: Unlimited number of symbols can be created without restrictions on the name length. Memory allocated for symbols gets deallocated in fl_finish(). * lib/flresource.c: Array allocated for copy of command line arguments was one element too short which led to crashes when using lots of command line arguments. Added function to free this memory in fl_finish(). * fdesign/fd_printC.c: Output wasn't correct ANSI-C89 when the pre_form_output() function was called. * fdesign/fd/*.[ch], fdesign/spec/*.[ch]: Newly generated using the newest fdesign version. 2008-03-27 Jens Thoms Toerring * lib/button.c: Most buttons now again react only to the release of the left mouse button, I had introduced a bug that broke this behaviour. * fdesign/sp_*.c: Some cosmetic correction to the output format of the files generated by fdesign. 2008-03-26 Jens Thoms Toerring * lib/forms.c: Clicking on a "pushable" object now leads to an input object currently having the focus lose the focus, thus enforcing it to report changes. Until now this only happened if the object that was clicked on was another input object. A FocusOut event now takes away keyboard input from input objects on the form in the window that lost the focus, a FocusIn event restores it. 2008-03-25 Jens Thoms Toerring * lib/forms.c: Further restructuring of event handling. All memory for objects of a form now (hopefully) gets deallocated on a call of fl_free_form() and a call of fl_finish() deallocates all memory used for forms and their objects, removes signal callbacks and deletes timers. The only exception is memory for tabfolder, I haven't yet understood the code for that... * lib/objects.c: Object pre- and posthandlers aren't called anymore on FL_FREEMEM events (the object or some of its childs probably doesn't exist anymore in that kind of situation). * lib/timeout.c: Changed the code a bit and, in combi- nation with changes in lib/forms.c, got the precision of timeouts to be a bit higher (haven't seen it being off more than 5 ms on my machine under light load) and made sure they never expire too early (as promised in the manual). Added a function to remove all timeouts, to be be called from fl_finish(). * lib/be.c: File isn't used anymore, the list of memory to be allocated never was used anyway if no idle handler was installed and it also didn't do the right thing. No calls to fl_addto_freelist() and fl_free_freelist() are left in XForms. * lib/include/Basic.h: FL_MOTION has come back, what I should have thrown out was FL_MOUSE. FL_MOUSE is still available for backward compatibility but isn't used in the code anymore - FL_UPDATE is the new name (in the object structure the 'want_update' member must be set to request this type of event - can be switched on and off at any time). * lib/slider.c: Changed the code for sliders (and thereby scrollbars) quite a bit - it was much too complicated (unfortunately still is:-( and didn't always work correctly. Scrollbars now react to scroll wheel mouse the same way a textbrowser does. * lib/signal: On system that support it sigaction() instead of signal() is used now. Added a function to remove all signal handlers, to be used from fl_finish(). * fdesign/ps_printC.c: Replaced the use of fl_calloc() by fl_malloc() when writing out C files - there's no good reason to spend time on zeroing out the memory. 2008-03-20 Jens Thoms Toerring * textbox.c: Textboxes didn't get regular update events that are needed for scrolling with the mouse pressed down just below or above the box. They also did only react to left mouse buttons (and scroll wheel) and now again also to the middle and right button. * lib/counter.c, fdesign/fd_object.c: Removed some debugging output accidentally left in. * lib/dial.c: Corrected return behaviour on mouse button release. 2008-03-19 Jens Thoms Toerring * lib/forms.c: Further cleanup and removal of cruft that was hard to understand but actually was unnecessary or counter-productive. Added check that makes sure that one of the radio buttons of a form is always set. * lib/include/Basic.h: FL_MOTION got removed, instead FL_UPDATE was introduced for events of the artificial timer (the one that kicks in when there are no events). The FL_OBJECT structure got two new elements, 'want_motion' and 'want_update'. If the first is set an object which is not an object that can be "pushed" will receive mouse movement events (e.g. in case the object has some inner structure that depends on the mouse position like counter objects) and the second is to be set by objects that want to receive FL_UPDATE events (but they still need to be objects that can be "pushed") - at the moment these are touch buttons, counters and choice objects. * lib/choice.c: FL_DROPLIST_CHOICE didn't work correctly anymore, fixed. Scroll wheel can now also be used to walk through the entry up or down in the popup. Added a new function fl_get_choice_item_mode() to the public interface. * lib/menu.c: Menus become highlighted when the mouse is moved onto it. Code cleaned up a bit. Added a function fl_set_menu_notitle() (analogous to the fl_set_choice_notitle() function) to allow removal of the sometimes ugly menu popup titles. This leads to an important change in the behaviour of FL_PUSH_MENU objects: if the title is switched off they only get opened on button release and stay directly below the menu button (like FL_PULLDOWN_MENU objects). There's a lot of code identical to that in choice.c, it might be reasonable to remove the duplication (what actually is the big difference between the menu and choice objects, anyway?) * lib/button: Changes to fit the new event handling code. Buttons now only react to clicks with the left mouse. button. Handling of radio buttons corrected. * lib/choice, lib/counter: Changes to fit the new event handling code. * lib/slider.c, lib/thumbwheel.c, lib/textbox.c, lib/positioner.c, lib/dial.c: Now react to left mouse button only (and mouse wheel as far as reasonable). * lib/fldraw.c: Issues with memory handling checked and corrected. 2008-03-12 Jens Thoms Toerring * lib/forms.c: Removed code injecting fake FL_RELEASE events that led to problems with double click selections e.g. in the file selector (this in turn required changes to lib/xpopup.c). * lib/xpopup.c: Extensive code cleanup, bug fixes and rewrite of event handling. Popup's, menus etc. now work more like one is it used from other toolkits. Shadows around popups got removed since they don't (and never did) work correctly. * Further code cleanup all over the place, removing bugs that may lead to segmentation faults or memory or X resources leaks. 2008-02-04 Jens Thoms Toerring * Resizing code again changed since I hadn't understood all the interdepencies between gravity and resize settings. Hopefully works correctly now. The special treatment of the case for objects that have no gravity set and all resizing switched off (in which case the center of gravity is moved when the enclosing form is resized) seems to be a bit strange. Why is not the same behaviour used for e.g. the x-direction if an object isn't fixed in x-direction by its gravity setting and it isn't to be resized in horizontal direction (same for y)? * lib/events.c: Changed the Expose event compression code that did lead to missed redraws under e.g. KDE or Gnome if they are set up to update a window also during resizing and the mouse is moved around a lot in the process. * lib/textbox.c: Hopefully fixed a bug (perhaps it's the one that Michal Szymanski reported on 2005/3/11 in the XForms mailing list) that resulted under certain circumstances in e.g. fl_do_forms() returning the object for a normal textbrowser unexpectedly when the mouse wheel was used, which in turn could make programs exit that did not expect such a return value (the fbrowse.c demo program did show the problem). * lib/textbox.c: Hopefully fixed another bug that kept the text area of a browser from being redrawn correctly following the resizing of its window when sliders were on and not in the left- or top-most position. * lib/objects.c: Added three functions fl_get_object_bw(), fl_get_object_gravity() and fl_get_object_resize() (to be added to the public interface). * lib/flinternal.h: Added several macros that test if the upper left hand and the lower right hand corner of an object are locked due to gravity settings and macros that test if the width or height is "fixed", i.e. determined by the gravity settings (so they are not influenced by the corresponding resizing settings). * demos/grav.c: Created a small demo program that shows the effects of the different gravity and resizing settings. The results can sometimes be a bit surprising at a first glance but I hope to have gotten it right;-) 2008-01-28 Jens Thoms Toerring * Resizing behaviour got rewritten to get it to work correctly even if a window gets resized to a very small size and then back to a large one (see e.g. the xyplotall demo program for the behaviour). This required to add elements to the FL_FORM and FL_OBJECT structures, but since they shouldn't be used directly from user programs and also user defined object should always be created via a call of fl_make_object(), where the geometry of the object gets set, this shouldn't lead to any trouble. One aspect of the changes is that an objects gravity setting now always takes precedence over the 'resize' setting and the 'resize' setting gets automatically corrected whenever necessary. * lib/events.c: changed queueing system so that queue overflows and thus loss of calls of callback functions or Xevents shouldn't be possible anymore. The queues are now implemented using linked lists that get extendend if necessary, deallocation is done from fl_finish(). * Got rid of a redraw bug that led to a form not being redrawn correctly after its window was made smaller (e.g. under fvwm2) * Several bugs where fixed that sometimes crashed the program with XErrors after resizing a window, especially when the window was made very small (exhibited by e.g. the formbrowser demo program). * Number of forms that can be created is now unlimited (or only limited by the available memory) instead of having an arbitrary maximum of 64 * Changes to autogen.sh to allow built with newer versions of autoconf and small changes on config/xformsinclude.m4 to avoid warnings. Added '-W' compiler flag (which in turn required to mark unused arguments of a lot of functions as such to avoid compiler warnings, see the new macro FL_UNUSED_ARG in lib/include/Basic.h that exists for just that purpose). * Handling of the number of colors was corrected for displays with more colors than can be stored in an unsigned long (e.g. 32-bit depth display with 32-bit wide unsigned longs). * Correction of the sizes of the scrollbars of FL_NORMAL_FORMBROWSER type of objects. * lib/dial.c: mouse-wheel handling for dials added * lib/tabfolder.c: bugs in memory handling corrected * Replaced float by double in many places (not yet finished!). * Code cleanup (concerns several dozens of files) 2004-12-28 Jean-Marc Lasgouttes * image/image_jpeg.c: fix compilation with IBM's xlc. * Makefile.am: remove useless GNUish construct. * lib/listdir.c: add a better definition of S_ISSOCK, that works with SCO OpenServer (thanks to Paul McNary). 2004-10-05 Angus Leeming * xforms.spec.in: Updating SO_VERSION revealed a flaw in the logic that tries to use this variable to define some missing symbolic links. The 'post' and 'postun' scripts have been rewritten to work once more. * lib/flinternal.h: move FL_NoColor... * lib/include/Basic.h: here. * lib/forms.c (do_interaction_step): prevent potential crash caused by invoking fl_get_winsize with a width as the first argument rather than a window ID. * NEWS: add some highlights post 1.0.90. 2004-10-05 Angus Leeming * configure.ac (SO_VERSION): updated to "2:0:1" in preparation for the xforms 1.1 release. 2004-10-06 Angus Leeming * lib/textbox.c (fl_set_textbox_xoffset): don't ignore a request to reset the offset if the manipulated value is less than zero. Instead, reset it to zero and proceed. * lib/browser.c (get_geometry): reset the horizontal offset to zero if the horizontal scrollbar is turned off. (Bug #3205.) 2004-07-28 Angus Leeming * lib/forms.c (fl_prepare_form_window): correct typo in error message. 2004-06-04 Angus Leeming * lib/fonts.c (fl_try_get_font_struct): change an error message to an informational one as the function is often used to test whether a font is loadable or not. 2004-06-03 Angus Leeming * lib/Makefile.am (EXTRA_DIST): distribute dirent_vms.h and vms_readdir.c. 2004-06-01 Duncan Simpson * fdesign/fd_printC.c (build_fname): re-write using fl_snprintf as a simpler and safer replacement for strncat and strncpy. 2004-05-27 Angus Leeming * fdesign/fd_printC.c (build_fname): if no output_dir is specified, then output files in the current directory. 2004-05-27 Angus Leeming * fdesign/fd_main.c: improve diagnostics when failing to convert the .fd file to a .[ch] pair. Also remove some redundant cruft. 2004-05-18 Angus Leeming * lib/include/Basic.h (fl_set_err_logfp): function was known as 'fl_set_error_logfp' in XForms 0.89. Define a typedef to map from the old to the new. 2004-05-18 Angus Leeming * demos/demo27.c: * demos/iconify.c: * demos/pup.c: * fdesign/fd_attribs.c: * fdesign/fd_main.c: * fdesign/fd_main.h: * fdesign/fd_rubber.c: * gl/glcanvas.c: * image/flimage.h: * image/flimage_int.h: * image/image.c: * image/image_disp.c: * image/image_fits.c: * image/image_gif.c: * image/image_jquant.c: * image/image_marker.c: * image/image_proc.c: * image/image_xwd.c: * image/matrix.c: * lib/asyn_io.c: * lib/canvas.c: * lib/child.c: * lib/choice.c: * lib/flcolor.c: * lib/flinternal.h: * lib/flresource.c: * lib/forms.c: * lib/fselect.c: * lib/input.c: * lib/listdir.c: * lib/menu.c: * lib/objects.c: * lib/pixmap.c: * lib/win.c: * lib/xdraw.c: * lib/xpopup.c: * lib/xsupport.c: * lib/include/Basic.h: * lib/include/XBasic.h: * lib/include/bitmap.h: * lib/include/button.h: * lib/include/canvas.h: * lib/include/choice.h: * lib/include/menu.h: * lib/include/popup.h: * lib/private/pcanvas.h: * lib/private/ptextbox.h: s/unsigned/unsigned int/ 2004-05-17 Angus Leeming Revert some functions to the same API as was used in XForms version 0.89, patch level 5. In all cases, this is just a case of using the typedef rather than the raw type. * lib/browser.c (fl_create_browser, fl_add_browser): * lib/include/browser.h (fl_create_browser, fl_add_browser): use FL_Coord. * lib/flcolor.c (fl_bk_color, fl_bk_textcolor): * lib/include/Basic.h (fl_bk_color, fl_bk_textcolor): use FL_COLOR. * lib/flresource.c (fl_initialize): * lib/include/XBasic.h (fl_initialize): use FL_CMD_OPT *. * lib/formbrowser.c (fl_add_formbrowser): * lib/include/formbrowser.h (fl_add_formbrowser): use FL_Coord. * lib/oneliner.c (fl_show_oneliner): * lib/include/goodies.h (fl_show_oneliner): use FL_Coord. * lib/scrollbar.c (fl_create_scrollbar, fl_add_scrollbar(): * lib/include/scrollbar.h (fl_create_scrollbar, fl_add_scrollbar(): use FL_Coord. * lib/signal.c (fl_add_signal_callback): * lib/include/Basic.h (fl_add_signal_callback): use FL_SIGNAL_HANDLER. * lib/tabfolder.c (fl_add_tabfolder, fl_get_folder_area): * lib/include/tabfolder.h (fl_add_tabfolder, fl_get_folder_area): use FL_Coord. * lib/win.c (fl_winmove, fl_winreshape): * lib/include/XBasic.h (fl_winmove, fl_winreshape): use FL_Coord. * lib/xdraw.c (fl_polygon): * lib/include/XBasic.h (fl_polygon): use FL_COLOR. * lib/xtext.c (fl_drw_text_beside): * lib/include/Basic.h (fl_drw_text_beside): use FL_COLOR. * lib/include/goodies.h (fl_exe_command, fl_end_command, fl_check_command): use FL_PID_T. 2004-05-17 Angus Leeming * lib/include/canvas.h: change the change to AUTOINCLUDE_GLCANVAS_H. * gl/glcanvas.h: #include . Add C++ guards. 2004-05-14 Angus Leeming * lib/include/canvas.h: add a preprocessor-qualified #include of glcanvas.h. The user must inititalise the GLCANVAS_H_LOCATION appropriately. This is a means to maintain some sort of backwards compatibility without the old, hacky code. 2004-05-13 Angus Leeming * image/Makefile.am (libflimage_la_LDFLAGS): * gl/Makefile.am (libformsGL_la_LDFLAGS): change the -version-info data to '@SO_VERSION@' so that all get updated automatically. 2004-05-13 Reed Riddle * lib/xyplot.c: * lib/include/xyplot.h (fl_replace_xyplot_point_in_overlay): new function, generalizing the existing fl_replace_xyplot_point which acts only on the first dataset. 2004-05-12 Jean-Marc Lasgouttes * gl/Makefile.am (INCLUDES): * demos/Makefile.am (INCLUDES): * fd2ps/Makefile.am (INCLUDES): * fdesign/Makefile.am (INCLUDES): add X_CFLAGS 2004-05-07 Angus Leeming * (xforms.spec.in): add code to the 'post' script to modify libforms.la et al. to prevent libtool from complaining that the files have been moved. 2004-05-07 Angus Leeming * lib/private/pvaluator.h (repeat_ms, timeout_id, mouse_pos): new variables. * lib/include/slider.[ch] (fl_[sg]et_slider_repeat): * lib/include/counter.[ch] (fl_[sg]et_counter_repeat): new accessor functions, enabling the user to query and modify the timeout used to control the behaviour of these widgets when the mouse is kept pressed down. * lib/include/slider.[ch] (handle_mouse): * lib/include/counter.[ch] (handle_mouse): use a timeout to control the rate at which the slider/counter is incremented. Replaces the current strategy which used a simple counter loop and which has become unusable with today's fast processors. 2004-05-06 Angus Leeming * configure.ac (SO_VERSION): new variable defining the libtool version info. Substituted in lib/Makefile.am and xforms.spec.in. * lib/Makefile.am (libforms_la_LDFLAGS): use the configure-time variable @SO_VERSION@ rather than the hard-coded 1:0:0. * xforms.spec.in: fix 'Release' and 'Source0' info. add 'post' and 'postun' scripts to create and remove symbolic links, respectively. 2004-05-06 Angus Leeming * fdesign/fd_spec.c: revert the change made earlier today. Turned out to be used in the demos code... 2004-05-06 Angus Leeming * xforms.spec.in: modify so that devfiles and binfiles are not placed in ${RPM_BUILD_ROOT}. Prevents rpm from bombing out with a "Checking for unpackaged files" error. 2004-05-05 Angus Leeming * lib/xtext.c (fl_drw_string): enable the drawing of characters in a font larger than the input widget. 2004-05-06 Angus Leeming * fdesign/fd_spec.c: initialization of the FL_CHOICE component of the objspec struct used 'emit_menu_header' and 'emit_menu_global', a cut-n-paste typo from the following FL_MENU component. They have both been reset to '0'. 2004-05-04 Angus Leeming * NT/libxforms.dsp, NT/xformsAll.dsw: removed these Visual C++ project files. They're way out of date and can be re-added if needed. 2004-05-05 Mike Heffner * lib/fselect.c (select_cb): clean-up and simplify this callback function by use of the existing fl_set_browser_dblclick_callback. 2004-05-04 Angus Leeming The original patch, posted to the xforms list on June 21, 2002, appears to have got lost. Archived here: http://bob.usuhs.mil/mailserv/list-archives/xforms-archive/0285.html Pass the associated (XEvent * xev) to fl_handle_object on an FL_DRAW event. This XEvent * is not used at all by any of xforms' "native" widgets, but an FL_FREE object is able to make use of this info to redraw only the part of the window that has changed. * forms.c (fl_handle_form): pass the XEvent on an FL_DRAW event. * objects.c (redraw_marked): pass the XEvent to fl_handle_object. (mark_for_redraw): new, static function containing all but the 'redraw_marked' call of the original fl_redraw_form. (fl_redraw_form): refactored code. Functionality unchanged. (fl_redraw_form_using_xevent): identical to fl_redraw_form, except that it passes the XEvent on to redraw_marked. 2004-05-02 Angus Leeming * lib/flresource.c (get_command_name): squash valgrind warning about a possible memory leak. 2004-04-30 Angus Leeming * lib/Makefile.am, fdesign/Makefile.am: silence automake warning about trailing backslash on last line of file. 2004-04-20 Jean-Marc Lasgouttes * lib/xpopup.c (fl_freepup): do not free unallocated entries (fl_setpup_maxpup): do not forget to reset parent and window in newly created menu_rec entries 2004-04-19 Jean-Marc Lasgouttes * demos/Makefile.am (glwin_LDADD, gl_LDADD): fix ordering of libraries (LDFLAGS): rename from AM_LDFLAGS (automake 1.5 did not like that) * config/xformsinclude.m4 (XFORMS_PROG_CC): fix description of --enable-debug 2004-04-05 Angus Leeming * Dummy commit to check all is well with my account. 2004-04-01 Jean-Marc Lasgouttes * lib/flresource.c (fl_get_resource): when a resource is a FL_STRING, avoid doing a strncpy of a string over itself (triggers a valgrind report) 2004-03-30 Jean-Marc Lasgouttes * README: mention the --enable-demos and --disable-gl flags, which got forgotten 2004-03-30 Hans J. Johnson * lib/pixmap.c (cleanup_xpma_struct): use a better check for libXpm version 2004-03-30 Jean-Marc Lasgouttes * XForms 1.0.90 released * NEWS: * README: update for 1.0.90 * configure.ac: set version to 1.0.90. Use XFORMS_CHECK_VERSION * config/xformsinclude.m4 (XFORMS_CHECK_VERSION): merge XFORMS_SET_VERSION and XFORMS_CHECK_VERSION. Set PACKAGE here and read version from PACKAGE_VERSION (set by AC_INIT). Remove detection of prereleases. Development versions are now versions with minor version number >= 50. * README: small update * configure.ac: add new define RETSIGTYPE_IS_VOID * lib/signal.c: fix handling of RETSIGTYPE 2003-12-02 Angus Leeming * demos/Makefile.am: enable 'make -j2' to work on a multi-processor machine. * demos/Makefile.am: handle the .fd -> .c conversion in automake-standard fashion. * lib/include/Makefile.am: pass sed the names of the files to be manipulated as '${srcdir}/`basename $$i`' rather than as '${srcdir}/$$i' or things go awol on the Dec. (Running ksh, fwiw.) 2003-11-28 Angus Leeming * Makefile.am: re-add xforms.spec to EXTRA_DIST. It is needed as well as xforms.spec.in or else 'make rpmdist' will fail. 2003-11-28 Angus Leeming * fdesign/fd_attribs.c: * image/image_jpeg.c: * image/image_xwd.c: * lib/flcolor.c: warning free compilation of the entire xforms source. 2003-11-28 Angus Leeming * demos/demotest.c: * demos/folder.c: * demos/free1.c: * demos/group.c: * demos/popup.c: * demos/wwwl.c: * demos/xyplotall.c: * demos/fd/scrollbar_gui.fd: squash all remaining warnings when compiling the demos directory '-W -Wall -Wno-unused-parameter'. 2003-11-28 Angus Leeming * Makefile.am: * configure.ac: compile fd2ps after fdesign. Will allow me to get rid of the files generated from the .fd files. 2003-11-27 Angus Leeming * demos/fd/Makefile.am: remove all the .[ch] files generated from their .fd parents. * demos/Makefile.am: generate the fd/*.[ch] files on-the-fly. * demos/buttonall.c: no longer #include fd/buttons_gui.c. * demos/butttypes.c: * demos/demotest.c: * demos/dirlist.c: * demos/folder.c: * demos/formbrowser.c: * demos/inputall.c: * demos/pmbrowse.c: * demos/scrollbar.c: * demos/thumbwheel.c: ditto for their own fd-generated files. * demos/pmbrowse.h: removed: cruft. * demos/fd/buttons_gui.[ch]: * demos/fd/butttypes_gui.[ch]: * demos/fd/fbtest_gui.[ch]: * demos/fd/folder_gui.[ch]: * demos/fd/formbrowser_gui.[ch]: * demos/fd/ibrowser_gui.[ch]: * demos/fd/inputall_gui.[ch]: * demos/fd/is_gui.[ch]: * demos/fd/is_gui_main.c: * demos/fd/pmbrowse_gui.[ch]: * demos/fd/scrollbar_gui.[ch]: * demos/fd/twheel_gui.[ch]: removed. 2003-11-27 Angus Leeming * fdesign/fd_printC.c (filename_only): use strrchr. * fdesign/fdesign.man: document the -dir option. 2003-11-27 Angus Leeming * NEWS: updated to reflect what has been going on in the 1.1 cycle. 2003-11-26 Angus Leeming * fdesign/fd_main.h: add a 'char * output_dir' var to the FD_Opt struct. * fdesign/fd_main.c: add code to initialize FD_Opt::output_dir. * fdesign/fd_forms.c (save_forms): pass fdopt.output_dir var to the external converter if non-zero. * fdesign/fd_printC.c (filename_only, build_fname): new helper functions that use FD_Opt::output_dir if it is set. (C_output): invoke build_fname rather than building the file name itself. 2003-11-27 Angus Leeming * demos/demotest_fd.[ch]: * demos/demotest_fd.fd: removed. The routines were not invoked by demotest (witness that it still links fine). * demos/pmbrowse.c: split out the fdesign generated code. Ensuing changes to use the fdesign generated code unchanged. * demos/pmbrowse.fd: moved... * demos/fd/pmbrowse_gui.[ch]: * demos/fd/pmbrowse_gui.fd: to here. * demos/Makefile.am: * demos/fd/Makefile.am: ensuing changes. 2003-11-27 Angus Leeming * image/image_gif.c (flush_buffer): do not pass 'incode'. Instead use a local variable. 2003-11-26 Jean-Marc Lasgouttes * fdesign/fd_forms.c (save_forms): do not try to remove twice ".fd" from file name (avoids problem with path names containing a '.'). 2003-11-25 Clive A Stubbings * image/image_gif.c (flush_buffer): new static function, containing code factored out of process_lzw_code. (process_lzw_code): invoke flush_buffer where old code was in process_lzw_code itself. In addition, also invoke flush_buffer when cleaning up after an old-style gif image. * image/image_jpeg.c (JPEG_identify): handle 'raw' JPEG images without the JFIF header. 2003-11-26 Angus Leeming * demos/boxtype.c: squash warning about uninitialized data. 2003-11-24 Angus Leeming * fdesign/sp_menu.c (emit_menu_header): output properly initialized C-code. 2003-11-20 Angus Leeming * demos/Makefile.am: enable the conditional building of the demo GL codes. * demos/gl.c: * demos/glwin.c: #include gl/glcanvas.h and so prevent warnings about implicit function declarations. 2003-11-20 Jean-Marc Lasgouttes * lib/local.h: do not define HAVE_KP_DEFINE * lib/flinternal.h: test directly for X11 version here * lib/forms.c (fl_keyboard): * lib/flcolor.c (fl_mapcolor, fl_dump_state_info): * lib/xpopup.c (fl_addtopup): * lib/clock.c (draw_clock): use proper ML_xxx macros instead of bogus names 2003-11-20 Angus Leeming * lib/events.c: * lib/fldraw.c: * lib/forms.c: * lib/xpopup.c: * lib/xsupport.c: * image/image_fits.c: * image/image_gif.c: * image/image_jpeg.c: * image/image_replace.c: * image/image_tiff.c: * image/ps_core.c: * image/ps_draw.c: * image/image_fits.c: * image/image_gif.c: * image/image_jpeg.c: * image/image_replace.c: * image/image_tiff.c: * image/image_xwd.c: * image/ps_core.c: * image/ps_draw.c: * fdesign/fd_main.c: squash warnings about comparison of signed and unsigned variables. Only 'safe' warnings have been squashed. 2003-11-20 Angus Leeming * lib/flsnprintf.c: remove unused variable 'credits'. * lib/flresource.c: remove line 'fl_context->xim;' as it is a statement with no effect. * lib/version.c: remove unused variable 'c'. 2003-11-20 Angus Leeming * lib/flinternal.h: add declaration of fl_handle_form. Squash warnings about implicit declaration of the function when compiling lib/tabfolder.c. * gl/glcanvas.h: remove #ifdef HAVE_GL_GLX_H guard. Cruft from pre-autoconf days. Squash warnings about implicit declaration of the function when compiling gl/glcanvas.c 2003-11-20 Angus Leeming * fd2ps/papers.c: * fd2ps/pscol.c: * fd2ps/psdraw.c: * fdesign/fd_control.c: * fdesign/fd_main.c: * fdesign/fd_printC.c: * fdesign/fd_spec.c: * fdesign/sp_dial.c: * image/image_marker.c: * image/image_tiff.c: * image/ps_core.c: * lib/cursor.c: * lib/flcolor.c: squash warnings about 'var may be uninitialized' when compiling with gcc -W -Wall by explicitly initializing all parts of the arrays in the above files. 2003-11-19 Angus Leeming * autogen.sh: enable the use of autoconf 2.58. 2003-11-19 Angus Leeming * lib/OS2 and all files therein: removed. * lib/Makefile.am: remove mention of OS2. * lib/Readme: removed. * os2move.cmd: removed. * gl/canvas.h: removed. * gl/Makefile.am: remove canvas.h. 2003-11-19 Jean-Marc Lasgouttes * lib/flinternal.h: remove obsolete comment * config/xformsinclude.m4 (XFORMS_PATH_XPM): honor X_CFLAGS to find xpm.h (should fix problem reported by Reed Riddle) * README: update. In particular, the acknowledgement of copyright has been removed since the code is not here anymore (and the advertising clause is not needed anymore). Try to point to the new nongnu.org site. * Makefile.am (dist-hook): remove old leftover from LyX (EXTRA_DIST): do not distribute xforms.spec, which is generated at configure time * lib/signal.c (default_signal_handler): fix typo 2003-11-14 Jean-Marc Lasgouttes * config/config.guess: * config/config.sub: * config/libtool.m4: * config/ltmain.sh: updated from libtool 1.4.3 (as distributed with rh9) * config/depcomp: updated from automake 1.4 (as distributed with rh9) 2003-11-18 Angus Leeming * xforms.spec.in: update the %doc list to reflect actuality. 2003-11-18 Jean-Marc Lasgouttes * INSTALL: generic instructions from autoconf. 2003-10-03 Angus Leeming Patch from Matthew Yaconis by way of David Dembrow . * lib/fselect.c: remove the arbitrary restriction on the display of borderless forms. * lib/tabfolder.c: display the tab forms correctly when using bottom tab folders. 2003-11-13 Jean-Marc Lasgouttes * config/common.am: do not set LIBS to an empty value * image/Makefile.am (INCLUDES): * lib/Makefile.am (INCLUDES): honor X_CFLAGS * demos/Makefile.am: * fdesign/Makefile.am: * fd2ps/Makefile.am: use $(foo) form instead of @foo@ for variables references. Honor X_LIBS, X_PRE_LIBS and X_EXTRA_LIBS. 2003-09-10 Jean-Marc Lasgouttes * Makefile.am: only build the gl/ directory if required * configure.ac: simplify handling of --enable-demos. Add support for --disable-gl option; gl support is only compiled in if GL/glx.h is found 2003-09-09 Jean-Marc Lasgouttes * config/xformsinclude.m4 (XFORMS_CHECK_LIB_JPEG): no need to link against the X11 libs... * configure.ac: remove lots of checks for headers and functions. We only keep the ones that were already tested for in the old source (although we do not know whether they are still useful). * lib/asyn_io.c: use HAVE_SYS_SELECT_H 2003-09-09 Jean-Marc Lasgouttes * Makefile.am: only build demos/ directory if required * configure.ac: add --enable-demos option 2003-09-09 Angus Leeming * lib/forms.c (fl_keyboard): pass it the event to allow it to distinguish between KeyPress and KeyRelease events. (dispatch_key): new function, factored out of do_keyboard. (do_keyboard): Handles KeyRelease events correctly. The KeyPress keysym is stored and then dispatched on KeyRelease also, since XmbLookupString is undefined on a KeyRelease event. 2003-09-05 Jean-Marc Lasgouttes * lib/version.c (fl_print_version): remove workaround for XENIX * lib/local.h: remove NO_SOCK (who wants to support old SCO anyway?) 2003-07-31 Jean-Marc Lasgouttes * lib/local.h (FL_SIGRET): * lib/signal.c (default_signal_handler): use RETSIGTYPE instead of FL_SIG_RET * lib/errmsg.c (fl_get_syserror_msg): use HAVE_STRERROR * lib/sysdep.c (fl_msleep): use HAVE_USLEEP * lib/local.h: remove variables DONT_HAVE_USLEEP, DONT_HAVE_STRERROR, NO_CONST (handled by AC_C_CONST), FL_SIGRET_IS_VOID, FL_SIGRET * configure.ac: check for usleep too 2003-05-23 Angus Leeming * image/rgb_db.c: follow Rouben Rostamian's advice and remove all the helper functions that were used to ascertain the name of the RGB color before he rewrote fl_lookup_RGBcolor. * flimage.h: add a comment to the declaration of fl_init_RGBdatabase that is does nothing and is retained for compatibility only. 2003-05-23 Angus Leeming * lib/include/Basic.h: remove declarations of functions fl_init_RGBdatabase and fl_lookup_RGBcolor as they are part of libflimage, not libforms. 2003-05-30 Angus Leeming * Changes: renamed as NEWS. * COPYING: renamed as COPYING.LIB. * 00README: renamed as README. 2003-05-22 Jean-Marc Lasgouttes * lib/include/Makefile.am: make sure that forms.h is not distributed 2003-05-21 Jean-Marc Lasgouttes * configure.ac: do not set VERSION explicitely, this is done in XFORMS_SET_VERSION. * config/xformsinclude.m4 (XFORMS_SET_VERSION): simplify a tiny bit 2003-05-22 Rouben Rostamian * image/rgb_db.c (fl_lookup_RGBcolor): this function fell off the dist at 1.0pre3. Now it is back again with a shiny new, more efficient implementation. 2003-05-05 Jean-Marc Lasgouttes * lib/include/Makefile.am (forms.h): create forms.h using the target stamp-forms, so that it remains untouched when AAA.h is regenerated but did not change. * lib/include/AAA.h.in: new file. This is the template from which AAA.h is generated * lib/include/.cvsignore: add AAA.h * configure.ac: call XFORMS_SET_VERSION; generate AAA.h from AAA.h.in * config/xformsinclude.m4 (XFORMS_SET_VERSION): new macro, which sets the VERSION string for xforms (XFORMS_CHECK_VERSION): simplify a bit 2003-04-24 Jean-Marc Lasgouttes * image/image_fits.c (Bad_bpp): use abs() and not fabs(), since bpp is an int 2003-04-24 Angus Leeming Migrate from imake to autoconf/automake. * Imakefile: * Imakefile.os2: * demos/Imakefile: * demos/Imakefile.os2: * fd2ps/Imakefile: * fd2ps/Imakefile.os2: * fdesign/Imakefile: * fdesign/Imakefile.os2: * fdesign/Imakefile.xxx: * gl/Imakefile: * image/Imakefile: * lib/Imakefile: * lib/Imakefile.os2: * lib/OS2/Imakefile.os2: * lib/include/Imakefile: removed. * autogen.sh: * configure.ac: * config/.cvsignore: * config/common.am: * config/config.guess: * config/config.sub: * config/cygwin.m4: * config/depcomp: * config/libtool.m4: * config/ltmain.sh: * config/xformsinclude.m4: Here be magic ;-) * Makefile.am: * config/Makefile.am: * demos/Makefile.am: * demos/fd/Makefile.am: * fd2ps/Makefile.am: * fd2ps/test/Makefile.am: * fdesign/Makefile.am: * fdesign/fd/Makefile.am: * fdesign/fd4test/Makefile.am: * fdesign/notes/Makefile.am: * fdesign/spec/Makefile.am: * fdesign/xpm/Makefile.am: * gl/Makefile.am: * image/Makefile.am: * lib/Makefile.am: * lib/OS2/Makefile.am: * lib/bitmaps/Makefile.am: * lib/fd/Makefile.am: * lib/include/Makefile.am: * lib/private/Makefile.am: added. * xforms.spec.in: the RPM spec file. * lib/local.h: make use of the HAVE_STRCASECMP preprocessor variable. * lib/pixmap.c: use XPM_H_LOCATION instead of pre-processor stuff. * demos/demotest.c: define the callback. * fd2ps/sys.c: use preprocessor variable HAVE_STRCASECMP rather than NO_STRCASECMP. * fd2ps/sys.h: now redundant, so remove it. * fd2ps/fd2ps.h: * fd2ps/sys.c: remove #include "sys.h" * gl/canvas.h: * gl/glcanvas.h: make use of HAVE_GL_GLX_H preprocessor variable. 2003-04-24 Angus Leeming * lib/tabfolder.c (handle): ensure that we have an active folder before trying to manipulate its contents. 2003-04-24 Angus Leeming * lib/include/Imakefile: do not copy the generated forms.h to ../. * lib/Imakefile: remove the targets to install forms.h. * pretty well all .c files: change #include "forms.h" to #include "include/forms.h". 2003-04-22 Angus Leeming * fd2ps/sys.h: remove #define NO_STRDUP and FL_SIGRET as they aren't used. 2003-04-22 Angus Leeming * */*.c: ensure that config.h is #included if the HAVE_CONFIG_H preprocessor variable is set. 2003-04-22 Angus Leeming * lib/include/zzz.h: remove the #include "flinternal.h" line whose inclusion depends on the MAKING_FORMS preprocessor variable. * lib/forms.h: * lib/include/forms.h: regenerated. 2003-04-20 Angus Leeming * demos/wwwl.c: #include "private/flsnprintf.h". 2003-04-20 Angus Leeming * lib/private/flsnprintf.h: use #defines to prevent needless fl_snprintf bloat. * lib/flsnprintf.c: prepend portable_v?snprintf with "fl_" to prevent name clashes with other software. Make these functions globally accessible. Importantly, #if 0...#endif a block that prevents the code from linking correctly on the DEC. 2003-04-20 Angus Leeming * image/image.c: * lib/errmsg.c: no need to check for fl_vsnprintf anymore. 2003-04-20 Angus Leeming * demos/Imakefile: * fd2ps/Imakefile: * fdesign/Imakefile: * gl/Imakefile: * image/Imakefile: * lib/Imakefile: pass the expected -DHAVE_SNPRINTF options to the compiler. 2003-04-17 Angus Leeming Make fl_snprintf private. * lib/include/flsnprintf.h: moved to lib/private/flsnprintf.h. * lib/include/Imakefile: remove flsnprintf.h. * lib/forms.h: * lib/include/forms.h: regenerated. * fdesign/fd_attribs.c: * image/image.c: * image/image_io_filter.c: * image/image_postscript.c: * lib/choice.c: * lib/cmd_br.c: * lib/events.c: * lib/flresource.c: * lib/fselect.c: * lib/goodie_alert.c: * lib/goodie_choice.c: * lib/goodie_msg.c: * lib/goodie_salert.c: * lib/version.c: * lib/xpopup.c: add #include "private/flsnprintf.h". 2003-04-17 Jean-Marc Lasgouttes * lib/Imakefile (EXTRA_INCLUDES): add $(XPMINC) 2003-04-17 Angus Leeming * demos/Imakefile: * fd2ps/Imakefile: * fdesign/Imakefile: * gl/Imakefile: * image/Imakefile: * lib/Imakefile: don't pass -Iprivate to the complier. * fdesign/fd_super.c: * fdesign/sp_browser.c: * fdesign/sp_choice.c: * fdesign/sp_counter.c: * fdesign/sp_dial.c: * fdesign/sp_menu.c: * fdesign/sp_positioner.c: * fdesign/sp_xyplot.c: * image/image_postscript.c: * image/postscript.c: * image/ps_core.c: * image/ps_draw.c: * image/ps_text.c: * lib/browser.c: * lib/canvas.c: * lib/choice.c: * lib/counter.c: * lib/dial.c: * lib/flinternal.h: * lib/formbrowser.c: * lib/menu.c: * lib/objects.c: * lib/positioner.c: * lib/scrollbar.c: * lib/sldraw.c: * lib/slider.c: * lib/textbox.c: * lib/thumbwheel.c: * lib/valuator.c: * lib/xyplot.c: associated changes to the #include directives. 2003-04-17 Angus Leeming * lib/xforms.5: renamed as xforms.man. This probably breaks the installation, but that is all slated for change anyway. 2003-04-17 Angus Leeming * demos/Imakefile: do not -Ifd when compiling. * demos/Imakefile: * demos/buttonall.c: * demos/demotest.c: * demos/dirlist.c: * demos/folder.c: * demos/formbrowser.c: * demos/ibrowser.c: * demos/inputall.c: * demos/itest.c: * demos/scrollbar.c: * demos/thumbwheel.c: associated changes. * demos/.cvsignore: add all the generated executables. 2003-04-17 Angus Leeming * lib/include/canvas.h: cruft removal. Don't mention glcanvas.h here in case the user does not want GL support. * lib/include/forms.h * lib/forms.h: regenerated. * gl/glcanvas.c: include glcanvas.h as this is no longer in forms.h 2003-04-16 Angus Leeming Remove the SNP directory and replace it with a single file, flsnprintf.c. Invoke snprintf through a wrapper fl_snprintf. * Imakefile: remove SUBDIR snp. * lib/flsnprintf.c, lib/include/flsnprintf.h: new files. * lib/include/Imakefile: add flsnprintf.h to the files used to generated forms.h. * lib/forms.h * lib/include/forms.h: regenerated. * lib/Imakefile: add flsnprintf.c. Pass -DHAVE_SNPRINTF as a compiler option. * lib/local.h: remove HAVE_SNPRINTF stuff. * demos/Imakefile: * fd2ps/Imakefile: * fdesign/Imakefile: * gl/Imakefile: * image/Imakefile: pass -DHAVE_SNPRINTF as a compiler option. Remove other SNP stuff. * demos/wwwl.c: * fdesign/fd_attribs.c: * image/image.c: * image/image_io_filter.c: * image/image_postscript.c: * lib/choice.c: * lib/cmd_br.c: * lib/errmsg.c: * lib/events.c: * lib/flresource.c: * lib/fselect.c: * lib/goodie_alert.c: * lib/goodie_choice.c: * lib/goodie_msg.c: * lib/goodie_salert.c: * lib/version.c: * lib/xpopup.c: s/\(v*snprintf\)/fl_\1/ * snp/*: all files removed. 2003-04-15 Angus Leeming * lots of files: reduce the amount of magic includes of header files and therefore include flinternal.h explicitly much more. 2003-04-15 Angus Leeming * .cvsignore: * demos/.cvsignore: * fd2ps/.cvsignore: * fdesign/.cvsignore: * gl/.cvsignore: * image/.cvsignore: * libs/.cvsignore: * libs/include/.cvsignore: prepare the way for autoconf/automake. 2003-04-10 Angus Leeming * lib/include/Basic.h: add FL_RESIZED to the FL_EVENTS enum. * lib/include/AAA.h: up FL_FIXLEVEL to 2 to reflect this. * lib/forms.h: * lib/include/forms.h: regenerated. * lib/forms.c (scale_form): pass event FL_RESIZED to the object handler if the object size is changed. * lib/tabfolder.c (handle): handle the FL_RESIZED event to ensure that the currently active folder is resized. 2003-04-10 Angus Leeming * lib/version.c (fl_print_version, fl_library_version): use FL_VERSION, FL_REVISION rather than RCS stuff. 2003-04-10 Angus Leeming * most files: Remove all the RCS strings from the header files and about half of 'em from the .c files. 2003-04-10 John Levon * lib/pixmap.c (init_xpm_attributes): "fix" XPixmaps containing colour "opaque". 2003-04-09 Angus Leeming * demos/.cvsignore: * snp/.cvsignore: Ignore Makefile* 2003-04-09 Angus Leeming Move tabfolder-specific code out of forms.c and allow individual FL_OBJECTs to respond to such events. Means that the library becomes extensible to new, user-defined widgets once again. * lib/include/Basic.h: add FL_MOVEORIGIN to the FL_EVENTS enum. * lib/forms.h: * lib/include/forms.h: regenerated automatically. * lib/forms.c (fl_handle_form): no longer a static function. Dispatch FL_MOVEORIGIN events to the form's constituent objects. (fl_get_tabfolder_origin): removed. Functionality moved into tabfolder.c. (do_interaction_step): no longer call fl_get_tabfolder_origin. Instead, dispatch a call to fl_handle_form(form, FL_MOVEORIGIN, ...). * lib/tabfolder.c (handle): add FL_MOVEORIGIN to the event switch. Update the x,y absolute coords of the active_folder and dispatch a call to fl_handle_form(active_folder, FL_MOVEORIGIN, ...) to ensure that the x,y absolute coords of nested tabfolders are also updated. 2003-04-09 Jean-Marc Lasgouttes * image/Imakefile (EXTRA_INCLUDES): change the order of includes, to avoid that an older installed forms.h is used instead of the fresh one 2003-04-09 Angus Leeming * lib/objects.c (hide_tooltip): renamed as checked_hide_tooltip. (unconditional_hide_tooltip): new static helper function, invoked within fl_handle_it on FL_KEYPRESS and FL_PUSH events. * lib/include/AAA.h: up-ed FL_FIXLEVEL to 1 to reflect the changes made above. * lib/forms.h: regenerated to reflect changed FL_FIXLEVEL. * version.c (version): update to reflect this also. 2003-04-08 Angus Leeming Enable tooltips to be shown correctly in "composite" widgets such as the browser. * lib/objects.c (get_parent): new static helper function. Given an FL_OBJECT*, returns its parent FL_OBJECT. (tooltip_handler): rewritten to show the tooltip that is stored by the parent FL_OBJECT. (hide_tooltip): new static helper function: on leaving an FL_OBJECT, only hide the tooltip if we have also left the bounds of the parent FL_OBJECT. (fl_handle_it): make use of these new functions to show and hide tooltips. 2003-04-08 Angus Leeming * image/image_rotate.c (flimage_rotate): enable the rotation of grayscale images by 90 degree multiples and more generally prevent other unsupported image types from crashing xforms. * lib/flresource.c (fl_initialize): clean-up properly if we fail to create input contexts or methods. * lib/textbox.c (handle_textbox): * lib/thumbwheel.c (handle): * lib/util.c (flevent): FL_KEYBOARD has been replaced by FL_KEYPRESS. The former is retained for compatability, but the latter should be used internally. xforms-1.0.93sp1/configure.ac0000644000175000017500000001367411376514624014540 0ustar jensjensdnl Process with autoconf to generate configure script -*- sh -*- AC_PREREQ(2.61) AC_INIT([xforms],[1.0.93sp1],[xforms-development@nongnu.org]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(lib/forms.c) XFORMS_CHECK_VERSION AC_CANONICAL_TARGET AC_CONFIG_HEADERS([lib/config.h]) AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION) AM_MAINTAINER_MODE ### This defines the version number of the installed .so files ### using libtool's versioning system. AC_SUBST(SO_VERSION, ["2:0:0"]) # fix the value of the prefixes. test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ### Set the execute permissions of the various scripts correctly for file in config/install-sh config/mkinstalldirs ; do chmod 755 ${srcdir}/${file} done AC_ARG_ENABLE(bwc_bs_hack, [AS_HELP_STRING([--enable-bwc-bs-hack],[Enable backward compatiblity hack for browser, scrollbar and tabfolder objects])]) AM_CONDITIONAL(USE_BWC_BS_HACK, test x$enable_bwc_bs_hack = xyes) AC_ARG_ENABLE(demos, [AS_HELP_STRING([--enable-demos],[Build demo programs])]) AM_CONDITIONAL(BUILD_DEMOS, test x$enable_demos = xyes) AC_ARG_ENABLE(docs, [AS_HELP_STRING([--enable-docs],[Build documentation])]) AM_CONDITIONAL(BUILD_DOCS, test x$enable_docs = xyes) ### Check for programs XFORMS_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB ### check for special systems AC_ISC_POSIX AC_AIX ### Check for some Cygwin-specific details. CHECK_WITH_CYGWIN # Work around a problem in automake 1.4: when invoking install-strip, # INSTALL_PROGRAM is changed to 'install -s', and since # INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0 # which returns an error condition when stripping fails. INSTALL_SCRIPT='${INSTALL}' ### Setup libtool AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL ### Add extra directories to check for libraries. XFORMS_WITH_DIR([extra-lib],[extra library directory],extra_lib, NONE) XFORMS_LOOP_DIR($xforms_cv_extra_lib,XFORMS_ADD_LIB_DIR(xforms_ldflags,$dir)) test ! x"$xforms_ldflags" = x && LDFLAGS="$xforms_ldflags $LDFLAGS" ### Add extra directories to check for include files. XFORMS_WITH_DIR([extra-inc],[extra include directory],extra_inc, NONE) XFORMS_LOOP_DIR($xforms_cv_extra_inc,XFORMS_ADD_INC_DIR(xforms_cppflags,$dir)) test ! x"$xforms_cppflags" = x && CPPFLAGS="$xforms_cppflags $CPPFLAGS" ### Add both includes and libraries XFORMS_WITH_DIR([extra-prefix],[extra lib+include directory],extra_prefix, NONE, ${prefix}) XFORMS_LOOP_DIR($xforms_cv_extra_prefix,[ XFORMS_ADD_INC_DIR(CPPFLAGS,$dir/include) XFORMS_ADD_LIB_DIR(LDFLAGS,$dir/lib)]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl used AC_TYPE_PID_T AC_TYPE_SIZE_T # Checks for libraries. dnl by testing these we check if it is ok to have dnl -lc and -lm as args to the compiler AC_CHECK_LIB(m, sin) AC_CHECK_LIB(c, fopen) # Checks for header files. AC_CHECK_HEADERS([sys/select.h]) # Check whether we want to build the gl code AC_ARG_ENABLE(gl, [AS_HELP_STRING([--disable-gl],[Do not build GL support library])]) if test x$enable_gl != xno ; then AC_CHECK_HEADER([GL/glx.h],, [enable_gl=no]) fi AM_CONDITIONAL(BUILD_GL, [test x$enable_gl != xno]) dnl we have some code in lib/listdir.c that could use that... dnl AC_HEADER_DIRENT # Check for X, XPM and JPEG AC_PATH_XTRA XFORMS_PATH_XPM XFORMS_CHECK_LIB_JPEG # Checks for library functions. AC_TYPE_SIGNAL if test $ac_cv_type_signal = "void" ; then AC_DEFINE(RETSIGTYPE_IS_VOID, 1, [Define if the return type of signal handlers is void]) fi AC_CHECK_FUNCS([snprintf strcasecmp strerror usleep nanosleep vsnprintf sigaction]) XFORMS_CHECK_DECL(snprintf, stdio.h) XFORMS_CHECK_DECL(vsnprintf, stdio.h) XFORMS_CHECK_DECL(sigaction, signal.h) ### Some information on what just happened VERSION_INFO="Configuration\n\ Host type: ${host}\n\ Special build flags: ${xforms_flags}\n\ C Compiler: ${CC}\n\ C Compiler flags: ${CFLAGS}\n\ Linker flags: ${LDFLAGS}\n" ### Not used for now. ### AC_SUBST(VERSION_INFO) AC_SUBST(X_LIBS) AC_SUBST(X_PRE_LIBS) ## Some config.h stuff AH_TOP([ /* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* \file config.h * * This is the compilation configuration file for xforms. * It was generated by autoconfs configure. * You might want to change some of the defaults if something goes wrong * during the compilation. */ #ifndef CONFIG_H #define CONFIG_H ]) AH_BOTTOM([ #endif /* NOT CONFIG_H */ ]) ### Finish the work. AC_CONFIG_FILES([Makefile \ xforms.spec \ lib/include/AAA.h \ config/Makefile \ lib/Makefile \ lib/bitmaps/Makefile \ lib/fd/Makefile \ lib/include/Makefile \ lib/private/Makefile \ image/Makefile gl/Makefile \ fdesign/Makefile \ fdesign/fd/Makefile \ fdesign/fd4test/Makefile \ fdesign/notes/Makefile \ fdesign/spec/Makefile \ fdesign/xpm/Makefile \ fd2ps/Makefile \ fd2ps/test/Makefile \ demos/Makefile \ demos/fd/Makefile \ doc/Makefile ]) AC_OUTPUT # show version information echo printf "$VERSION_INFO" echo # Display a final warning if there has been a XFORMS_ERROR XFORMS_CHECK_ERRORS xforms-1.0.93sp1/lib/0000755000175000017500000000000011377311602012775 5ustar jensjensxforms-1.0.93sp1/lib/sldraw.c0000644000175000017500000002343111375703472014450 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sldraw.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pslider.h" #define IS_FLATORDOWN( t ) ( IS_FLATBOX( t ) || t == FL_DOWN_BOX ) #define IS_FLATORUPBOX( t ) ( IS_FLATBOX( t ) || t == FL_UP_BOX ) /*************************************** ***************************************/ static double flinear( double val, double smin, double smax, double gmin, double gmax ) { return smin == smax ? gmax : ( gmin + ( gmax - gmin ) * ( val - smin ) / ( smax - smin ) ); } /*************************************** ***************************************/ void fli_calc_slider_size( FL_OBJECT * ob, FLI_SCROLLBAR_KNOB * knob ) { FLI_SLIDER_SPEC *sp = ob->spec; double val = sp->min == sp->max ? 0.5 : ( sp->val - sp->min ) / ( sp->max - sp->min ); double size = sp->slsize; FL_COORD bw = ob->bw; int absbw = FL_abs( bw ); int fudge1 = IS_FLATORUPBOX( ob->boxtype ) ? 0 : ( bw == -2 || bw >= 2 ); int fudge2 = IS_FLATORUPBOX( ob->boxtype ) ? 0 : ( 2 * ( bw == -2 ) + ( bw >= 2 ) ); if ( ob->type == FL_VERT_FILL_SLIDER ) { int inv = sp->min > sp->max; knob->h = ( inv ? 1 - val : val ) * ( sp->h - 2 * absbw ); knob->y = inv ? sp->h - absbw - knob->h : absbw; knob->w = sp->w - 2 * absbw; knob->x = absbw; return; } else if ( ob->type == FL_HOR_FILL_SLIDER ) { knob->w = val * ( sp->w - 2 * absbw ); knob->x = absbw; knob->h = sp->h - 2 * absbw; knob->y = absbw; return; } if ( IS_VSLIDER( ob ) ) { knob->h = size * ( sp->h - 2 * absbw ); if ( IS_SCROLLBAR( ob ) && knob->h < MINKNOB_SB ) knob->h = MINKNOB_SB; else if ( ! IS_SCROLLBAR( ob ) && knob->h < 2 * absbw + MINKNOB_SL ) knob->h = 2 * absbw + MINKNOB_SL; if ( ob->type == FL_VERT_BROWSER_SLIDER2 ) { knob->h = size * sp->h; knob->y = flinear( val, 0.0, 1.0, 0, sp->h - knob->h ); knob->x = 1 + IS_FLATORDOWN( ob->boxtype ); knob->w = sp->w - 2 - 2 * IS_FLATORDOWN( ob->boxtype ); } else if ( ob->type == FL_VERT_THIN_SLIDER || ob->type == FL_VERT_BASIC_SLIDER ) { knob->h = size * sp->h; knob->y = flinear( val, 0.0, 1.0, 0, sp->h - knob->h ); knob->w = sp->w + fudge2; knob->x = - fudge1; } else { knob->y = flinear( val, 0.0, 1.0, absbw, sp->h - absbw - knob->h ); knob->w = sp->w - 2 * absbw; knob->x = absbw; } return; } else { knob->w = size * ( sp->w - 2 * absbw ); if ( IS_SCROLLBAR( ob ) && knob->w < MINKNOB_SB ) knob->w = MINKNOB_SB; else if ( ! IS_SCROLLBAR( ob ) && knob->w < 2 * absbw + MINKNOB_SL ) knob->w = 2 * absbw + MINKNOB_SL; if ( ob->type == FL_HOR_BROWSER_SLIDER2 ) { knob->w = size * sp->w; knob->x = flinear( val, 0.0, 1.0, 0, sp->w - knob->w ); knob->h = sp->h - 2 * ( 1 + IS_FLATORDOWN( ob->boxtype ) ); knob->y = 1 + IS_FLATORDOWN( ob->boxtype ); } else if ( ob->type == FL_HOR_THIN_SLIDER || ob->type == FL_HOR_BASIC_SLIDER ) { knob->w = size * sp->w; knob->x = flinear( val, 0.0, 1.0, 0, sp->w - knob->w ); knob->h = sp->h + fudge2; knob->y = - fudge1; } else { knob->x = flinear( val, 0.0, 1.0, absbw, sp->w - absbw - knob->w ); knob->h = sp->h - 2 * absbw; knob->y = absbw; } return; } M_err( "fli_calc_slider_size", "Bad slider type:%d", ob->type ); } /*************************************** ***************************************/ void fli_drw_slider( FL_OBJECT * ob, FL_COLOR col1, FL_COLOR col2, const char * str, int d ) { FLI_SLIDER_SPEC *sp = ob->spec; FL_COORD x = ob->x + sp->x, y = ob->y + sp->y, w = sp->w, h = sp->h; int sltype = ob->type; int bw = ob->bw; FL_Coord xsl, ysl, hsl, wsl; FL_Coord absbw = FL_abs( bw ), bw2, absbw2; int slbox; FLI_SCROLLBAR_KNOB knob; fli_calc_slider_size( ob, &knob ); xsl = ob->x + sp->x + knob.x; ysl = ob->y + sp->y + knob.y; wsl = knob.w; hsl = knob.h; /* Draw the slider */ if ( d & FLI_SLIDER_BOX ) { int btype = ob->boxtype; int actual_bw = bw; if ( sltype == FL_VERT_BROWSER_SLIDER2 || sltype == FL_HOR_BROWSER_SLIDER2 ) { btype = FL_UP_BOX; actual_bw = bw > 0 ? 1 : -1; } else if ( sltype == FL_VERT_THIN_SLIDER || sltype == FL_VERT_BASIC_SLIDER ) { btype = FL_FLAT_BOX; actual_bw = bw > 0 ? 1 : -1; } else if ( sltype == FL_HOR_THIN_SLIDER || sltype == FL_HOR_BASIC_SLIDER ) { btype = FL_FLAT_BOX; actual_bw = 1; } else btype = btype == FL_SHADOW_BOX ? FL_BORDER_BOX : btype; fl_drw_box( btype, x, y, w, h, col1, actual_bw ); } if ( sltype == FL_VERT_NICE_SLIDER || sltype == FL_VERT_NICE_SLIDER2 ) { fl_drw_box( FL_FLAT_BOX, x + w / 2 - 2, y + absbw, 4, h - 2 * absbw, FL_BLACK, 0 ); fl_drw_box( FL_UP_BOX, xsl, ysl, wsl, hsl, col1, IS_FLATBOX( ob->boxtype ) ? -1 : bw ); fl_drw_box( FL_DOWN_BOX, xsl + 2, ysl + hsl / 2 - 2, wsl - 4, 5, col2, 1 ); } else if ( sltype == FL_HOR_NICE_SLIDER || sltype == FL_HOR_NICE_SLIDER2 ) { int yoff = hsl > 15 ? 3 : 2; fl_drw_box( FL_FLAT_BOX, x + absbw, y + h / 2 - 2, w - 2 * absbw, 4, FL_BLACK, 0 ); fl_drw_box( FL_UP_BOX, xsl, ysl, wsl, hsl, col1, IS_FLATBOX( ob->boxtype ) ? -1 : bw ); fl_drw_box( FL_DOWN_BOX, xsl + wsl / 2 - 2, ysl + yoff, 5, hsl - 2 * yoff, col2, 1 /* absbw - 2 */ ); } else { switch ( ob->boxtype ) { case FL_UP_BOX: slbox = FL_UP_BOX; break; case FL_DOWN_BOX: slbox = FL_UP_BOX; break; case FL_FRAME_BOX: case FL_EMBOSSED_BOX: slbox = ob->boxtype; break; case FL_ROUNDED_BOX: slbox = FL_ROUNDED_BOX; break; case FL_RFLAT_BOX: slbox = FL_ROUNDED_BOX; break; case FL_RSHADOW_BOX: slbox = FL_ROUNDED_BOX; break; default: slbox = FL_BORDER_BOX; break; } /* This is the height of the sliding bar */ absbw2 = absbw >= 2 ? absbw - 1 : absbw - ( bw < 0 ); if ( absbw2 == 0 ) absbw2 = 1; bw2 = bw > 0 ? absbw2 : - absbw2; if ( sltype == FL_VERT_THIN_SLIDER || sltype == FL_HOR_THIN_SLIDER || sltype == FL_VERT_BASIC_SLIDER || sltype == FL_HOR_BASIC_SLIDER ) { absbw2 = absbw - ( absbw > 2 ) - ( bw == 2 ); if ( absbw2 == 0 ) absbw2 = 1; bw2 = bw > 0 ? absbw2 : - absbw2; } if ( sltype == FL_HOR_THIN_SLIDER ) sltype = FL_HOR_BROWSER_SLIDER2; if ( sltype == FL_VERT_THIN_SLIDER ) sltype = FL_VERT_BROWSER_SLIDER2; if ( d & FLI_SLIDER_KNOB ) { fl_drw_box( slbox, xsl, ysl, wsl, hsl, col2, bw2 ); if ( sltype == FL_VERT_BROWSER_SLIDER || sltype == FL_VERT_BROWSER_SLIDER2 ) { /* if soft edge, we can squeeze one more pixel */ int extra = bw2 < 0; fl_drw_text( FL_ALIGN_CENTER, xsl - extra, ysl, wsl + 2 * extra, hsl, 0, FL_NORMAL_STYLE, FL_TINY_SIZE, "@RippleLines" ); } else if ( sltype == FL_HOR_BROWSER_SLIDER || sltype == FL_HOR_BROWSER_SLIDER2 ) fl_drw_text( FL_ALIGN_CENTER, xsl - 1, ysl, wsl, hsl, 0, 10, 1, "@2RippleLines" ); } } if ( ! str || ! *str ) return; /* Draw the label */ fl_drw_text( FL_ALIGN_CENTER, xsl, ysl, wsl, hsl, 0, FL_NORMAL_STYLE, FL_TINY_SIZE, str ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/slider.c0000644000175000017500000007074411375704501014441 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file slider.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pslider.h" #include #include #define IS_NORMAL( o ) ( ( o )->type == FL_HOR_SLIDER \ || ( o )->type == FL_VERT_SLIDER ) #define IS_NICE( o ) ( ( o )->type == FL_VERT_NICE_SLIDER \ || ( o )->type == FL_VERT_NICE_SLIDER2 \ || ( o )->type == FL_HOR_NICE_SLIDER \ || ( o )->type == FL_HOR_NICE_SLIDER2 ) enum { COMPLETE = 0, FOCUS = 1, SLIDER_MOTION = 2, SLIDER_JUMP = 4 }; #define VAL_BOXW FL_max( 35, 0.18 * ob->w ) /* reporting boxsize */ #define VAL_BOXH 25 /* vertical RBW */ /*************************************** ***************************************/ static void compute_bounds( FL_OBJECT * ob ) { FLI_SLIDER_SPEC *sp = ob->spec; sp->x = 0; sp->y = 0; sp->w = ob->w; sp->h = ob->h; if ( ob->objclass == FL_VALSLIDER ) { if ( IS_VSLIDER( ob ) ) { sp->y += VAL_BOXH; sp->h -= VAL_BOXH; } else if ( IS_HSLIDER( ob ) ) { sp->x += VAL_BOXW; sp->w -= VAL_BOXW; } } } /*************************************** ***************************************/ static void draw_motion( FL_OBJECT * ob ) { FLI_SLIDER_SPEC *sp = ob->spec; XRectangle xrec[ 2 ]; int abbw = FL_abs( ob->bw ); FL_COLOR col; if ( ob->type != FL_VERT_BROWSER_SLIDER2 && ob->type != FL_HOR_BROWSER_SLIDER2 && ob->type != FL_VERT_THIN_SLIDER && ob->type != FL_HOR_THIN_SLIDER ) { FLI_SCROLLBAR_KNOB knob; fli_calc_slider_size( ob, &knob ); if ( IS_HSLIDER( ob ) ) { xrec[ 0 ].x = ob->x + sp->x; xrec[ 0 ].y = ob->y + sp->y; xrec[ 0 ].width = knob.x + 1; xrec[ 0 ].height = sp->h; xrec[ 1 ].x = xrec[ 0 ].x + knob.x + knob.w - 1; xrec[ 1 ].y = xrec[ 0 ].y; xrec[ 1 ].width = sp->w - knob.x - knob.w + 1; xrec[ 1 ].height = sp->h; } else { xrec[ 0 ].x = ob->x + sp->x; xrec[ 0 ].y = ob->y + sp->y; xrec[ 0 ].width = sp->w; xrec[ 0 ].height = knob.y + 1; xrec[ 1 ].x = xrec[ 0 ].x; xrec[ 1 ].y = xrec[ 0 ].y +knob.y + knob.h - 1; xrec[ 1 ].width = sp->w; xrec[ 1 ].height = sp->h - knob.y - knob.h + 1; } fl_set_clippings( xrec, 2 ); fl_drw_box( FL_FLAT_BOX, ob->x + sp->x + abbw, ob->y + sp->y + abbw, sp->w - 2 * abbw, sp->h - 2 * abbw, ob->col1, 0 ); } else if ( ob->type == FL_HOR_THIN_SLIDER || ob->type == FL_VERT_THIN_SLIDER || ob->type == FL_HOR_BASIC_SLIDER || ob->type == FL_VERT_BASIC_SLIDER ) fl_drw_box( FL_FLAT_BOX, ob->x + sp->x, ob->y + sp->y, sp->w, sp->h, ob->col1, 1 ); else if ( ob->type == FL_HOR_BROWSER_SLIDER2 || ob->type == FL_VERT_BROWSER_SLIDER2 ) fl_drw_box( ob->boxtype, ob->x + sp->x, ob->y + sp->y, sp->w, sp->h, ob->col1, ob->bw > 0 ? 1 : -1 ); else fl_drw_box( FL_UP_BOX, ob->x + sp->x, ob->y + sp->y, sp->w, sp->h, ob->col1, ob->bw > 0 ? 1 : -1 ); fl_unset_clipping( ); col = ( IS_SCROLLBAR( ob ) && sp->mouse == FLI_SLIDER_KNOB ) ? FL_MCOL : ob->col2; fli_drw_slider( ob, ob->col1, col, NULL, FLI_SLIDER_KNOB ); } /*************************************** * Draws a slider ***************************************/ static void draw_slider( FL_OBJECT * ob ) { FLI_SLIDER_SPEC *sp = ob->spec; char valstr[ 64 ]; double val; FL_Coord bx = ob->x, /* value box */ by = ob->y, bw = ob->w, bh = ob->h; /* Draw the value box */ if ( ob->objclass == FL_VALSLIDER ) { if ( IS_VSLIDER( ob ) ) bh = VAL_BOXH; else bw = VAL_BOXW; if ( sp->filter ) strcpy( valstr, sp->filter( ob, sp->val, sp->prec ) ); else sprintf( valstr, "%.*f", sp->prec, sp->val ); fl_drw_box( ob->boxtype, bx, by, bw, bh, ob->col1, ob->bw ); fl_drw_text_beside( FL_ALIGN_CENTER, bx, by, bw, bh, ob->lcol, ob->lstyle, ob->lsize, valstr ); } if ( ( sp->draw_type == SLIDER_MOTION || sp->draw_type == SLIDER_JUMP ) && ( IS_SCROLLBAR( ob ) || IS_NORMAL( ob ) || IS_NICE( ob ) ) ) { draw_motion( ob ); return; } /* Draw the slider */ val = sp->min == sp->max ? 0.5 : ( sp->val - sp->min ) / ( sp->max - sp->min ); if ( ob->align == FL_ALIGN_CENTER ) { fli_drw_slider( ob, ob->col1, ob->col2, IS_FILL( ob ) ? "" : ob->label, FLI_SLIDER_ALL & ~sp->mouse ); /* added 10/21/00 TCZ: need this to get the inside label right otherwise fli_drw_slider() draw lable centered on the filled part!*/ if ( IS_FILL( ob ) ) fl_draw_object_label( ob ); } else { fli_drw_slider( ob, ob->col1, ob->col2, "", FLI_SLIDER_ALL & ~sp->mouse ); fl_draw_object_label_outside( ob ); } if ( sp->mouse != FLI_SLIDER_NONE ) fli_drw_slider( ob, ob->col1, sp->mouse ? FL_MCOL : ob->col2, "", sp->mouse ); } /*************************************** * Checks if mouse is not on the knob of the slider ***************************************/ static int is_off_knob( FL_OBJECT * obj, FL_Coord mx, FL_Coord my ) { FLI_SCROLLBAR_KNOB knob; FLI_SLIDER_SPEC *sp = obj->spec; fli_calc_slider_size( obj, &knob ); if ( IS_VSLIDER( obj ) ) { if ( IS_FILL( obj ) ) sp->mw = 0; else sp->mh = knob.h; if ( my < knob.y ) return -1; if ( my >= knob.y + knob.h ) return 1; sp->offy = knob.y + knob.h / 2 - my; if ( IS_FILL( obj ) ) sp->offy = 0; } else { if ( IS_FILL( obj ) ) sp->mw = 0; else sp->mw = knob.w; if ( mx < knob.x ) return -1; if ( mx >= knob.x + knob.w ) return 1; sp->offx = knob.x + knob.w / 2 - mx; if ( IS_FILL( obj ) ) sp->offx = 0; } return 0; } /*************************************** * Get the slider value for the current mouse position ***************************************/ static double get_newvalue( FL_OBJECT * ob, FL_Coord mx, FL_Coord my ) { FLI_SLIDER_SPEC *sp = ob->spec; double newval = 0.0; int absbw = FL_abs( ob->bw ); if ( IS_HSLIDER( ob ) ) { double dmx = mx + sp->offx; if ( dmx < 0.5 * sp->mw + absbw ) newval = sp->min; else if ( dmx > sp->w - 0.5 * sp->mw - absbw ) newval = sp->max; else newval = sp->min + ( sp->max - sp->min ) * ( dmx - 0.5 * sp->mw - absbw ) / ( sp->w - sp->mw - 2 * absbw ); } else { double dmy = my + sp->offy; if ( dmy < 0.5 * sp->mh + absbw ) newval = sp->min; else if ( dmy > sp->h - 0.5 * sp->mh - absbw ) newval = sp->max; else newval = sp->min + ( sp->max - sp->min ) * ( dmy - 0.5 * sp->mh - absbw ) / ( sp->h - sp->mh - 2 * absbw ); } return newval; } /*************************************** ***************************************/ static void scrollbar_timeout( int val FL_UNUSED_ARG, void * data ) { ( ( FLI_SLIDER_SPEC * ) data )->timeout_id = -1; } /*************************************** ***************************************/ static void handle_enter( FL_OBJECT * obj, FL_Coord mx, FL_Coord my ) { FLI_SLIDER_SPEC *sp = obj->spec; /* When a scrollbar is entered we want to keep track of the mouse movements in order to be able to highlight the knob when the mouse is on top of it ('sp->mouse' keeps track of that). */ if ( IS_SCROLLBAR( obj ) ) { obj->want_motion = 1; sp->mouse_off_knob = is_off_knob( obj, mx, my ); if ( ! sp->mouse_off_knob ) { sp->mouse = FLI_SLIDER_KNOB; fl_redraw_object( obj ); } } } /*************************************** ***************************************/ static void handle_leave( FL_OBJECT * obj ) { FLI_SLIDER_SPEC *sp = obj->spec; /* When the mouse leaves a scrollbar we no longer need reports about mouse movements and may have to un-highlight the knob */ if ( IS_SCROLLBAR( obj ) ) { obj->want_motion = 0; if ( sp->mouse == FLI_SLIDER_KNOB ) { sp->mouse = FLI_SLIDER_NONE; fl_redraw_object( obj ); } } } /*************************************** * Handle a mouse position change ***************************************/ static int handle_mouse( FL_OBJECT * obj, FL_Coord mx, FL_Coord my, int key ) { FLI_SLIDER_SPEC *sp = obj->spec; double newval; if ( sp->mouse_off_knob ) { if ( sp->timeout_id == -1 ) { if ( key == FL_MBUTTON1 ) newval = sp->val + sp->mouse_off_knob * sp->ldelta; else if ( key == FL_MBUTTON2 ) newval = sp->val + sp->mouse_off_knob * sp->rdelta; else return FL_RETURN_NONE; } else return FL_RETURN_NONE; } else if ( key == FL_MBUTTON1 ) newval = get_newvalue( obj, mx, my ); else return FL_RETURN_NONE; newval = fli_valuator_round_and_clamp( obj, newval ); if ( sp->val == newval ) return FL_RETURN_NONE; /* When we're still doing jumps in a scrollbar restart the timer */ if ( sp->mouse_off_knob ) sp->timeout_id = fl_add_timeout( sp->repeat_ms, scrollbar_timeout, sp ); sp->val = newval; sp->draw_type = sp->mouse_off_knob ? SLIDER_JUMP : SLIDER_MOTION; fl_redraw_object( obj ); sp->val = newval; return FL_RETURN_CHANGED; } /*************************************** ***************************************/ static int handle_motion( FL_OBJECT * obj, FL_Coord mx, FL_Coord my, int key, void * ev ) { FLI_SLIDER_SPEC *sp = obj->spec; int ret; /* If this is a motion while in "jump mode" for a scrollbar do nothing */ if ( IS_SCROLLBAR( obj ) && sp->mouse_off_knob && key ) return FL_RETURN_NONE; /* If we get here without the left mouse button being pressed we're monitoring the mouse movements to change hightlighting of the knob of a scrollbar */ if ( key != FL_MBUTTON1 ) { int old_state = sp->mouse_off_knob; sp->mouse_off_knob = is_off_knob( obj, mx, my ); if ( old_state != sp->mouse_off_knob ) { sp->mouse = sp->mouse_off_knob ? FLI_SLIDER_NONE : FLI_SLIDER_KNOB; fl_redraw_object( obj ); } return FL_RETURN_NONE; } /* For non-scrollbar objects we're going to update the sliders position - if a shift key is pressed we here fake a smaller mouse movement */ if ( ! IS_SCROLLBAR( obj ) ) { if ( shiftkey_down( ( ( XEvent * ) ev )->xmotion.state ) ) { if ( ! sp->was_shift ) { sp->old_mx = mx; sp->old_my = my; sp->was_shift = 1; } if ( IS_HSLIDER( obj ) ) mx = sp->old_mx + ( mx - sp->old_mx ) * FL_SLIDER_FINE; else my = sp->old_my + ( my - sp->old_my ) * FL_SLIDER_FINE; } else sp->was_shift = 0; } if ( ( ret = handle_mouse( obj, mx, my, key ) ) && ! ( obj->how_return & FL_RETURN_END_CHANGED ) ) sp->start_val = sp->val; return ret; } /*************************************** ***************************************/ static int handle_push( FL_OBJECT * obj, FL_Coord mx, FL_Coord my, int key, void * ev ) { FLI_SLIDER_SPEC *sp = obj->spec; int ret; if ( key != FL_MBUTTON1 && key != FL_MBUTTON2 ) return FL_RETURN_NONE; sp->start_val = sp->val; sp->timeout_id = -1; sp->offx = sp->offy = 0; /* For value sliders we do not want the slider to jump to one of the extreme positions just because the user clicked on the number field - they may just be trying if it's possible to edit the number... */ if ( obj->objclass == FL_VALSLIDER && ( ( IS_HSLIDER( obj ) && mx < 0 ) || ( IS_VSLIDER( obj ) && my < 0 ) ) ) return FL_RETURN_NONE; /* Check were the mouse button was clicked */ sp->mouse_off_knob = is_off_knob( obj, mx, my ); /* If the object is a scrollbar and the mouse is on its knob nothing happens yet and we're just going to wait for mouse movements. If it's not on the knob we need articfical timer events to make the knob jump. For non-scrollbars we're going to jump the slider so the mouse will be on top of the "knob" and will stay there (and we will get updates about mouse movements via FL_MOTION events). */ if ( IS_SCROLLBAR( obj ) ) { if ( ! sp->mouse_off_knob ) return FL_RETURN_NONE; obj->want_update = 1; fl_add_timeout( sp->repeat_ms, scrollbar_timeout, sp ); } else sp->mouse_off_knob = 0; /* If we got here the slider position got to be changed, for scrollbars by a jump, for normal sliders by moving the slider to the current mouse postion. We then need to record the position for faked slowing down of the mouse */ ret = handle_mouse( obj, mx, my, key ); /* If a shift key is pressed record the current mouse position */ if ( shiftkey_down( ( ( XEvent * ) ev )->xbutton.state ) ) { sp->old_mx = mx; sp->old_my = my; sp->was_shift = 1; } else sp->was_shift = 0; if ( ret && ! ( obj->how_return & FL_RETURN_END_CHANGED ) ) sp->start_val = sp->val; return ret; } /*************************************** ***************************************/ static int handle_update( FL_OBJECT * obj, FL_Coord mx, FL_Coord my, int key ) { FLI_SLIDER_SPEC *sp = obj->spec; int ret; if ( ( ret = handle_mouse( obj, mx, my, key ) ) && ! ( obj->how_return & FL_RETURN_END_CHANGED ) ) sp->start_val = sp->val; return ret; } /*************************************** ***************************************/ static int handle_scroll( FL_OBJECT * obj, int key, int key_state ) { FLI_SLIDER_SPEC *sp = obj->spec; double newval; if ( key == FL_MBUTTON4 ) newval = sp->val - ( shiftkey_down( key_state ) ? sp->rdelta : sp->ldelta / 2 ); else if ( key == FL_MBUTTON5 ) newval = sp->val + ( shiftkey_down( key_state ) ? sp->rdelta : sp->ldelta / 2 ); else return FL_RETURN_NONE; newval = fli_valuator_round_and_clamp( obj, newval ); if ( sp->val == newval ) return FL_RETURN_NONE; sp->val = newval; sp->draw_type = SLIDER_JUMP; fl_redraw_object( obj ); return FL_RETURN_CHANGED | FL_RETURN_END; } /*************************************** ***************************************/ static int handle_release( FL_OBJECT * obj, FL_Coord mx, FL_Coord my, int key, void * ev ) { FLI_SLIDER_SPEC *sp = obj->spec; int ret = FL_RETURN_NONE; int old_state = sp->mouse_off_knob; if ( sp->timeout_id != -1 ) { fl_remove_timeout( sp->timeout_id ); sp->timeout_id = -1; } obj->want_update = 0; /* Scrollwheel only is used with scrollbars */ if ( ! IS_SCROLLBAR( obj ) && ( key == FL_MBUTTON4 || key == FL_MBUTTON5 ) ) return FL_RETURN_NONE; /* Take care, 'ev' might be NULL - on hiding the buttons form a fake FL_RELEASE event gets send */ if ( ev && ( ret = handle_scroll( obj, key, ( ( XEvent * ) ev )->xbutton.state ) ) ) return ret; if ( ( sp->mouse_off_knob = is_off_knob( obj, mx, my ) ) != old_state ) { sp->mouse = sp->mouse_off_knob ? FLI_SLIDER_NONE : FLI_SLIDER_KNOB; fl_redraw_object( obj ); } ret = FL_RETURN_END; if ( sp->start_val != sp->val ) ret |= FL_RETURN_CHANGED; return ret; } /*************************************** * Handles an event for a slider ***************************************/ static int handle_slider( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key, void * ev ) { FLI_SLIDER_SPEC *sp = ob->spec; int ret = FL_RETURN_NONE; mx -= ob->x + sp->x; my -= ob->y + sp->y; switch ( event ) { case FL_ATTRIB : case FL_RESIZED : compute_bounds( ob ); break; case FL_DRAW : ob->align &= ~ FL_ALIGN_INSIDE; sp->draw_type = COMPLETE; draw_slider( ob ); break; case FL_DRAWLABEL : fl_draw_object_label_outside( ob ); break; case FL_FREEMEM : fl_safe_free( ob->spec ); break; case FL_ENTER : handle_enter( ob, mx, my ); break; case FL_LEAVE : handle_leave( ob ); break; case FL_MOTION : ret |= handle_motion( ob, mx, my, key, ev ); break; case FL_PUSH : ret |= handle_push( ob, mx, my, key, ev ); break; case FL_UPDATE : ret |= handle_update( ob, mx, my, key ); break; case FL_RELEASE : ret |= handle_release( ob, mx, my, key, ev ); break; } return ret; } /*************************************** * Creates a slider object ***************************************/ static FL_OBJECT * create_slider( int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_SLIDER_SPEC *sp; ob = fl_make_object( objclass, type, x, y, w, h, label, handle_slider ); ob->boxtype = FL_SLIDER_BOXTYPE; ob->col1 = FL_SLIDER_COL1; ob->col2 = FL_SLIDER_COL2; ob->align = FL_SLIDER_ALIGN; ob->lcol = FL_SLIDER_LCOL; ob->lsize = FL_TINY_SIZE; ob->spec = sp = fl_calloc( 1, sizeof *sp ); sp->min = 0.0; sp->max = 1.0; sp->val = sp->start_val = 0.5; sp->filter = NULL; sp->slsize = FL_SLIDER_WIDTH; sp->prec = 2; sp->repeat_ms = 100; sp->timeout_id = -1; sp->mouse_off_knob = 0; sp->was_shift = 0; sp->old_mx = sp->old_my = 0; if ( IS_SCROLLBAR( ob ) ) sp->slsize *= 1.5; sp->ldelta = 0.1; sp->rdelta = 0.05; fl_set_object_dblbuffer( ob, 1 ); return ob; } /*************************************** * Adds a slider object ***************************************/ static FL_OBJECT * add_slider( int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = create_slider( objclass, type, x, y, w, h, label ); /* Set the default return policy for the object */ fl_set_object_return( obj, FL_RETURN_CHANGED ); fl_add_object( fl_current_form, obj ); compute_bounds( obj ); return obj; } /*************************************** ***************************************/ FL_OBJECT * fl_create_slider( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { return create_slider( FL_SLIDER, type, x, y, w, h, label ); } /*************************************** ***************************************/ FL_OBJECT * fl_add_slider( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { return add_slider( FL_SLIDER, type, x, y, w, h, label ); } /*************************************** ***************************************/ FL_OBJECT * fl_create_valslider( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { return create_slider( FL_VALSLIDER, type, x, y, w, h, label ); } /*************************************** ***************************************/ FL_OBJECT * fl_add_valslider( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { return add_slider( FL_VALSLIDER, type, x, y, w, h, label ); } /*************************************** ***************************************/ void fl_set_slider_value( FL_OBJECT * ob, double val ) { FLI_SLIDER_SPEC *sp; double smin, smax; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_SLIDER ) && ! IsValidClass( ob, FL_VALSLIDER ) ) { M_err( "fl_set_slider_value", "%s is not a slider", ob ? ob->label : "" ); return; } #endif sp = ob->spec; smin = FL_min( sp->min, sp->max ); smax = FL_max( sp->min, sp->max ); val = FL_clamp( val, smin, smax ); if ( sp->val != val ) { sp->val = sp->start_val = val; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_slider_bounds( FL_OBJECT * ob, double min, double max ) { FLI_SLIDER_SPEC *sp; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_SLIDER ) && ! IsValidClass( ob, FL_VALSLIDER ) ) { M_err( "fl_set_slider_bounds", "%s is not a slider", ob ? ob->label : "" ); return; } #endif sp = ob->spec; if ( sp->min == min && sp->max == max ) return; sp->min = min; sp->max = max; if ( sp->val < sp->min && sp->val < sp->max ) sp->val = FL_min( sp->min, sp->max ); if ( sp->val > sp->min && sp->val > sp->max ) sp->val = FL_max( sp->min, sp->max ); fl_redraw_object( ob ); } /*************************************** * Returns value of the slider ***************************************/ double fl_get_slider_value( FL_OBJECT * ob ) { #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_SLIDER ) && ! IsValidClass( ob, FL_VALSLIDER ) ) { M_err( "fl_get_slider_value", "%s is not a slider", ob ? ob->label : "" ); return 0; } #endif return ( ( FLI_SLIDER_SPEC * ) ob->spec )->val; } /*************************************** * Returns the slider bounds ***************************************/ void fl_get_slider_bounds( FL_OBJECT * ob, double * min, double * max ) { *min = ( ( FLI_SLIDER_SPEC * ) ob->spec )->min; *max = ( ( FLI_SLIDER_SPEC * ) ob->spec )->max; } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function should be regarded as deprecated and * fl_set_object_return() should be used instead. ***************************************/ void fl_set_slider_return( FL_OBJECT * obj, unsigned int when ) { if ( when & FL_RETURN_END_CHANGED ) when &= ~ ( FL_RETURN_NONE | FL_RETURN_CHANGED ); fl_set_object_return( obj, when ); } /*************************************** * Sets the step size to which values are rounded ***************************************/ void fl_set_slider_step( FL_OBJECT * ob, double value ) { ( ( FLI_SLIDER_SPEC * ) ob->spec )->step = value; } /*************************************** * Set slider increments for clicks with left and middle mouse button ***************************************/ void fl_set_slider_increment( FL_OBJECT * ob, double l, double r ) { ( ( FLI_SLIDER_SPEC * ) ob->spec )->ldelta = l; ( ( FLI_SLIDER_SPEC * ) ob->spec )->rdelta = r; } /*************************************** ***************************************/ void fl_get_slider_increment( FL_OBJECT * ob, double * l, double * r ) { *l = ( ( FLI_SLIDER_SPEC * ) ob->spec )->ldelta; *r = ( ( FLI_SLIDER_SPEC * ) ob->spec )->rdelta; } /*************************************** * Sets the portion of the slider box covered by the slider ***************************************/ void fl_set_slider_size( FL_OBJECT * ob, double size ) { FLI_SLIDER_SPEC *sp = ob->spec; double dim; int min_knob = IS_SCROLLBAR( ob ) ? MINKNOB_SB : MINKNOB_SL; double old; if ( size <= 0.0 ) size = 0.0; else if (size >= 1.0) size = 1.0; old = size; /* Impose minimum knob size */ dim = IS_VSLIDER( ob ) ? ob->h : ob->w; dim -= 2 * FL_abs( ob->bw ); if ( dim * size < min_knob && dim > 0.0 ) size = min_knob / dim; if ( size != sp->slsize ) { sp->slsize = size; fl_redraw_object( ob ); } } /*************************************** * Only for value sliders. ***************************************/ void fl_set_slider_precision( FL_OBJECT * ob, int prec ) { FLI_SLIDER_SPEC *sp = ob->spec; if ( prec > 10 ) prec = 10; if ( sp->prec != prec ) { sp->prec = prec; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_slider_filter( FL_OBJECT * ob, FL_VAL_FILTER filter ) { ( ( FLI_SLIDER_SPEC * ) ob->spec )->filter = filter; } /*************************************** ***************************************/ int fl_get_slider_repeat( FL_OBJECT * ob ) { return ( ( FLI_SLIDER_SPEC * ) ob->spec )->repeat_ms; } /*************************************** ***************************************/ void fl_set_slider_repeat( FL_OBJECT * ob, int millisec ) { if ( millisec > 0 ) ( ( FLI_SLIDER_SPEC * ) ob->spec )->repeat_ms = millisec; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/vstrcat.c0000644000175000017500000000364311247055071014636 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file vstrcat.c * * Copyright(c) 1993,1994 by T.C. Zhao * All rights reserved. * * Similar to strcat, but takes variable number of argument */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "include/forms.h" #include "flinternal.h" #include "ulib.h" /*************************************** ***************************************/ char * fli_vstrcat( const char * fmt, ... ) { size_t total = 0; char *ret, *p; va_list ap; if ( ! fmt || ! *fmt ) return NULL; total = strlen( fmt ); /* Record total length */ va_start( ap, fmt ); while ( ( p = va_arg( ap, char * ) ) ) total += strlen( p ); va_end( ap ); if ( ! ( ret = fl_malloc( total + 1 ) )) return NULL; strcpy( ret, fmt ); va_start( ap, fmt ); while ( ( p = va_arg( ap, char * ) ) ) strcat( ret, p ); va_end( ap ); return ret; } /*************************************** ***************************************/ void fli_free_vstrcat( void * p ) { fl_safe_free( p ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/tabfolder.c0000644000175000017500000007056711376221212015116 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file tabfolder.c * * This file is part of the XForms library package. * Copyright (c) 1997-2002 By T.C. Zhao * All rights reserved. * * tabbed folder */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #define TBDEBUG 0 typedef struct { FL_OBJECT * canvas; FL_OBJECT * parent; /* the tabfolder object */ FL_FORM ** forms; /* the folders */ FL_OBJECT ** title; /* the associted tab */ int nforms; /* number of folders */ int active_folder; /* current active folder */ int last_active; /* the previous active folder */ int x, y; int max_h; int h_pad, v_pad; int processing_destroy; int auto_fit; int offset; int num_visible; } FLI_TABFOLDER_SPEC; static void compute_position( FL_OBJECT * ); static void switch_folder( FL_OBJECT *, long ); static void program_switch( FL_OBJECT *, int ); static void get_tabsize( FL_OBJECT *, const char *, int *, int *, int ); static void shift_tabs( FL_OBJECT *, int left ); #define IsFolderClass( ob ) ( ( ob ) && ( ob )->objclass == FL_TABFOLDER ) /*************************************** ***************************************/ static int handle_tabfolder( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev ) { FL_FORM *folder; FLI_TABFOLDER_SPEC *sp = ob->spec; switch ( event ) { case FL_RESIZED: if ( ( folder = fl_get_active_folder( ob ) ) && sp->auto_fit != FL_NO ) { if ( sp->auto_fit == FL_FIT ) fl_set_form_size( folder, sp->canvas->w, sp->canvas->h ); else if ( folder->w < sp->canvas->w || folder->h < sp->canvas->h ) fl_set_form_size( folder, sp->canvas->w, sp->canvas->h ); } break; case FL_MOVEORIGIN: if ( ( folder = fl_get_active_folder( ob ) ) ) { fl_get_winorigin( folder->window, &folder->x, &folder->y ); /* Don't forget nested folders */ fli_handle_form( folder, FL_MOVEORIGIN, 0, ev ); } break; case FL_ATTRIB: case FL_DRAW: fl_set_object_boxtype( sp->canvas, fli_boxtype2frametype( ob->boxtype ) ); sp->processing_destroy = 0; compute_position( ob ); break; case FL_FREEMEM: fl_safe_free( sp->forms ); fl_safe_free( sp->title ); fl_free( sp ); break; } return 0; } /*************************************** * Canvas expose handler. ***************************************/ static int canvas_handler( FL_OBJECT * ob, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { FLI_TABFOLDER_SPEC *sp = ob->u_vdata; /* sp->nforms can be zero */ if ( sp->nforms == 0 || sp->active_folder >= sp->nforms ) return 0; if ( sp->active_folder >= 0 ) /* regular exposure, not first time */ program_switch( sp->title[ sp->active_folder ], sp->active_folder ); else if ( sp->last_active >= 0 && sp->last_active < sp->nforms ) program_switch( sp->title[ sp->last_active ], sp->last_active ); return 0; } /*************************************** * Before canvas is destroyed, this routine will be called. * we need to close the form that is attached to this canvas ***************************************/ static int canvas_cleanup( FL_OBJECT * ob ) { FLI_TABFOLDER_SPEC *sp = ob->u_vdata; if ( sp->active_folder >= 0 && sp->active_folder < sp->nforms ) { sp->processing_destroy = 1; if ( sp->forms[ sp->active_folder ]->visible == FL_VISIBLE ) fl_hide_form( sp->forms[ sp->active_folder ] ); sp->last_active = sp->active_folder; if ( sp->active_folder >= 0 ) fl_set_object_boxtype( sp->title[ sp->active_folder ], ob->parent->type != FL_BOTTOM_TABFOLDER ? FL_TOPTAB_UPBOX : FL_BOTTOMTAB_UPBOX ); sp->active_folder = -1; } return 0; } /*************************************** * For all the folders set a dummy form callback to prevent * the contained objects from leaking thru to fl_do_forms ***************************************/ static void form_cb( FL_OBJECT * ob FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { } /*************************************** ***************************************/ FL_OBJECT * fl_create_tabfolder( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_TABFOLDER_SPEC *sp; int absbw, oldu = fl_get_coordunit( );; ob = fl_make_object( FL_TABFOLDER, type, x, y, w, h, label, handle_tabfolder ); fl_set_coordunit( FL_COORD_PIXEL ); ob->boxtype = FL_UP_BOX; ob->spec = sp = fl_calloc( 1, sizeof *sp ); absbw = FL_abs( ob->bw ); sp->parent = ob; sp->forms = NULL; sp->title = NULL; sp->x = ob->x + absbw; sp->y = ob->y + absbw; sp->h_pad = 12; sp->v_pad = 5; sp->auto_fit = FL_NO; sp->canvas = fl_create_canvas( FL_SCROLLED_CANVAS, sp->x, sp->y, ob->w - 2 * absbw, ob->h - 2 * absbw, label ? label : "tab" ); sp->canvas->u_vdata = sp; fl_modify_canvas_prop( sp->canvas, 0, 0, canvas_cleanup ); fl_set_object_boxtype( sp->canvas, fli_boxtype2frametype( ob->boxtype ) ); fl_add_canvas_handler( sp->canvas, Expose, canvas_handler, 0 ); fl_set_object_color( sp->canvas, ob->col1, ob->col2 ); fl_set_object_bw( sp->canvas, ob->bw ); fl_set_object_gravity( sp->canvas, ob->nwgravity, ob->segravity ); fl_set_coordunit( oldu ); fl_add_child( ob, sp->canvas ); fl_set_object_return( ob, FL_RETURN_END_CHANGED ); return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_tabfolder( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { FL_OBJECT *obj = fl_create_tabfolder( type, x, y, w, h, l ); /* Set the default return policy for the object */ fl_add_object( fl_current_form, obj ); return obj; } /*************************************** ***************************************/ void fli_detach_form( FL_FORM * form ) { form->attached = 0; if ( form->parent && form->parent->child == form ) form->parent->child = 0; form->parent = NULL; } /*************************************** ***************************************/ int fl_get_tabfolder_numfolders( FL_OBJECT * ob ) { return ( ( FLI_TABFOLDER_SPEC * ) ob->spec )->nforms; } /*************************************** * Tab is switched by the application, no need to invoke the callback * or report bacl to the user ***************************************/ static void program_switch( FL_OBJECT * obj, int folder ) { FLI_TABFOLDER_SPEC *sp; if ( folder >= 0 ) { sp = obj->u_vdata; switch_folder( obj, folder ); obj->parent->returned = FL_RETURN_NONE; /* This handles set_folder while hidden */ if ( ! obj->visible || ! obj->form->visible == FL_VISIBLE ) sp->last_active = folder; } } /*************************************** ***************************************/ static void switch_folder( FL_OBJECT * ob, long data ) { FLI_TABFOLDER_SPEC *sp = ob->u_vdata; FL_FORM *form; Window win; FL_OBJECT *bkob; int active = data; if ( data < 0 || data >= sp->nforms ) { M_err( "switch_folder", "Invalid index"); return; } form = sp->forms[ data ]; if ( active == sp->active_folder && sp->active_folder >= 0 && ! sp->processing_destroy && ( ob->parent->how_return == FL_RETURN_ALWAYS || ob->parent->how_return == FL_RETURN_END ) ) { ob->parent->returned |= FL_RETURN_END; #if USE_BWC_BS_HACK if ( ! ob->parent->object_callback ) ob->parent->returned &= ~ FL_RETURN_END; #endif } if ( active == sp->active_folder || sp->processing_destroy ) { sp->processing_destroy = 0; return; } if ( ! ob->form->window || ! FL_ObjWin( sp->canvas ) ) return; if ( sp->auto_fit != FL_NO ) { if ( sp->auto_fit == FL_FIT ) fl_set_form_size( form, sp->canvas->w, sp->canvas->h ); else if ( form->w < sp->canvas->w || form->h < sp->canvas->h ) fl_set_form_size( form, sp->canvas->w, sp->canvas->h ); } /* We have more tabs than that can be shown */ if ( sp->num_visible < sp->nforms - 1 || sp->offset ) { if ( ( active && active == sp->offset ) || active > sp->num_visible ) { int last; shift_tabs( ob, active == sp->offset ? -1 : 1 ); sp->title[ active ]->boxtype &= ~ FLI_BROKEN_BOX; sp->title[ active ]->align = FL_ALIGN_CENTER; last = sp->num_visible + sp->offset + 1; last = FL_clamp( last, 0, sp->nforms - 1 ); sp->title[ last ]->boxtype |= FLI_BROKEN_BOX; sp->title[ last ]->align = FL_ALIGN_LEFT | FL_ALIGN_INSIDE; fl_redraw_form( ob->form ); } } win = fl_prepare_form_window( form, 0, 0, "Folder" ); /* win reparent eats the reparent event */ fl_winreparent( win, FL_ObjWin( sp->canvas ) ); form->parent_obj = ob; fl_show_form_window( form ); /* Need to redraw the last selected folder tab */ if ( sp->active_folder >= 0 && sp->forms[ sp->active_folder ]->visible == FL_VISIBLE ) { FL_OBJECT *actobj; actobj = sp->title[ sp->active_folder ]; actobj->col1 = sp->parent->col1; fl_set_object_boxtype( actobj, ob->parent->type != FL_BOTTOM_TABFOLDER ? FL_TOPTAB_UPBOX : FL_BOTTOMTAB_UPBOX ); fl_drw_frame( FL_UP_FRAME, sp->canvas->x, sp->canvas->y, sp->canvas->w, sp->canvas->h, sp->canvas->col1, sp->canvas->bw ); fl_hide_form( sp->forms[ sp->active_folder ] ); sp->forms[ sp->active_folder ]->parent_obj = NULL; sp->last_active = sp->active_folder; } form->parent = ob->form; ob->form->child = form; /* Find out the color of the new form */ if ( ( bkob = form->first ) && bkob->type == FL_NO_BOX ) bkob = bkob->next; if ( bkob ) fl_set_object_color( ob, bkob->col1, ob->col2 ); fl_set_object_boxtype( ob, ob->parent->type != FL_BOTTOM_TABFOLDER ? FL_SELECTED_TOPTAB_UPBOX : FL_SELECTED_BOTTOMTAB_UPBOX ); if ( sp->active_folder >= 0 ) { ob->parent->returned = FL_RETURN_END | FL_RETURN_CHANGED; #if USE_BWC_BS_HACK if ( ! ob->parent->object_callback ) ob->parent->returned &= ~ ( FL_RETURN_END | FL_RETURN_CHANGED ); #endif } sp->active_folder = active; } /*************************************** * Add a new folder to the bunch ***************************************/ FL_OBJECT * fl_addto_tabfolder( FL_OBJECT * ob, const char * title, FL_FORM * form ) { FLI_TABFOLDER_SPEC *sp = ob->spec; FL_OBJECT *tab; if ( ! IsFolderClass( ob ) ) { M_err( "fl_addto_tabfolder", "%s not a folder class", ob ? ob->label : "null" ); return 0; } if ( ! form || ! title ) { M_err( "fl_addto_tabfolder", "Invalid argument(s)" ); return 0; } if ( form->attached ) { M_err( "fl_addto_tabfolder", "Seems the form already attached" ); return 0; } if ( form->visible == FL_VISIBLE ) fl_hide_form( form ); sp->forms = fl_realloc( sp->forms, ( sp->nforms + 1 ) * sizeof *sp->forms ); sp->title = fl_realloc( sp->title, ( sp->nforms + 1 ) * sizeof *sp->title ); /* Plug the possible object leakage thru fl_do_forms */ if ( ! form->form_callback ) fl_set_form_callback( form, form_cb, NULL ); sp->forms[ sp->nforms ] = form; form->attached = 1; if ( form->pre_attach ) form->pre_attach( form ); tab = sp->title[ sp->nforms ] = fl_create_button( FL_NORMAL_BUTTON, 0, 0, 10, 10, title ); fl_set_object_boxtype( tab, ob->type != FL_BOTTOM_TABFOLDER ? FL_TOPTAB_UPBOX : FL_BOTTOMTAB_UPBOX ); tab->u_vdata = sp; fl_set_object_callback( tab, switch_folder, sp->nforms ); sp->nforms++; compute_position( ob ); fl_add_child( ob, tab ); tab->how_return = FL_RETURN_CHANGED; if ( sp->nforms == 1 ) { sp->last_active = 0; sp->active_folder = -1; program_switch( sp->title[ sp->last_active ], sp->last_active ); } /* If first time and the canvas is visible, refresh */ if ( sp->nforms == 1 && ob->visible ) fl_redraw_form( ob->form ); return tab; } /*************************************** ***************************************/ static void get_tabsize( FL_OBJECT * ob, const char * label, int * ww, int * hh, int fudge ) { int w, h, absbw = FL_abs( ob->bw ); FLI_TABFOLDER_SPEC *sp = ob->spec; fl_get_string_dimension( ob->lstyle, ob->lsize, label, strlen( label ), &w, &h ); w += sp->h_pad + 2 * absbw; h += sp->v_pad + 2 * absbw; *hh = h + fudge * absbw; *ww = w; return; } /*************************************** ***************************************/ void fl_delete_folder_byname( FL_OBJECT * ob, const char * name ) { FLI_TABFOLDER_SPEC *sp = ob->spec; int i, done; for ( done = i = 0; ! done && i < sp->nforms; i++ ) if ( ! strcmp( sp->title[ i ]->label, name ) ) done = i + 1; if ( done ) fl_delete_folder_bynumber( ob, done ); } /*************************************** ***************************************/ void fl_delete_folder_bynumber( FL_OBJECT * ob, int num ) { int i = num - 1, j; FLI_TABFOLDER_SPEC *sp = ob->spec; FL_OBJECT *deleted = NULL; FL_FORM *theform = NULL; if ( i >= 0 && i < sp->nforms ) { deleted = sp->title[ i ]; fli_detach_form( theform = sp->forms[ i ] ); for ( j = i + 1; j < sp->nforms; j++ ) { sp->title[ j - 1 ] = sp->title[ j ]; sp->title[ j - 1 ]->argument = j - 1; sp->forms[ j - 1 ] = sp->forms[ j ]; } sp->nforms--; sp->forms = fl_realloc( sp->forms, sp->nforms * sizeof *sp->forms ); sp->title = fl_realloc( sp->title, sp->nforms * sizeof *sp->title ); } if ( deleted ) { fli_set_object_visibility( deleted, FL_INVISIBLE ); if ( theform->form_callback == form_cb ) theform->form_callback = NULL; if ( theform->visible == FL_VISIBLE ) fl_hide_form( theform ); /* Change active folder if need to */ sp->last_active = -1; if ( i < sp->active_folder ) sp->active_folder--; else if ( i == sp->active_folder ) { sp->active_folder = -1; fl_set_folder_bynumber( ob, i ); } fl_free_object( deleted ); fl_redraw_form( ob->form ); } } /*************************************** ***************************************/ FL_FORM * fl_get_tabfolder_folder_bynumber( FL_OBJECT * ob, int num ) { FLI_TABFOLDER_SPEC *sp = ob->spec; int i = num - 1; return ( i >= 0 && i < sp->nforms ) ? sp->forms[ i ] : NULL; } /*************************************** ***************************************/ FL_FORM * fl_get_tabfolder_folder_byname( FL_OBJECT * ob, const char * name ) { int i; FLI_TABFOLDER_SPEC *sp = ob->spec; for ( i = 0; i < sp->nforms; i++ ) if ( strcmp( sp->title[ i ]->label, name ) == 0 ) return fl_get_tabfolder_folder_bynumber( ob, i + 1 ); return NULL; } /*************************************** ***************************************/ void fl_delete_folder( FL_OBJECT * ob, FL_FORM * form ) { int i, done; FLI_TABFOLDER_SPEC *sp = ob->spec; for ( done = i = 0; ! done && i < sp->nforms; i++ ) if ( form == sp->forms[ i ] ) done = i + 1; if ( done ) fl_delete_folder_bynumber( ob, done ); } /*************************************** ***************************************/ void fl_set_folder( FL_OBJECT * ob, FL_FORM * form ) { FLI_TABFOLDER_SPEC *sp; int i, done; if ( ! IsFolderClass( ob ) ) { M_err( "fl_set_folder", "%s is not tabfolder", ob ? ob->label : "null" ); return; } sp = ob->spec; for ( done = i = 0; ! done && i < sp->nforms; i++ ) if ( sp->forms[ i ] == form ) { program_switch( sp->title[ i ], i ); done = 1; } } /*************************************** ***************************************/ void fl_set_folder_byname( FL_OBJECT * ob, const char * name ) { FLI_TABFOLDER_SPEC *sp; int i, done; if ( ! IsFolderClass( ob ) ) { M_err( "fl_set_folder_byname", "%s is not tabfolder", ob ? ob->label : "null" ); return; } sp = ob->spec; for ( done = i = 0; ! done && i < sp->nforms; i++ ) if ( strcmp( sp->title[ i ]->label, name ) == 0 ) { program_switch( sp->title[ i ], i ); done = 1; } } /*************************************** ***************************************/ void fl_set_folder_bynumber( FL_OBJECT * ob, int num ) { FLI_TABFOLDER_SPEC *sp; int i = num - 1; if ( ! IsFolderClass( ob ) ) { M_err( "fl_set_folder_bynumber", "%s is not tabfolder", ob ? ob->label : "null" ); return; } sp = ob->spec; if ( i >= 0 && i < sp->nforms ) program_switch( sp->title[ i ], i ); } /*************************************** * Keep tab but replace the folder content ***************************************/ void fl_replace_folder_bynumber( FL_OBJECT * ob, int num, FL_FORM * form ) { FLI_TABFOLDER_SPEC *sp = ob->spec; int i = num - 1; if ( i >= 0 && i < sp->nforms && sp->forms[ i ] != form ) { sp->forms[ i ] = form; if ( i == sp->active_folder ) { sp->active_folder = -1; program_switch( sp->title[ i ], i ); } } } /*************************************** ***************************************/ int fl_get_folder_number( FL_OBJECT * ob ) { if ( ! IsFolderClass( ob ) ) { M_err( "fl_get_folder_number", "%s is not tabfolder", ob ? ob->label : "null" ); return 0; } return ( ( FLI_TABFOLDER_SPEC * ) ob->spec )->last_active + 1; } /*************************************** ***************************************/ int fl_get_active_folder_number( FL_OBJECT * ob ) { if ( ! IsFolderClass( ob ) ) { M_err( "fl_get_active_folder_number", "%s is not tabfolder", ob ? ob->label : "null" ); return 0; } return ( ( FLI_TABFOLDER_SPEC * ) ob->spec )->active_folder + 1; } /*************************************** ***************************************/ FL_FORM * fl_get_folder( FL_OBJECT * ob ) { FLI_TABFOLDER_SPEC *sp; if ( ! IsFolderClass( ob ) ) { M_err( "fl_get_folder", "%s is not tabfolder", ob ? ob->label : "null" ); return NULL; } sp = ob->spec; return sp->last_active >= 0 ? sp->forms[ sp->last_active ] : NULL; } /*************************************** ***************************************/ const char * fl_get_folder_name( FL_OBJECT * ob ) { FLI_TABFOLDER_SPEC *sp; if ( ! IsFolderClass( ob ) ) { M_err( "fl_get_folder_name", "%s is not tabfolder", ob ? ob->label : "null" ); return NULL; } sp = ob->spec; return sp->last_active >= 0 ? sp->title[ sp->last_active ]->label : NULL; } /*************************************** ***************************************/ FL_FORM * fl_get_active_folder( FL_OBJECT * ob ) { FLI_TABFOLDER_SPEC *sp; if ( ! IsFolderClass( ob ) ) { M_err( "fl_get_active_folder", "%s is not tabfolder", ob ? ob->label : "null" ); return NULL; } sp = ob->spec; return ( sp->forms && sp->active_folder >= 0 ) ? sp->forms[ sp->active_folder ] : NULL; } /*************************************** ***************************************/ const char * fl_get_active_folder_name( FL_OBJECT * ob ) { FLI_TABFOLDER_SPEC *sp; if ( ! IsFolderClass( ob ) ) { M_err( "fl_get_active_folder_name", "%s is not tabfolder", ob ? ob->label : "null" ); return NULL; } sp = ob->spec; return sp->active_folder >= 0 ? sp->title[ sp->active_folder ]->label : NULL; } /*************************************** ***************************************/ void fl_get_folder_area( FL_OBJECT * ob, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ) { FLI_TABFOLDER_SPEC *sp = ob->spec; compute_position( ob ); *x = sp->canvas->x; *y = sp->canvas->y; *w = sp->canvas->w; *h = sp->canvas->h; } /*************************************** ***************************************/ int fl_get_tabfolder_offset( FL_OBJECT * ob ) { return ( ( FLI_TABFOLDER_SPEC * ) ob->spec )->offset; } /*************************************** ***************************************/ int fl_set_tabfolder_offset( FL_OBJECT * ob, int offset ) { FLI_TABFOLDER_SPEC *sp = ob->spec; int old = sp->offset; if ( offset < 0 ) offset = 0; else if ( offset + sp->num_visible + 1 > sp->nforms - 1 ) offset = sp->nforms - sp->num_visible; if ( offset != sp->offset ) { shift_tabs( ob, offset - sp->offset ); fl_redraw_form( ob->form ); } return old; } /*************************************** * Compute the position and propagate the parent attributes ***************************************/ static void compute_top_position( FL_OBJECT * ob ) { FLI_TABFOLDER_SPEC *sp ; FL_OBJECT *tab; int i, max_h = 4; sp = ob->objclass == FL_TABFOLDER ? ob->spec : ob->u_vdata; sp->y = ob->y + 1; sp->x = sp->canvas->x - FL_abs( sp->canvas->bw ); for ( i = 0; i < sp->offset; i++ ) sp->title[ i ]->x = 2000; /* This gets the fl_get_folder_area() right (single line tab) - even if empty folder */ if ( sp->nforms == 0 ) { int junk; get_tabsize( ob, "AjbY", &junk, &max_h, 1 ); } for ( i = sp->offset; i < sp->nforms; i++ ) { tab = sp->title[ i ]; get_tabsize( ob, tab->label, &tab->w, &tab->h, 1 ); if ( tab->h > max_h ) max_h = tab->h; tab->x = sp->x; tab->y = sp->y; fli_inherit_attributes( ob, tab ); sp->x += tab->w + ( ob->bw > 0 ); if ( sp->x < sp->canvas->x + sp->canvas->w - 2 ) { sp->num_visible = i; tab->boxtype &= ~ FLI_BROKEN_BOX; tab->align = FL_ALIGN_CENTER; tab->visible = 1; } else if ( ( tab->w -= sp->x - sp->canvas->x - sp->canvas->w ) > 0 ) { tab->boxtype |= FLI_BROKEN_BOX; tab->align = FL_ALIGN_LEFT | FL_ALIGN_INSIDE; tab->visible = 1; } else { tab->w = 20; tab->visible = 0; } } for ( i = 0; i < sp->nforms; i++ ) sp->title[ i ]->h = max_h; /* This will be the canvas location */ if ( ob->objclass == FL_TABFOLDER ) { if ( ob->type != FL_BOTTOM_TABFOLDER ) sp->canvas->y = sp->y + max_h - ( ob->bw < 0 ); } else { if ( sp->parent->type != FL_BOTTOM_TABFOLDER ) sp->canvas->y = sp->y + max_h - ( ob->bw < 0 ); } sp->canvas->h = ob->h - max_h - FL_abs( ob->bw ) - 1; sp->max_h = max_h; fl_set_object_color( sp->canvas, ob->col1, ob->col2 ); } /*************************************** ***************************************/ static void compute_bottom_position( FL_OBJECT * ob ) { FLI_TABFOLDER_SPEC *sp; FL_OBJECT *tab; int i, max_h = 4, absbw = FL_abs( ob->bw ); sp = ob->objclass == FL_TABFOLDER ? ob->spec:ob->u_vdata; sp->x = ob->x; if ( sp->nforms == 0 ) { int junk; get_tabsize( ob, "AjbY", &junk, &max_h, -1 ); } for ( i = 0; i < sp->nforms; i++ ) { tab = sp->title[ i ]; get_tabsize( ob, tab->label, &tab->w, &tab->h, -1 ); if ( tab->h > max_h ) max_h = tab->h; tab->x = sp->x; fli_inherit_attributes( ob, tab ); sp->x += tab->w + ( ob->bw > 0 ); } sp->canvas->h = ob->h - 2 * absbw - max_h - 1; sp->y = sp->canvas->y + sp->canvas->h + absbw - ( ob->bw < 0 ); for ( i = 0; i < sp->nforms; i++ ) { sp->title[ i ]->h = max_h; sp->title[ i ]->y = sp->y; } sp->max_h = max_h; fl_set_object_color( sp->canvas, ob->col1, ob->col2 ); } /*************************************** ***************************************/ static void compute_position( FL_OBJECT * ob ) { if ( ob->type == FL_BOTTOM_TABFOLDER ) compute_bottom_position( ob ); else compute_top_position( ob ); } /*************************************** ***************************************/ int fl_set_tabfolder_autofit( FL_OBJECT * ob, int y ) { FLI_TABFOLDER_SPEC *sp = ob->spec; int old = sp->auto_fit; sp->auto_fit = y; return old; } /*************************************** ***************************************/ static void shift_tabs( FL_OBJECT * ob, int left ) { FLI_TABFOLDER_SPEC *sp = ob->u_vdata; int newp = sp->offset + left; if ( newp < 0 ) newp = 0; if ( newp == sp->offset ) return; sp->offset = newp; compute_position( ob ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/goodies.c0000644000175000017500000001454411247055071014603 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file goodies.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Common routines for the goodies */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "bitmaps/q.xbm" /* in directory bitmaps */ #include "bitmaps/warn.xbm" /* in directory bitmaps */ /*************************************** ***************************************/ void fl_update_display( int block ) { if ( block ) XSync( flx->display, 0 ); else XFlush( flx->display ); } /*************************************** * Preemptive handler to work around a bug in some window managers * where iconification causes a window to close. For normal closing, * we don't see any unmap events as winclose eats it ***************************************/ int fli_goodies_preemptive( FL_FORM * form, void * ev ) { if ( ( ( XEvent * ) ev )->type == UnmapNotify ) { fl_trigger_object( form->u_vdata ); return FL_PREEMPT; } return 0; } /*************************************** ***************************************/ int fl_goodies_atclose( FL_FORM * form, void * data ) { fl_trigger_object( data ? data : form->u_vdata ); if ( form->sort_of_modal ) form->sort_of_modal = 0; return FL_IGNORE; } /*************************************** ***************************************/ void fli_parse_goodies_label( FL_OBJECT * ob, const char * name ) { char s[ 256 ]; if ( fl_get_resource( name, NULL, FL_STRING, NULL, s, 256 ) ) { fl_set_object_label( ob, s ); fl_fit_object_label( ob, 5, 2 ); } } /*************************************** ***************************************/ void fli_get_goodie_title( FL_FORM * form, const char * res ) { char s[ 256 ]; if ( fl_get_resource( res, NULL, FL_STRING, NULL, s, 256 ) ) fl_set_form_title( form, s ); } static int goodie_style = FL_NORMAL_STYLE, goodie_size = FL_DEFAULT_SIZE; /*************************************** ***************************************/ void fl_set_goodies_font( int style, int size ) { goodie_style = style; goodie_size = size; } /*************************************** ***************************************/ void fli_get_goodies_font( int * style, int * size ) { *style = goodie_style; *size = goodie_size; } /*************************************** ***************************************/ void fli_handle_goodie_font( FL_OBJECT * ob1, FL_OBJECT * ob2 ) { if ( goodie_style < 0 ) return; if ( ob1 ) { fl_set_object_lstyle( ob1, goodie_style ); fl_set_object_lsize( ob1, goodie_size ); fl_fit_object_label( ob1, 1, 1 ); } if ( ob2 ) { fl_set_object_lstyle( ob2, goodie_style ); fl_set_object_lsize( ob2, goodie_size ); } } /*************************************** ***************************************/ static void fli_box_vert( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { int halfh = 0.5 * h, halfw = 0.5 * w; fli_add_vertex( x, y + halfh ); fli_add_vertex( x + halfw, y ); fli_add_vertex( x + 2 * halfw, y + halfh ); fli_add_vertex( x + halfw, y + 2 * halfh ); } /*************************************** ***************************************/ static int draw_box( FL_OBJECT * ob, int ev, FL_Coord x FL_UNUSED_ARG, FL_Coord y FL_UNUSED_ARG, int k FL_UNUSED_ARG, void * sp FL_UNUSED_ARG ) { int p = ( FL_max( ob->w, ob->h ) / 2 ) * 2 + 1; if ( ev != FL_DRAW ) return 0; fl_winset( FL_ObjWin( ob ) ); if ( ! fli_dithered( fl_vmode ) ) { fl_color( FL_YELLOW ); fli_reset_vertex( ); fli_box_vert( ob->x, ob->y, p, p ); fli_endpolygon( ); } fl_linewidth( 2 ); fl_color( FL_BLACK ); fli_reset_vertex( ); fli_box_vert( ob->x, ob->y, ob->w, ob->h ); fli_endclosedline( ); fl_linewidth( 0 ); return 0; } /*************************************** ***************************************/ void fli_add_q_icon( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { FL_OBJECT *obj; fl_add_free( FL_SLEEPING_FREE, x, y, w, h, "", draw_box ); obj = fl_add_bitmap( FL_NORMAL_BITMAP, x, y, w, h, "" ); fl_set_bitmap_data( obj, q_width, q_height, q_bits ); fl_set_object_color( obj, FL_YELLOW, FL_YELLOW ); fl_set_object_lcol( obj, FL_BLACK ); } /*************************************** ***************************************/ void fli_add_warn_icon( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { FL_OBJECT *obj; fl_add_free( FL_SLEEPING_FREE, x, y, w, h, "", draw_box ); obj = fl_add_bitmap( FL_NORMAL_BITMAP, x, y, w, h, "" ); fl_set_bitmap_data( obj, warn_width, warn_height, warn_bits ); fl_set_object_color( obj, FL_YELLOW, FL_YELLOW ); fl_set_object_lcol( obj, FL_BLACK ); } /*************************************** ***************************************/ void fli_goodies_cleanup( void ) { fli_msg_cleanup( ); fli_alert_cleanup( ); fli_choice_cleanup( ); fli_question_cleanup( ); fli_input_cleanup( ); fli_sinput_cleanup( ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/flcolor.c0000644000175000017500000014760011317452043014610 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file flcolor.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Colormap management. * * XForm will by default use the visual that has the most depth * and share colormap if possible. The default behavior can be * overridden by resource class Visual and Depth. * * Pixel is addressed via two indirections. First all colors * are addressed using the FL defined symbolic names, FL_RED, etc * which are then translated via a secondary lookup table to * get the true pixel values as known by the server. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /******************* Local variables ************************/ static unsigned long *lut; static unsigned long max_server_cols; /* max cols in current visual */ static long cols_in_default_visual; static long predefined_cols; /* min(max_server_col, built_in_col) */ static int allow_leakage; static FL_COLOR lastmapped; /* so fl_textcolor can refresh its cache */ static void fli_free_newpixel( unsigned long ); static FL_COLOR rgb2pixel( unsigned int, unsigned int, unsigned int ); /* this needs to be changed to a lookup table */ #ifndef FL_RGB2GRAY #define FL_RGB2GRAY( r, g, b ) \ ( ( 78 * ( r ) + 150 * ( g ) + 28 * ( b ) ) >> 8 ) #endif #define NV( a ) #a,a /* Default colormap entry for FORMS, subject to gamma corrections. * * The map entries are listed in the order of importance based * on which color we need most in case the Xserver does not have * enough depths to get them all. */ static FLI_IMAP fli_imap[ FL_MAX_COLS ] = { { NV( FL_BLACK ), 0, 0, 0, 0, 0 }, { NV( FL_WHITE ), 255, 255, 255, 0, 0 }, { NV( FL_COL1 ), 173, 173, 173, 0, 0 }, { NV( FL_BOTTOM_BCOL ), 89, 89, 89, 0, 0 }, { NV( FL_RIGHT_BCOL ), 41, 41, 41, 0, 0 }, { NV( FL_MCOL ), 191, 191, 191, 0, 0 }, { NV( FL_LEFT_BCOL ), 222, 222, 222, 0, 0 }, { NV( FL_SLATEBLUE ), 113, 113, 198, 0, 0 }, { NV( FL_INDIANRED ), 198, 113, 113, 0, 0 }, { NV( FL_RED ), 255, 0, 0, 0, 0 }, { NV( FL_BLUE ), 0, 0, 255, 0, 0 }, { NV( FL_GREEN ), 0, 255, 0, 0, 0 }, { NV( FL_YELLOW ), 255, 255, 0, 0, 0 }, { NV( FL_MAGENTA ), 255, 0, 255, 0, 0 }, { NV( FL_CYAN ), 0, 255, 255, 0, 0 }, { NV( FL_TOMATO ), 255, 99, 71, 0, 0 }, { NV( FL_INACTIVE ), 110, 110, 110, 0, 0 }, { NV( FL_TOP_BCOL ), 204, 204, 204, 0, 0 }, { NV( FL_PALEGREEN ), 113, 198, 113, 0, 0 }, { NV( FL_DARKGOLD ), 205, 149, 10, 0, 0 }, { NV( FL_ORCHID ), 205, 105, 201, 0, 0 }, { NV( FL_DARKCYAN ), 40, 170, 175, 0, 0 }, { NV( FL_DARKTOMATO ), 139, 54, 38, 0, 0 }, { NV( FL_WHEAT ), 255, 231, 155, 0, 0 }, { NV( FL_DARKORANGE ), 255, 128, 0, 0, 0 }, { NV( FL_DEEPPINK ), 255, 0, 128, 0, 0 }, { NV( FL_CHARTREUSE ), 128, 255, 0, 0, 0 }, { NV( FL_DARKVIOLET ), 128, 0, 255, 0, 0 }, { NV( FL_SPRINGGREEN ), 0, 255, 128, 0, 0 }, { NV( FL_DODGERBLUE ), 0, 128, 255, 0, 0 }, { NV( FL_DOGERBLUE ), 0, 128, 255, 0, 0 }, { NV( FL_LIGHTER_COL1 ), 204, 204, 204, 0, 0 }, { NV( FL_DARKER_COL1 ), 161, 161, 161, 0, 0 }, { NV( FL_ALICEBLUE ), 240, 248, 255, 0, 0 }, { NV( FL_ANTIQUEWHITE ), 250, 235, 215, 0, 0 }, { NV( FL_AQUA ), 0, 255, 255, 0, 0 }, { NV( FL_AQUAMARINE ), 127, 255, 212, 0, 0 }, { NV( FL_AZURE ), 240, 255, 255, 0, 0 }, { NV( FL_BEIGE ), 245, 245, 220, 0, 0 }, { NV( FL_BISQUE ), 255, 228, 196, 0, 0 }, { NV( FL_BLANCHEDALMOND ), 255, 235, 205, 0, 0 }, { NV( FL_BLUEVIOLET ), 138, 43, 226, 0, 0 }, { NV( FL_BROWN ), 165, 42, 42, 0, 0 }, { NV( FL_BURLYWOOD ), 222, 184, 135, 0, 0 }, { NV( FL_CADETBLUE ), 95, 158, 160, 0, 0 }, { NV( FL_CHOCOLATE ), 210, 105, 30, 0, 0 }, { NV( FL_CORAL ), 255, 127, 80, 0, 0 }, { NV( FL_CORNFLOWERBLUE ), 100, 149, 237, 0, 0 }, { NV( FL_CORNSILK ), 255, 248, 220, 0, 0 }, { NV( FL_CRIMSON ), 220, 20, 60, 0, 0 }, { NV( FL_DARKBLUE ), 0, 0, 139, 0, 0 }, { NV( FL_DARKGOLDENROD ), 184, 134, 11, 0, 0 }, { NV( FL_DARKGRAY ), 169, 169, 169, 0, 0 }, { NV( FL_DARKGREEN ), 0, 100, 0, 0, 0 }, { NV( FL_DARKGREY ), 169, 169, 169, 0, 0 }, { NV( FL_DARKKHAKI ), 189, 183, 107, 0, 0 }, { NV( FL_DARKMAGENTA ), 139, 0, 139, 0, 0 }, { NV( FL_DARKOLIVEGREEN ), 85, 107, 47, 0, 0 }, { NV( FL_DARKORCHID ), 153, 50, 204, 0, 0 }, { NV( FL_DARKRED ), 139, 0, 0, 0, 0 }, { NV( FL_DARKSALMON ), 233, 150, 122, 0, 0 }, { NV( FL_DARKSEAGREEN ), 143, 188, 143, 0, 0 }, { NV( FL_DARKSLATEBLUE ), 72, 61, 139, 0, 0 }, { NV( FL_DARKSLATEGRAY ), 47, 79, 79, 0, 0 }, { NV( FL_DARKSLATEGREY ), 47, 79, 79, 0, 0 }, { NV( FL_DARKTURQUOISE ), 0, 206, 209, 0, 0 }, { NV( FL_DEEPSKYBLUE ), 0, 191, 255, 0, 0 }, { NV( FL_DIMGRAY ), 105, 105, 105, 0, 0 }, { NV( FL_DIMGREY ), 105, 105, 105, 0, 0 }, { NV( FL_FIREBRICK ), 178, 34, 34, 0, 0 }, { NV( FL_FLORALWHITE ), 255, 250, 240, 0, 0 }, { NV( FL_FORESTGREEN ), 34, 139, 34, 0, 0 }, { NV( FL_FUCHSIA ), 255, 0, 255, 0, 0 }, { NV( FL_GAINSBORO ), 220, 220, 220, 0, 0 }, { NV( FL_GHOSTWHITE ), 248, 248, 255, 0, 0 }, { NV( FL_GOLD ), 255, 215, 0, 0, 0 }, { NV( FL_GOLDENROD ), 218, 165, 32, 0, 0 }, { NV( FL_GRAY ), 128, 128, 128, 0, 0 }, { NV( FL_GREENYELLOW ), 173, 255, 47, 0, 0 }, { NV( FL_GREY ), 128, 128, 128, 0, 0 }, { NV( FL_HONEYDEW ), 240, 255, 240, 0, 0 }, { NV( FL_HOTPINK ), 255, 105, 180, 0, 0 }, { NV( FL_INDIGO ), 75, 0, 130, 0, 0 }, { NV( FL_IVORY ), 255, 255, 240, 0, 0 }, { NV( FL_KHAKI ), 240, 230, 140, 0, 0 }, { NV( FL_LAVENDER ), 230, 230, 250, 0, 0 }, { NV( FL_LAVENDERBLUSH ), 255, 240, 245, 0, 0 }, { NV( FL_LAWNGREEN ), 124, 252, 0, 0, 0 }, { NV( FL_LEMONCHIFFON ), 255, 250, 205, 0, 0 }, { NV( FL_LIGHTBLUE ), 173, 216, 230, 0, 0 }, { NV( FL_LIGHTCORAL ), 240, 128, 128, 0, 0 }, { NV( FL_LIGHTCYAN ), 224, 255, 255, 0, 0 }, { NV( FL_LIGHTGOLDENRODYELLOW ), 250, 250, 210, 0, 0 }, { NV( FL_LIGHTGRAY ), 211, 211, 211, 0, 0 }, { NV( FL_LIGHTGREEN ), 144, 238, 144, 0, 0 }, { NV( FL_LIGHTGREY ), 211, 211, 211, 0, 0 }, { NV( FL_LIGHTPINK ), 255, 182, 193, 0, 0 }, { NV( FL_LIGHTSALMON ), 255, 160, 122, 0, 0 }, { NV( FL_LIGHTSEAGREEN ), 32, 178, 170, 0, 0 }, { NV( FL_LIGHTSKYBLUE ), 135, 206, 250, 0, 0 }, { NV( FL_LIGHTSLATEGRAY ), 119, 136, 153, 0, 0 }, { NV( FL_LIGHTSLATEGREY ), 119, 136, 153, 0, 0 }, { NV( FL_LIGHTSTEELBLUE ), 176, 196, 222, 0, 0 }, { NV( FL_LIGHTYELLOW ), 255, 255, 224, 0, 0 }, { NV( FL_LIME ), 0, 255, 0, 0, 0 }, { NV( FL_LIMEGREEN ), 50, 205, 50, 0, 0 }, { NV( FL_LINEN ), 250, 240, 230, 0, 0 }, { NV( FL_MAROON ), 128, 0, 0, 0, 0 }, { NV( FL_MEDIUMAQUAMARINE ), 102, 205, 170, 0, 0 }, { NV( FL_MEDIUMBLUE ), 0, 0, 205, 0, 0 }, { NV( FL_MEDIUMORCHID ), 186, 85, 211, 0, 0 }, { NV( FL_MEDIUMPURPLE ), 147, 112, 219, 0, 0 }, { NV( FL_MEDIUMSEAGREEN ), 60, 179, 113, 0, 0 }, { NV( FL_MEDIUMSLATEBLUE ), 123, 104, 238, 0, 0 }, { NV( FL_MEDIUMSPRINGGREEN ), 0, 250, 154, 0, 0 }, { NV( FL_MEDIUMTURQUOISE ), 72, 209, 204, 0, 0 }, { NV( FL_MEDIUMVIOLETRED ), 199, 21, 133, 0, 0 }, { NV( FL_MIDNIGHTBLUE ), 25, 25, 112, 0, 0 }, { NV( FL_MINTCREAM ), 245, 255, 250, 0, 0 }, { NV( FL_MISTYROSE ), 255, 228, 225, 0, 0 }, { NV( FL_MOCCASIN ), 255, 228, 181, 0, 0 }, { NV( FL_NAVAJOWHITE ), 255, 222, 173, 0, 0 }, { NV( FL_NAVY ), 0, 0, 128, 0, 0 }, { NV( FL_OLDLACE ), 253, 245, 230, 0, 0 }, { NV( FL_OLIVE ), 128, 128, 0, 0, 0 }, { NV( FL_OLIVEDRAB ), 107, 142, 35, 0, 0 }, { NV( FL_ORANGE ), 255, 165, 0, 0, 0 }, { NV( FL_ORANGERED ), 255, 69, 0, 0, 0 }, { NV( FL_PALEGOLDENROD ), 238, 232, 170, 0, 0 }, { NV( FL_PALETURQUOISE ), 175, 238, 238, 0, 0 }, { NV( FL_PALEVIOLETRED ), 219, 112, 147, 0, 0 }, { NV( FL_PAPAYAWHIP ), 255, 239, 213, 0, 0 }, { NV( FL_PEACHPUFF ), 255, 218, 185, 0, 0 }, { NV( FL_PERU ), 205, 133, 63, 0, 0 }, { NV( FL_PINK ), 255, 192, 203, 0, 0 }, { NV( FL_PLUM ), 221, 160, 221, 0, 0 }, { NV( FL_POWDERBLUE ), 176, 224, 230, 0, 0 }, { NV( FL_PURPLE ), 128, 0, 128, 0, 0 }, { NV( FL_ROSYBROWN ), 188, 143, 143, 0, 0 }, { NV( FL_ROYALBLUE ), 65, 105, 225, 0, 0 }, { NV( FL_SADDLEBROWN ), 139, 69, 19, 0, 0 }, { NV( FL_SALMON ), 250, 128, 114, 0, 0 }, { NV( FL_SANDYBROWN ), 244, 164, 96, 0, 0 }, { NV( FL_SEAGREEN ), 46, 139, 87, 0, 0 }, { NV( FL_SEASHELL ), 255, 245, 238, 0, 0 }, { NV( FL_SIENNA ), 160, 82, 45, 0, 0 }, { NV( FL_SILVER ), 192, 192, 192, 0, 0 }, { NV( FL_SKYBLUE ), 135, 206, 235, 0, 0 }, { NV( FL_SLATEGRAY ), 112, 128, 144, 0, 0 }, { NV( FL_SLATEGREY ), 112, 128, 144, 0, 0 }, { NV( FL_SNOW ), 255, 250, 250, 0, 0 }, { NV( FL_STEELBLUE ), 70, 130, 180, 0, 0 }, { NV( FL_TAN ), 210, 180, 140, 0, 0 }, { NV( FL_TEAL ), 0, 128, 128, 0, 0 }, { NV( FL_THISTLE ), 216, 191, 216, 0, 0 }, { NV( FL_TURQUOISE ), 64, 224, 208, 0, 0 }, { NV( FL_VIOLET ), 238, 130, 238, 0, 0 }, { NV( FL_WHITESMOKE ), 245, 245, 245, 0, 0 }, { NV( FL_YELLOWGREEN ), 154, 205, 50, 0, 0 }, { NV( FL_FREE_COL1 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL2 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL3 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL4 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL5 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL6 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL7 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL8 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL9 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL10 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL11 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL12 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL13 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL14 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL15 ), 0, 0, 0, 0, 0 }, { NV( FL_FREE_COL16 ), 0, 0, 0, 0, 0 }, }; #define flmapsize ( ( int ) ( sizeof fli_imap / sizeof *fli_imap ) ) /*************************************** ***************************************/ const char * fli_query_colorname( FL_COLOR col ) { FLI_IMAP *flmap; static char buf[ 32 ]; for ( flmap = fli_imap; flmap < fli_imap + FL_BUILT_IN_COLS + 1; flmap++ ) if ( col == flmap->index ) return flmap->name; /* Not a built-in */ if ( col == FL_NoColor ) return "FL_NoColor"; if ( col >= FL_FREE_COL1 && col <= FL_FREE_COL16 ) sprintf( buf,"FL_FREE_COL%ld",1+col-FL_FREE_COL1 ); else sprintf( buf, "%ld", col ); return buf; } /*************************************** ***************************************/ long fli_query_namedcolor( const char *s ) { FLI_IMAP *flmap; for ( flmap = fli_imap; s && flmap < fli_imap + FL_BUILT_IN_COLS + 1; flmap++ ) if ( strcmp( s, flmap->name ) == 0 ) return flmap->index; if ( strstr( s, "FL_FREE_COL" ) ) return FL_FREE_COL1 + atoi( s + 11 ) - 1; if ( strcmp( "FL_NoColor", s ) == 0 ) return FL_NoColor; /* A wild shot */ return atoi( s ); } /*************************************** ***************************************/ #ifdef DO_GAMMA_CORRECTION #include void fl_set_gamma( double r, double g, double b ) { FLI_IMAP *fm; static double rgamma = 1.0, ggamma = 1.0, bgamma = 1.0; if ( fli_imap[ 4 ].grayval ) { /* Too lazy to shuffle colormap around */ M_err( "fl_set_gamma", "Ignored. Please call fl_set_gamma before fl_init" ); return; } if ( r <= 1.e-3 || g <= 1.e-3 || b <= 1.e-3 ) { M_warn( "fl_set_gamma", "BadValue %4.2f %4.2f %4.2f. Ignored", r, g, b ); return; } for ( fm = fli_imap; fm < fli_imap + FL_BUILT_IN_COLS + 1; fm++ ) { fm->r = 0.5 + 255 * pow( fm->r / 255.0, rgamma / r ); fm->g = 0.5 + 255 * pow( fm->g / 255.0, ggamma / g ); fm->b = 0.5 + 255 * pow( fm->b / 255.0, bgamma / b ); } rgamma = r; ggamma = g; bgamma = b; } #endif /* DO_GAMMA_CORRECTION */ static XColor *defaultc = NULL; /*************************************** * Copy the first several entries in the default colormap to avoid * flashing in case we are using a private colormap or non-default * visual (can't do anyting about TrueColor/DirectColor though) ***************************************/ #define DEFAULT_SAVE 35 static int save_index[ ] = { 2, 3, 4, 5, 6, 7, 34 }; #define NSAVE ( sizeof save_index / sizeof *save_index ) static void be_nice( void ) { int i, save = FL_min( cols_in_default_visual - 210, DEFAULT_SAVE ); XColor *dc; unsigned long newpixels[ DEFAULT_SAVE ], frees[ DEFAULT_SAVE ]; int npixels, found, j, k, saved; FL_COLOR black = BlackPixel( flx->display, fl_screen ); FL_COLOR white = WhitePixel( flx->display, fl_screen ); for ( saved = 0, dc = defaultc, i = 0; i < save; i++, dc++ ) { dc->flags = DoRed | DoGreen | DoBlue; if ( XAllocColor( flx->display, fli_colormap( fl_vmode ), dc ) ) newpixels[ saved++ ] = dc->pixel; } /* Only keep the pixels in the save_index. 0 and 1 are always saved */ for ( npixels = 0, i = 2; fli_depth( fl_vmode ) > 4 && i < saved; i++ ) { k = newpixels[ i ]; for ( j = found = 0; ! found && j < ( int ) NSAVE; j++ ) found = k == save_index[ j ] || k == ( int ) white || k == ( int ) black; if ( ! found ) frees[ npixels++ ] = k; } if ( npixels ) XFreeColors( flx->display, fli_colormap( fl_vmode ), frees, npixels, 0 ); if ( save <= 0 ) { XColor xc; M_warn( "be_nice", "Black = %ld White = %ld", black, white ); /* As a minimum, we should preserve black & white */ xc.flags = DoRed | DoGreen | DoBlue; if ( black == 0 ) { xc.red = xc.green = xc.blue = 0; xc.pixel = 0; XAllocColor( flx->display, fli_colormap( fl_vmode ), &xc ); M_warn( "be_nice", "Get Black = %ld", xc.pixel ); if ( white == 1 ) { xc.pixel = white; xc.red = xc.green = xc.blue = 0xffff; XAllocColor( flx->display, fli_colormap( fl_vmode ), &xc ); M_warn( "be_nice", "Get White = %ld", xc.pixel ); } } else if ( white == 0 ) { xc.red = xc.green = xc.blue = 0xffff; XAllocColor( flx->display, fli_colormap( fl_vmode ), &xc ); M_warn( "be_nice", "Get White = %ld", xc.pixel ); if ( black == 1 ) { xc.red = xc.green = xc.blue = black; xc.pixel = 0; XAllocColor( flx->display, fli_colormap( fl_vmode ), &xc ); M_warn( "be_nice", "Get Black = %ld", xc.pixel ); } } } M_warn( "be_nice", "Total %d colors copied", save > 0 ? save : 2 ); } /*************************************** ***************************************/ static int alloc_direct_color( void ) { XColor xxc[ FL_BUILT_IN_COLS ], *xc; FLI_IMAP *fm; long pred = predefined_cols; for ( xc = xxc, fm = fli_imap; fm < fli_imap + pred; fm++, xc++ ) { xc->red = ( fm->r << 8 ) | 0xff; xc->green = ( fm->g << 8 ) | 0xff; xc->blue = ( fm->b << 8 ) | 0xff; xc->flags = DoRed | DoGreen | DoBlue; xc->pixel = lut[ fm->index ] = rgb2pixel( fm->r, fm->g, fm->b ); } XStoreColors( flx->display, fli_map( fl_vmode ), xxc, pred ); return 1; } /*************************************** * Do colormap allocation. DirectColor is handled seperately ***************************************/ static int fill_map( void ) { XColor xc; int ok; long pred = predefined_cols; unsigned int r, g, b; FLI_IMAP *fm, *fs; lut = fl_state[ fl_vmode ].lut; fli_dithered( fl_vmode ) = fli_depth( fl_vmode ) <= 2; M_warn( "fill_map", "Trying to get %d colors", pred ); xc.flags = DoRed | DoGreen | DoBlue; for ( ok = 1, fm = fli_imap, fs = fm + pred; ok && fm < fs; fm++ ) { /* If Xserver is grayscale, we are really walking the "gray" area as the server can drive the the display with any of the r, g or b, need to force a correct value */ r = FL_is_gray( fl_vmode ) ? fm->grayval : fm->r; g = FL_is_gray( fl_vmode ) ? fm->grayval : fm->g; b = FL_is_gray( fl_vmode ) ? fm->grayval : fm->b; xc.red = ( r << 8 ) | 0xff; xc.green = ( g << 8 ) | 0xff; xc.blue = ( b << 8 ) | 0xff; ok = XAllocColor( flx->display, fli_map( fl_vmode ), &xc ); if ( ok ) lut[ fm->index ] = xc.pixel; } if ( fl_state[ fl_vmode ].pcm || fli_cntl.sharedColormap || fli_dithered( fl_vmode ) ) { if ( ! ok && fm > fli_imap ) fm--; ok = 1; } /* Get approx. for the rest of needed colors */ for ( fs = fli_imap + FL_BUILT_IN_COLS; ok && fm < fs; fm++ ) fl_mapcolor( fm->index, fm->r, fm->g, fm->b ); /* Make rest of the entry invalid so we don't accidently free a valid pixel */ memset( lut + FL_BUILT_IN_COLS, 1, ( FL_MAX_COLS - FL_BUILT_IN_COLS ) * sizeof *lut ); return ok; } /*************************************** * Try to get a private colormap. Return 1 for success. Typically * this is the last color strategy we will try and in case it * fails, caller probably should terminate the program. ***************************************/ static int get_private_cmap( int vmode ) { int ok, i; M_warn( "get_private_cmap", "getting private colormap" ); /* Get a private colormap */ fli_map( vmode ) = XCreateColormap( flx->display, fl_root, fli_visual( vmode ), vmode != FL_DirectColor ? AllocNone : AllocAll ); if ( ! fli_map( vmode ) ) { M_err( "get_private_cmap", "Can't create Colormap!" ); exit( 0 ); } lut = fl_state[ vmode ].lut; if ( vmode == FL_DirectColor ) return alloc_direct_color( ); /* Copy some default entries */ be_nice( ); /* Fill colormap with predetermined colors */ fl_state[ vmode ].pcm = 1; ok = fill_map( ); for ( i = FL_BUILT_IN_COLS; i < FL_MAX_COLS; i++ ) lut[ i ] = i; M_warn( "get_private_cmap", "%s %s succesful", fl_vclass_name( vmode ), ok ? "" : "not" ); return ok; } /*************************************** * Use standard colormap only if user explicitly requests it as it * is the most un-flexible among shared,private and standard. ***************************************/ static int get_standard_cmap( int vmode ) { FLI_IMAP *fm, *fs; XStandardColormap stdcmap; XStandardColormap *sc = &stdcmap; XColor xc; Atom mapid = ( vmode == FL_GrayScale || vmode == FL_StaticGray ) ? XA_RGB_GRAY_MAP : XA_RGB_DEFAULT_MAP; #if FL_DEBUG >= ML_ERR M_warn( "get_standard_cmap", "Getting standard colormap" ); #endif if ( ! XGetStandardColormap( flx->display, fl_root, &stdcmap, mapid ) ) { M_err( "get_standard_cmap", "Can't get standard map" ); return 0; } lut = fl_state[ vmode ].lut; /* we got the map. now figure out the pixel values */ fli_map( vmode ) = sc->colormap; xc.flags = DoRed | DoGreen | DoBlue; for ( fm = fli_imap, fs = fm + FL_BUILT_IN_COLS; fm < fs; fm++ ) { xc.red = ( fm->r << 8 ) | 0xff; xc.green = ( fm->g << 8 ) | 0xff; xc.blue = ( fm->b << 8 ) | 0xff; XAllocColor( flx->display, fli_colormap( vmode ), &xc ); lut[ fm->index ] = xc.pixel; } fl_state[ vmode ].pcm = 1; return 1; } /*************************************** ***************************************/ static int get_shared_cmap( int vmode ) { int ok; /* Share colormap only if requested visual is the same as the default visual */ if ( fli_visual( vmode ) == DefaultVisual( flx->display, fl_screen ) ) { fli_map( vmode ) = DefaultColormap( flx->display, fl_screen ); M_warn( "get_shared_cmap", "Using default map %ld for %s", fli_map( vmode ), fl_vclass_name( vmode ) ); } else { fli_map( vmode ) = XCreateColormap( flx->display, fl_root, fli_visual( vmode ), vmode != FL_DirectColor ? AllocNone : AllocAll ); M_warn( "get_shared_cmap", " NewMap %ld (0x%lx) for %s (ID = 0x%lx)", fli_map( vmode ), fli_map( vmode ), fl_vclass_name( vmode ), fli_visual( vmode )->visualid ); } if ( ! fli_map( vmode ) ) { M_err( "get_shared_cmap", "Error getting colormaps" ); exit( 1 ); } #define PD( v ) \ if ( ( DefaultVisual( flx->display, fl_screen ) )->class == ( v ) ) \ fprintf( stderr, "DefaultVisual = %s CurrentVisual = %s\n", \ #v, fl_vclass_name( fli_class( vmode ) ) ); if ( fli_cntl.debug ) { PD( TrueColor ); PD( PseudoColor ); PD( DirectColor ); PD( GrayScale ); PD( StaticGray ); PD( StaticColor ); } lut = fl_state[ vmode ].lut; if ( vmode == FL_DirectColor ) return alloc_direct_color( ); /* Copy a few entries from the default colormap if we are using a map other than the defaulf */ if ( fli_visual( vmode ) != DefaultVisual( flx->display, fl_screen ) ) be_nice( ); ok = fill_map( ); /* If we can't do it, free the color we have already allocated so other applications may have an easier time getting colors */ if ( ! ok ) { M_warn( "get_shared_cmap", "can't share for %s", fl_vclass_name( vmode ) ); fli_map( vmode ) = XCopyColormapAndFree( flx->display, fli_map( vmode ) ); } return ok; } /*************************************** * Create GCs for a particular visual and depth ***************************************/ void fli_create_gc( Window win ) { GC *flgcs, *flgce; FL_State *fs = fl_state + fl_vmode; /* If gc for this visual exists, do switch */ if ( fl_state[ fl_vmode ].gc[ 0 ] ) { flx->gc = fl_state[ fl_vmode ].gc[ 0 ]; flx->textgc = fl_state[ fl_vmode ].textgc[ 0 ]; if ( fl_state[ fl_vmode ].cur_fnt ) XSetFont( flx->display, flx->textgc, fl_state[ fl_vmode ].cur_fnt->fid ); return; } /* Check if we need to dither */ fli_dithered( fl_vmode ) = fli_depth( fl_vmode ) <= 2; /* Need to create new GCs */ M_warn( "fli_create_gc", "For %s", fl_vclass_name( fl_vmode ) ); if ( ! fli_gray_pattern[ 1 ] ) { M_err( "fli_create_gc", "gray pattern not initialized" ); exit( 1 ); } flgcs = fs->gc; flgce = flgcs + sizeof fs->gc / sizeof *fs->gc; for ( ; flgcs < flgce; flgcs++ ) { *flgcs = XCreateGC( flx->display, win, 0, 0 ); XSetStipple( flx->display, *flgcs, FLI_INACTIVE_PATTERN ); XSetGraphicsExposures( flx->display, *flgcs, 0 ); } flx->gc = fl_state[ fl_vmode ].gc[ 0 ]; /* Initialize text gc */ flgcs = fs->textgc; flgce = flgcs + sizeof fs->textgc / sizeof *fs->textgc; for ( ; flgcs < flgce; flgcs++ ) { *flgcs = XCreateGC( flx->display, win, 0, 0 ); XSetStipple( flx->display, *flgcs, FLI_INACTIVE_PATTERN ); XSetGraphicsExposures( flx->display, *flgcs, 0 ); } flx->textgc = fl_state[ fl_vmode ].textgc[ 0 ]; /* Initialize a dimmed GC */ fl_state[ fl_vmode ].dimmedGC = XCreateGC( flx->display, win, 0, 0 ); XSetStipple( flx->display, fl_state[ fl_vmode ].dimmedGC, FLI_INACTIVE_PATTERN ); XSetGraphicsExposures( flx->display, fl_state[ fl_vmode ].dimmedGC, 0 ); XSetFillStyle( flx->display, fl_state[ fl_vmode ].dimmedGC, FillStippled ); /* Special for B&W and 2bits displays */ if ( fli_dithered( fl_vmode ) ) { int i; fli_whitegc = XCreateGC( flx->display, win, 0, 0 ); XSetForeground( flx->display, fli_whitegc, fl_get_flcolor( FL_WHITE ) ); for ( i = 0; i < 3; i++ ) { fli_bwgc[ i ] = XCreateGC( flx->display, win, 0, 0 ); XSetStipple( flx->display, fli_bwgc[ i ], fli_gray_pattern[ i ] ); XSetGraphicsExposures( flx->display, fli_bwgc[ i ], 0 ); XSetFillStyle( flx->display, fli_bwgc[ i ], FillStippled ); } } if ( fl_state[ fl_vmode ].cur_fnt ) XSetFont( flx->display, flx->textgc, fl_state[ fl_vmode ].cur_fnt->fid ); } /*************************************** * Global routine to initialize all things related visual and colors ***************************************/ void fli_init_colormap( int vmode ) { int i, ok; FLI_IMAP *fm = fli_imap; Colormap defmap; /* If map for this mode already exists, leave it alone, not only efficient but also necessary as fl_win_open may call init map */ if ( fli_map( vmode ) ) { #if FL_DEBUG >= ML_DEBUG M_info( "fli_init_colormap", "%s is ok", fl_vclass_name( vmode ) ); #endif return; } /* Get max colors we can have, take care there are machines where an unsigned long isn't large enough to hold the number of colors) */ if ( ( unsigned int ) fli_depth( vmode ) >= CHAR_BIT * sizeof max_server_cols ) max_server_cols = ~ 0; else max_server_cols = 1L << fli_depth( vmode ); predefined_cols = FL_min( FL_BUILT_IN_COLS, max_server_cols ); M_info( "fli_init_colormap", "MaxColors = %d PredefCol = %d", max_server_cols, predefined_cols ); fli_init_stipples( ); if ( ! defaultc ) defaultc = fl_malloc( FL_MAX_COLS * sizeof *defaultc ); /* Initialize secondary lookup table */ for ( fm = fli_imap, i = 0; i < FL_MAX_COLS; i++, fm++ ) { defaultc[ i ].pixel = i; fm->grayval = FL_RGB2GRAY( fm->r, fm->g, fm->b ); if ( i >= FL_BUILT_IN_COLS ) fm->index = i; } /* Take a snapshot of the default colormap for later use by private_colormap */ defmap = DefaultColormap( flx->display, fl_screen ); cols_in_default_visual = ( 1L << DefaultDepth( flx->display, fl_screen ) ) - 1; /* Some server may have a default visual with depth == 32 */ if ( cols_in_default_visual <= 0 ) cols_in_default_visual = 80; M_warn( "fli_init_colormap", "%ld (0x%lx)", defmap, defmap ); XQueryColors( flx->display, defmap, defaultc, FL_min( cols_in_default_visual, DEFAULT_SAVE ) ); ok = 0; if ( fli_cntl.privateColormap ) ok = get_private_cmap( vmode ); else if ( fli_cntl.standardColormap ) ok = get_standard_cmap( vmode ); if ( ! ok && ! ( ok = get_shared_cmap( vmode ) ) ) { /* If unable to share colormaps, we can either get a private colormap or force substitutions */ #if 1 M_err( "fli_init_colormap", "Failed to share colors. Using private colormap" ); ok = get_private_cmap( vmode ); #else ok = 1; fli_cntl.sharedColormap = 1; get_shared_cmap( vmode ); #endif } if ( ! ok ) { M_err( "fli_init_colormap", "I screwed up or you have a weird workstatation" ); exit( 1 ); } M_warn( "fli_init_colormap", "%s Done", fl_vclass_name( vmode ) ); #if FL_DEBUG >= ML_WARN fli_dump_state_info( vmode, "fli_init_colormap" ); #endif } /*************************************** ***************************************/ void fli_free_colormap( int vmode ) { int i; for( i = 0; i < 3; i++ ) if ( fli_gray_pattern[ i ] ) { XFreePixmap( flx->display, fli_gray_pattern[ i ] ); fli_gray_pattern[ i ] = None; } if ( fli_visual( vmode ) != DefaultVisual( flx->display, fl_screen ) ) XFreeColormap( flx->display, fli_map( vmode ) ); fl_safe_free( defaultc ); } static unsigned long fl_get_rgb_pixel( FL_COLOR packed, int * newpix ); /*************************************** * Input col is the color known to the world outside of FORMS, * FL_RED etc. Returned will be the true pixel X understands ***************************************/ unsigned long fl_get_pixel( FL_COLOR col ) { if ( col == FL_NoColor ) return fl_get_pixel( FL_COL1 ); if ( flx->isRGBColor ) return fl_get_rgb_pixel( col, &flx->newpix ); if ( col >= FL_MAX_COLS ) { M_err( "fl_get_pixel", "Bad request %lu", col ); return 0; } return fl_state[ fl_vmode ].lut[ col ]; } /*************************************** ***************************************/ void fl_set_foreground( GC gc, FL_COLOR color ) { XSetForeground( fl_display, gc, fl_get_pixel( color ) ); } /*************************************** ***************************************/ void fl_set_background( GC gc, FL_COLOR color ) { XSetBackground( fl_display, gc, fl_get_pixel( color ) ); } /*************************************** ***************************************/ void fl_color( FL_COLOR col ) { static int vmode = -1; long p; if ( flx->color != col || vmode != fl_vmode ) { flx->color = col; vmode = fl_vmode; p = fl_get_pixel( col ); XSetForeground( flx->display, flx->gc, p ); fli_free_newpixel( p ); } } /*************************************** ***************************************/ static unsigned long fl_get_rgb_pixel( FL_COLOR packed, int * newpix ) { FL_STATE *s = &fl_state[ fl_vmode ]; unsigned long pixel; int max_col; static Colormap lastcolormap; static XColor *xcolor; static int new_col; XColor xc; unsigned int r = FL_GETR( packed ); unsigned int g = FL_GETG( packed ); unsigned int b = FL_GETB( packed ); *newpix = 0; if ( s->vclass == TrueColor || s->vclass == DirectColor ) return rgb2pixel( r, g, b ); else { xc.flags = DoRed | DoGreen | DoBlue; xc.red = ( r << 8 ) | 0xff; xc.green = ( g << 8 ) | 0xff; xc.blue = ( b << 8 ) | 0xff; new_col++; if ( ( *newpix = XAllocColor( flx->display, s->colormap, &xc ) ) ) return xc.pixel; /* Color allocation failed. Search for best match */ if ( ( max_col = FL_min( 256, 1 << s->depth ) ) == 0 ) max_col = 256; if ( ! xcolor ) xcolor = fl_malloc( 256 * sizeof *xcolor ); /* Not theoretically correct as colormap may have changed * since the last time we asked for colors. Take a chance for * performace. */ if ( lastcolormap != s->colormap || new_col > 3 ) { int i; for ( i = 0; i < max_col; i++ ) xcolor[ i ].pixel = i; XQueryColors( flx->display, s->colormap, xcolor, max_col ); lastcolormap = s->colormap; new_col = 0; } fli_find_closest_color( r, g, b, xcolor, max_col, &pixel ); return pixel; } } /*************************************** ***************************************/ static void fli_free_newpixel( unsigned long pixel ) { if ( flx->newpix ) { XFreeColors( flx->display, flx->colormap, &pixel, 1, 0 ); flx->newpix = 0; } } /*************************************** ***************************************/ void fl_textcolor( FL_COLOR col ) { static int vmode = -1; static int switched; static GC textgc; if ( flx->textcolor != col || vmode != fl_vmode || flx->textcolor == lastmapped ) { lastmapped = FL_NoColor; flx->textcolor = col; vmode = fl_vmode; if ( col == FL_INACTIVE_COL && fli_dithered( vmode ) ) { textgc = flx->textgc; flx->textgc = fl_state[ vmode ].dimmedGC; XSetFont( flx->display, flx->textgc, fl_state[ vmode ].cur_fnt->fid ); switched = 1; } else if ( switched ) { flx->textgc = textgc; XSetFont( flx->display, flx->textgc, fl_state[ vmode ].cur_fnt->fid ); switched = 0; } XSetForeground( flx->display, flx->textgc, col = fl_get_pixel( col ) ); fli_free_newpixel( col ); } } /*************************************** ***************************************/ void fl_bk_color( FL_COLOR col ) { if ( flx->bkcolor != col ) { flx->bkcolor = col; col = fl_get_pixel( col ); XSetBackground( flx->display, flx->gc, col ); fli_free_newpixel( col ); } } /*************************************** ***************************************/ void fl_bk_textcolor( FL_COLOR col ) { if ( flx->bktextcolor != col ) { flx->bktextcolor = col; col = fl_get_pixel( col ); XSetBackground( flx->display, flx->textgc, col ); fli_free_newpixel( col ); } } /*************************************** * Map color: it involves changing the internal colormap as well as * requesting the acutal pixel value. In case a request fails, * we subsititute the closest color ***************************************/ unsigned long fl_mapcolor( FL_COLOR col, int r, int g, int b ) { XColor exact; int i, j = -1; static int totalcols; static XColor *cur_mapvals[ 6 ], *cur_map; unsigned long pixel; /* If requested color is reserved, warn */ if ( col < FL_BUILT_IN_COLS ) M_warn( "fl_mapcolor", "Changing reserved color" ); /* Must invalidate color cache */ if ( col == flx->color ) flx->color = BadPixel; lut = fl_state[ fl_vmode ].lut; if ( col >= flmapsize ) { M_err( "fl_mapcolor", "Only %d indexed colors are supported", flmapsize ); return 0; } /* col is the external colorname, FL_RED etc, which is kept in fli_imap[].index. */ if ( col == fli_imap[ col ].index ) j = col; for ( i = 0; j < 0 && i < flmapsize; i++ ) if ( col == fli_imap[ i ].index ) j = i; if ( j < 0 ) j = flmapsize - 1; /* In B&W too many colors collaps together */ if ( fli_imap[ j ].r == r && fli_imap[ j ].g == g && fli_imap[ j ].b == b && r != 0 && ! fli_dithered( fl_vmode ) && lut[ col ] ) return lut[ col ]; fli_imap[ j ].r = r; fli_imap[ j ].g = g; fli_imap[ j ].b = b; fli_imap[ j ].grayval = FL_RGB2GRAY( r, g, b ); fli_imap[ j ].index = col; lastmapped = col; M_warn( "fl_mapcolor", "mapping %ld (%d,%d,%d)", col, r, g, b ); pixel = lut[ col ]; exact.red = ( r << 8 ) | 0xff; exact.green = ( g << 8 ) | 0xff; exact.blue = ( b << 8 ) | 0xff; exact.flags = DoRed | DoGreen | DoBlue; exact.pixel = pixel; if ( fl_vmode == DirectColor ) { exact.pixel = lut[ col ] = rgb2pixel( r, g, b ); XStoreColors( flx->display, fli_map( fl_vmode ), &exact, 1 ); return lut[ col ]; } /* pixel value known by the server */ if ( ! allow_leakage && fli_depth( fl_vmode ) >= 4 && pixel != BadPixel ) fl_free_pixels( &pixel, 1 ); if ( XAllocColor( flx->display, fli_colormap( fl_vmode ), &exact ) ) { lut[ col ] = exact.pixel; return lut[ col ]; } /* Colormap is full. Warn once and substitute from now on */ if ( ! cur_mapvals[ fl_vmode ] ) { M_warn( "fl_mapcolor", "ColormapFull. Using substitutions" ); totalcols = FL_min( FL_MAX_COLS, 1L << fli_depth( fl_vmode ) ); cur_map = fl_calloc( totalcols + 1, sizeof *cur_map ); cur_mapvals[ fl_vmode ] = cur_map; /* Take a snapshot of the color map */ for ( i = 0; i < totalcols; i++ ) cur_map[ i ].pixel = i; XQueryColors( flx->display, fli_map( fl_vmode ), cur_map, totalcols ); } /* Search for the closest match */ cur_map = cur_mapvals[ fl_vmode ]; j = fli_find_closest_color( r, g, b, cur_map, totalcols, &pixel ); if ( j < 0 ) { M_err( "fl_mapcolor", "Something is very wrong" ); exit( 1 ); } /* j will be the stuff we want */ lut[ col ] = cur_map[ j ].pixel; /* We still need to allocate the color, otherwise destroying the just requested color might accidentally free a reserved pixel */ exact.red = cur_map[ j ].red; exact.green = cur_map[ j ].green; exact.blue = cur_map[ j ].blue; exact.pixel = cur_map[ j ].pixel; exact.flags = DoRed | DoGreen | DoBlue; if ( ! XAllocColor( flx->display, fli_colormap( fl_vmode ), &exact ) ) M_warn( "fl_mapcolor", "Something is wrong - will proceed" ); #if FL_DEBUG >= ML_DEBUG M_warn( "fl_mapcolor", "(%d %d %d)<->(%d %d %d)", r, g, b, cur_map[ j ].red, cur_map[ j ].green, cur_map[ j ].blue ); #endif return lut[ col ]; } /*************************************** ***************************************/ long fl_mapcolorname( FL_COLOR col, const char * name ) { XColor xc; if ( XParseColor( flx->display, fli_colormap( fl_vmode ), ( char * ) name, &xc ) ) { xc.red = ( xc.red >> 8 ) & 0xff; xc.green = ( xc.green >> 8 ) & 0xff; xc.blue = ( xc.blue >> 8 ) & 0xff; return fl_mapcolor( col, xc.red, xc.green, xc.blue ); } return -1; } /*************************************** * change internal colormap before initialization. This way, * FORMS default color can be changed ***************************************/ void fl_set_icm_color( FL_COLOR col, int r, int g, int b ) { int i; for ( i = 0; i < flmapsize; i++ ) if ( col == fli_imap[ i ].index ) { if ( FL_is_gray( fl_vmode ) ) fli_imap[ i ].grayval = FL_RGB2GRAY( r, g, b ); else { fli_imap[ i ].r = r; fli_imap[ i ].g = g; fli_imap[ i ].b = b; } return; } } /*************************************** * query internal colormap ***************************************/ void fl_get_icm_color( FL_COLOR col, int * r, int * g, int * b ) { int i; for ( i = 0; i < flmapsize; i++ ) if ( col == fli_imap[ i ].index ) { if ( FL_is_gray( fl_vmode ) ) *r = *g = *b = fli_imap[ i ].grayval; else { *r = fli_imap[ i ].r; *g = fli_imap[ i ].g; *b = fli_imap[ i ].b; } return; } } /*************************************** * query real colormap. r,g,b returned is the current color used ***************************************/ unsigned long fl_getmcolor( FL_COLOR i, int * r, int * g, int * b ) { XColor exact; if ( ( exact.pixel = fl_get_pixel( i ) ) >= max_server_cols ) { *r = *g = *b = 0; return ( unsigned long ) -1; } XQueryColor( flx->display, fli_map( fl_vmode ), &exact ); *r = ( exact.red >> 8 ) & 0xff; *g = ( exact.green >> 8 ) & 0xff; *b = ( exact.blue >> 8 ) & 0xff; return exact.pixel; } /*** End of Colormap routines *******}***************/ /*************************************** ***************************************/ void fl_set_graphics_mode( int mode, int doublebuf ) { if ( mode >= 0 && mode < 6 && fl_mode_capable( mode, 1 ) ) { fl_vmode = mode; M_warn( "fl_set_graphics_mode", "Changed to %s\n", fl_vclass_name( mode ) ); } fli_cntl.doubleBuffer = doublebuf; } /*************************************** ***************************************/ int fl_get_visual_depth( void ) { return fl_state[ fl_vmode ].depth; } /*************************************** * print out the current state info. For debugging only ***************************************/ #if FL_DEBUG >= ML_WARN void fli_dump_state_info( int mode, const char * where ) { FL_State *fs = fl_state + mode; XVisualInfo xvi; if ( fli_cntl.debug ) { fprintf( stderr, "In %s", where ); fprintf( stderr, " VClass: %s", fl_vclass_name( fli_class( mode ) ) ); fprintf( stderr, " VisualID: 0x%lx", fs->xvinfo->visualid ); fprintf( stderr, " Depth: %d %d", fli_depth( mode ), fs->xvinfo->depth ); fprintf( stderr, " Colormap: 0x%lx\n", fli_map( mode ) ); } /* Some more checks */ if ( ! XMatchVisualInfo( flx->display, fl_screen, fli_depth( mode ), fli_class( mode ), &xvi ) ) { M_err( "fli_dump_state_info", "Can't match listed visual" ); exit( 1 ); } /* Possible on SGI with OpenGL selected visuals */ if ( fli_visual( mode )->visualid != xvi.visualid ) M_warn( "fli_dump_state_info", "inconsistent visualID, probably OK" ); /* State info consistency */ if ( fli_depth( mode ) != fs->xvinfo->depth ) { M_err( "fli_dump_state_info", "Bad Depth" ); exit( 1 ); } if ( fli_class( mode ) != fs->xvinfo->class ) { M_err( "fli_dump_state_info", "Bad visual class" ); exit( 1 ); } } #endif /*************************************** ***************************************/ int fl_mode_capable( int mode, int warn ) { int cap; if ( mode < 0 || mode > 5 ) { M_err( "fl_mode_capable", "Bad mode = %d", mode ); return 0; } cap = fli_depth( mode ) >= FL_MINDEPTH && fli_visual( mode ); if ( ! cap && warn ) M_warn( "fl_mode_capable", "Not capable of %s at depth = %d", fl_vclass_name( mode ), fli_depth( mode ) ); return cap; } /*************************************** * Convert a RGB triple into a pixel value usable in DirectColor * and TrueColor. Note the RGB triple is ONE-BYTE EACH. ***************************************/ static FL_COLOR rgb2pixel( unsigned int r, unsigned int g, unsigned int b ) { FL_State *s = fl_state + fl_vmode; /* This one drops bits and looks bad if primary color resolution is less than 6, but server calculates color this way. A better way should be r = ((float) r * ((1L << s->rbits) - 1) / 255.0 + 0.1); */ if ( s->rbits < 8 ) { r >>= 8 - s->rbits; g >>= 8 - s->gbits; b >>= 8 - s->bbits; } else if ( s->rbits > 8 ) { r <<= 8 - s->rbits; g <<= 8 - s->gbits; b <<= 8 - s->bbits; } return ( ( ( unsigned long ) r << s->rshift ) & s->rmask ) | ( ( ( unsigned long ) g << s->gshift ) & s->gmask ) | ( ( ( unsigned long ) b << s->bshift ) & s->bmask ); } /*************************************** * Create a colormap valid for the given visual. It also * fills the colormap with default XFORMS map ***************************************/ #define MAXFILL ( FL_BUILT_IN_COLS + 1 ) #define MAXREAD 100 Colormap fl_create_colormap( XVisualInfo * xv, int nfill ) { long black = BlackPixel( flx->display, fl_screen ); long white = WhitePixel( flx->display, fl_screen ); XColor xc; Colormap cmap; int depth = xv->depth == 32 ? 24:xv->depth; int maxcolors = 1 << depth; int maxread = FL_min( MAXREAD, maxcolors ); XColor *cur_entries = fl_malloc( maxread * sizeof *cur_entries ), *dc; int i, j, k, found; unsigned long pixels[ MAXREAD ], allocated[ MAXREAD ], p; int keep = maxcolors / 32; cmap = XCreateColormap( flx->display, fl_root, xv->visual, xv->class != FL_DirectColor ? AllocNone : AllocAll ); /* As a minimum try to preserve Black or White */ xc.flags = DoRed | DoGreen | DoBlue; xc.pixel = 0; if ( black == 0 && nfill >= 0 ) { xc.red = xc.green = xc.blue = 0; XAllocColor( flx->display, cmap, &xc ); } else if ( white == 0 && nfill >= 0 ) { xc.red = xc.green = xc.blue = 0xffff; XAllocColor( flx->display, cmap, &xc ); } /* Now if have the same visual, we can do event more */ if ( nfill > 0 && fl_vmode == xv->class && fl_vmode != DirectColor ) { nfill = FL_min( MAXFILL, nfill ); nfill = FL_min( nfill, maxcolors ); if ( nfill < 4 ) /* potentially 8+1+4 colors */ nfill = 4; for ( i = 0; i < maxread; i++ ) cur_entries[ i ].pixel = i; XQueryColors( flx->display, fli_map( fl_vmode ), cur_entries, maxread ); dc = cur_entries; for ( k = i = 0; i < maxread; i++, dc++ ) { allocated[ i ] = FL_NoColor; dc->flags = DoRed | DoGreen | DoBlue; if ( XAllocColor( flx->display, cmap, dc ) ) allocated[ k++ ] = dc->pixel; } /* Now free the non-xforms colors, but keep some non-xforms entries */ for ( k = 0, i = keep; i < maxread; i++ ) { p = allocated[ i ]; for ( j = found = 0; ! found && j < nfill; j++ ) found = p == fl_get_pixel( j ) || p == ( unsigned long ) white || p == ( unsigned long ) black || p == 34; if ( ! found && p != FL_NoColor ) pixels[ k++ ] = p; } if ( k ) { M_warn( "fl_create_colormap", "free %d\n", k ); XFreeColors( flx->display, cmap, pixels, k, 0 ); } } fl_free( cur_entries ); return cmap; } /*************************************** ***************************************/ void fl_set_color_leak( int y ) { allow_leakage = y; } /*************************************** * if an index is being for the first time, the corresponding pixel * is either reserverd or bad, need to trap it ***************************************/ static int bad_color_handler( Display * d FL_UNUSED_ARG, XErrorEvent * xev ) { if ( xev->error_code == BadAccess ) M_warn( "bad_color_handler", "bad pixel" ); return 0; } /*************************************** ***************************************/ void fl_free_pixels( unsigned long * pix, int n ) { int ( *oh )( Display *, XErrorEvent * ); oh = XSetErrorHandler( bad_color_handler ); XFreeColors( flx->display, fli_map( fl_vmode ), pix, n, 0 ); XSync( flx->display, 0 ); XSetErrorHandler( oh ); } /*************************************** ***************************************/ void fl_free_colors( FL_COLOR * c, int n ) { int i, k, j = -1; unsigned long * pixels = fl_malloc( n * sizeof *pixels ), *pix; lut = fl_state[ fl_vmode ].lut; pix = pixels; for ( k = 0; k < n; k++, c++, pix++ ) { /* If requested color is reserved, warn */ if ( *c < FL_FREE_COL1 ) M_warn( "fl_free_colors", "Freeing reserved color" ); /* Must invalidate color cache */ if ( *c == flx->color ) flx->color = BadPixel; for ( i = 0; j < 0 && i < flmapsize; i++ ) if ( *c == fli_imap[ i ].index ) j = i; if ( j < 0 ) j = flmapsize - 1; /* Pixel value known by the server */ *pix = lut[ *c ]; /* Mark this pixel as bad */ lut[ *c ] = BadPixel; } fl_free_pixels( pixels, n ); fl_free( pixels ); } /*************************************** * (r,g,b) input should be 8bit each ***************************************/ #define LINEAR_COLOR_DISTANCE 0 int fli_find_closest_color( int r, int g, int b, XColor * map, int len, unsigned long * pix ) { long mindiff = 0x7fffffffL, diff; int dr, dg, db; int i, k; for ( k = i = 0; i < len; i++ ) { dr = r - ( ( map[ i ].red >> 8 ) & 0xff ); dg = g - ( ( map[ i ].green >> 8 ) & 0xff ); db = b - ( ( map[ i ].blue >> 8 ) & 0xff ); /* Correct formula is (.299,.587,.114) */ #if LINEAR_COLOR_DISTANCE diff = 3 * FL_abs( dr ) + 4 * FL_abs( dg ) + 2 * FL_abs( db ); #else diff = 3 * ( dr * dr ) + 4 * ( dg * dg ) + 2 * ( db * db ); #endif if ( diff < 0 ) fprintf( stderr, "dr = %d dg = %d db = %d diff = %ld\n", dr, dg, db, diff ); if ( diff < mindiff ) { mindiff = diff; k = i; *pix = map[ i ].pixel; } } return k; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/errmsg.c0000644000175000017500000001222311247055071014441 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file errmsg.c * * Copyright(c) 1993,1994 by T.C. Zhao * All rights reserved. * * Error handling routines. * * Messages are divided into graphics and non-graphics types. * For graphical error messages, a user input may be demanded, * while for non-graphical messages, a string is printed and * does nothing else. * * The graphical output routine must have the following form: * void (*gmout)(const char *, const char *, const char *, int); */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include "local.h" /* up stairs */ #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" #include "ulib.h" extern int errno; /* system error no */ #ifndef HAVE_STRERROR extern char *sys_errlist[ ]; #endif #define MAXESTR 2048 /* maximum error string len */ /********************************************************************** * msg_threshold controls amount of message to print * 0: only error 1: error and warning * 2: info 3: more info * 4: debugging 5: trace **********************************************************************/ /************ Local variables ****************************************/ static FILE *errlog; /* where the msg is going */ static int threshold; /* current threshold */ static int level; /* requested message level */ static const char *file; /* source file name */ static int lineno; /* line no. in that file */ FL_ERROR_FUNC efp_; /* global pointer to shut up lint */ FL_ERROR_FUNC user_error_function_; /* hook for application error handler */ /*************************************** * set up where err is gonna go ***************************************/ void fl_set_err_logfp( FILE * fp ) { if ( fp ) errlog = fp; } /*************************************** ***************************************/ void fl_set_error_handler( FL_ERROR_FUNC user_func) { user_error_function_ = user_func; } /*************************************** ***************************************/ const char * fli_get_syserror_msg( void ) { const char *pp; #ifdef HAVE_STRERROR pp = errno ? strerror( errno ) : ""; #else pp = errno ? sys_errlist[ errno ] : ""; #endif return pp; } /*************************************** * Message levels ***************************************/ void fli_set_msg_threshold( int mlevel ) { threshold = mlevel; } /******************************************************************** * Generate two strings that contain where and why an error occured *********************************************************************/ static void P_errmsg( const char * func, const char * fmt, ... ) { va_list args; char *where, why[ MAXESTR + 1 ] = ""; /* Check if there is nothing to do */ if ( level >= threshold ) return; if ( ! errlog ) errlog = stderr; /* Set up the string where it happended */ if ( func ) { char line[ 20 ]; if ( lineno > 0 ) sprintf( line, "%d", lineno ); else strcpy( line, "?" ); where = *func ? fli_vstrcat( "In ", func, "() [", file, ":", line, "] ", ( char * ) 0 ) : fli_vstrcat( "In [", file, ":", line, "]: ", ( char * ) 0 ); } else where = strdup( "" ); /* Now find out why */ if ( fmt && *fmt ) { va_start( args, fmt ); fl_vsnprintf( why, sizeof why, fmt, args ); va_end( args ); } /* Having gotten the message as well as where and why show it */ fprintf( errlog, "%s%s\n", where, why ); fli_free_vstrcat( where ); } /********************************************************************* * Set the level, line number and file where error occurred, return * the function to use for outputting the error message ********************************************************************/ FL_ERROR_FUNC fli_error_setup( int lev, const char * f, int l ) { file = f; lineno = l; level = lev; return user_error_function_ ? user_error_function_ : P_errmsg; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/pixmap.c0000644000175000017500000006356611314177234014461 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file pixmap.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Pixmap support. In order to take advantage of Xpm3.4g features, * we need both XpmRevision and XpmLibraryVersion check */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include XPM_H_LOCATION #if FL_DEBUG >= ML_ERR #define CHECK( obj, f ) \ if ( ! IsValidClass( ( obj ), FL_PIXMAP ) \ && ! IsValidClass( ( obj ), FL_PIXMAPBUTTON ) ) \ { \ M_err( f, "%s is not Pixmap/pixmapbutton class", \ ( ( obj ) && ( obj )->label ) ? ( obj )->label : "" ); \ return; \ } #else #define CHECK( obj, f ) #endif typedef struct { XpmAttributes * xpma; GC gc; int align; int dx, dy; int show_focus; unsigned int focus_w, /* these should be in button_spec */ focus_h; } PixmapSPEC; static XpmAttributes *xpmattrib; /*************************************** * Part of pixmap cleanup ***************************************/ static void cleanup_xpma_struct( XpmAttributes * xpma ) { /* only versions >= 3.4g have alloc_pixels. We always compile with 3.4g but have to re-act to dynamic libraries, which may be older */ if ( ! xpma || ! xpma->colormap ) return; /* do we use at least libXpm 3.4g? */ #if XpmFormat >= 3 && XpmVersion >= 4 && XpmRevision >= 7 M_warn( "cleanup_xpma_struct", "Using 3.4g features" ); XFreeColors( flx->display, xpma->colormap, xpma->alloc_pixels, xpma->nalloc_pixels, 0 ); #else /* somewhat dangerous */ M_warn( "cleanup_xpma_struct", "Using old xpm libs" ); XFreeColors( flx->display, xpma->colormap, xpma->pixels, xpma->npixels, 0 ); #endif xpma->colormap = None; XpmFreeAttributes( xpma ); fl_free( xpma ); } /*************************************** * Free pixmaps associated with an object ***************************************/ static void free_pixmap( FL_BUTTON_STRUCT * sp ) { PixmapSPEC *psp = sp->cspecv; fl_free_pixmap( sp->pixmap ); fl_free_pixmap( sp->mask ); cleanup_xpma_struct( psp->xpma ); psp->xpma = NULL; sp->pixmap = None; sp->mask = None; } /*************************************** ***************************************/ static void free_focuspixmap( FL_BUTTON_STRUCT * sp ) { fl_free_pixmap( sp->focus_pixmap ); fl_free_pixmap( sp->focus_mask ); sp->focus_pixmap = None; sp->focus_mask = None; } /*************************************** * Change pixmap/mask. del==true means we want to destroy old pixmaps ***************************************/ static void change_pixmap( FL_BUTTON_STRUCT * sp, Window win, Pixmap p, Pixmap shape_mask, int del ) { PixmapSPEC *psp = sp->cspecv; if ( p == None || win == None ) return; if ( del ) free_pixmap( sp ); else { cleanup_xpma_struct( psp->xpma ); psp->xpma = NULL; } sp->pixmap = p; sp->mask = shape_mask; M_warn( "change_pixmap", "Pixmap = %ld mask = %ld win = %ld", p, shape_mask, win ); if ( psp->gc == None ) { psp->gc = XCreateGC( flx->display, win, 0, NULL ); XSetGraphicsExposures( flx->display, psp->gc, False ); } XSetClipMask( flx->display, psp->gc, sp->mask ); } /*************************************** * Change pixmap/mask. If 'del' is set destroy teh old pixmaps ***************************************/ static void change_focuspixmap( FL_BUTTON_STRUCT * sp, Window win FL_UNUSED_ARG, Pixmap p, Pixmap shape_mask, int del ) { if ( del ) free_focuspixmap( sp ); sp->focus_pixmap = p; sp->focus_mask = shape_mask; } /*************************************** ***************************************/ static void show_pixmap( FL_OBJECT * obj, int focus ) { FL_BUTTON_STRUCT *sp = obj->spec; PixmapSPEC *psp = sp->cspecv; int dest_x, dest_y, dest_w, dest_h, src_x, src_y, m_dest_x, m_dest_y; FL_Coord clip_x, clip_y, clip_w, clip_h; Pixmap pixmap, mask; int bits_w, bits_h, is_focus = focus && sp->focus_pixmap && psp->show_focus; pixmap = is_focus ? sp->focus_pixmap : sp->pixmap; mask = is_focus ? sp->focus_mask : sp->mask; bits_w = is_focus ? psp->focus_w : sp->bits_w; bits_h = is_focus ? psp->focus_h : sp->bits_h; /* Do nothing if pixmap does not exist or has zero size */ if ( pixmap == None || bits_w == 0 || bits_h == 0 ) { fl_drw_text( FL_ALIGN_CENTER, obj->x, obj->y, obj->w, obj->h, obj->lcol, obj->lstyle, FL_TINY_SIZE, "p" ); return; } m_dest_x = dest_x = obj->x + FL_abs( obj->bw ) + psp->dx; m_dest_y = dest_y = obj->y + FL_abs( obj->bw ) + psp->dy; dest_w = obj->w - 2 * FL_abs( obj->bw ) - 2 * psp->dx; dest_h = obj->h - 2 * FL_abs( obj->bw ) - 2 * psp->dy; src_x = 0; src_y = 0; if ( dest_w > bits_w ) { if ( ! ( psp->align & ( FL_ALIGN_LEFT | FL_ALIGN_RIGHT ) ) ) m_dest_x = dest_x += ( dest_w - bits_w ) / 2; else if ( psp->align & FL_ALIGN_RIGHT ) m_dest_x = dest_x += dest_w - bits_w; dest_w = bits_w; } else { if ( ! ( psp->align & ( FL_ALIGN_LEFT | FL_ALIGN_RIGHT ) ) ) src_x = ( bits_w - dest_w ) / 2; else if ( psp->align & FL_ALIGN_RIGHT ) src_x = bits_w - dest_w; m_dest_x -= src_x; } if ( dest_h > bits_h ) { if ( ! ( psp->align & ( FL_ALIGN_TOP | FL_ALIGN_BOTTOM ) ) ) m_dest_y = dest_y += ( dest_h - bits_h ) / 2; else if ( psp->align & FL_ALIGN_BOTTOM ) m_dest_y = dest_y += dest_h - bits_h; dest_h = bits_h; } else { if ( ! ( psp->align & ( FL_ALIGN_TOP | FL_ALIGN_BOTTOM ) ) ) src_y = ( bits_h - dest_h ) / 2; else if ( psp->align & FL_ALIGN_BOTTOM ) src_y = bits_h - dest_h; m_dest_y -= src_y; } /* Get the currently set clipping */ fli_get_clipping( &clip_x, &clip_y, &clip_w, &clip_h ); if ( clip_w > 0 && clip_h > 0 ) { /* If the pixmap is not within the clipping region nothing is to be drawn */ if ( dest_x + dest_w < clip_x || dest_x > clip_x + clip_w || dest_y + dest_h < clip_y || dest_y > clip_y + clip_h ) return; /* If the pixmap isn't completely within the clipping region recalculate what to draw */ if ( dest_x <= clip_x || dest_x + dest_w >= clip_x + clip_w || dest_y <= clip_y || dest_y + dest_h >= clip_y + clip_h ) { if ( dest_x < clip_x ) { src_x += clip_x - dest_x; dest_w -= clip_x - dest_x; dest_x = clip_x; } if ( dest_x + dest_w > clip_x + clip_w ) dest_w = clip_x + clip_w - dest_x; if ( dest_y < clip_y ) { src_y += clip_y - dest_y; dest_h -= clip_y - dest_y; dest_y = clip_y; } if ( dest_y + dest_h > clip_y + clip_h ) dest_h = clip_y + clip_h - dest_y; } } /* hopefully, XSetClipMask is smart */ XSetClipMask( flx->display, psp->gc, mask ); XSetClipOrigin( flx->display, psp->gc, m_dest_x, m_dest_y ); XCopyArea( flx->display, pixmap, FL_ObjWin( obj ), psp->gc, src_x, src_y, dest_w, dest_h, dest_x, dest_y ); } static int red_closeness = 40000; static int green_closeness = 30000; static int blue_closeness = 50000; /*************************************** * Basic attributes ***************************************/ static void init_xpm_attributes( Window win, XpmAttributes * xpma, FL_COLOR tran ) { XWindowAttributes xwa; XGetWindowAttributes( flx->display, win, &xwa ); xpma->valuemask = XpmVisual | XpmDepth | XpmColormap; xpma->depth = xwa.depth; xpma->visual = xwa.visual; xpma->colormap = xwa.colormap; xpma->valuemask |= XpmRGBCloseness; xpma->red_closeness = red_closeness; xpma->green_closeness = green_closeness; xpma->blue_closeness = blue_closeness; #if XpmRevision >= 7 xpma->valuemask |= XpmReturnPixels | XpmReturnAllocPixels; #else xpma->valuemask |= XpmReturnPixels; #endif { static XpmColorSymbol xpcm[ 2 ]; xpcm[ 0 ].name = "None"; xpcm[ 0 ].value = 0; xpcm[ 0 ].pixel = fl_get_flcolor( tran ); xpcm[ 1 ].name = "opaque"; xpcm[ 1 ].value = 0; xpcm[ 1 ].pixel = fl_get_flcolor( FL_BLACK ); xpma->valuemask |= XpmColorSymbols; xpma->colorsymbols = xpcm; xpma->numsymbols = 2; } } /********************************************************************** * Static PIXMAP ******************************************************************{**/ static void draw_pixmap( FL_OBJECT * obj ) { /* Draw the box */ fl_drw_box( obj->boxtype, obj->x, obj->y, obj->w, obj->h, obj->col2, obj->bw ); show_pixmap( obj, 0 ); } /*************************************** ***************************************/ static int handle_pixmap( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FL_BUTTON_STRUCT *sp = obj->spec; #if FL_DEBUG >= ML_DEBUG M_info( "handle_pixmap", fli_event_name( event ) ); #endif switch ( event ) { case FL_DRAW: draw_pixmap( obj ); /* fall through */ case FL_DRAWLABEL: fl_draw_object_label( obj ); break; case FL_FREEMEM: free_pixmap( obj->spec ); if ( ( ( PixmapSPEC * ) sp->cspecv )->gc ) XFreeGC( flx->display, ( ( PixmapSPEC * ) sp->cspecv )->gc ); fl_safe_free( sp->cspecv ); fl_safe_free( obj->spec ); break; } return FL_RETURN_NONE; } /*************************************** * Creates a pixmap object ***************************************/ FL_OBJECT * fl_create_pixmap( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FL_BUTTON_STRUCT *sp; PixmapSPEC *psp; obj = fl_make_object( FL_PIXMAP, type, x, y, w, h, label, handle_pixmap ); obj->boxtype = FL_BITMAP_BOXTYPE; obj->col1 = FL_BITMAP_COL1; obj->col2 = FL_BITMAP_COL2; obj->lcol = FL_BITMAP_LCOL; obj->align = FL_BITMAP_ALIGN; obj->active = type != FL_NORMAL_BITMAP; obj->spec = sp = fl_calloc( 1, sizeof *sp ); sp->bits_w = 0; sp->cspecv = psp = fl_calloc( 1, sizeof *psp ); psp->dx = psp->dy = 0; psp->align = FL_ALIGN_CENTER | FL_ALIGN_INSIDE; return obj; } /*************************************** * Adds a pixmap object ***************************************/ FL_OBJECT * fl_add_pixmap( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_pixmap( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** ***************************************/ Pixmap fl_create_from_pixmapdata( Window win, char ** data, unsigned int * w, unsigned int * h, Pixmap * sm, int * hotx, int * hoty, FL_COLOR tran ) { Pixmap p = None; int s; /* This ensures we do not depend on the header/dl having the same size */ xpmattrib = fl_calloc( 1, XpmAttributesSize( ) ); init_xpm_attributes( win, xpmattrib, tran ); s = XpmCreatePixmapFromData( flx->display, win, data, &p, sm, xpmattrib ); if ( s != XpmSuccess ) { errno = 0; M_err( "fl_create_from_pixmapdata", "error converting: %s", ( s == XpmOpenFailed ? "(Can't open)" : ( s == XpmFileInvalid ? "(Invalid file)" : ( s == XpmColorFailed ? "(Can't get color)" : "" ) ) ) ); if ( s < 0 ) { fl_free( xpmattrib ); return None; } } if ( p != None ) { *w = xpmattrib->width; *h = xpmattrib->height; if ( hotx ) *hotx = xpmattrib->x_hotspot; if ( hoty ) *hoty = xpmattrib->y_hotspot; } else fl_free( xpmattrib ); return p; } /*************************************** ***************************************/ void fl_set_pixmap_pixmap( FL_OBJECT * obj, Pixmap id, Pixmap mask ) { FL_BUTTON_STRUCT *sp; FL_Coord w = 0, h = 0; CHECK( obj, "fl_set_pixmap_pixmap" ); sp = obj->spec; change_pixmap( sp, FL_ObjWin( obj ), id, mask, 0 ); /* 0 don't free old */ if ( sp->pixmap != None ) fl_get_winsize( sp->pixmap, &w, &h ); sp->bits_w = w; sp->bits_h = h; fl_redraw_object( obj ); } /*************************************** ***************************************/ Pixmap fl_get_pixmap_pixmap( FL_OBJECT * obj, Pixmap * p, Pixmap * m ) { FL_BUTTON_STRUCT *sp; if ( ! IsValidClass( obj, FL_PIXMAP ) && ! IsValidClass( obj, FL_PIXMAPBUTTON ) ) { M_err( "fl_get_pixmap_pixmap", "%s is not Pixmap/pixmapbutton class", ( obj && obj->label ) ? obj->label : "" ); return None; } sp = obj->spec; /* pixmapbutton and pixmap use the same structure */ *p = sp->pixmap; if ( m ) *m = sp->mask; return sp->pixmap; } /*************************************** * Generic routine to read a pixmap file. ***************************************/ Pixmap fl_read_pixmapfile( Window win, const char * file, unsigned int * w, unsigned int * h, Pixmap * shape_mask, int * hotx, int * hoty, FL_COLOR tran ) { Pixmap p = None; int s; xpmattrib = fl_calloc( 1, XpmAttributesSize( ) ); init_xpm_attributes( win, xpmattrib, tran ); s = XpmReadFileToPixmap( flx->display, win, ( char * ) file, &p, shape_mask, xpmattrib ); if ( s != XpmSuccess ) { errno = 0; M_err( "fl_read_pixmapfile", "error reading %s %s", file, ( s == XpmOpenFailed ? "(Can't open)" : ( s == XpmFileInvalid ? "(Invalid file)" : ( s == XpmColorFailed ? "(Can't get color)" : "" ) ) ) ); if ( s < 0 ) { fl_free( xpmattrib ); return None; } } if ( p != None ) { *w = xpmattrib->width; *h = xpmattrib->height; if ( hotx ) *hotx = xpmattrib->x_hotspot; if ( hoty ) *hoty = xpmattrib->y_hotspot; } else fl_free( xpmattrib ); return p; } /*************************************** ***************************************/ void fl_set_pixmap_file( FL_OBJECT * obj, const char * fname ) { Pixmap p = None, shape_mask = None; FL_BUTTON_STRUCT *sp; int hotx, hoty; Window win; if ( ! flx || ! flx->display ) return; CHECK( obj, "fl_set_pixmap_file" ); sp = obj->spec; win = FL_ObjWin( obj ) ? FL_ObjWin( obj ) : fl_default_win( ); p = fl_read_pixmapfile( win, fname, &sp->bits_w, &sp->bits_h, &shape_mask, &hotx, &hoty, obj->col1 ); if ( p != None ) { change_pixmap( sp, win, p, shape_mask, 0 ); ( ( PixmapSPEC * ) sp->cspecv )->xpma = xpmattrib; fl_redraw_object( obj ); } } /******** End of static pixmap ************************}*/ /***************************************************************** * Pixmap button ***********************************************************{****/ #define IsFlat( t ) ( ( t ) == FL_FLAT_BOX \ || ( t ) == FL_FRAME_BOX \ || ( t ) == FL_BORDER_BOX ) /*************************************** ***************************************/ static void draw_pixmapbutton( FL_OBJECT * obj ) { FL_BUTTON_STRUCT *sp = obj->spec; PixmapSPEC *psp = sp->cspecv; /* Draw it like a "normal button */ fli_draw_button( obj ); /* Add the pixmap on top of it */ switch ( sp->event ) { case FL_ENTER: if ( psp->show_focus ) show_pixmap( obj, 1 ); else show_pixmap( obj, 0 ); break; case FL_LEAVE: show_pixmap( obj, 0 ); break; default: show_pixmap( obj, obj->belowmouse && psp->show_focus ); break; } fl_draw_object_label( obj ); } /*************************************** * button driver will clean up spec after this function returns ***************************************/ static void cleanup_pixmapbutton( FL_BUTTON_STRUCT *sp ) { PixmapSPEC *psp = sp->cspecv; if ( psp->gc ) { XFreeGC( flx->display, psp->gc ); psp->gc = None; } if ( psp->xpma ) { cleanup_xpma_struct( psp->xpma ); psp->xpma = NULL; } if ( sp->cspecv ) { fl_free( sp->cspecv ); sp->cspecv = NULL; } } /*************************************** ***************************************/ FL_OBJECT * fl_create_pixmapbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; static int class_init; FL_BUTTON_STRUCT *sp; PixmapSPEC *psp; if ( ! class_init ) { fl_add_button_class( FL_PIXMAPBUTTON, draw_pixmapbutton, cleanup_pixmapbutton ); class_init = 1; } obj = fl_create_generic_button( FL_PIXMAPBUTTON, type, x, y, w, h, label ); obj->boxtype = FL_PIXMAPBUTTON_BOXTYPE; obj->col1 = FL_PIXMAPBUTTON_COL1; obj->col2 = FL_PIXMAPBUTTON_COL2; obj->align = FL_PIXMAPBUTTON_ALIGN; obj->lcol = FL_PIXMAPBUTTON_LCOL; sp = obj->spec; /* allocated in fl_create_generic_button() */ sp->cspecv = psp = fl_calloc( 1, sizeof *psp ); psp->show_focus = 1; psp->align = FL_ALIGN_CENTER | FL_ALIGN_INSIDE; psp->dx = psp->dy = 3; return obj; } /*************************************** ***************************************/ FL_OBJECT * fl_add_pixmapbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; obj = fl_create_pixmapbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** ***************************************/ void fl_set_pixmap_data( FL_OBJECT * obj, char ** bits ) { FL_BUTTON_STRUCT *sp; Window win; Pixmap p, shape_mask = None; int hx, hy; CHECK( obj, "fl_set_pixmap_data" ); if ( ! flx->display ) return; sp = obj->spec; win = FL_ObjWin( obj ) ? FL_ObjWin( obj ) : fl_default_win( ); p = fl_create_from_pixmapdata( win, bits, &sp->bits_w, &sp->bits_h, &shape_mask, &hx, &hy, obj->col1 ); if ( p != None ) { change_pixmap( sp, win, p, shape_mask, 0 ); ( ( PixmapSPEC * ) sp->cspecv )->xpma = xpmattrib; fl_redraw_object( obj ); } } /*************************************** ***************************************/ void fl_set_pixmap_colorcloseness( int red, int green, int blue ) { red_closeness = red; green_closeness = green; blue_closeness = blue; } /****************** End of pixmap stuff ************}**/ /*************************************** ***************************************/ void fl_set_pixmap_align( FL_OBJECT * obj, int align, int xmargin, int ymargin ) { FL_BUTTON_STRUCT *sp; PixmapSPEC *psp; CHECK( obj, "fl_set_pixmap_align" ); sp = obj->spec; psp = sp->cspecv; if ( align != psp->align || xmargin != psp->dx || ymargin != psp->dy ) { psp->align = align; psp->dx = xmargin; psp->dy = ymargin; fl_redraw_object( obj ); } } /*************************************** ***************************************/ void fl_set_pixmapbutton_focus_pixmap( FL_OBJECT * obj, Pixmap id, Pixmap mask ) { FL_BUTTON_STRUCT *sp = obj->spec; PixmapSPEC *psp = sp->cspecv; int w, h; CHECK( obj, "fl_set_pixmapbutton_focus_pixmap" ); change_focuspixmap( sp, FL_ObjWin( obj ), id, mask, 0 ); if ( sp->focus_pixmap != None ) { fl_get_winsize( sp->focus_pixmap, &w, &h ); psp->focus_w = w; psp->focus_h = h; } } /*************************************** ***************************************/ void fl_set_pixmapbutton_focus_data( FL_OBJECT * obj, char ** bits ) { FL_BUTTON_STRUCT *sp; PixmapSPEC *psp; Window win; Pixmap p, shape_mask = None; int hx, hy; CHECK( obj, "fl_set_pixmapbutton_focus_data" ); if ( ! flx->display ) return; sp = obj->spec; psp = sp->cspecv; win = FL_ObjWin( obj ) ? FL_ObjWin( obj ) : fl_default_win( ); p = fl_create_from_pixmapdata( win, bits, &psp->focus_w, &psp->focus_h, &shape_mask, &hx, &hy, obj->col1 ); if ( p != None ) { change_focuspixmap( sp, win, p, shape_mask, 0 ); ( ( PixmapSPEC * ) sp->cspecv )->xpma = xpmattrib; } } /*************************************** ***************************************/ void fl_set_pixmapbutton_focus_file( FL_OBJECT * obj, const char * fname ) { Pixmap p, shape_mask = None; FL_BUTTON_STRUCT *sp; int hotx, hoty; Window win; PixmapSPEC *psp; if ( ! flx->display ) return; sp = obj->spec; psp = sp->cspecv; win = FL_ObjWin( obj ) ? FL_ObjWin( obj ) : fl_default_win( ); p = fl_read_pixmapfile( win, fname, &psp->focus_w, &psp->focus_h, &shape_mask, &hotx, &hoty, obj->col1 ); if ( p != None ) { change_focuspixmap( sp, win, p, shape_mask, 0 ); fl_free( xpmattrib ); } } /*************************************** ***************************************/ void fl_set_pixmapbutton_focus_outline( FL_OBJECT * obj, int yes_no ) { FL_BUTTON_STRUCT *sp; PixmapSPEC *psp; CHECK( obj, "fl_set_pixmapbutton_focus_outline" ); sp = obj->spec; psp = sp->cspecv; psp->show_focus = yes_no; } /*************************************** ***************************************/ void fl_free_pixmap_pixmap( FL_OBJECT * obj ) { CHECK( obj, "fl_free_pixmap_pixmap" ); free_pixmap( obj->spec ); } /*************************************** * This can't go into forms.c as it will pull xpm into * programs that don't need it ***************************************/ void fli_set_form_icon_data( FL_FORM * form, char ** data ) { Pixmap p, s = None; unsigned int j; p = fl_create_from_pixmapdata( fl_root, data, &j, &j, &s, NULL, NULL, 0 ); if ( p != None ) { fl_set_form_icon( form, p, s ); fl_free( xpmattrib ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/appwin.c0000644000175000017500000002071211247055071014442 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file appwin.c *. * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Manage application windows */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /***************************************************************** * Application window management. Data structure is grossly wrong * ****TODO****** **************************************************************{**/ /* some constant handlers */ static int handle_mapping_notify( XEvent * xev, void * user_data FL_UNUSED_ARG ) { XRefreshKeyboardMapping( ( XMappingEvent * ) xev ); return 0; } /*************************************** ***************************************/ static void remove_app_win( FLI_WIN * appwin ) { #if FL_DEBUG >= ML_DEBUG M_info( "remove_app_win", "deleting window %ld", appwin->win ); #endif if ( fli_app_win == appwin ) fli_app_win = appwin->next; else { FLI_WIN *fwin = fli_app_win; while ( fwin && fwin->next != appwin ) fwin = fwin->next; if ( fwin ) fwin->next = fwin->next->next; else { M_err( "remove_app_win", "Invalid argument" ); return; } } fl_free( appwin ); } /*************************************** * Given a window find the correct structure or create one ***************************************/ static FLI_WIN * get_fl_win_struct( Window win ) { FLI_WIN *fwin = fli_app_win, *lwin = fli_app_win; size_t i; for ( ; fwin && fwin->win != win; lwin = fwin, fwin = fwin->next ) /* empty */ ; /* If we found it we're done */ if ( fwin ) return fwin; /* Otherwise create a new structure and append it to the end */ #if FL_DEBUG >= ML_DEBUG M_info( "get_fl_win_struct", "Creating FLI_WIN struct for %ld", win ); #endif if ( ( fwin = fl_malloc( sizeof *fwin ) ) == NULL ) return NULL; fwin->next = NULL; fwin->win = win; fwin->pre_emptive = NULL; fwin->pre_emptive_data = NULL; for ( i = 0; i < LASTEvent; i++ ) { fwin->callback[ i ] = NULL; fwin->user_data[ i ] = NULL; } /* Default handlers */ fwin->callback[ MappingNotify ] = handle_mapping_notify; fwin->default_callback = NULL; fwin->mask = 0; if ( ! fli_app_win ) fli_app_win = fwin; else lwin->next = fwin; return fwin; } /*************************************** ***************************************/ FL_APPEVENT_CB fli_set_preemptive_callback( Window win, FL_APPEVENT_CB pcb, void * data ) { FLI_WIN *fwin; FL_APPEVENT_CB old = NULL; if ( ! ( fwin = get_fl_win_struct( win ) ) ) { M_err( "fli_set_preemptive_callback", "Memory allocation failure" ); return NULL; } old = fwin->pre_emptive; fwin->pre_emptive = pcb; fwin->pre_emptive_data = data; return old; } /*************************************** * Add an event handler for a window ***************************************/ FL_APPEVENT_CB fl_add_event_callback( Window win, int ev, FL_APPEVENT_CB wincb, void * user_data ) { FLI_WIN *fwin; int i, nev; FL_APPEVENT_CB old = NULL; if ( ev < 0 || ev >= LASTEvent ) return NULL; if ( ! ( fwin = get_fl_win_struct( win ) ) ) { M_err( "fl_add_event_callback", "Memory allocation failure" ); return NULL; } /* ev < KeyPress means all events */ nev = ev; if ( ev < KeyPress ) { ev = KeyPress; nev = LASTEvent - 1; } for ( i = ev; i <= nev; i++ ) { old = fwin->callback[ i ]; fwin->callback[ i ] = wincb; fwin->user_data[ i ] = user_data; } return old; } /*************************************** * Removes one or all event callbacks for a window. May be * called with for a window for which no event callbacks * have been set, so handle also that case gracefully. ***************************************/ void fl_remove_event_callback( Window win, int ev ) { FLI_WIN *fwin = fli_app_win; if ( ev < 0 || ev >= LASTEvent ) return; while ( fwin && fwin->win != win ) fwin = fwin->next; if ( ! fwin ) return; if ( ev >= KeyPress ) { fwin->callback[ ev ] = NULL; fwin->user_data[ ev ] = NULL; } else /* ev < KeyPress means all events */ remove_app_win( fwin ); } typedef struct { int event; unsigned long mask; } EMS; static EMS ems[ ] = { { CirculateNotify, StructureNotifyMask }, { ConfigureNotify, StructureNotifyMask }, { DestroyNotify, StructureNotifyMask }, { CreateNotify, StructureNotifyMask }, { GravityNotify, StructureNotifyMask }, { MapNotify, StructureNotifyMask }, { ReparentNotify, StructureNotifyMask }, { UnmapNotify, StructureNotifyMask }, { CirculateRequest, SubstructureRedirectMask }, { ConfigureRequest, SubstructureRedirectMask }, { MapRequest, SubstructureRedirectMask }, { ResizeRequest, ResizeRedirectMask }, { Expose, ExposureMask }, { EnterNotify, EnterWindowMask }, { LeaveNotify, LeaveWindowMask }, { KeyPress, KeyPressMask }, { KeyRelease, KeyReleaseMask} , { ButtonPress, ButtonPressMask /* | OwnerGrabButtonMask */ }, { ButtonRelease, ButtonReleaseMask /* | OwnerGrabButtonMask */ }, { MotionNotify, PointerMotionMask | ButtonMotionMask | PointerMotionHintMask }, { FocusIn, FocusChangeMask }, { FocusOut, FocusChangeMask }, { KeymapNotify, KeymapStateMask }, { PropertyNotify, PropertyChangeMask }, { VisibilityNotify, VisibilityChangeMask }, { ColormapNotify, ColormapChangeMask }, /* non-maskable events */ { MappingNotify, 0 }, { SelectionNotify, 0 }, { SelectionRequest, 0 }, { SelectionClear, 0 }, { ClientMessage, 0 }, { GraphicsExpose, 0 }, { NoExpose, 0 } }; /*************************************** ***************************************/ unsigned long fli_xevent_to_mask( int event ) { EMS *em = ems, *eme = ems + sizeof ems / sizeof *ems; for ( ; em < eme; em++ ) if ( em->event == event ) return em->mask; return 0; } /*************************************** ***************************************/ void fl_activate_event_callbacks( Window win ) { FLI_WIN *fwin = fli_app_win; int i; unsigned long mask; while ( fwin && fwin->win != win ) fwin = fwin->next; if ( ! fwin ) { M_err( "fl_activate_event_callbacks", "Unknown window %ld", win ); return; } /* Solicit all registered events */ for ( mask = i = 0; i < LASTEvent; i++ ) if ( fwin->callback[ i ] ) mask |= fli_xevent_to_mask( i ); XSelectInput( flx->display, win, mask ); } /*************************************** ***************************************/ void fl_winclose( Window win ) { XEvent xev; XUnmapWindow( flx->display, win ); XDestroyWindow( flx->display, win ); XSync( flx->display, 0 ); while ( XCheckWindowEvent( flx->display, win, AllEventsMask, &xev ) ) fli_xevent_name( "Eaten", &xev ); fl_remove_event_callback( win, 0 ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/tbox.c0000644000175000017500000017366711374311421014135 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pbrowser.h" #include #include #include #define TOP_MARGIN 1 #define RIGHT_MARGIN 2 #define BOTTOM_MARGIN 1 #define LEFT_MARGIN 3 /* must be at least 1 for selection box */ static int handle_tbox( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); static GC create_gc( FL_OBJECT *, int, int, FL_COLOR, int, int, int, int ); /*************************************** * Creates a new textbox object ***************************************/ FL_OBJECT * fli_create_tbox( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_TBOX_SPEC *sp; obj = fl_make_object( FL_TBOX, type, x, y, w, h, label, handle_tbox ); obj->boxtype = FLI_TBOX_BOXTYPE; obj->lcol = FLI_TBOX_LCOL; obj->col1 = FLI_TBOX_COL1; obj->col2 = FLI_TBOX_COL2; obj->align = FLI_TBOX_ALIGN; obj->wantkey = FL_KEY_SPECIAL; obj->want_update = 0; obj->spec = sp = fl_malloc( sizeof *sp ); sp->x = 0; sp->y = 0; sp->w = 0; sp->h = 0; sp->attrib = 1; sp->no_redraw = 0; sp->lines = NULL; sp->num_lines = 0; sp->callback = NULL; sp->xoffset = 0; sp->yoffset = 0; sp->max_width = 0; sp->max_height = 0; sp->def_size = fli_cntl.browserFontSize ? fli_cntl.browserFontSize : FLI_TBOX_FONTSIZE; sp->def_style = FL_NORMAL_STYLE; sp->def_align = FL_ALIGN_LEFT; sp->defaultGC = None; sp->backgroundGC = None; sp->selectGC = None; sp->nonselectGC = None; sp->bw_selectGC = None; sp->specialkey = '@'; sp->select_line = -1; sp->deselect_line = -1; sp->react_to_vert = sp->react_to_hori = 1; /* Per default the object never gets returned, user must change that */ fl_set_object_return( obj, FL_RETURN_NONE ); return obj; } /*************************************** * Deletes a line from the textbox ***************************************/ void fli_tbox_delete_line( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; int recalc_max_width = 0; int i; /* If line number is invalid do nothing */ if ( line < 0 || line >= sp->num_lines ) return; if ( sp->select_line == line ) sp->select_line = -1; else if ( sp->select_line > line ) sp->select_line--; if ( sp->deselect_line == line ) sp->deselect_line = -1; else if ( sp->deselect_line > line ) sp->deselect_line--; /* Check if recalculation of maximum line length is necessary */ if ( sp->max_width == sp->lines[ line ]->w ) recalc_max_width = 1; /* Set vertical position of following lines */ for ( i = line + 1; i < sp->num_lines; i++ ) sp->lines[ i ]->y -= sp->lines[ line ]->h; sp->max_height -= sp->lines[ line ]->h; /* Get rid of special GC for the line */ if ( sp->lines[ line ]->specialGC ) { XFreeGC( flx->display, sp->lines[ line ]->specialGC ); sp->lines[ line ]->specialGC = None; } /* Deallocate memory for the text of the line to delete */ fl_safe_free( sp->lines[ line ]->fulltext ); /* Get rid of memory for the structure */ fl_free( sp->lines[ line ] ); /* Move pointers to following line structures one up */ if ( --sp->num_lines != line ) memmove( sp->lines + line, sp->lines + line + 1, ( sp->num_lines - line ) * sizeof *sp->lines ); /* Reduce memory for array of structure pointers */ sp->lines = fl_realloc( sp->lines, sp->num_lines * sizeof *sp->lines ); /* If necessary find remaining longest line */ if ( recalc_max_width ) { sp->max_width = 0; for ( i = 0; i < sp->num_lines; i++ ) sp->max_width = FL_max( sp->max_width, sp->lines[ i ]->w ); /* Correct x offset if necessary */ if ( sp->max_width <= sp->w ) sp->xoffset = 0; else if ( sp->xoffset > sp->max_width - sp->w ) sp->xoffset = sp->max_width - sp->w; } /* Check thaty offset is still reasonable */ if ( sp->num_lines == 0 ) sp->yoffset = 0; else if ( sp->lines[ sp->num_lines - 1 ]->y + sp->lines[ sp->num_lines - 1 ]->h < sp->yoffset + sp->h ) { int old_no_redraw = sp->no_redraw; sp->no_redraw = 1; fli_tbox_set_bottomline( obj, sp->num_lines - 1 ); sp->no_redraw = old_no_redraw; } if ( ! sp->no_redraw ) fl_redraw_object( obj ); } /*************************************** * Inserts one or more lines, separated by * linefeed characters, into the textbox ***************************************/ void fli_tbox_insert_lines( FL_OBJECT * obj, int line, const char * new_text ) { char *text = fl_strdup( new_text ); char *p = text; char *del; while ( 1 ) { ; if ( ( del = strchr( p, '\n' ) ) ) *del = '\0'; fli_tbox_insert_line( obj, line++, p ); if ( del ) p = del + 1; else break; } fl_free( text ); } /*************************************** * Inserts a single line into the textbox ***************************************/ void fli_tbox_insert_line( FL_OBJECT * obj, int line, const char * new_text ) { FLI_TBOX_SPEC *sp = obj->spec; char *text; char *p; int done = 0; char *e; int is_bold = 0; int is_italic = 0; TBOX_LINE *tl; int i; /* Catch invalid 'line' or 'new_text' argument */ if ( line < 0 || ! new_text ) return; /* If 'line' is too large correct that by appending to the end */ if ( line >= sp->num_lines ) line = sp->num_lines; /* Make sure the line marked as selected and deselected stay correct */ if ( sp->select_line >= line ) sp->select_line++; if ( sp->deselect_line >= line ) sp->deselect_line++; /* Make a copy of the text of the line */ p = text = strdup( new_text ); /* Get memory for one more line */ sp->lines = fl_realloc( sp->lines, ++sp->num_lines * sizeof *sp->lines ); /* If necessary move all following lines one down */ if ( line < sp->num_lines - 1 ) memmove( sp->lines + line + 1, sp->lines + line, ( sp->num_lines - line - 1 ) * sizeof *sp->lines ); sp->lines[ line ] = tl = fl_malloc( sizeof **sp->lines ); /* Set up defaults for the line */ tl->fulltext = NULL; tl->text = NULL; tl->len = 0; tl->selected = 0; tl->selectable = 1; tl->is_separator = 0; tl->is_underlined = 0; tl->x = 0; tl->w = 0; tl->h = sp->def_size; tl->size = sp->def_size; tl->style = sp->def_style; tl->align = sp->def_align; tl->color = obj->lcol; tl->is_special = 0; tl->specialGC = None; /* Check for flags at the start of the line. When we're done 'p' points to the start of the string to be shown in the textbox.*/ while ( *p && *p == sp->specialkey && ! done ) { if ( p[ 1 ] == sp->specialkey ) { p += 1; done = 1; break; } switch ( p [ 1 ] ) { case '\0' : done = 1; break; case 'h' : tl->size = FL_HUGE_SIZE; p += 2; break; case 'l' : tl->size = FL_LARGE_SIZE; p += 2; break; case 'm' : tl->size = FL_MEDIUM_SIZE; p += 2; break; case 's' : tl->size = FL_SMALL_SIZE; p += 2; break;; case 'L' : tl->size += 6; p += 2; break; case 'M' : tl->size += 4; p += 2; break; case 'S' : tl->size -= 2; p += 2; break; case 'b' : tl->style |= FL_BOLD_STYLE; is_bold = 1; p += 2; break; case 'i' : tl->style |= FL_ITALIC_STYLE; is_italic = 1; p += 2; break; case 'n' : tl->style = FL_NORMAL_STYLE; if ( is_bold ) tl->style |= FL_BOLD_STYLE; if ( is_italic ) tl->style |= FL_ITALIC_STYLE; p += 2; break; case 'f' : tl->style = FL_FIXED_STYLE; if ( is_bold ) tl->style |= FL_BOLD_STYLE; if ( is_italic ) tl->style |= FL_ITALIC_STYLE; p += 2; break; case 't' : tl->style = FL_TIMES_STYLE; if ( is_bold ) tl->style |= FL_BOLD_STYLE; if ( is_italic ) tl->style |= FL_ITALIC_STYLE; p += 2; break; case 'c' : tl->align = FL_ALIGN_CENTER; p += 2; break; case 'r' : tl->align = FL_ALIGN_RIGHT; p += 2; break; case '_' : tl->is_underlined = 1; p += 2; break; case '-' : sp->lines[ line ]->is_separator = 1; sp->lines[ line ]->selectable = 0; done = 1; break; case 'N' : sp->lines[ line ]->selectable = 0; tl->color = FL_INACTIVE; p += 2; break; case 'C' : tl->color = strtol( p + 2, &e, 10 ); if ( e == p + 2 ) { M_err( "fli_tbox_insert_line", "missing color" ); p += 1; break; } if ( tl->color >= FL_MAX_COLS ) { M_err( "fli_tbox_insert_line", "bad color %ld", tl->color ); tl->color = obj->lcol; } p = e; break; default : M_err( "fli_tbox_insert_line", "bad flag %c", p[ 1 ] ); p += 1; done = 1; break; } } tl->fulltext = text; if ( ! tl->is_separator ) tl->text = p; else tl->text = tl->fulltext + strlen( tl->fulltext ); tl->len = strlen( tl->text ); /* Figure out width and height of string */ if ( ! tl->is_separator && *tl->text ) { tl->w = fl_get_string_widthTAB( tl->style, tl->size, tl->text, tl->len ); tl->h = fl_get_string_height( tl->style, tl->size, tl->len ? tl->text : " " , tl->len | 1, &tl->asc, &tl->desc ); } else { tl->w = 0; tl->h = fl_get_string_height( tl->style, tl->size, "X", 1, &tl->asc, &tl->desc ); } /* If the new line is longer than all others we need to recalculate the horizontal position of all lines that aren't left aligned */ if ( tl->w > sp->max_width ) { sp->max_width = tl->w; for ( i = 0; i < sp->num_lines; i++ ) if ( sp->lines[ i ]->align == FL_ALIGN_CENTER ) sp->lines[ i ]->x = ( sp->max_width - sp->lines[ i ]->w ) / 2; else if ( sp->lines[ i ]->align == FL_ALIGN_RIGHT ) sp->lines[ i ]->x = sp->max_width - sp->lines[ i ]->w; } else { if ( tl->align == FL_ALIGN_CENTER ) tl->x = ( sp->max_width - tl->w ) / 2; else if ( tl->align == FL_ALIGN_RIGHT ) tl->x = sp->max_width - tl->w; } /* Calculate the vertical position of the line, shifting that of lines that may come afterwards */ if ( sp->num_lines == 1 ) tl->y = 0; else if ( line == sp->num_lines - 1 ) tl->y = sp->lines[ line - 1 ]->y + sp->lines[ line - 1 ]->h; else { tl->y = sp->lines[ line + 1 ]->y; for ( i = line + 1; i < sp->num_lines; i++ ) sp->lines[ i ]->y += tl->h; } sp->max_height += tl->h; /* Set flag if the line isn't to be drawn in default style, size and color. We don't create a GC yet since this might be called before the textbox is visible! */ if ( tl->style != sp->def_style || tl->size != sp->def_size || ( tl->color != obj->lcol && tl->selectable ) ) tl->is_special = 1; if ( ! sp->no_redraw ) fl_redraw_object( obj ); } /*************************************** * Appends a line to the end of the textbox ***************************************/ void fli_tbox_add_line( FL_OBJECT * obj, const char * text, int show ) { FLI_TBOX_SPEC *sp = obj->spec; fli_tbox_insert_lines( obj, sp->num_lines, text ); /* Make last line visible if asked for */ if ( show && sp->num_lines ) { TBOX_LINE *tl = sp->lines[ sp->num_lines - 1 ]; if ( tl->y + tl->h - sp->yoffset >= sp->h ) fli_tbox_set_bottomline( obj, sp->num_lines - 1 ); } } /*************************************** * Appends characters to the last line in the textbox ***************************************/ void fli_tbox_add_chars( FL_OBJECT * obj, const char * add ) { FLI_TBOX_SPEC *sp = obj->spec; TBOX_LINE *tl; int new_len; char *old_fulltext; char * old_text; int i; char *new_text; char *del; /* If there's nothing to add return */ if ( ! add || ! *add ) return; /* If there aren't any lines yet it's equivalent to inserting a new one */ if ( sp->num_lines == 0 ) { fli_tbox_insert_lines( obj, sp->num_lines, add ); return; } /* If the last line is empty replace it by the stuff to be added */ if ( sp->lines[ sp->num_lines - 1 ]->len == 0 ) { int old_no_redraw = sp->no_redraw; sp->no_redraw = 1; fli_tbox_delete_line( obj, sp->num_lines - 1 ); fli_tbox_insert_lines( obj, sp->num_lines, add ); sp->no_redraw = old_no_redraw; return; } /* Append everything to the last line up to a linefeed */ if ( ( del = strchr( add, '\n' ) ) ) { new_text = fl_malloc( del - add + 1 ); memcpy( new_text, add, del - add ); new_text[ del - add ] = '\0'; } else new_text = ( char * ) add; tl = sp->lines[ sp->num_lines - 1 ]; /* Make up the new text of the line from the old and the new text */ new_len = strlen( tl->fulltext ) + strlen( new_text ); old_text = tl->text; old_fulltext = tl->fulltext; tl->fulltext = fl_malloc( new_len + 1 ); strcpy( tl->fulltext, old_fulltext ); strcat( tl->fulltext, new_text ); tl->text = tl->fulltext + ( old_text - old_fulltext ); tl->len = new_len; fl_safe_free( old_fulltext ); /* Text of a separator line never gets shown */ if ( tl->is_separator ) return; /* Figure out the new length of the line */ if ( *tl->text ) tl->w = fl_get_string_widthTAB( tl->style, tl->size, tl->text, tl->len ); /* If line is now longer than all others we need to recalculate the horizontal position of all lines that aren't left aligned */ if ( tl->w > sp->max_width ) { sp->max_width = tl->w; for ( i = 0; i < sp->num_lines; i++ ) if ( sp->lines[ i ]->align == FL_ALIGN_CENTER ) sp->lines[ i ]->x = ( sp->max_width - sp->lines[ i ]->w ) / 2; else if ( sp->lines[ i ]->align == FL_ALIGN_RIGHT ) sp->lines[ i ]->x = sp->max_width - sp->lines[ i ]->w; } else { if ( tl->align == FL_ALIGN_CENTER ) tl->x = ( sp->max_width - tl->w ) / 2; else if ( tl->align == FL_ALIGN_RIGHT ) tl->x = sp->max_width - tl->w; } /* If there was no newline in the string to be appended we're done, otherwise the remaining stuff has to be added as new lines */ if ( ! del ) { TBOX_LINE *tl = sp->lines[ sp->num_lines - 1 ]; if ( tl->y + tl->h - sp->yoffset >= sp->h ) fli_tbox_set_bottomline( obj, sp->num_lines - 1 ); } else { fl_free( new_text ); fli_tbox_add_line( obj, del + 1, 1 ); } } /*************************************** * Replaces a line in the textbox ***************************************/ void fli_tbox_replace_line( FL_OBJECT * obj, int line, const char * text ) { FLI_TBOX_SPEC *sp = obj->spec; int old_select_line = sp->select_line; int old_no_redraw = sp->no_redraw; if ( line < 0 || line >= sp->num_lines || ! text ) return; sp->no_redraw = 1; fli_tbox_delete_line( obj, line ); sp->no_redraw = old_no_redraw; fli_tbox_insert_line( obj, line, text ); if ( line == old_select_line && sp->lines[ line ]->selectable ) fli_tbox_select_line( obj, line ); } /*************************************** * Removes all lines from the textbox ***************************************/ void fli_tbox_clear( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int i; sp->select_line = sp->deselect_line = -1; if ( sp->num_lines == 0 ) return; for ( i = 0; i < sp->num_lines; i++ ) { if ( sp->lines[ i ]->specialGC ) { XFreeGC( flx->display, sp->lines[ i ]->specialGC ); sp->lines[ i ]->specialGC = None; } fl_safe_free( sp->lines[ i ]->fulltext ); fl_safe_free( sp->lines[ i ] ); } fl_safe_free( sp->lines ); sp->num_lines = 0; sp->max_width = 0; sp->max_height = 0; sp->xoffset = 0; sp->yoffset = 0; if ( ! sp->no_redraw ) fl_redraw_object( obj ); } /*************************************** * Loads all lines from a file into the textbox ***************************************/ int fli_tbox_load( FL_OBJECT * obj, const char * filename ) { FLI_TBOX_SPEC *sp = obj->spec; FILE *fp; char *text; char *del; /* Load the file */ if ( ! filename || ! *filename ) return 0; if ( ! ( fp = fopen( filename, "r" ) ) ) return 0; while ( ( text = fli_read_line( fp ) ) && *text ) { int old_no_redraw = sp->no_redraw; /* Get rid of linefeed at end of line */ if ( ( del = strrchr( text, '\n' ) ) ) *del = '\0'; sp->no_redraw = 1; fli_tbox_insert_line( obj, sp->num_lines, text ); sp->no_redraw = old_no_redraw; fl_free( text ); } fl_safe_free( text ); fclose( fp ); if ( ! sp->no_redraw ) fl_redraw_object( obj ); return 1; } /*************************************** * Returns the text of a line in the textbox (including flags) ***************************************/ const char * fli_tbox_get_line( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( line < 0 || line >= sp->num_lines ) return NULL; return sp->lines[ line ]->fulltext; } /*************************************** * Sets a new font size for all lines drawn with default settings ***************************************/ void fli_tbox_set_fontsize( FL_OBJECT * obj, int size ) { FLI_TBOX_SPEC *sp = obj->spec; double old_xrel; double old_yrel; int old_no_redraw = sp->no_redraw; int i; if ( size < FL_TINY_SIZE || size > FL_HUGE_SIZE ) return; sp->def_size = size; sp->attrib = 1; if ( sp->num_lines == 0 ) return; old_xrel = fli_tbox_get_rel_xoffset( obj ); old_yrel = fli_tbox_get_rel_yoffset( obj ); /* Calculate width and height for all lines */ for ( i = 0; i < sp->num_lines; i++ ) { TBOX_LINE *tl = sp->lines[ i ]; if ( tl->is_special ) continue; tl->size = size; /* Figure out width and height of string */ if ( ! tl->is_separator && *tl->text ) { tl->w = fl_get_string_widthTAB( tl->style, tl->size, tl->text, tl->len ); tl->h = fl_get_string_height( tl->style, tl->size, tl->len ? tl->text : " ", tl->len | 1, &tl->asc, &tl->desc ); } else { tl->w = 0; tl->h = fl_get_string_height( tl->style, tl->size, "X", 1, &tl->asc, &tl->desc ); } } /* Calculate vertical positions of all lines and max width */ sp->max_width = sp->lines[ 0 ]->w; for ( i = 1; i < sp->num_lines; i++ ) { sp->lines[ i ]->y = sp->lines[ i - 1 ]->y + sp->lines[ i - 1 ]->h; sp->max_width = FL_max( sp->max_width, sp->lines[ i ]->w ); } /* Determine new height of all text */ sp->max_height = sp->lines[ sp->num_lines - 1 ]->y + sp->lines[ sp->num_lines - 1 ]->h; sp->no_redraw = 1; fli_tbox_set_rel_xoffset( obj, old_xrel ); fli_tbox_set_rel_yoffset( obj, old_yrel ); sp->no_redraw = old_no_redraw; } /*************************************** * Sets a new font style for all lines drawn with default settings ***************************************/ void fli_tbox_set_fontstyle( FL_OBJECT * obj, int style ) { FLI_TBOX_SPEC *sp = obj->spec; double old_xrel; double old_yrel; int old_no_redraw = sp->no_redraw; int i; if ( style < FL_NORMAL_STYLE || style > FL_TIMESBOLDITALIC_STYLE ) return; sp->def_style = style; sp->attrib = 1; if ( sp->num_lines == 0 ) return; old_xrel = fli_tbox_get_rel_xoffset( obj ); old_yrel = fli_tbox_get_rel_yoffset( obj ); /* Calculate width and height for all lines */ for ( i = 0; i < sp->num_lines; i++ ) { TBOX_LINE *tl = sp->lines[ i ]; if ( tl->is_special ) continue; tl->style = style; /* Figure out width and height of string */ if ( ! tl->is_separator && *tl->text ) { tl->w = fl_get_string_widthTAB( tl->style, tl->size, tl->text, tl->len ); tl->h = fl_get_string_height( tl->style, tl->size, tl->len ? tl->text : " ", tl->len | 1, &tl->asc, &tl->desc ); } else { tl->w = 0; tl->h = fl_get_string_height( tl->style, tl->size, "X", 1, &tl->asc, &tl->desc ); } } /* Calculate vertical positions of all lines and the width of the longest line */ sp->max_width = sp->lines[ 0 ]->w; for ( i = 1; i < sp->num_lines; i++ ) { sp->lines[ i ]->y = sp->lines[ i - 1 ]->y + sp->lines[ i - 1 ]->h; sp->max_width = FL_max( sp->max_width, sp->lines[ i ]->w ); } /* Determine new height of total text */ sp->max_height = sp->lines[ sp->num_lines - 1 ]->y + sp->lines[ sp->num_lines - 1 ]->h; sp->attrib = 1; sp->no_redraw = 1; fli_tbox_set_rel_xoffset( obj, old_xrel ); fli_tbox_set_rel_yoffset( obj, old_yrel ); sp->no_redraw = old_no_redraw; } /*************************************** * Sets the x-offset in pixels of the text displayed in the textbox ***************************************/ int fli_tbox_set_xoffset( FL_OBJECT * obj, int pixel ) { FLI_TBOX_SPEC *sp = obj->spec; if ( sp->max_width <= sp->w || pixel < 0 ) pixel = 0; if ( pixel > sp->max_width - sp->w ) pixel = FL_max( 0, sp->max_width - sp->w ); sp->xoffset = pixel; if ( ! sp->no_redraw ) fl_redraw_object( obj ); return pixel; } /*************************************** * Sets the x-offset of the text displayed in the textbox as a * number between 0 (starts of lines are shown) and 1 (end of * longest line is shown) ***************************************/ double fli_tbox_set_rel_xoffset( FL_OBJECT * obj, double offset ) { FLI_TBOX_SPEC *sp = obj->spec; if ( sp->max_width <= sp->w || offset < 0.0 ) offset = 0.0; if ( offset > 1.0 ) offset = 1.0; sp->xoffset = FL_nint( offset * FL_max( 0, sp->max_width - sp->w ) ); if ( ! sp->no_redraw ) fl_redraw_object( obj ); return fli_tbox_get_rel_xoffset( obj ); } /*************************************** * Sets the y-offset in pixels of the text displayed in the textbox ***************************************/ int fli_tbox_set_yoffset( FL_OBJECT * obj, int pixel ) { FLI_TBOX_SPEC *sp = obj->spec; if ( sp->max_height <= sp->h || pixel < 0 ) pixel = 0; if ( pixel > sp->max_height - sp->h ) pixel = FL_max( 0, sp->max_height - sp->h ); sp->yoffset = pixel; if ( ! sp->no_redraw ) fl_redraw_object( obj ); return pixel; } /*************************************** * Sets the y-offset of the text displayed in the textbox as a * number between 0 (show start of text) and 1 (show end of * text) ***************************************/ double fli_tbox_set_rel_yoffset( FL_OBJECT * obj, double offset ) { FLI_TBOX_SPEC *sp = obj->spec; if ( sp->max_height <= sp->h || offset < 0.0 ) offset = 0.0; if ( offset > 1.0 ) offset = 1.0; sp->yoffset = FL_nint( offset * FL_max( 0, sp->max_height - sp->h ) ); if ( ! sp->no_redraw ) fl_redraw_object( obj ); return fli_tbox_get_rel_yoffset( obj ); } /*************************************** * Returns the x-offset in pixels of the text displayed in the textbox ***************************************/ int fli_tbox_get_xoffset( FL_OBJECT * obj ) { return ( ( FLI_TBOX_SPEC * ) obj->spec )->xoffset; } /*************************************** * Returns the x-offset of the text displayed in the textbox * as a number between 0 (starts of lines are shown) and 1 * (end of longest line s shown) ***************************************/ double fli_tbox_get_rel_xoffset( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; if ( sp->max_width <= sp->w ) return 0.0; return ( double ) sp->xoffset / ( sp->max_width - sp->w ); } /*************************************** * Returns the y-offset in pixels of the text displayed in the textbox ***************************************/ int fli_tbox_get_yoffset( FL_OBJECT * obj ) { return ( ( FLI_TBOX_SPEC * ) obj->spec )->yoffset; } /*************************************** * Returns the y-offset of the text displayed in the textbox * as a number between 0 (start of text is shown) and 1 (end * of text is shown) ***************************************/ double fli_tbox_get_rel_yoffset( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; if ( sp->max_height <= sp->h ) return 0.0; return ( double ) sp->yoffset / ( sp->max_height - sp->h ); } /*************************************** * Returns the y-offset (in pixel) for a line (or -1 if the line * does not exist). ***************************************/ int fli_tbox_get_line_yoffset( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( line < 0 || line >= sp->num_lines ) return -1; return sp->lines[ line ]->y; } /*************************************** * Makes a line the topmost shown line (as far as possible) ***************************************/ void fli_tbox_set_topline( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( ! sp->num_lines ) return; if ( line < 0 ) line = 0; else if ( line >= sp->num_lines ) line = sp->num_lines - 1; fli_tbox_set_yoffset( obj, sp->lines[ line ]->y ); } /*************************************** * Makes a line the lowest shown line (as far as possible) ***************************************/ void fli_tbox_set_bottomline( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( ! sp->num_lines ) return; if ( line < 0 ) line = 0; else if ( line >= sp->num_lines ) line = sp->num_lines - 1; fli_tbox_set_yoffset( obj, sp->lines[ line ]->y + sp->lines[ line ]->h - sp->h ); } /*************************************** * Makes a line shown in the center of the browser (as far as possible) ***************************************/ void fli_tbox_set_centerline( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( ! sp->num_lines ) return; if ( line < 0 ) line = 0; else if ( line >= sp->num_lines ) line = sp->num_lines - 1; fli_tbox_set_yoffset( obj, sp->lines[ line ]->y + ( sp->lines[ line ]->h - sp->h ) / 2 ); } /*************************************** * Removes all selections in the browser ***************************************/ void fli_tbox_deselect( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int i; for ( i = 0; i < sp->num_lines; i++ ) sp->lines[ i ]->selected = 0; sp->select_line = -1; sp->deselect_line = -1; if ( ! sp->no_redraw ) fl_redraw_object( obj ); } /*************************************** * Deselects a line in the browser ***************************************/ void fli_tbox_deselect_line( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( line < 0 || line >= sp->num_lines || ! sp->lines[ line ]->selected ) return; sp->lines[ line ]->selected = 0; /* Don't mark as deselected for FL_SELECT_BROWSER since otherwise it would be impossible for the user to retrieve the selection */ if ( obj->type != FL_SELECT_BROWSER ) { sp->deselect_line = line; sp->select_line = -1; } if ( ! sp->no_redraw ) fl_redraw_object( obj ); } /*************************************** * Selects a line in the browser (if necessary deselecting another line) ***************************************/ void fli_tbox_select_line( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( line < 0 || line >= sp->num_lines || sp->lines[ line ]->selected || ! sp->lines[ line ]->selectable ) return; if ( sp->select_line != -1 && obj->type != FL_MULTI_BROWSER ) sp->lines[ sp->select_line ]->selected = 0; sp->lines[ line ]->selected = 1; sp->select_line = line; sp->deselect_line = -1; if ( ! sp->no_redraw ) fl_redraw_object( obj ); } /*************************************** * Returns if a line in the browser is selected ***************************************/ int fli_tbox_is_line_selected( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; return line >= 0 && line < sp->num_lines && sp->lines[ line ]->selected; } /*************************************** * Sets if a line is selectable or not ***************************************/ void fli_tbox_make_line_selectable( FL_OBJECT * obj, int line, int state ) { FLI_TBOX_SPEC *sp = obj->spec; TBOX_LINE *tl; if ( line < 0 || line >= sp->num_lines || sp->lines[ line ]->is_separator || obj->type == FL_NORMAL_BROWSER ) return; tl = sp->lines[ line ]; state = state ? 1 : 0; if ( ! state ) { if ( line == sp->select_line ) sp->select_line = -1; if ( line == sp->deselect_line ) sp->deselect_line = -1; } if ( tl->selectable != state ) { tl->selectable = state; if ( tl->is_special ) { if ( tl->specialGC ) { XFreeGC( flx->display, tl->specialGC ); sp->lines[ line ]->specialGC = None; } if ( FL_ObjWin( obj ) ) tl->specialGC = create_gc( obj, tl->style, tl->size, state ? obj->lcol : FL_INACTIVE, sp->x, sp->y, sp->w, sp->h ); } } if ( ! sp->no_redraw ) fl_redraw_object( obj ); } /*************************************** * Returns the last selected or deselected line (or 0 if there's none). * Please note: this function returns the index of the selected line * incremented by one and the negative of the index of the deselected * line decremented by 1. ***************************************/ int fli_tbox_get_selection( FL_OBJECT *obj ) { FLI_TBOX_SPEC *sp = obj->spec; if ( sp->select_line >= 0 ) return sp->select_line + 1; else if ( sp->deselect_line >= 0 ) return - sp->deselect_line - 1; else return 0; } /*************************************** * Installs a handler for double and triple clicks ***************************************/ void fli_tbox_set_dblclick_callback( FL_OBJECT * obj, FL_CALLBACKPTR cb, long data ) { FLI_TBOX_SPEC *sp = obj->spec; sp->callback = cb; sp->callback_data = data; fl_set_object_dblclick( obj, cb ? FL_CLICK_TIMEOUT : 0 ); } /*************************************** * Creates a GC with the required settings ***************************************/ static GC create_gc( FL_OBJECT * obj, int style, int size, FL_COLOR color, int clip_x, int clip_y, int clip_w, int clip_h ) { GC gc; XGCValues xgcv; unsigned long gcvm; if ( fli_cntl.safe ) xgcv.graphics_exposures = 1; else { Screen *scr = ScreenOfDisplay( flx->display, fl_screen ); xgcv.graphics_exposures = ! DoesBackingStore( scr ) || ! fli_cntl.backingStore; } gcvm = GCGraphicsExposures | GCForeground; xgcv.foreground = fl_get_flcolor( color ); gc = XCreateGC( flx->display, FL_ObjWin( obj ), gcvm, &xgcv ); if ( size > 0 && style >= 0 ) { XFontStruct *xfs = fl_get_fntstruct( style, size ); XSetFont( flx->display, gc, xfs->fid ); } fl_set_gc_clipping( gc, obj->x + clip_x, obj->y + clip_y, clip_w, clip_h ); return gc; } /*************************************** ***************************************/ void fli_tbox_recalc_area( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int dummy; sp->x = FL_abs( obj->bw ) + LEFT_MARGIN; sp->y = FL_abs( obj->bw ) + TOP_MARGIN; sp->w = obj->w - 2 * FL_abs( obj->bw ) - LEFT_MARGIN - RIGHT_MARGIN; sp->h = obj->h - 2 * FL_abs( obj->bw ) - TOP_MARGIN - BOTTOM_MARGIN; /* This is necessary because different box types haven't all the same inside size but will look still wrong with anything but up and down boxes... */ if ( obj->boxtype == FL_UP_BOX ) { sp->x++; sp->y++; sp->w -= 2; sp->h -= 2; } /* Calculate height of line with default font */ sp->def_height = fl_get_string_height( sp->def_style, sp->def_size, "X", 1, &dummy, &dummy ); } /*************************************** ***************************************/ static void fli_tbox_prepare_drawing( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int i; double old_xrel = fli_tbox_get_rel_xoffset( obj ); double old_yrel = fli_tbox_get_rel_yoffset( obj ); int old_no_redraw = sp->no_redraw; fli_tbox_recalc_area( obj ); /* Recalculate horizontal positions of all lines */ for ( i = 0; i < sp->num_lines; i++ ) if ( sp->lines[ i ]->align == FL_ALIGN_CENTER ) sp->lines[ i ]->x = ( sp->max_width - sp->lines[ i ]->w ) / 2; else if ( sp->lines[ i ]->align == FL_ALIGN_RIGHT ) sp->lines[ i ]->x = sp->max_width - sp->lines[ i ]->w; /* We might get called before the textbox is shown and then the window is still unknown and GCs can't be created */ if ( ! FL_ObjWin( obj ) ) return; /* Create default GC for text drawing */ if ( sp->defaultGC ) XFreeGC( flx->display, sp->defaultGC ); sp->defaultGC = create_gc( obj, sp->def_style, sp->def_size, obj->lcol, sp->x, sp->y, sp->w, sp->h ); /* Create background GC for redraw deselected lines */ if ( sp->backgroundGC ) XFreeGC( flx->display, sp->backgroundGC ); sp->backgroundGC = create_gc( obj, -1, 0, obj->col1, sp->x - ( LEFT_MARGIN > 0 ), sp->y, sp->w + ( LEFT_MARGIN > 0 ), sp->h ); /* Create select GC for marking selected lines */ if ( sp->selectGC ) XFreeGC( flx->display, sp->selectGC ); sp->selectGC = create_gc( obj, -1, 0, fli_dithered( fl_vmode ) ? FL_BLACK : obj->col2, sp->x - ( LEFT_MARGIN > 0 ), sp->y, sp->w + ( LEFT_MARGIN > 0 ), sp->h ); /* Create GC for text of non-selectable lines */ if ( sp->nonselectGC ) XFreeGC( flx->display, sp->nonselectGC ); sp->nonselectGC = create_gc( obj, sp->def_style, sp->def_size, FL_INACTIVE, sp->x, sp->y, sp->w, sp->h ); /* Special GC for text of selected lines in B&W */ if ( fli_dithered( fl_vmode ) ) { if ( sp->bw_selectGC ) XFreeGC( flx->display, sp->bw_selectGC ); sp->bw_selectGC = create_gc( obj, sp->def_style, sp->def_size, FL_WHITE, sp->x - ( LEFT_MARGIN > 0 ), sp->y, sp->w + ( LEFT_MARGIN > 0 ), sp->h ); } /* Lines with non-default fonts or colors have their own GCs */ for ( i = 0; i < sp->num_lines; i++ ) { TBOX_LINE *tl = sp->lines[ i ]; if ( ! tl->is_special ) continue; if ( tl->specialGC ) { XFreeGC( flx->display, tl->specialGC ); tl->specialGC = None; } tl->specialGC = create_gc( obj, tl->style, tl->size, tl->color, sp->x, sp->y, sp->w, sp->h ); } sp->no_redraw = 1; fli_tbox_set_rel_xoffset( obj, old_xrel ); fli_tbox_set_rel_yoffset( obj, old_yrel ); sp->no_redraw = old_no_redraw; } /*************************************** * Frees all resources needed for the FLI_TBOX_SPEC structure ***************************************/ static void free_tbox_spec( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int i; for ( i = 0; i < sp->num_lines; i++ ) { if ( sp->lines[ i ]->specialGC ) XFreeGC( flx->display, sp->lines[ i ]->specialGC ); fl_safe_free( sp->lines[ i ]->fulltext ); fl_safe_free( sp->lines[ i ] ); } fl_safe_free( sp->lines ); if ( sp->defaultGC ) XFreeGC( flx->display, sp->defaultGC ); if ( sp->backgroundGC ) XFreeGC( flx->display, sp->backgroundGC ); if ( sp->selectGC ) XFreeGC( flx->display, sp->selectGC ); if ( sp->nonselectGC ) XFreeGC( flx->display, sp->nonselectGC ); if ( sp->bw_selectGC ) XFreeGC( flx->display, sp->bw_selectGC ); fl_safe_free( obj->spec ); } /*************************************** * Draws the complete textbox ***************************************/ static void draw_tbox( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int i; XFillRectangle( flx->display, FL_ObjWin( obj ), sp->backgroundGC, obj->x + sp->x - ( LEFT_MARGIN > 0 ), obj->y + sp->y + sp->w - sp->yoffset, sp->w + ( LEFT_MARGIN > 0 ), sp->h ); if ( sp->num_lines == 0 ) return; for ( i = 0; i < sp->num_lines; i++ ) { TBOX_LINE *tl; GC activeGC = sp->defaultGC; tl = sp->lines[ i ]; if ( tl->y + tl->h < sp->yoffset ) /* if line is above tbox */ continue; if ( tl->y >= sp->h + sp->yoffset ) /* if line is below tbox */ break; /* Separator lines obviously need to be treated differently from normal text */ if ( tl->is_separator ) { /* The extra horizontal pixels here are due to the function called subtracting them! */ fl_drw_text( 0, obj->x + sp->x - 3, obj->y + sp->y - sp->yoffset + tl->y + tl->h / 2, sp->w + 6, 1, FL_COL1, FL_NORMAL_STYLE, sp->def_size, "@DnLine" ); continue; } /* Draw background of line in selection color if necessary*/ if ( tl->selected ) XFillRectangle( flx->display, FL_ObjWin( obj ), sp->selectGC, obj->x + sp->x - ( LEFT_MARGIN > 0 ), obj->y + sp->y + tl->y - sp->yoffset, sp->w + ( LEFT_MARGIN > 0 ), tl->h ); /* If there's no text or the text isn't visible within the textbox nothing needs to be drawn */ if ( ! *tl->text || tl->x - sp->xoffset >= sp->w || tl->x + tl->w - sp->xoffset < 0 ) continue; /* If the line needs a different font or color than the default use a special GC just for that line */ if ( ! tl->selectable ) activeGC = sp->nonselectGC; if ( tl->is_special ) { if ( ! tl->specialGC ) tl->specialGC = create_gc( obj, tl->style, tl->size, tl->selectable ? tl->color : FL_INACTIVE, sp->x, sp->y, sp->w, sp->h ); activeGC = tl->specialGC; } /* Set up GC for selected lines in B&W each time round - a bit slow, but I guess there are hardly any machines left with a B&W display */ if ( fli_dithered( fl_vmode ) && tl->selected ) { XFontStruct *xfs = fl_get_fntstruct( tl->style, tl->size ); XSetFont( flx->display, sp->bw_selectGC, xfs->fid ); XSetForeground( flx->display, sp->bw_selectGC, fl_get_flcolor( FL_WHITE ) ); activeGC = sp->bw_selectGC; } /* Now draw the line, underlined if necessary */ if ( tl->is_underlined ) fl_diagline( obj->x + sp->x - sp->xoffset + tl->x, obj->y + sp->y - sp->yoffset + tl->y + tl->h - 1, FL_min( sp->w + sp->xoffset - tl->x, tl->w ), 1, ( fli_dithered( fl_vmode ) && tl->selected ) ? FL_WHITE : tl->color ); fli_drw_stringTAB( FL_ObjWin( obj ), activeGC, obj->x + sp->x - sp->xoffset + tl->x, obj->y + sp->y - sp->yoffset + tl->y + tl->asc, tl->style, tl->size, tl->text, tl->len, 0 ); } } /*************************************** * Tries to find the index of the next selectable line following * 'line', returns the total number of lines if none can be found. ***************************************/ static int find_next_selectable( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( line < -1 || line >= sp->num_lines ) line = -1; while ( ++line < sp->num_lines ) if ( sp->lines[ line ]->selectable ) break; return line < sp->num_lines ? line : -1; } /*************************************** * Tries to find the index of the next selectable line * before 'line', returns -1 if none can be found. ***************************************/ static int find_previous_selectable( FL_OBJECT * obj, int line ) { FLI_TBOX_SPEC *sp = obj->spec; if ( line < 0 || line > sp->num_lines ) line = sp->num_lines; while ( --line >= 0 ) if ( sp->lines[ line ]->selectable ) break; return line; } /*************************************** * Returns the total number of lines in the browser ***************************************/ int fli_tbox_get_num_lines( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; return sp->num_lines; } /*************************************** * Returns the index of the first line that * is completete shown on the screen ***************************************/ int fli_tbox_get_topline( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int i = FL_min( sp->yoffset / sp->def_height, sp->num_lines - 1); if ( sp->num_lines == 0 ) return -1; if ( sp->lines[ i ]->y < sp->yoffset ) { while ( ++i < sp->num_lines && sp->lines[ i ]->y < sp->yoffset ) /* empty */ ; if ( i == sp->num_lines || sp->lines[ i ]->y > sp->yoffset + sp->h ) i--; } else if ( sp->lines[ i ]->y > sp->yoffset ) { while ( i-- > 0 && sp->lines[ i ]->y > sp->yoffset ) /* empty */ ; if ( i < 0 || sp->lines[ i ]->y < sp->yoffset ) i++; } return i < sp->num_lines ? i : -1; } /*************************************** * Returns the index of the last line that * is completete shown on the screen ***************************************/ int fli_tbox_get_bottomline( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int i = sp->num_lines; while ( --i >= 0 && sp->lines[ i ]->y > sp->yoffset && sp->lines[ i ]->y + sp->lines[ i ]->h > sp->yoffset + sp->h ) /* empty */ ; return i; } /*************************************** * Deals with keyboard input (and indirectly with mouse wheel "clicks") ***************************************/ static int handle_keyboard( FL_OBJECT * obj, int key ) { FLI_TBOX_SPEC *sp = obj->spec; int old_select_line = sp->select_line; int old_yoffset = sp->yoffset; int old_xoffset = sp->xoffset; int ret = FL_RETURN_NONE; if ( IsHome( key ) && sp->react_to_vert ) fli_tbox_set_rel_yoffset( obj, 0.0 ); else if ( IsEnd( key ) && sp->react_to_vert ) fli_tbox_set_rel_yoffset( obj, 1.0 ); else if ( IsPageUp( key ) && sp->react_to_vert ) fli_tbox_set_yoffset( obj, sp->yoffset - sp->h ); else if ( IsHalfPageUp( key ) && sp->react_to_vert ) fli_tbox_set_yoffset( obj, sp->yoffset - sp->h / 2 ); else if ( Is1LineUp( key ) && sp->react_to_vert ) fli_tbox_set_yoffset( obj, sp->yoffset - sp->def_height ); else if ( ( IsPageDown( key ) || key == ' ' ) && sp->react_to_vert ) fli_tbox_set_yoffset( obj, sp->yoffset + sp->h ); else if ( IsHalfPageDown( key ) && sp->react_to_vert ) fli_tbox_set_yoffset( obj, sp->yoffset + sp->h / 2 ); else if ( Is1LineDown( key ) && sp->react_to_vert ) fli_tbox_set_yoffset( obj, sp->yoffset + sp->def_height ); else if ( IsLeft( key ) && sp->react_to_hori ) fli_tbox_set_xoffset( obj, sp->xoffset - 3 ); else if ( IsRight( key ) && sp->react_to_hori ) fli_tbox_set_xoffset( obj, sp->xoffset + 3 ); else if ( IsUp( key ) ) { if ( sp->react_to_vert && ( obj->type == FL_NORMAL_BROWSER || obj->type == FL_SELECT_BROWSER || obj->type == FL_MULTI_BROWSER ) ) { int topline = fli_tbox_get_topline( obj ); if ( --topline >= 0 ) fli_tbox_set_yoffset( obj, sp->lines[ topline ]->y ); } else if ( obj->type == FL_HOLD_BROWSER ) { TBOX_LINE *tl; int line = find_previous_selectable( obj, sp->select_line ); if ( line >= 0 ) { tl = sp->lines[ line ]; if ( sp->react_to_vert || ( tl->y + tl->h >= sp->yoffset && tl->y < sp->h + sp->yoffset ) ) { fli_tbox_select_line( obj, line ); tl = sp->lines[ sp->select_line ]; /* Bring the selection into view if necessary */ if ( tl->y < sp->yoffset ) fli_tbox_set_topline( obj, sp->select_line ); else if ( tl->y + tl->h - sp->yoffset >= sp->h ) fli_tbox_set_bottomline( obj, sp->select_line ); } } } } else if ( IsDown( key ) ) { if ( sp->react_to_vert && ( obj->type == FL_NORMAL_BROWSER || obj->type == FL_SELECT_BROWSER || obj->type == FL_MULTI_BROWSER ) ) { int topline = fli_tbox_get_topline( obj ); if ( topline >= 0 && topline < sp->num_lines - 1 ) { if ( sp->lines[ topline ]->y - sp->yoffset == 0 ) topline++; fli_tbox_set_yoffset( obj, sp->lines[ topline ]->y ); } else fli_tbox_set_yoffset( obj, sp->max_height ); } else if ( obj->type == FL_HOLD_BROWSER ) { TBOX_LINE *tl; int line = find_next_selectable( obj, sp->select_line ); if ( line >= 0 ) { tl = sp->lines[ line ]; if ( sp->react_to_vert || ( tl->y + tl->h >= sp->yoffset && tl->y < sp->h + sp->yoffset ) ) { fli_tbox_select_line( obj, line ); tl = sp->lines[ sp->select_line ]; /* Bring the selection into view if necessary */ if ( tl->y + tl->h < sp->yoffset ) fli_tbox_set_topline( obj, sp->select_line ); else if ( tl->y + tl->h - sp->yoffset >= sp->h ) fli_tbox_set_bottomline( obj, sp->select_line ); } } } } if ( old_select_line != sp->select_line ) ret |= FL_RETURN_SELECTION; if ( old_yoffset != sp->yoffset || old_xoffset != sp->xoffset ) ret |= FL_RETURN_CHANGED | FL_RETURN_END; return ret; } /*************************************** * Mouse wheel hack - the (release) event is converted * to a key event (function is also used by input.c) ***************************************/ int fli_handle_mouse_wheel( int * ev, int * key, void * xev ) { if ( *ev == FL_PUSH ) return 0; if ( *ev == FL_RELEASE ) { *ev = FL_KEYPRESS; if ( xev && shiftkey_down( ( ( XButtonEvent * ) xev )->state ) ) { ( ( XButtonEvent * ) xev )->state &= ~ ShiftMask; ( ( XKeyEvent * ) xev )->state &= ~ ShiftMask; *key = *key == FL_MBUTTON4 ? FLI_1LINE_UP : FLI_1LINE_DOWN; } else if ( xev && controlkey_down( ( ( XButtonEvent * ) xev )->state ) ) { ( ( XButtonEvent * ) xev )->state &= ~ ControlMask; ( ( XKeyEvent * ) xev )->state &= ~ ControlMask; *key = *key == FL_MBUTTON4 ? XK_Prior : XK_Next; } else *key = *key == FL_MBUTTON4 ? FLI_HALFPAGE_UP : FLI_HALFPAGE_DOWN; } return 1; } /*************************************** * Tries to find the index of the line under the mouse, * returns -1 if there's none ***************************************/ static int find_mouse_line( FL_OBJECT * obj, FL_Coord my ) { FLI_TBOX_SPEC *sp = obj->spec; int line; if ( my < obj->y + sp->y || my > obj->y + sp->y + sp->h ) return -1; my += sp->yoffset - sp->y - obj->y; line = FL_min( sp->num_lines - 1, obj->y / ( ( double ) sp->max_height / sp->num_lines ) ); if ( sp->lines[ line ]->y > my ) while ( line-- > 0 && sp->lines[ line ]->y > my ) /* empty */ ; else while ( sp->lines[ line ]->y + sp->lines[ line ]->h < my && ++line < sp->num_lines ) /* empty */ ; if ( line < 0 || line >= sp->num_lines ) return -1; return line; } /*************************************** * Sets if the textbox reacts to keys that change the vertical * position (used by browser when vertical scrollbar is switched * on or off) ***************************************/ void fli_tbox_react_to_vert( FL_OBJECT * obj, int state ) { ( ( FLI_TBOX_SPEC * ) obj->spec )->react_to_vert = state ? 1 : 0; } /*************************************** * Sets if the textbox reacts to keys that change the horizontal * position (used by browser when horizontal scrollbar is switched * on or off) ***************************************/ void fli_tbox_react_to_hori( FL_OBJECT * obj, int state ) { ( ( FLI_TBOX_SPEC * ) obj->spec )->react_to_hori = state ? 1 : 0; } /*************************************** * Handles a mouse event, returns whether a selection change has occured ***************************************/ #define DESELECT 0 #define SELECT 1 static int handle_mouse( FL_OBJECT * obj, FL_Coord my, int ev ) { FLI_TBOX_SPEC *sp = obj->spec; int line; int ret = FL_RETURN_NONE; static int mode; static int last_multi = -1; /* Check whether there are any lines at all */ if ( sp->num_lines == 0 ) return ret; /* Figure out the index of the line the mouse is on, if mouse us below or above the text area scroll up or down */ if ( ev == FL_UPDATE && sp->react_to_vert && ( my < obj->y + sp->y || my > obj->y + sp->y + sp-> h ) ) { if ( my < obj->y + sp->y ) { line = fli_tbox_get_topline( obj ); if ( line > 0 ) { fli_tbox_set_topline( obj, --line ); ret |= FL_RETURN_CHANGED; } } else { line = fli_tbox_get_bottomline( obj ); if ( line > 0 && line < sp->num_lines - 1 ) { fli_tbox_set_bottomline( obj, ++line ); ret |= FL_RETURN_CHANGED; } } } else if ( obj->type != FL_NORMAL_BROWSER ) line = find_mouse_line( obj, my ); /* A normal textbox doesn't react to the mouse otherwise */ if ( obj->type == FL_NORMAL_BROWSER ) return ret; else if ( obj->type == FL_SELECT_BROWSER || obj->type == FL_HOLD_BROWSER ) { if ( line < 0 || ! sp->lines[ line ]->selectable ) return ret; /* For FL_SELECT_BROWSER browsers the selection is undone when the mouse is released */ if ( ev == FL_RELEASE && obj->type == FL_SELECT_BROWSER ) { if ( sp->select_line >= 0 ) fli_tbox_deselect_line( obj, sp->select_line ); return ret; } if ( line < 0 ) return ret; if ( ev == FL_PUSH ) { if ( ! sp->lines[ line ]->selected ) { fli_tbox_select_line( obj, line ); ret |= FL_RETURN_SELECTION; } } else if ( line >= 0 && line != sp->select_line ) { fli_tbox_select_line( obj, line ); ret |= FL_RETURN_SELECTION; } return ret; } else /* FL_MULTI_BROWSER */ { if ( line < 0 ) return ret; if ( ev == FL_PUSH ) { if ( ! sp->lines[ line ]->selectable ) return ret; mode = sp->lines[ line ]->selected ? DESELECT : SELECT; if ( mode == SELECT ) { fli_tbox_select_line( obj, line ); last_multi = line; ret |= FL_RETURN_SELECTION; } else { fli_tbox_deselect_line( obj, line ); last_multi = line; ret |= FL_RETURN_DESELECTION; } } else { /* Mouse may have been moved that fast that one or more lines got skipped */ if ( last_multi != -1 && FL_abs( line - last_multi ) > 1 ) { int incr = line - last_multi > 1 ? 1 : -1; while ( ( last_multi += incr ) != line ) if ( sp->lines[ last_multi ]->selectable ) { if ( mode == SELECT && ! sp->lines[ last_multi ]->selected ) { fli_tbox_select_line( obj, last_multi ); ret |= FL_RETURN_SELECTION; } else if ( mode == DESELECT && sp->lines[ last_multi ]->selected ) { fli_tbox_deselect_line( obj, last_multi ); ret |= FL_RETURN_DESELECTION; } } } if ( sp->lines[ line ]->selectable ) { if ( mode == SELECT && ! sp->lines[ line ]->selected ) { fli_tbox_select_line( obj, line ); last_multi = line; ret |= FL_RETURN_SELECTION; } else if ( mode == DESELECT && sp->lines[ line ]->selected ) { fli_tbox_deselect_line( obj, line ); ret |= FL_RETURN_DESELECTION; last_multi = line; } } if ( ev == FL_RELEASE ) last_multi = -1; } } return ret; } /*************************************** * Called for events concerning the textbox ***************************************/ static int handle_tbox( FL_OBJECT * obj, int ev, FL_Coord mx FL_UNUSED_ARG, FL_Coord my, int key, void * xev ) { FLI_TBOX_SPEC *sp = obj->spec; int ret = FL_RETURN_NONE; static int old_yoffset = -1; /* Mouse wheel hack */ if ( ( key == FL_MBUTTON4 || key == FL_MBUTTON5 ) && ! obj->want_update && ! fli_handle_mouse_wheel( &ev, &key, xev ) ) return ret; switch ( ev ) { case FL_ATTRIB : case FL_RESIZED : sp->attrib = 1; break; case FL_DRAW : if ( sp->attrib ) { fli_tbox_prepare_drawing( obj ); sp->attrib = 0; } fl_drw_box( obj->boxtype, obj->x, obj->y, obj->w, obj->h, obj->col1, obj->bw ); draw_tbox( obj ); break; case FL_DBLCLICK : case FL_TRPLCLICK : if ( sp->callback ) sp->callback( obj, sp->callback_data ); break; case FL_KEYPRESS : ret = handle_keyboard( obj, key ); break; case FL_PUSH : if ( key != FL_MBUTTON1 ) break; obj->want_update = 1; old_yoffset = sp->yoffset; ret |= handle_mouse( obj, my, ev ); break; case FL_UPDATE : ret |= handle_mouse( obj, my, ev ); break; case FL_RELEASE : ret |= handle_mouse( obj, my, ev ) | FL_RETURN_END; if ( sp->yoffset != old_yoffset ) ret |= FL_RETURN_CHANGED; obj->want_update = 0; break; case FL_FREEMEM : free_tbox_spec( obj ); break; } return ret; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/clipboard.c0000644000175000017500000002355111347207453015113 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file clipboard.c * * This file is part of the XForms library package. * Copyright (c) 1997-2002 T.C. Zhao * All rights reserved. * * Implementation of clipboard. Event handling violates the ICCCM, * but should work ok. Need server time from the mainloop. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" typedef struct { FL_OBJECT * ob; /* the object that stuff'ed cp */ FL_OBJECT * req_ob; /* the object that requested cp */ Window window; Window req_window; long type, size; FL_LOSE_SELECTION_CB lose_callback; FL_SELECTION_CB got_it_callback; /* the following are not used */ void * losecb_data; void * gotitcb_data; } ClipBoard; static ClipBoard clipboard, *cp; int ( * fli_handle_clipboard )( void * ) = NULL; /* also needed in handling.c */ static int handle_clipboard_event( void * ); /*************************************** ***************************************/ static int noop_lose_callback( FL_OBJECT * ob FL_UNUSED_ARG, long type FL_UNUSED_ARG ) { return 0; } /*************************************** ***************************************/ int fl_stuff_clipboard( FL_OBJECT * ob, long type FL_UNUSED_ARG, const void * data, long size, FL_LOSE_SELECTION_CB lose_callback ) { Window win = FL_ObjWin( ob ); fli_handle_clipboard = handle_clipboard_event; cp = &clipboard; if ( ! win ) { M_err( "fl_stuff_clipboard", "Bad object %s", ob ? ob->label : "null" ); return 0; } XSetSelectionOwner( flx->display, XA_PRIMARY, win, CurrentTime ); /* make sure we got it */ if ( XGetSelectionOwner( flx->display, XA_PRIMARY ) != win ) { M_err( "fl_stuff_clipboard", "Failed to get owner" ); return 0; } /* create structure that holds clipboard info */ cp->window = win; cp->ob = ob; cp->size = size; cp->lose_callback = lose_callback ? lose_callback : noop_lose_callback; /* cheap (and fast!) shot */ XStoreBuffer( flx->display, data, size, 0 ); return size; } static Atom clipboard_prop; static Atom targets_prop; /*************************************** ***************************************/ int fl_request_clipboard( FL_OBJECT * ob, long type FL_UNUSED_ARG, FL_SELECTION_CB got_it_callback ) { Window win; void *buf; int nb = 0; cp = &clipboard; cp->req_ob = ob; if ( ! clipboard_prop ) { clipboard_prop = XInternAtom( flx->display, "FL_CLIPBOARD", False ); fli_handle_clipboard = handle_clipboard_event; } cp->got_it_callback = got_it_callback; cp->req_window = FL_ObjWin( ob ); win = XGetSelectionOwner( flx->display, XA_PRIMARY ); if ( win == None ) { XSetSelectionOwner( flx->display, XA_PRIMARY, cp->req_window, CurrentTime ); buf = XFetchBuffer( flx->display, &nb, 0 ); cp->window = XGetSelectionOwner( flx->display, XA_PRIMARY ); cp->ob = NULL; cp->size = nb; cp->got_it_callback( cp->req_ob, XA_STRING, buf, nb ); XFree( buf ); } else if ( win != cp->req_window ) { /* We don't own it, request it */ M_warn( "fl_request_clipboard", "Requesting selection from %ld", win ); XConvertSelection( flx->display, XA_PRIMARY, XA_STRING, clipboard_prop, cp->req_window, CurrentTime ); nb = -1; } else if ( win == cp->req_window ) { /* we own the buffer */ buf = XFetchBuffer( flx->display, &nb, 0 ); cp->got_it_callback( cp->req_ob, XA_STRING, buf, nb ); XFree( buf ); } return nb; } /*************************************** * Returns a negative number if not known how to handle an event ***************************************/ static int handle_clipboard_event( void * event ) { XSelectionRequestEvent *sreq = event; XEvent *xev = event; XSelectionEvent sev; char *s; int n; /* SelectionClear confirms loss of selection */ /* SelectionRequest indicates that another app wants to own selection */ /* SelectionNotify confirms that request of selection is ok */ if ( ! targets_prop ) targets_prop = XInternAtom( flx->display, "TARGETS", False ); if ( ! clipboard_prop ) clipboard_prop = XInternAtom( flx->display, "FL_CLIPBOARD", False ); cp = &clipboard; if ( ! cp->req_window && ! cp->window ) { M_warn( "handle_clipboard_event", "InternalError" ); return -1; } if ( xev->type == SelectionClear ) { if ( cp->ob ) cp->lose_callback( cp->ob, cp->type ); cp->ob = NULL; cp->window = None; } else if ( xev->type == SelectionNotify && cp->req_ob ) { /* Our request went through, go and get it */ Atom ret_type; int ret_format; unsigned long ret_len = 0, ret_after; unsigned char *ret = NULL; /* X gurantees 16K request size */ long chunksize = fli_context->max_request_size, offset = 0; char *buf = NULL; int buflen = 0; /* Get the stuff. Repeat until we get all */ do { XGetWindowProperty( flx->display, xev->xselection.requestor, xev->xselection.property, offset, chunksize, False, xev->xselection.target, &ret_type, &ret_format, &ret_len, &ret_after, &ret ); if ( ret_len && ret ) { if ( ret_after == 0 && ! buf ) cp->got_it_callback( cp->req_ob, ret_type, ret, ret_len ); else { buf = fl_realloc( buf, buflen + ret_len ); memcpy( buf + buflen, ret, ret_len ); buflen += ret_len; } XFree( ret ); ret = NULL; } offset += ret_len * ret_format / 32; chunksize = ( ret_after + 3 ) / 4; if ( chunksize > fli_context->max_request_size ) chunksize = fli_context->max_request_size; } while ( ret_after ); if ( buflen ) { cp->got_it_callback( cp->req_ob, ret_type, buf, buflen ); fl_free( buf ); } XDeleteProperty( flx->display, xev->xselection.requestor, xev->xselection.property ); } else if ( xev->type == SelectionRequest ) { /* Someone wants our selection */ M_warn( "handle_clipboard_event", "SelectionRequest" ); if ( sreq->owner != cp->window ) { M_err( "handle_clipboard_event", "Wrong owner" ); return -1; } /* Set up the event to be sent to the requestor */ sev.type = SelectionNotify; sev.display = sreq->display; sev.requestor = sreq->requestor; sev.selection = sreq->selection; sev.target = sreq->target; sev.property = None; sev.time = sreq->time; if ( sreq->selection == XA_PRIMARY ) { if ( sreq->target == XA_STRING ) { s = XFetchBuffer( flx->display, &n, 0 ); XChangeProperty( flx->display, sreq->requestor, sreq->property, sreq->target, 8, PropModeReplace, (unsigned char *) s, n ); sev.property = sreq->property; XFree( s ); } else if ( sreq->target == targets_prop ) /* aixterm wants this */ { Atom alist = XA_STRING; XChangeProperty( flx->display, sreq->requestor, sreq->property, XA_ATOM, 32, PropModeReplace, ( unsigned char * ) &alist, 1 ); sev.property = sreq->property; } else { /* If we have other types conversion routine should be called here */ M_warn( "handle_clipboard_event", "Received request with " "unknown/not implemented XAtom target type: %d\n", ( int ) sreq->target ); } XSendEvent( flx->display, sreq->requestor, False, 0, ( XEvent * ) & sev ); } else { /* not XA_PRIMARY request */ M_warn( "handle_clipboard_event", "Unknown selection request: %d", sreq->selection ); return -1; } } return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/lightbut.c0000644000175000017500000001156411247055071014773 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file lightbut.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /*************************************** * Draws the lightbutton ***************************************/ static void draw_lightbutton( FL_OBJECT * ob ) { int c1, c2, libox; FL_Coord xx, yy, ww, hh, absbw = FL_abs( ob->bw ), bw2; FL_BUTTON_STRUCT *sp = ob->spec; c1 = ob->belowmouse ? FL_LIGHTBUTTON_MCOL : FL_LIGHTBUTTON_TOPCOL; c2 = sp->val ? ob->col2 : ob->col1; fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, c1, ob->bw ); if ( ob->boxtype == FL_NO_BOX || ob->boxtype == FL_FLAT_BOX ) absbw = FL_abs( FL_BOUND_WIDTH ); /* otherwise too close to the edge */ if ( absbw < 3 ) absbw = 3; /* Calculate and draw the light */ hh = FL_max( ob->h - 3 * absbw - 1, FL_LIGHTBUTTON_MINSIZE ); ww = FL_max( hh / 2, FL_LIGHTBUTTON_MINSIZE ); if ( ww > ob->w / 6 ) ww = ob->w / 6; xx = ob->x + 1.5 * absbw + 1; yy = ob->y + ob->h / 2 - hh / 2; absbw = FL_abs( ob->bw ); /* adjustment for non-rectangular boxes */ if ( ob->boxtype == FL_ROUNDED3D_UPBOX || ob->boxtype == FL_ROUNDED3D_DOWNBOX ) { hh -= 2; yy += 1; xx += 3 + ob->w * 0.01; ww -= 1; } else if ( ob->boxtype == FL_RSHADOW_BOX ) { hh -= 1; xx += 1; } switch ( ob->boxtype ) { case FL_UP_BOX: case FL_ROUNDED3D_UPBOX: libox = FL_DOWN_BOX; break; case FL_DOWN_BOX: case FL_ROUNDED3D_DOWNBOX: libox = FL_DOWN_BOX; break; case FL_FRAME_BOX: case FL_EMBOSSED_BOX: case FL_ROUNDED_BOX: libox = ob->boxtype; break; case FL_RFLAT_BOX: libox = FL_ROUNDED_BOX; break; case FL_RSHADOW_BOX: libox = FL_ROUNDED_BOX; break; default: libox = FL_BORDER_BOX; break; } bw2 = absbw > 2 ? absbw - 1 : absbw; fl_drw_box( libox, xx, yy, ww, hh, c2, bw2 ); /* Draw the label */ if ( ( ob->align & ~ FL_ALIGN_INSIDE ) == FL_ALIGN_CENTER ) fl_drw_text( FL_ALIGN_LEFT, xx + ww + 1, ob->y, ob->w - ww - 3, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else fl_draw_object_label( ob ); ww = 0.75f * ob->h; if ( ww < absbw + 1 ) ww = absbw + 1; if ( ob->type == FL_RETURN_BUTTON ) fl_drw_text( 0, ob->x + ob->w - ww, ob->y + 0.2 * ob->h, 0.6 * ob->h, 0.6 * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } /*************************************** * creates an object ***************************************/ FL_OBJECT * fl_create_lightbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; fl_add_button_class( FL_LIGHTBUTTON, draw_lightbutton, NULL ); ob = fl_create_generic_button( FL_LIGHTBUTTON, type, x, y, w, h, label ); ob->boxtype = FL_LIGHTBUTTON_BOXTYPE; ob->col1 = FL_LIGHTBUTTON_COL1; ob->col2 = FL_LIGHTBUTTON_COL2; ob->align = FL_LIGHTBUTTON_ALIGN; ob->lcol = FL_LIGHTBUTTON_LCOL; return ob; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_lightbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_lightbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/win.c0000644000175000017500000005706011320107304013734 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file win.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * To isolate dependencies of XForms on the window system, we provide * some system-neutual windowing services. It is expected that all * XForms internal windowing will be done using these. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /********************************************************************* * * Windowing support. * Geometry preference, opening/closing windows and geometry queries * * winclose is in appwin.c * ****************************************************************{****/ static XSetWindowAttributes st_xswa; static XSizeHints st_xsh; static XWMHints st_xwmh; static unsigned int st_wmask; static int st_wmborder; static unsigned int bwidth = 0; static int fli_winreparentxy( Window win, Window new_parent, int x, int y ); extern FLI_WM_STUFF fli_wmstuff; /* defined in flresource.c */ /********************************************************************* * Default window attributes. Subject to pref_winsize and its friends **********************************************************************/ void fli_default_xswa( void ) { /* OwnerGrab is needed for pop-up to work correctly */ st_xswa.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | OwnerGrabButtonMask | EnterWindowMask | LeaveWindowMask | ButtonMotionMask | PointerMotionMask | PointerMotionHintMask /* | VisibilityChangeMask | PropertyChangeMask */ | StructureNotifyMask; /* for input method */ if( fli_context->xic ) st_xswa.event_mask |= FocusChangeMask; st_xswa.backing_store = fli_cntl.backingStore; st_wmask = CWEventMask | CWBackingStore; /* Border_pixel must be set for 24bit TrueColor displays */ st_xswa.border_pixel = 0; st_wmask |= CWBorderPixel; st_xsh.flags = 0; /* Default size */ st_xsh.width = st_xsh.base_width = 320; st_xsh.height = st_xsh.base_height = 200; /* Border */ st_wmborder = FL_FULLBORDER; /* Keyboard focus. Need window manager's help */ st_xwmh.input = True; st_xwmh.initial_state = NormalState; st_xwmh.flags = InputHint | StateHint; } /************** Window sizes ******************{**/ /*************************************** * Open window with this size ***************************************/ void fl_initial_winsize( FL_Coord w, FL_Coord h ) { st_xsh.width = st_xsh.base_width = w; st_xsh.height = st_xsh.base_height = h; st_xsh.flags |= USSize; } /*************************************** ***************************************/ void fl_initial_winstate( int state ) { st_xwmh.initial_state = state; st_xwmh.flags |= StateHint; } /*************************************** ***************************************/ void fl_winicon( Window win, Pixmap p, Pixmap m ) { XWMHints lxwmh, *xwmh; lxwmh.flags = 0; xwmh = win ? &lxwmh : &st_xwmh; xwmh->icon_pixmap = p; xwmh->icon_mask = m; xwmh->flags |= IconPixmapHint | IconMaskHint; if ( win ) XSetWMHints( flx->display, win, xwmh ); } /*************************************** * Open window with this size and KEEP it this size if window manager * coorporates ***************************************/ void fl_winsize( FL_Coord w, FL_Coord h ) { fl_initial_winsize( w, h ); /* Try to disable interactive resizing */ st_xsh.min_width = st_xsh.max_width = w; st_xsh.min_height = st_xsh.max_height = h; st_xsh.flags |= PMinSize | PMaxSize; } /*************************************** * Set a limit to the minimum size a window can take. Can be used * while a window is visible. If window is not given, we take the * request to mean a constraint for future windows. ***************************************/ void fl_winminsize( Window win, FL_Coord w, FL_Coord h ) { XSizeHints mxsh, *sh; /* Copy current constraints */ mxsh = st_xsh; mxsh.flags = 0; sh = win ? &mxsh : &st_xsh; sh->min_width = w; sh->min_height = h; sh->flags |= PMinSize; if ( win ) XSetWMNormalHints( flx->display, win, sh ); } /*************************************** ***************************************/ void fl_winmaxsize( Window win, FL_Coord w, FL_Coord h ) { XSizeHints mxsh, *sh; mxsh = st_xsh; mxsh.flags = 0; sh = win ? &mxsh : &st_xsh; sh->max_width = w; sh->max_height = h; sh->flags |= PMaxSize; if ( win ) XSetWMNormalHints( flx->display, win, sh ); } /*************************************** ***************************************/ void fl_winstepsize( Window win, FL_Coord dx, FL_Coord dy ) { XSizeHints mxsh, *sh; /* Copy current constraints */ mxsh = st_xsh; mxsh.flags = 0; sh = win ? &mxsh : &st_xsh; sh->width_inc = dx; sh->height_inc = dy; sh->flags |= PResizeInc; if ( win ) XSetWMNormalHints( flx->display, win, sh ); } /******* End of basic win size routines **********}***/ /******* Window position routines **************{***/ /*************************************** ***************************************/ void fl_winposition( FL_Coord x, FL_Coord y ) { st_xsh.x = x; st_xsh.y = y; st_xsh.flags |= fli_wmstuff.pos_request; } /****** End of window positioning routines ******}*/ /***** Window position and size **************{****/ /*************************************** ***************************************/ void fl_initial_wingeometry( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { fl_winposition( x, y ); fl_initial_winsize( w, h ); } /*************************************** ***************************************/ void fl_wingeometry( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { fl_winposition( x, y ); fl_winsize( w, h ); } /***** End of geometry preference routine *******}**/ /***** Misc. windowing routines *****************{*/ /*************************************** * Try to fix the aspect ration ***************************************/ void fl_winaspect( Window win, FL_Coord x, FL_Coord y ) { XSizeHints lxsh, *xsh; if ( x <= 0 || y <= 0 ) { M_err( "fl_winaspect", "Bad aspect ratio" ); return; } lxsh.flags = 0; xsh = win ? &lxsh : &st_xsh; xsh->flags |= PAspect; xsh->min_aspect.x = x; xsh->min_aspect.y = y; xsh->max_aspect.x = x; xsh->max_aspect.y = y; xsh->base_width = xsh->width = x; xsh->base_height = xsh->height = y; if ( xsh->base_width < 100 || xsh->base_height < 100 ) { double fact = 100 / FL_max( x, y ); xsh->base_width *= fact; xsh->base_height *= fact; } if ( win ) XSetWMNormalHints( flx->display, win, xsh ); } /*************************************** ***************************************/ void fl_noborder( void ) { st_wmborder = FL_NOBORDER; } /*************************************** ***************************************/ void fl_transient( void ) { st_wmborder = FL_TRANSIENT; } /*************************************** ***************************************/ void fl_winmove( Window win, FL_Coord dx, FL_Coord dy) { if ( win ) XMoveWindow( flx->display, win, dx, dy ); else fl_winposition( dx, dy ); } /*************************************** ***************************************/ void fl_winreshape( Window win, FL_Coord dx, FL_Coord dy, FL_Coord w, FL_Coord h ) { if ( win ) XMoveResizeWindow( flx->display, win, dx, dy, w, h ); else { fl_winresize( win, w, h ); fl_winmove( win, dx, dy ); } } /***** End of misc. windowing routines **********}*/ /********* Window geometry query routines ********{*/ /*************************************** ***************************************/ void fl_get_winsize( Window win, FL_Coord * w, FL_Coord * h ) { unsigned int ww, hh, bjunk, djunk; int xx, yy; Window root; XGetGeometry( flx->display, win, &root, &xx, &yy, &ww, &hh, &bjunk, &djunk ); *w = ww; *h = hh; } /*************************************** ***************************************/ void fl_get_winorigin( Window win, FL_Coord * x, FL_Coord * y ) { int xx, yy; unsigned int ww, hh, bw, d; Window root; XGetGeometry( flx->display, win, &root, &xx, &yy, &ww, &hh, &bw, &d ); XTranslateCoordinates( flx->display, win, root, - ( int ) bw, - ( int ) bw, &xx, &yy, &root ); *x = xx; *y = yy; } /*************************************** ***************************************/ void fl_get_wingeometry( Window win, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ) { int xx, yy; unsigned int ww, hh, bw, d; Window root; XGetGeometry( flx->display, win, &root, &xx, &yy, &ww, &hh, &bw, &d ); XTranslateCoordinates( flx->display, win, root, - ( int ) bw, - ( int ) bw, &xx, &yy, &root ); *x = xx; *y = yy; *w = ww; *h = hh; } /***** End of window geometry query routines ********}*/ /******* Open window etc ***********************/ /*************************************** * If one of the forms is destoryed we want to know about it * All window notices the Close window manager command ***************************************/ static void setup_catch_destroy( Window win ) { static Atom atom_delete_win; static Atom atom_protocols; if ( ! atom_delete_win ) atom_delete_win = XInternAtom( flx->display, "WM_DELETE_WINDOW", 0 ); if ( ! atom_protocols ) atom_protocols = XInternAtom( flx->display, "WM_PROTOCOLS", 0 ); XChangeProperty( flx->display, win, atom_protocols, XA_ATOM, 32, PropModeReplace, ( unsigned char * ) &atom_delete_win, 1 ); } /*************************************** * Waits until we know for sure the newly mapped window is visible ***************************************/ static void wait_mapwin( Window win ) { XEvent xev; if ( ! ( st_xswa.event_mask & StructureNotifyMask ) ) { M_err( "wait_mapwin", "XForms improperly initialized" ); exit( 1 ); } /* Wait for the window to become mapped */ do { XWindowEvent( flx->display, win, StructureNotifyMask, &xev ); fli_xevent_name( "waiting", &xev ); } while ( xev.type != MapNotify ); } /*************************************** ***************************************/ static char * fl_label_to_res_name( const char * label ) { static char res[ 54 ]; fli_sstrcpy( res, label ? label : "", sizeof res ); fli_nuke_all_non_alnum( res ); if ( res[ 0 ] && isupper( ( int ) res[ 0 ] ) ) res[ 0 ] = tolower( ( int ) res[ 0 ] ); return res; } /*************************************** ***************************************/ static char * get_machine_name( Display * d ) { static char machine_name[ 256 ] = ""; char *p; if ( machine_name[ 0 ] ) return machine_name; if ( gethostname( machine_name, sizeof machine_name - 1 ) ) { M_err( "get_machine_name", "Unable to get host name" ); strcpy( machine_name, DisplayString( d ) ); if ( ( p = strchr( machine_name, ':' ) ) ) *p = '\0'; } return machine_name; } /*************************************** ***************************************/ void fli_set_winproperty( Window win, unsigned int prop ) { char **argv; int argc; if ( prop & FLI_COMMAND_PROP ) { argv = fl_get_cmdline_args( &argc ); XSetCommand( flx->display, win, argv, argc ); } } /*************************************** ***************************************/ Window fli_create_window( Window parent, Colormap m, const char * wname ) { Window win; XClassHint clh; char *tmp; XTextProperty xtpwname, xtpmachine; char *label = fl_strdup( wname ? wname : "" ); FL_FORM *mainform = fl_get_app_mainform( ); st_xswa.colormap = m; st_wmask |= CWColormap; /* no decoration means unmanagered windows */ if ( st_wmborder == FL_NOBORDER && ( st_xsh.flags & fli_wmstuff.pos_request) == fli_wmstuff.pos_request ) { /* Turning this on will make the window truely unmananged, might have problems with the input focus and colormaps */ st_xswa.override_redirect = True; st_wmask |= CWOverrideRedirect; } /* MWM uses root window's cursor, don't want that */ if ( ( st_wmask & CWCursor ) != CWCursor ) { st_xswa.cursor = fl_get_cursor_byname( FL_DEFAULT_CURSOR ); st_wmask |= CWCursor; } if ( st_wmborder != FL_FULLBORDER ) { st_xswa.save_under = True; st_wmask |= CWSaveUnder; /* For small transient windows, we don't need backing store */ if ( st_xsh.width < 200 || st_xsh.height < 200 ) st_xswa.backing_store = NotUseful; } if ( mainform && mainform->window ) { st_xwmh.flags |= WindowGroupHint; st_xwmh.window_group = mainform->window; } #if FL_DEBUG >= ML_WARN fli_dump_state_info( fl_vmode, "fli_create_window" ); #endif win = XCreateWindow( flx->display, parent, st_xsh.x, st_xsh.y, st_xsh.width, st_xsh.height, bwidth, fli_depth( fl_vmode ), InputOutput, fli_visual( fl_vmode ), st_wmask, &st_xswa ); if ( fli_cntl.debug > 3 ) { XFlush( flx->display ); fprintf( stderr, "****CreateWin OK**** sleeping 1 seconds\n" ); sleep( 1 ); } clh.res_name = fl_label_to_res_name( label ); clh.res_class = "XForm"; /* Command property is set elsewhere */ xtpwname.value = 0; XStringListToTextProperty( label ? &label : 0, 1, &xtpwname ); XSetWMProperties( flx->display, win, &xtpwname, &xtpwname, 0, 0, &st_xsh, &st_xwmh, &clh ); if ( xtpwname.value ) XFree( xtpwname.value ); xtpmachine.value = 0; tmp = get_machine_name( flx->display ); if ( XStringListToTextProperty( &tmp, 1, &xtpmachine ) ) XSetWMClientMachine( flx->display, win, &xtpmachine ); if ( xtpmachine.value ) XFree( xtpmachine.value ); fli_create_gc( win ); if ( st_wmborder == FL_TRANSIENT ) { if ( mainform && mainform->window ) XSetTransientForHint( flx->display, win, mainform->window ); else XSetTransientForHint( flx->display, win, fl_root ); } fl_free( label ); return win; } /*************************************** ***************************************/ Window fli_cmap_winopen( Window parent, Colormap m, const char * label ) { Window win = fli_create_window( parent, m, label ); return fl_winshow( win ); } /*************************************** ***************************************/ Window fl_wincreate( const char * label ) { return fli_create_window( fl_root, fli_map( fl_vmode ), label) ; } /*************************************** ***************************************/ Window fl_winopen( const char * label ) { fli_init_colormap( fl_vmode ); return fli_cmap_winopen( fl_root, fli_map( fl_vmode ), label ); } /*************************************** ***************************************/ Window fl_winshow( Window win ) { XMapRaised( flx->display, win ); /* Wait until the newly mapped window shows up */ if ( st_xwmh.initial_state == NormalState ) wait_mapwin( win ); setup_catch_destroy( win ); fl_winset( win ); /* Re-initialize window defaults */ fli_default_xswa( ); return win; } /*************************************** ***************************************/ int fli_winreparentxy( Window win, Window new_parent, int x, int y ) { if ( ! win || ! new_parent ) return -1; else return XReparentWindow( flx->display, win, new_parent, x, y ); } /*************************************** ***************************************/ int fl_winreparent( Window win, Window new_parent ) { return fli_winreparentxy( win, new_parent, 0, 0 ); } /*************************************** ***************************************/ void fl_winhide( Window win ) { if ( win ) XUnmapWindow( flx->display, win ); } /*************************************** ***************************************/ void fl_winbackground( Window win, FL_COLOR bk ) { if ( win == 0 ) { st_xswa.background_pixel = bk; st_wmask |= CWBackPixel; } else { XSetWindowBackground( flx->display, win, bk ); XClearWindow( flx->display, win ); } } /*************************************** ***************************************/ void fl_winset( Window win ) { flx->win = win; } /*************************************** ***************************************/ Window fl_winget( void ) { return flx->win; } /*************************************** ***************************************/ int fl_iconify( Window win ) { return XIconifyWindow( flx->display, win, flx->screen ); } /*************************************** * Inform window manager about window constraints: minsize, maxsize, * aspect ratio ***************************************/ void fl_reset_winconstraints( Window win ) { if ( win ) XSetWMNormalHints( flx->display, win, &st_xsh ); } /*************************************** ***************************************/ void fl_winresize( Window win, FL_Coord neww, FL_Coord newh ) { XSizeHints lxsh; long fields; FL_Coord curwh, curww; if ( ! win ) return; /* If sizes are the same we don't have to do anything. Some window managers are too dumb to optimize this. */ fl_get_winsize( win, &curww, &curwh ); if ( curww == neww && curwh == newh ) return; lxsh.flags = 0; fields = 0; if ( XGetWMNormalHints( flx->display, win, &lxsh, &fields ) ) { lxsh.width = lxsh.base_width = neww; lxsh.height = lxsh.base_height = newh; lxsh.flags |= USSize; if ( lxsh.flags & PMinSize && lxsh.flags & PMaxSize ) { if ( lxsh.min_width == lxsh.max_width ) lxsh.min_width = lxsh.max_width = neww; if ( lxsh.min_height == lxsh.max_height ) lxsh.min_height = lxsh.max_height = newh; } /* Reset any contraints */ if ( lxsh.flags & PMinSize ) { if ( lxsh.min_width > neww ) lxsh.min_width = neww; if ( lxsh.min_height > newh ) lxsh.min_height = newh; } if ( lxsh.flags & PMaxSize ) { if ( lxsh.max_width < neww ) lxsh.max_width = neww; if ( lxsh.max_height < newh ) lxsh.max_height = newh; } XSetWMNormalHints( flx->display, win, &lxsh ); } XResizeWindow( flx->display, win, neww, newh ); XFlush( flx->display ); } /*************************************** * Check if a given window is valid. At the moment only used by * canvas. A dirty hack. *****TODO ***** * If the main event loop is correct, we don't need to do this stuff ***************************************/ static int badwin; static int valid_win_handler( Display * dpy FL_UNUSED_ARG, XErrorEvent * xev ) { if ( xev->error_code == BadWindow || xev->error_code == BadDrawable ) badwin = 1; return 0; } /*************************************** ***************************************/ int fl_winisvalid( Window win ) { int ( * old )( Display *, XErrorEvent * ); FL_Coord w, h; badwin = 0; old = XSetErrorHandler( valid_win_handler ); fl_get_winsize( win, &w, &h ); XSetErrorHandler( old ); return ! badwin; } /*************************************** ***************************************/ void fl_wintitle( Window win, const char * title ) { XTextProperty xtp; if ( ! win && ! title ) return; xtp.value = 0; XStringListToTextProperty( ( char ** ) &title, 1, &xtp ); XSetWMName( flx->display, win, &xtp ); XSetWMIconName( flx->display, win, &xtp ); if ( xtp.value ) XFree( xtp.value ); } /*************************************** ***************************************/ void fl_winicontitle( Window win, const char * title ) { XTextProperty xtp; if ( ! win || ! title ) return; xtp.value = 0; XStringListToTextProperty( ( char ** ) &title, 1, &xtp ); XSetWMIconName( flx->display, win, &xtp ); if ( xtp.value ) XFree( xtp.value ); } /*************************************** * Grab keyboard focus ***************************************/ void fl_winfocus( Window win ) { XSetInputFocus( flx->display, win, RevertToParent, CurrentTime ); #if 0 if ( fli_context->xic ) XSetICValues( fli_context->xic, XNClientWindow, win, XNFocusWindow, win, 0 ); #endif } /********* END of Windowing support ***}**/ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/scrollbut.c0000644000175000017500000000733411247055071015162 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file scrollbut.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Buttons for the scrollbar. Maybe of some value in general use. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ static void draw_sbbutton( FL_OBJECT * ob ) { FL_COLOR c1; FL_Coord abw = FL_abs( ob->bw ); FL_Coord extra = abw; FL_BUTTON_STRUCT *sp = ob->spec; int btype = FLI_TRIANGLE_UPBOX8; char *label = ob->label; int x = ob->x, y = ob->y, w = ob->w, h = ob->h; if ( ob->col2 != FL_COL1 && ( sp->event == FL_ENTER || sp->event == FL_LEAVE ) ) return; if ( sp->event == FL_DRAW ) fl_drw_box( ob->boxtype, x, y, w, h, ob->col1, ob->bw ); if ( *label == '#' ) { w = h = FL_min( ob->w, ob->h ); x += ( ob->w - w ) / 2; y += ( ob->h - h ) / 2; label++; } if ( ( ob->boxtype != FL_NO_BOX && ob->boxtype != FL_FLAT_BOX ) || abw == 1 ) { extra += 1 + 0.051 * FL_min( w, h ); abw = 1; } if ( *label == '2' ) btype = sp->val ? FLI_TRIANGLE_DOWNBOX2 : FLI_TRIANGLE_UPBOX2; else if ( *label == '4' ) btype = sp->val ? FLI_TRIANGLE_DOWNBOX4 : FLI_TRIANGLE_UPBOX4; else if ( *label == '6' ) btype = sp->val ? FLI_TRIANGLE_DOWNBOX6 : FLI_TRIANGLE_UPBOX6; else if ( *label == '8' ) btype = sp->val ? FLI_TRIANGLE_DOWNBOX8 : FLI_TRIANGLE_UPBOX8; c1 = ( ob->belowmouse && sp->event != FL_RELEASE ) ? FL_MCOL : ob->col2; fli_drw_tbox( btype, x + extra, y + extra, w - 2 * extra, h - 2 * extra, c1, abw ); } /*************************************** * creates an object ***************************************/ FL_OBJECT * fl_create_scrollbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; fl_add_button_class( FL_SCROLLBUTTON, draw_sbbutton, 0 ); ob = fl_create_generic_button( FL_SCROLLBUTTON, type, x, y, w, h, label ); ob->boxtype = FL_UP_BOX; ob->col1 = FL_COL1; ob->col2 = FL_COL1; ob->lcol = FL_COL1; return ob; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_scrollbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_scrollbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/dmalloc.h0000644000175000017500000000620711247055071014567 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file dmalloc.h * * This file is part of the XForms library package. * Copyright (c) 1996-1998 T.C. Zhao and Mark Overmars * All rights reserved. * * Very simple debug version of malloc family. It works by replacing the * standard malloc and its cousins with my own routines that track, among * other things, where mallocs are called and how many bytes they get. All * these relies on the the work of true malloc. A true debug version of * malloc should replace malloc with calls to sbrk. Anyway, All I want out of * this hack is to make sure there are no memory leaks. */ #ifndef TC_DMALLOC_H_ #define TC_DMALLOC_H_ #include #ifdef TC_MEMDBG extern void *tc_dbg_malloc( size_t, const char *, int ); extern void *tc_dbg_calloc( size_t, size_t, const char *, int ); extern void *tc_dbg_realloc( void *, size_t, const char *, int ); extern void *tc_dbg_getmat( int, int, size_t, const char *, int ); extern char *tc_dbg_strdup( const char *, const char *, int ); extern void tc_dbg_free( void *, const char *, int ); extern void tc_true_free( void * ); extern void tc_set_mem_warn( int ); extern void tc_mem_stat( int ); #ifndef TC_MEMDBG_OWNER /* actual replacememnt */ #define fl_malloc( a ) tc_dbg_malloc( a, __FILE__, __LINE__ ) #define fl_calloc( a, b ) tc_dbg_calloc( a, b, __FILE__, __LINE__ ) #define fl_realloc( a, b ) tc_dbg_realloc( a, b, __FILE__, __LINE__ ) #define fl_free( a ) tc_dbg_free( a, __FILE__, __LINE__ ) #define fl_strdup( a ) tc_dbg_strdup( a, __FILE__, __LINE__ ) #endif /* TC_MEMDBG_OWNER */ #else /* if not debug, tfree becomes free */ #ifndef fl_free #define fl_malloc( a ) malloc( a ) #define fl_calloc( a, b ) calloc( a, b ) #define fl_realloc( a, b ) realloc( a, b ) #define fl_free( a ) free( a ) #endif #define tc_true_free( p ) free( p ) #define tc_mem_stat( a ) #define tc_set_mem_warn( p ) #endif /* TC_MEMDBG */ #endif /* _MY_MALLOC_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/0000755000175000017500000000000011377311602014447 5ustar jensjensxforms-1.0.93sp1/lib/private/pnmenu.h0000644000175000017500000000167011247055071016127 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ #ifndef PNMENU_H_ #define PNMENU_H_ typedef struct { FL_POPUP * popup; FL_POPUP_RETURN * sel; FL_COLOR hl_color; } FLI_NMENU_SPEC; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pselect.h0000644000175000017500000000212111247055071016254 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ #ifndef PSELECT_H_ #define PSELECT_H_ typedef struct { FL_POPUP * popup; FL_POPUP_RETURN * sel; int align; int style; int size; FL_COLOR color; int timeout_id; long repeat_ms; } FLI_SELECT_SPEC; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pchoice.h0000644000175000017500000000335111247055071016235 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pchoice.h * * This file is part of the XForms library package. * Copyright T.C. Zhao and Mark Overmars * All rights reserved. */ #ifndef PCHOICE_H_ #define PCHOICE_H_ /* make sure that the first 5 items are the same as FL_MENU. * fdesign assumes this */ typedef struct { int numitems; /* number of items in choice */ int val; /* last menu item selected */ char * items[ FL_CHOICE_MAXITEMS + 1 ]; /* choice items */ char * shortcut[ FL_CHOICE_MAXITEMS + 1 ]; unsigned char mode[ FL_CHOICE_MAXITEMS + 1 ]; int align; /* the choice text is aligned */ int fontsize; /* font size */ int fontstyle; /* font style */ int pushed; int below; unsigned char modechange[ FL_CHOICE_MAXITEMS + 1 ]; int counter; int no_title; } FLI_CHOICE_SPEC; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pspinner.h0000644000175000017500000000242511247055071016462 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ #ifndef PSPINNER_H #define PSPINNER_H typedef struct { FL_OBJECT * input; FL_OBJECT * up; FL_OBJECT * down; int i_val; int i_min; int i_max; int i_incr; double f_val; double f_min; double f_max; double f_incr; int orient; int prec; int attrib; int old_ival; double old_fval; } FLI_SPINNER_SPEC; #define DEFAULT_SPINNER_PRECISION 6 #endif /* PSPINNER_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pscrollbar.h0000644000175000017500000000203511247055071016764 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pscrollbar.h */ #ifndef PSCROLLBAR_H_ #define PSCROLLBAR_H_ #include "private/pslider.h" typedef struct { FL_OBJECT * slider; FL_OBJECT * up; FL_OBJECT * down; double increment; double old_val; } FLI_SCROLLBAR_SPEC; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pbrowser.h0000644000175000017500000000474111247055071016472 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pbrowser.h * * This file is part of the XForms library package. * Copyright (c) T.C. Zhao and Mark Overmars * All rights reserved. */ #ifndef PBROWSER_H_ #define PBROWSER_H_ #include "private/ptbox.h" #include "private/pscrollbar.h" typedef struct { FL_OBJECT * tb; /* the textbox */ FL_OBJECT * hsl; /* horizontal scrollbar */ FL_OBJECT * vsl; /* vertical scrollbar */ FL_CALLBACKPTR callback; long callback_data; double hsize, vsize; double hval, vval; double hinc1, hinc2; double vinc1, vinc2; int dead_area; int attrib; int v_on, /* scrollbar on/off state */ h_on; int v_pref, /* on/off prefererence */ h_pref; int vw, vw_def; int hh, hh_def; int user_set; FL_BROWSER_SCROLL_CALLBACK hcb, vcb; void * hcb_data, * vcb_data; double old_vp; double old_hp; } FLI_BROWSER_SPEC; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/flsnprintf.h0000644000175000017500000000335011247055071017007 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file flsnprintf.h */ #ifndef FL_SNPRINTF_H #define FL_SNPRINTF_H #include #ifdef HAVE_SNPRINTF #ifndef HAVE_DECL_SNPRINTF int snprintf( char *, size_t, const char *, ...); #endif #ifndef HAVE_DECL_VSNPRINTF int vsnprintf( char *, size_t, const char *, va_list); #endif #define fl_snprintf snprintf #define fl_vsnprintf vsnprintf #else /* HAVE_SNPRINTF */ FL_EXPORT int fl_portable_snprintf( char *, size_t, const char *, ... ); FL_EXPORT int fl_portable_vsnprintf( char *, size_t, const char *, va_list ); #define fl_snprintf fl_portable_snprintf #define fl_vsnprintf fl_portable_vsnprintf #endif /* HAVE_SNPRINTF */ #endif /* NOT FL_SNPRINTF_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pcanvas.h0000644000175000017500000000537111247055071016262 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pcanvas.h * * This file is part of the XForms library package. * Copyright (c) 1995-1997 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifndef PCANVAS_H #define PCANVAS_H /* Canvas specific stuff */ typedef struct { const char * winname; /* name of the window */ Window parent; /* real parent(needed for dblbuffer) */ Window window; /* Canvas window */ Visual * visual; /* canvas visual */ void * context; /* context for glx/mesa */ FL_MODIFY_CANVAS_PROP init; FL_MODIFY_CANVAS_PROP activate; FL_MODIFY_CANVAS_PROP cleanup; Colormap colormap; /* colormap for the canvas */ GC gc; unsigned int mask, user_mask; int depth; int dec_type; /* if and how to decorate canvas */ int x, /* window size */ y, w, h; int yield_to_shortcut; /* other object's shortcut has priority */ XSetWindowAttributes xswa; XSetWindowAttributes user_xswa; FL_OBJECT * last_active; /* last sp->activated object */ /* this is not exactly right. sort of wasteful */ FL_HANDLE_CANVAS canvas_handler[ LASTEvent ]; void * user_data[ LASTEvent ]; int keep_colormap; Window swindow; /* scrolled/subwindow */ int sx, sy, sw, sh; /* scrolled window size */ } FLI_CANVAS_SPEC; #endif /* PCANVAS_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pformbrowser.h0000644000175000017500000000340311247055071017350 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pformbrowser.h */ #ifndef PFORMBROWSER_H #define PFORMBROWSER_H typedef struct { FL_OBJECT * canvas; FL_OBJECT * parent; int nforms; FL_FORM ** form; int v_pref; int h_pref; int vw_def, vw; int hh_def, hh; FL_OBJECT * hsl; FL_OBJECT * vsl; int h_on, v_on; double old_vval, old_hval; int x, y; int left_edge; int top_edge; int top_form; int max_height; int max_width; int processing_destroy; int in_draw; int scroll; /* either pixel based or form based */ } FLI_FORMBROWSER_SPEC; #define IsFormBrowserClass( ob ) \ ( ( ob ) && ( ob )->objclass == FL_FORMBROWSER ) #if defined sun && ! defined __SVR4 #define memmove( a, b, c ) bcopy( b, a, c ) #endif #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pdial.h0000644000175000017500000000320411247055071015711 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pdial.h * * This file is part of the XForms library package. * Copyright (c) 1995-1997 T.C. Zhao and Mark Overmars * All rights reserved. * * Private header for dial object */ #ifndef PDIAL_H #define PDIAL_H typedef struct { double a, /* for speed */ b; double min, /* min/max value of dial */ max; double val; /* current value of dial */ double step; /* step size */ double thetai; /* start angle (degrees) */ double thetaf; /* end angle (degrees) */ double origin; /* where the origin is */ short cross_over; double start_val; short direction; /* not currently used */ } FLI_DIAL_SPEC; #endif /* pdial_h */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/Makefile.am0000644000175000017500000000045111211743031016473 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = \ flsnprintf.h \ pbrowser.h \ pcanvas.h \ pchoice.h \ pcounter.h \ pdial.h \ pflps.h \ pformbrowser.h \ pmenu.h \ pnmenu.h \ ppositioner.h \ pscrollbar.h \ pselect.h \ pslider.h \ ptbox.h \ ptwheel.h \ pvaluator.h \ pxyplot.h xforms-1.0.93sp1/lib/private/pflps.h0000644000175000017500000002232311321671074015747 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pflps.h * * private headers of postscript support. Must come * after forms.h */ #ifndef PFLPS_H #define PFLPS_H #include "include/forms.h" /* configuration infomation. contains all information needed for * both regular gui postscript and image_postscript members */ typedef struct { /* The first entries must be identical to the ones of a FLPS_CONTROL structure defined in flps.h */ int ps_color; int orientation; int auto_fit; int drawbox; int eps; float xdpi, ydpi; float paper_w, paper_h; float gamma; const char * tmpdir; int printer_dpi; float hm, vm; float xscale, yscale; int scale_text; int first_page_only; int clip; /* Now follow elements not from the FLPS_CONTROL structure */ FILE * fp; int lastc, literal, len; int pack; int verbose; /* cache */ int cur_lw, /* line width */ last_lw; int cur_style, /* font style and size */ cur_size; FL_COLOR cur_color; /* color cache */ int landscape; float final_xscale, final_yscale; /* private fields for regular flps */ int unit; /* unit of measure */ int pages; /* how many pages */ int page; /* current page */ int epsf_import; /* true if importing EPS */ int inverted; /* take care of coord switch */ int user_bw; /* bw specified on cmdline */ int bw; /* current border width */ const char * poly_name; /* PS poly name */ /* private field for image postscript */ char * prefix; /* output file prefix */ int misct, /* misc. margins */ miscl, miscb, miscr; int lastr, lastg, lastb; int comment; int isRGBColor; int rotation; float s2px; /* screen to paper scaling */ float s2py; /* screen to paper scaling */ } FLPSInfo; extern FLPSInfo *flps; extern void flps_color( FL_COLOR ); extern void flps_rgbcolor( int, int, int ); extern int flps_get_gray255( FL_COLOR ); extern void flps_emit_prolog( void ); extern void flps_emit_header( const char *, int, int, int, int, int ); extern void flps_switch_flps( FLPSInfo * ); extern void flps_restore_flps( void ); /* basic drawing of simple geomtric figures */ extern void flps_draw_init( void ); extern void flps_rectangle( int, int, int, int, int, FL_COLOR ); extern void flps_roundrectangle( int, int, int, int, int, FL_COLOR ); extern void flps_lines( FL_POINT *, int, FL_COLOR ); extern void flps_line( int, int, int, int, FL_COLOR ); extern void flps_poly( int, FL_POINT *, int, FL_COLOR ); extern int flps_draw_symbol( const char *, int, int, int, int, FL_COLOR ); extern void flps_oval( int, int, int, int, int, FL_COLOR ); extern void flps_pieslice( int, int, int, int, int, int, int, FL_COLOR ); extern void flps_circ( int, int, int, int, FL_COLOR ); extern void flps_arc( int, int, int, int, int, int, FL_COLOR ); #define flps_rectf( x, y, w, h, c ) flps_rectangle( 1, x, y, w, h, c ) #define flps_rect( x, y, w, h, c ) flps_rectangle( 0, x, y, w, h, c ) extern void flps_draw_box( int, int, int, int, int, FL_COLOR, int ); extern void flps_draw_tbox( int, int, int, int, int, FL_COLOR, int ); extern void flps_draw_frame( int, int, int, int, int, FL_COLOR, int ); extern void flps_draw_checkbox( int, int, int, int, int, FL_COLOR, int ); /* basic text drawing routines */ extern void flps_draw_text( int, int, int, int, int, FL_COLOR, int, int, const char * ); extern void flps_draw_text_beside( int, int, int, int, int, FL_COLOR, int, int, const char * ); extern void flps_text_init( void ); extern int find_type_val( int, const char * ); extern void flps_reset_cache( void ); extern void flps_invalidate_color_cache( void ); extern void flps_invalidate_font_cache( void ); extern void flps_invalidate_linewidth_cache( void ); extern void flps_invalidate_symbol_cache( void ); extern void flps_linewidth( int ); extern int flps_get_linewidth( void ); extern void flps_reset_linewidth( void ); extern void flps_linestyle( int ); extern int flps_get_linestyle( void ); extern void flps_log( const char * ); extern void flps_output( const char *, ... ); extern void flps_set_font( int, int ); extern int get_gray255( FL_COLOR ); extern void get_scale_unit( int, float *, float * ); extern void ps_invalidate_font_cache(void); extern char *ps_literal( const char * ); extern void flps_set_clipping( int, int, int, int); extern void flps_unset_clipping( void ); extern void flps_apply_gamma( float ); extern FL_COLOR flps_get_namedcolor( const char * ); #define PS_SPECIAL( c ) ( ( c ) == '(' \ || ( c ) == ')' \ || ( c ) == '[' \ || ( c ) == ']' \ || ( c ) == '<' \ || ( c ) == '>' \ || ( c ) == '%' \ || ( c ) == '#' \ || ( c ) == '/' ) #endif /* ifndef PFLPS_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/ptbox.h0000644000175000017500000001674711370765654016010 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ #ifndef PTBOX_H #define PTBOX_H typedef struct { char * fulltext; /* text of line with flags */ char * text; /* text of line without flags */ unsigned int len; /* line length */ int selected; /* whether line is selected */ int selectable; /* whether line is selectable */ int x; /* vertical position relative to topline */ int y; /* horizontal position of text */ int w; /* length of text in pixels */ int h; /* height of text in pixels */ int size; /* font size */ int style; /* font style */ int asc; /* font ascent */ int desc; /* font descent */ FL_COLOR color; /* font color */ int align; /* alignment of text */ int is_underlined; /* whether to draw underlined */ int is_separator; /* is this a separator line? */ int is_special; /* does it need special GC? */ GC specialGC; /* GC for if not default font/color */ } TBOX_LINE; typedef struct { TBOX_LINE ** lines; /* strurctures for lines of text */ int num_lines; /* number of structures */ int xoffset; /* horizontal scroll in pixels */ int yoffset; /* vertical scroll in pixels */ int x, /* coordinates and sizes of drawing area */ y, w, h; int attrib; /* set when attributes changed */ int no_redraw; /* flags when no redraw is to be done */ int select_line; /* last selected line */ int deselect_line; /* last deselected line */ int max_width; /* length of longest line in pixels */ int max_height; /* height of all lines in pixels */ int def_size; /* default front size */ int def_style; /* default font style */ int def_align; /* default alignment */ int def_height; /* height of line with default font size */ GC defaultGC; /* text drawing GC */ GC backgroundGC; /* background GC */ GC selectGC; /* background for selection GC */ GC nonselectGC; /* for text of non-selectable lines */ GC bw_selectGC; /* b&w selection text GC */ int specialkey; /* Key that indicates a special symbol */ FL_CALLBACKPTR callback; /* double and triple click callback */ long callback_data; /* data for callback */ int old_yoffset; int react_to_vert; int react_to_hori; } FLI_TBOX_SPEC; /* Defaults */ #define FLI_TBOX_BOXTYPE FL_DOWN_BOX #define FLI_TBOX_COL1 FL_WHITE #define FLI_TBOX_COL2 FL_YELLOW #define FLI_TBOX_LCOL FL_LCOL #define FLI_TBOX_ALIGN FL_ALIGN_BOTTOM #define FLI_TBOX_FONTSIZE FL_SMALL_SIZE extern FL_OBJECT * fli_create_tbox( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); extern void fli_tbox_delete_line( FL_OBJECT * obj, int line ); extern void fli_tbox_insert_lines( FL_OBJECT *, int, const char * ); extern void fli_tbox_insert_line( FL_OBJECT *, int, const char * ); extern void fli_tbox_add_line( FL_OBJECT *, const char *, int ); extern void fli_tbox_add_chars( FL_OBJECT *, const char * ); extern const char * fli_tbox_get_line( FL_OBJECT *, int ); extern void fli_tbox_replace_line( FL_OBJECT *, int, const char * ); extern void fli_tbox_clear( FL_OBJECT * ); extern int fli_tbox_load( FL_OBJECT *, const char * ); extern void fli_tbox_recalc_area( FL_OBJECT * ); extern void fli_tbox_set_fontsize( FL_OBJECT *, int ); extern void fli_tbox_set_fontstyle( FL_OBJECT *, int ); extern int fli_tbox_set_xoffset( FL_OBJECT *, int ); extern double fli_tbox_set_rel_xoffset( FL_OBJECT *, double ); extern int fli_tbox_set_yoffset( FL_OBJECT *, int ); extern double fli_tbox_set_rel_yoffset( FL_OBJECT *, double ); extern int fli_tbox_get_xoffset( FL_OBJECT * ); extern double fli_tbox_get_rel_xoffset( FL_OBJECT * ); extern int fli_tbox_get_yoffset( FL_OBJECT * ); extern double fli_tbox_get_rel_yoffset( FL_OBJECT * ); extern void fli_tbox_set_topline( FL_OBJECT *, int ); extern void fli_tbox_set_bottomline( FL_OBJECT *, int ); extern void fli_tbox_set_centerline( FL_OBJECT *, int ); extern void fli_tbox_deselect( FL_OBJECT * obj ); extern void fli_tbox_deselect_line( FL_OBJECT *, int ); extern void fli_tbox_select_line( FL_OBJECT *, int ); extern int fli_tbox_is_line_selected( FL_OBJECT *, int ); extern int fli_tbox_get_selection( FL_OBJECT *obj ); extern void fli_tbox_make_line_selectable( FL_OBJECT *, int, int ); extern void fli_tbox_set_dblclick_callback( FL_OBJECT *, FL_CALLBACKPTR, long ); extern int fli_tbox_get_num_lines( FL_OBJECT * ); extern int fli_tbox_get_topline( FL_OBJECT * obj ); extern int fli_tbox_get_bottomline( FL_OBJECT * ); extern void fli_tbox_react_to_vert( FL_OBJECT *, int ); extern void fli_tbox_react_to_hori( FL_OBJECT *, int ); extern int fli_tbox_get_line_yoffset( FL_OBJECT *, int ); #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pslider.h0000644000175000017500000000342511247055071016267 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pslider.h * * This file is part of the XForms library package. * Copyright (c) 1995-1997 T.C. Zhao and Mark Overmars * All rights reserved. * * private header for slider object */ #ifndef PSLIDER_H #define PSLIDER_H #include "pvaluator.h" typedef FLI_VALUATOR_SPEC FLI_SLIDER_SPEC; #define MINKNOB_SB 16 /* scrollbar */ #define MINKNOB_SL 14 /* regular sliders */ #define IS_HSLIDER( o ) ( ( o )->type & FL_HOR_FLAG ) #define IS_VSLIDER( o ) ( ! IS_HSLIDER( o ) ) #define IS_FILL( o ) ( ( o )->type == FL_VERT_FILL_SLIDER \ || ( o )->type == FL_HOR_FILL_SLIDER ) #define IS_SCROLLBAR( o ) ( ( o )->type & FL_SCROLL_FLAG ) #define IS_FLATBOX( bt ) ( ( bt ) == FL_FRAME_BOX \ || ( bt ) == FL_EMBOSSED_BOX \ || ( bt ) == FL_BORDER_BOX \ || ( bt ) == FL_ROUNDED_BOX ) #endif /* PSLIDER_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pvaluator.h0000644000175000017500000000577011247055071016647 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pvaluator.h * * This file is part of the XForms library package. * Copyright (c) 1995-1997 T.C. Zhao and Mark Overmars * All rights reserved. * * private header for valuator object. Someday, all the * valuator functions will be consolidated to take care * most common tasks. Also the struct has redundant stuff in it. */ #ifndef PVALUATOR_H #define PVALUATOR_H /* The special information for valuators. the size of this structure * probably can be reduced quite a bit. */ typedef struct { double min; /* minimal value of slider */ double max; /* maximal value of slider */ double val; /* current value of slider */ double step; /* step size */ int draw_type; int prec; /* precision when printing value */ double start_val; double ldelta; /* "left mouse" step */ double rdelta; /* "right mouse " step */ double sstep; /* small step for counter */ double lstep; /* large step for counter */ FL_Coord x, /* draw (dbl buffer): adjustment report box */ y, w, h; double slsize; /* size of the slider */ FL_VAL_FILTER filter; FL_Coord offx; FL_Coord offy; FL_Coord mx, /* mouse: after adjustment for report box */ my, mw, mh; FL_Coord old_mx, old_my; int mouse, /* part the mouse is on */ lmouse; FL_Coord ww[ 5 ], /* for counter */ xx[ 5 ]; int changed; unsigned int mouseobj; int cross_over; /* allow cross over */ int repeat_ms; int cur_repeat_ms; int min_repeat_ms; int do_speedjump; int timeout_id; int mouse_off_knob; int was_shift; } FLI_VALUATOR_SPEC; enum { COMPLETE_DRAW = 1, VALUE_DRAW = 2, }; #endif /* PVALUTOR_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/ptwheel.h0000644000175000017500000000213711247055071016274 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file ptwheel.h * * This file is part of the XForms library package. * Copyright (c) 1995-1997 T.C. Zhao and Mark Overmars * All rights reserved. * * private header for slider object */ #ifndef PTWHEEL_H #define PTWHEEL_H #include "pvaluator.h" typedef FLI_VALUATOR_SPEC FLI_THUMBWHEEL_SPEC; #endif /* PTWHEEL_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/ppositioner.h0000644000175000017500000000304311247055071017174 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file ppositioner.h * * This file is part of the XForms library package. * Copyright (c) 1995-1997 T.C. Zhao and Mark Overmars * All rights reserved. * * private header for positioner object */ #ifndef PPOSITION_H #define PPOSITION_H typedef struct { double xmin, /* minimal values */ ymin; double xmax, /* maximal values */ ymax; double xval, /* current values */ yval; double lxval, /* previous values */ lyval; double xstep, /* step size to which values are rounded */ ystep; int partial; double old_x, /* values at start of ineraction */ old_y; } FLI_POSITIONER_SPEC; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/.cvsignore0000644000175000017500000000002511171560225016443 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/lib/private/pmenu.h0000644000175000017500000000374711247055071015760 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pmenu.h */ #ifndef PMENU_H_ #define PMENU_H_ #define MAXITEMS ( FL_MENU_MAXITEMS + 1 ) /* index 0 unused */ /* make sure that the first 5 elements are the same as FL_CHOICE. * fdesign assumes this */ typedef struct { int numitems; /* number of items in menu */ int val; /* last menu item selected */ char * items[ MAXITEMS ]; /* individual menu items */ char * shortcut[ MAXITEMS ]; /* shortcuts for items */ unsigned char mode[ MAXITEMS ]; /* menu item mode */ int align; /* onle here to mirror FL_CHOICE */ int extern_menu; /* if external pop is used */ short showsymbol; /* whether symbol is to be shown */ short shown; /* if shown */ char mval[ MAXITEMS ]; /* entry value, position based */ char modechange[ MAXITEMS ]; int cur_val; /* counter for the value */ int no_title; FL_PUP_CB cb[ MAXITEMS ]; /* item callback functions */ } FLI_MENU_SPEC; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pcounter.h0000644000175000017500000000214411247055071016461 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pcounter.h * * This file is part of the XForms library package. * Copyright (c) 1995-1997 T.C. Zhao and Mark Overmars * All rights reserved. * * private header for counter objects */ #ifndef PCOUNTER_H #define PCOUNTER_H #include "pvaluator.h" typedef FLI_VALUATOR_SPEC FLI_COUNTER_SPEC; #endif /* PCOUNTER_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/pxyplot.h0000644000175000017500000001545011247055071016345 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /** * \file pxyplot.h * * This file is part of the XForms library package. * Copyright (c) 1995-1997 T.C. Zhao and Mark Overmars * All rights reserved. * * private header for xyplot object */ #ifndef PXYPLOT_H #define PXYPLOT_H #define MAX_ALABEL 64 #define MAX_MAJOR 50 #define MAX_MINOR 50 #define MAX_TIC 200 /* really should be MAJOR * MINOR */ typedef struct { float xmin, /* true xbounds */ xmax; float ymin, /* true ybounds */ ymax; float xscmin, /* bounds used in mapping */ xscmax; float yscmin, /* bounds used in mapping */ yscmax; float ax, /* data -> screen conversion */ bx, ay, by; float xtic, /* tic marks */ ytic; float xbase, /* log base */ ybase; float lxbase, /* log10 of the log base */ lybase; int xi, /* ploted area bounds */ xf, yi, yf; char * title; /* overall title */ char * xlabel, * ylabel; /* the x- and y-axis labels */ char * axtic[ MAX_ALABEL ];/* alphanumerical tic marks */ char * aytic[ MAX_ALABEL ];/* alphanumerical tic marks */ char * xmargin1, * xmargin2; char * ymargin1, * ymargin2; /* fixed area. margins */ char ** text; /* inset text *text[over] */ float * xt, * yt; /* inset text position xt[over] */ float ** x, ** y; /* real data *x, *y[over+1] */ float * grid; /* interpolating grid[over+1] */ float ux, /* points to be updated */ uy; float * wx, /* working array for interpolat.*/ * wy; FL_POINT * xp; /* screen data */ FL_POINT * xpactive; /* active(mouse) screen data */ FL_POINT * xpi; /* screen data for interpolated */ short * thickness; /* line thickness [over+1] */ FL_COLOR * col; /* overlay color [over+1] */ FL_COLOR * tcol; /* overlay text color [over+1] */ int * type; /* type[over+1] */ int * n, /* total points/viewable points */ nxp; int n1; int ninterpol; int nxpi; int cur_nxp; /* length of xp */ int inside; int grid_linestyle; FL_XYPLOT_SYMBOL * symbol; /* [over + 1] */ short * interpolate; /* if interpolate[over+1] */ short * talign; /* inset text alignment [over+1] */ short xscale; /* linear or log for x */ short yscale; /* linear or log for y */ short active; /* if accepting mouse events */ short ssize; /* symbol size */ short lsize, /* font and style for labels */ lstyle; short xautoscale; /* autoscale to fit */ short yautoscale; /* autoscale to fit */ short xmajor, xminor; /* x-axis scaling */ short ymajor, yminor; /* y-axis scaling */ short inspect; short update; short maxoverlay; short xgrid, ygrid; /* if draw grid */ short iactive; /* which overlay is active */ int objx, /* singlebuffer mode */ objy; float bxm, /* data -> screen conversion */ bym; float key_x, /* key place location */ key_y; int key_lstyle, key_lsize; int key_align; int no_keybox; char ** key; short maxytic; /* max tic mark length in pixels */ int key_maxw, key_maxh, key_ascend, key_descend; int key_xs, key_ys; /* tic locations */ int num_xminor; int num_xmajor; int num_yminor; int num_ymajor; float xmajor_val[ MAX_MAJOR ]; float ymajor_val[ MAX_MAJOR ]; short xtic_minor[ MAX_TIC ]; short xtic_major[ MAX_MAJOR ]; short ytic_minor[ MAX_TIC ]; short ytic_major[ MAX_MAJOR ]; short mark_active; short external_data; int start_x; int start_y; } FLI_XYPLOT_SPEC; #endif /* PXYPLOT.H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/private/Makefile.in0000644000175000017500000002436111377311602016522 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = lib/private ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = \ flsnprintf.h \ pbrowser.h \ pcanvas.h \ pchoice.h \ pcounter.h \ pdial.h \ pflps.h \ pformbrowser.h \ pmenu.h \ pnmenu.h \ ppositioner.h \ pscrollbar.h \ pselect.h \ pslider.h \ ptbox.h \ ptwheel.h \ pvaluator.h \ pxyplot.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/private/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign lib/private/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/lib/read2lsbf.c0000644000175000017500000000265011247055071015011 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file read2lsbf.c * * Copyright(c) 1993,1994 by T.C. Zhao * All rights reserved. * * Read 2bytes LSB first */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" #include "ulib.h" /*************************************** ***************************************/ int fli_fget2LSBF( FILE * fp ) { int ret = getc( fp ); return ( ret | getc( fp ) << 8 ); } /*************************************** ***************************************/ int fli_fput2LSBF( int code, FILE * fp ) { putc( code & 0xff, fp ); return putc( ( code >> 8 ) & 0xff, fp ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/colsel.c0000644000175000017500000001110511252440767014427 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file colsel.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Select a color */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" typedef struct { FL_FORM * colorform; FL_OBJECT * col[ 64 ]; FL_OBJECT * next, * prev, * cancel; FL_OBJECT * cindex; } COLSEL; static COLSEL colsel; static COLSEL *cs = &colsel; /*************************************** ***************************************/ static void create_colorform( void ) { int i, j; if ( cs->colorform ) return; cs->colorform = fl_bgn_form( FL_UP_BOX, 240, 220 ); for ( i = 0; i < 8; i++ ) for ( j = 0; j < 8; j++ ) { cs->col[ 8 * i + j ] = fl_add_button( FL_NORMAL_BUTTON, 40 + j * 20, 10 + i * 20, 20, 20, "" ); fl_set_object_boxtype( cs->col[ 8 * i + j ], FL_BORDER_BOX ); fl_set_object_lcol( cs->col[ 8 * i + j ], 7 ); } cs->prev = fl_add_button( FL_NORMAL_BUTTON, 10, 10, 30, 160, "@4" ); cs->next = fl_add_button( FL_NORMAL_BUTTON, 200, 10, 30, 160, "@6" ); cs->cancel = fl_add_button( FL_NORMAL_BUTTON, 80, 180, 140, 30, "Cancel" ); cs->cindex = fl_add_text( FL_NORMAL_TEXT, 5, 180, 70, 30, "Cancel" ); fl_set_object_lsize( cs->cindex,FL_TINY_SIZE ); fl_end_form( ); } extern int flrectboundcolor; /*************************************** * initializes the colors ***************************************/ static void init_colors( int cc, int thecol ) { int i; const char *cn; fl_freeze_form( cs->colorform ); for ( i = 0; i < 64; i++ ) { fl_set_object_color( cs->col[ i ], cc + i, cc + i ); fl_set_object_label( cs->col[ i ], "" ); if ( thecol == cc + i ) fl_set_object_label( cs->col[ i ], "@9plus" ); } cn = fli_query_colorname( thecol ); fl_set_object_label( cs->cindex, cn + ( cn[ 0 ] == 'F' ? 3 : 0 ) ); fl_unfreeze_form( cs->colorform ); } /*************************************** ***************************************/ static int atclose( FL_FORM * form, void * ev FL_UNUSED_ARG ) { fl_trigger_object( form->u_vdata ); return FL_IGNORE; } /*************************************** * Shows a colormap color selector from which the user can select a color. ***************************************/ int fl_show_colormap( int oldcol ) { FL_OBJECT *ob; int i, cc, ready = 0, thecol; int s = flrectboundcolor; flrectboundcolor = FL_BOTTOM_BCOL; if ( oldcol == FL_NoColor ) oldcol = FL_COL1; cc = 64 * ( oldcol / 64 ); thecol = oldcol; create_colorform( ); cs->colorform->u_vdata = cs->cancel; fl_set_form_atclose( cs->colorform, atclose, 0 ); init_colors( cc, thecol ); fl_set_object_color( cs->cancel, thecol, thecol ); fl_deactivate_all_forms( ); fl_show_form( cs->colorform, FL_PLACE_ASPECT, FL_TRANSIENT, "Colormap" ); while ( ! ready ) { ob = fl_do_only_forms( ); if ( ob == cs->prev && cc >= 64 ) { cc -= 64; init_colors( cc, thecol ); } else if ( ob == cs->next && cc + 64 < FL_MAX_COLS ) { cc += 64; init_colors( cc, thecol ); } else if ( ob == cs->cancel ) ready = 1; else for ( i = 0; i < 64; i++ ) if ( ob == cs->col[ i ] ) { ready = 1; thecol = cc + i; } } fl_hide_form( cs->colorform ); fl_activate_all_forms( ); flrectboundcolor = s; return thecol; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/fldraw.c0000644000175000017500000011205011311524047014414 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fldraw.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * High level drawing routines. Uses the routines defined in xdraw.c */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #define FLI_SHADOW_COL FL_RIGHT_BCOL static void fl_foldertab_box( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, FL_COLOR, int ); /******************************************************************* * Rectangle routines ****************************************************************{**/ /*************************************** * Make an arbitary rectangle have positive width and height ***************************************/ void fli_canonicalize_rect( FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ) { if ( *w < 0 ) { *w = -*w; *x -= *w; } if ( *h < 0 ) { *h = -*h; *y -= *h; } } /*************************************** * Draw a filled rectangle with a black boundary. Also Compensates * for the inconsistency in Xlib ***************************************/ int flrectboundcolor = FL_BLACK; void fl_rectbound( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ) { fli_canonicalize_rect( &x, &y, &w, &h ); /* 0 width has special meaning in Xlib */ if ( h < 2 ) h = 2; if ( w < 2 ) w = 2; fl_rectangle( 1, x + 1, y + 1, w - 1, h - 1, col ); fl_rectangle( 0, x, y, w, h, flrectboundcolor ); } /****** End of rectangle routines ***********************}***/ #define MAX_RADIUS 18 /* 0.0, 0.034074, 0.1339746, 0.292893, 0.5, 0.741181, 1.0 */ static double offset[ ] = { 0.0, 0.07612, 0.29289, 0.61732, 1.0 }; #define RN ( sizeof offset / sizeof *offset ) /*************************************** ***************************************/ static void compute_round_corners( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_POINT * point ) { size_t i; double rs = 0.45 * FL_min( w, h ); static double old_rs = -1; static FL_Coord o[ RN ]; if ( rs > MAX_RADIUS ) rs = MAX_RADIUS; if ( rs < 0 ) rs = 0; if ( rs != old_rs ) { for ( i = 0; i < RN; i++ ) o[ i ] = FL_crnd( offset[ i ] * rs ); old_rs = rs; } for ( i = 0; i < RN; i++, point++ ) { point->x = x + o[ RN - i - 1 ]; point->y = y + o[ i ]; } for ( i = 0; i < RN; i++, point++ ) { point->x = x + o[ i ]; point->y = y + h - 1 - o[ RN - i - 1 ]; } for ( i = 0; i < RN; i++, point++ ) { point->x = x + w - 1 - o[ RN - i - 1 ]; point->y = y + h - 1 - o[ i ]; } for ( i = 0; i < RN; i++, point++ ) { point->x = x + w - 1 - o[ i ]; point->y = y + o[ RN - i - 1 ]; } } /*************************************** ***************************************/ void fl_roundrectangle( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ) { FL_POINT point[ 4 * RN + 1 ]; /* need one extra for closing of polygon! */ compute_round_corners( x, y, w, h, point ); fl_polygon( fill, point, 4 * RN, col ); } #define Shrink( x, y, w, h, d ) \ do { x += ( d ); \ y += ( d ); \ w -= 2 * ( d ); \ h -= 2 * ( d ); \ } while ( 0 ) /*************************************** ***************************************/ static void fl_rounded3dbox( int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int bw ) { FL_POINT point[ 4 * RN + 1 ]; /* on extra for closing of curve */ int lw = FL_abs( bw ); int n = 4 * RN, olw; Shrink( x, y, w, h, ( int ) ( lw / 2 ) ); compute_round_corners( x, y, w, h, point ); fl_polyf( point, n, col ); olw = fl_get_linewidth( ); fl_linewidth( lw ); /* draw the shadow */ if ( style == FL_ROUNDED3D_UPBOX ) { fl_lines( point, 2 * RN, FL_LEFT_BCOL ); fl_lines( point + 2 * RN - 3, RN + 1, FL_BOTTOM_BCOL ); fl_lines( point + 3 * RN - 4, RN + 2, FL_RIGHT_BCOL ); point[ n ] = point[ 0 ]; fl_lines( point + n - 3, 4, FL_TOP_BCOL ); } else { fl_lines( point, 2 * RN, FL_BOTTOM_BCOL ); fl_lines( point + 2 * RN - 3, RN + 1, FL_TOP_BCOL ); fl_lines( point + 3 * RN - 4, RN + 2, FL_LEFT_BCOL ); point[ n ] = point[ 0 ]; fl_lines( point + n - 3, 4, FL_BOTTOM_BCOL ); } fl_linewidth( olw ); if ( bw > 0 && fli_dithered( fl_vmode ) ) { compute_round_corners( x, y, w, h, point ); fl_polyl( point, n, FL_BLACK ); } } /*************************************** ***************************************/ static void fl_oval3dbox( int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int bw ) { int absbw = FL_abs( bw ), olw = fl_get_linewidth( ); int extra = 1 + ( absbw > 3 ); int xx, yy, ww, hh; Shrink( x, y, w, h, ( int ) ( absbw / 2 ) ); fl_pieslice( 1, x, y, w, h, 0, 3600, col ); xx = x + extra; yy = y + extra; ww = w - 2 * extra; hh = h - 2 * extra; fl_linewidth( absbw ); if ( style == FL_OVAL3D_UPBOX ) { fl_pieslice( 0, x, y, w, h, 450, 2250, FL_TOP_BCOL ); fl_pieslice( 0, x, y, w, h, 0, 450, FL_BOTTOM_BCOL ); fl_pieslice( 0, x, y, w, h, 2250, 3600, FL_BOTTOM_BCOL ); } else if ( style == FL_OVAL3D_FRAMEBOX ) { fl_linewidth( 0 ); fl_pieslice( 0, x, y, w, h, 450, 2250, FL_BOTTOM_BCOL ); fl_pieslice( 0, xx, yy, ww, hh, 450, 2250, FL_LEFT_BCOL ); fl_pieslice( 0, xx, yy, ww, hh, 0, 450, FL_BOTTOM_BCOL ); fl_pieslice( 0, x, y, w, h, 0, 450, FL_LEFT_BCOL ); fl_pieslice( 0, xx, yy, ww, hh, 2250, 3600, FL_BOTTOM_BCOL ); fl_pieslice( 0, x, y, w, h, 2250, 3600, FL_LEFT_BCOL ); } else if ( style == FL_OVAL3D_EMBOSSEDBOX ) { fl_linewidth( 0 ); fl_pieslice( 0, x, y, w, h, 450, 2250, FL_LEFT_BCOL ); fl_pieslice( 0, xx, yy, ww, hh, 450, 2250, FL_BOTTOM_BCOL ); fl_pieslice( 0, xx, yy, ww, hh, 0, 450, FL_LEFT_BCOL ); fl_pieslice( 0, x, y, w, h, 0, 450, FL_BOTTOM_BCOL ); fl_pieslice( 0, xx, yy, ww, hh, 2250, 3600, FL_LEFT_BCOL ); fl_pieslice( 0, x, y, w, h, 2250, 3600, FL_BOTTOM_BCOL ); } else { fl_pieslice( 0, x, y, w, h, 450, 2250, FL_BOTTOM_BCOL ); fl_pieslice( 0, x, y, w, h, 0, 450, FL_TOP_BCOL ); fl_pieslice( 0, x, y, w, h, 2250, 3600, FL_TOP_BCOL ); } fl_linewidth( olw ); if ( fli_dithered( fl_vmode ) ) fl_pieslice( 0, x, y, w, h, 0, 3600, FL_BLACK ); } #define SetPoint( v, xp, yp ) \ do { ( v )->x = xp; \ ( v )->y = yp; \ } while ( 0 ) /*************************************** * Draw a rectangular box. TODO: need to change primitive box * drawing using frame ***************************************/ void fl_drw_box( int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int bw_in ) { FL_POINT vert[ 5 ]; /* need one extra for closing of polygon! */ int B, dp = fli_dithered( fl_vmode ), bw = bw_in; FL_Coord cx, cy, cw, ch; if ( c == FL_NoColor ) c = FL_COL1; if ( style == FL_NO_BOX ) return; if ( ! ( B = bw > 0 ) ) bw = - bw; if ( bw == 0 && style != FL_NO_BOX ) style = FL_FLAT_BOX; /* We must guarantee width of rectangle is larger than 0 */ if ( w - 2 * bw <= 0 ) bw = w / 2 - 1; if ( h - 2 * bw <= 0 ) bw = h / 2 - 1; if ( w <= 0 || h <= 0 ) return; switch ( style ) { case FL_NO_BOX: break; case FL_UP_BOX: fl_rectf( x + bw + B, y + bw + B, w - 2 * bw - 2 * B, h - 2 * bw - 2 * B, c ); fl_rectf( x + B, y + B, w - 1 - B, bw, FL_TOP_BCOL ); fl_rectf( x + B, y + h - bw - B, w - 1 - B, bw, FL_BOTTOM_BCOL ); SetPoint( vert, x + w - B - bw, y + bw + B ); SetPoint( vert + 1, x + w - B - bw, y + h - B - bw ); SetPoint( vert + 2, x + w - B, y + h - B ); SetPoint( vert + 3, x + w - B, y + B ); fl_polyf( vert, 4, FL_RIGHT_BCOL ); /* left trapzoidal */ SetPoint( vert, x + B, y + B ); SetPoint( vert + 1, x + B, y + h - B ); SetPoint( vert + 2, x + bw + B, y + h - bw - B ); SetPoint( vert + 3, x + bw + B, y + bw + B ); fl_polyf( vert, 4, FL_LEFT_BCOL ); if ( B || fli_dithered( fl_vmode ) ) fl_rect( x, y, w - 1, h - 1, FL_RIGHT_BCOL ); /* special hack for B&W */ if ( fli_dithered( fl_vmode ) ) { if ( bw > 2 ) { SetPoint( vert, x + B, y + B ); SetPoint( vert + 1, x + B + bw - 1, y + bw ); SetPoint( vert + 2, x + w - bw, y + bw ); fl_lines( vert, 3, FL_BLACK ); fl_simple_line( x + B + bw - 1, y + B + bw, x + B + bw - 1, y + h - bw, FL_BLACK ); } else fl_rect( x, y, w - 1, h - 1, FL_BLACK ); } break; case FL_DOWN_BOX: fl_rectf( x + bw, y + bw, w - 2 * bw, h - 2 * bw, c ); fl_rectf( x, y + h - bw, w, bw - dp, FL_TOP_BCOL ); fl_rectf( x, y, w, bw, FL_BOTTOM_BCOL ); /* right trapzoid */ SetPoint( vert, x + w - bw, y + bw ); SetPoint( vert + 1, x + w - bw, y + h - bw ); SetPoint( vert + 2, x + w - dp, y + h ); SetPoint( vert + 3, x + w - dp, y ); fl_polyf( vert, 4, FL_LEFT_BCOL ); /* left trapzoid */ SetPoint( vert, x, y ); SetPoint( vert + 1, x, y + h - 1 ); SetPoint( vert + 2, x + bw, y + h - bw ); SetPoint( vert + 3, x + bw, y + bw ); fl_polyf( vert, 4, FL_RIGHT_BCOL ); /* special hack for B&W */ if ( fli_dithered( fl_vmode ) ) { SetPoint( vert, x + B, y + h - 1 ); SetPoint( vert + 1, x + w - 1, y + h - 1 ); SetPoint( vert + 2, x + w - 1, y + B ); fl_lines( vert, 3, FL_BLACK ); } break; case FL_FLAT_BOX: fl_rectf( x, y, w, h, c ); break; case FL_BORDER_BOX: fl_rectbound( x, y, w - 1, h - 1, c ); break; case FL_FRAME_BOX: B = bw > 2 ? bw - 2 : 1; fl_drw_box( FL_DOWN_BOX, x, y, w, h, c, 1 ); x += B + 1; y += B + 1; w -= 2 * ( B + 1 ); h -= 2 * ( B + 1 ); fl_drw_frame( FL_UP_FRAME, x, y, w, h, c, -1 ); break; case FL_EMBOSSED_BOX: B = bw > 2 ? bw - 2 : 1; fl_drw_box( FL_UP_BOX, x, y, w, h, c, -1 ); x += B + 1; y += B + 1; w -= 2 * ( B + 1 ); h -= 2 * ( B + 1 ); fl_drw_frame( FL_DOWN_FRAME, x, y, w, h, c, 1 ); break; case FL_ROUNDED_BOX: fl_roundrectf( x + 1, y + 1, w - 1, h - 1, c ); fl_roundrect( x, y, w, h, FL_BLACK ); break; case FL_ROUNDED3D_UPBOX: case FL_ROUNDED3D_DOWNBOX: fl_rounded3dbox( style, x, y, w, h, c, bw ); break; case FL_SHADOW_BOX: bw++; fl_rectf( x + bw, y + h - bw, w - bw, bw, FLI_SHADOW_COL ); fl_rectf( x + w - bw, y + bw, bw, h - bw, FLI_SHADOW_COL ); fl_rectbound( x, y, w - bw, h - bw, c ); break; case FL_RSHADOW_BOX: if ( w > 70 && h > 70 ) bw++; fli_get_clipping( &cx, &cy, &cw, &ch ); /* draw the shadow. draw it several times with clipping */ fl_roundrectf( x + bw, y + bw, w - bw, h - bw, FLI_SHADOW_COL ); /* draw the box */ fli_set_additional_clipping( x, y, w, h ); fl_roundrectf( x + 1, y + 1, w - 1 - bw, h - 1 - bw, c ); fl_roundrect( x, y, w - bw, h - bw, FL_BLACK ); fl_set_clipping( cx, cy, cw, ch ); break; case FL_RFLAT_BOX: fl_roundrectf( x, y, w, h, c ); break; case FL_OVAL_BOX: fl_oval( 1, x + 1, y + 1, w - 1, h - 1, c ); fl_oval( 0, x + 1, y + 1, w - 2, h - 2, FL_BLACK ); break; case FL_OVAL3D_UPBOX: case FL_OVAL3D_DOWNBOX: case FL_OVAL3D_FRAMEBOX: case FL_OVAL3D_EMBOSSEDBOX: fl_oval3dbox( style, x, y, w, h, c, bw_in ); break; case FL_TOPTAB_UPBOX: case FL_SELECTED_TOPTAB_UPBOX: case FL_BOTTOMTAB_UPBOX: case FL_SELECTED_BOTTOMTAB_UPBOX: fl_foldertab_box( style, x, y, w, h, c, bw_in ); break; default: if ( style & FLI_BROKEN_BOX ) fl_foldertab_box( style, x, y, w, h, c, bw_in ); else M_err( "fl_drw_box", "Unkonwn boxtype: %d", style ); break; } } /*************************************** * 0 * 1 3 * 2 * draw a box rotated 45 degrees ***************************************/ void fl_drw_checkbox( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int bw ) { FL_POINT xpoint[ 5 ], /* need one extra for closing of polygon! */ allp[ 9 ]; int halfh = h / 2, halfw = w / 2; w = 2 * halfw; h = 2 * halfh; /* generate all points */ SetPoint( allp, x + halfw, y ); SetPoint( allp + 1, x, y + halfh ); SetPoint( allp + 2, x + halfw, y + h ); SetPoint( allp + 3, x + w, y + halfh ); SetPoint( allp + 4, x + halfw, y + bw ); SetPoint( allp + 5, x + bw, y + halfh ); SetPoint( allp + 6, x + halfw, y + h - bw ); SetPoint( allp + 7, x + w - bw, y + halfh ); /* draw overall box */ fl_polyf( allp + 4, 4, col ); if ( type == FL_UP_BOX || type == FL_DOWN_BOX ) { xpoint[ 0 ] = allp[ 0 ]; xpoint[ 1 ] = allp[ 1 ]; xpoint[ 2 ] = allp[ 5 ]; xpoint[ 3 ] = allp[ 4 ]; fl_polyf( xpoint, 4, type == FL_UP_BOX ? FL_LEFT_BCOL : FL_RIGHT_BCOL ); xpoint[ 0 ] = allp[ 0 ]; xpoint[ 1 ] = allp[ 4 ]; xpoint[ 2 ] = allp[ 7 ]; SetPoint( xpoint + 3, allp[ 3 ].x, allp[ 3 ].y ); fl_polyf( xpoint, 4, type == FL_UP_BOX ? FL_TOP_BCOL : FL_BOTTOM_BCOL ); xpoint[ 0 ] = allp[ 6 ]; xpoint[ 1 ] = allp[ 2 ]; xpoint[ 2 ] = allp[ 3 ]; xpoint[ 3 ] = allp[ 7 ]; fl_polyf( xpoint, 4, type == FL_UP_BOX ? FL_RIGHT_BCOL : FL_LEFT_BCOL ); xpoint[ 0 ] = allp[ 1 ]; xpoint[ 1 ] = allp[ 2 ]; xpoint[ 2 ] = allp[ 6 ]; xpoint[ 3 ] = allp[ 5 ]; fl_polyf( xpoint, 4, type == FL_UP_BOX ? FL_BOTTOM_BCOL : FL_TOP_BCOL ); } #if 1 /* add a border. destructive as polyl uses the allp[ 5 ] */ if ( fli_dithered( fl_vmode ) /* || tbw > 0 */ ) fl_polyl( allp, 4, FL_BLACK ); #endif } /*************************************** * Draw a frame around a box. The frame is so drawn that it is just * outside of the box without any gap. A flat with the same size * as the frame just fit the inside the of the frame. ***************************************/ void fl_drw_frame( int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int bw ) { FL_POINT vert[ 5 ]; /* need one extra for closing of polygon! */ int B, dp = fli_dithered( fl_vmode ); if ( w <= 0 || h <= 0 ) return; if ( ! ( B = bw > 0 ) ) bw = - bw; switch ( style ) { case FL_UP_FRAME: /* must guarante the width of rectangle > 0 */ if ( ( w - 2 * bw ) <= 0 ) bw = w / 2; if ( ( h - 2 * bw ) <= 0 ) bw = h / 2; x -= bw + B; y -= bw + B; w += 2 * ( bw + B ); h += 2 * ( bw + B ); fl_rectf( x + B, y + B, w - 1 - B, bw, FL_TOP_BCOL ); fl_rectf( x + B, y + h - bw - B, w - 1 - B, bw, FL_BOTTOM_BCOL ); SetPoint( vert, x + w - B - bw, y + bw + B ); SetPoint( vert + 1, x + w - B - bw, y + h - B - bw ); SetPoint( vert + 2, x + w - B, y + h - B ); SetPoint( vert + 3, x + w - B, y + B ); fl_polyf( vert, 4, FL_RIGHT_BCOL ); /* left trapzoidal */ SetPoint( vert, x + B, y + B ); SetPoint( vert + 1, x + B, y + h - B ); SetPoint( vert + 2, x + bw + B, y + h - bw - B ); SetPoint( vert + 3, x + bw + B, y + bw + B ); fl_polyf( vert, 4, FL_LEFT_BCOL ); if ( B || fli_dithered( fl_vmode ) ) fl_rect( x, y, w - 1, h - 1, FL_BLACK ); /* special hack for B&W */ if ( fli_dithered( fl_vmode ) ) { if ( bw > 2 ) { SetPoint( vert, x + B, y + B ); SetPoint( vert + 1, x + B + bw - 1, y + bw ); SetPoint( vert + 2, x + w - bw, y + bw ); fl_lines( vert, 3, FL_BLACK ); fl_simple_line( x + B + bw - 1, y + B + bw, x + B + bw - 1, y + h - bw, FL_BLACK ); } else fl_rect( x, y, w - 1, h - 1, FL_BLACK ); } break; case FL_DOWN_FRAME: x -= bw; y -= bw; w += 2 * bw; h += 2 * bw; /* top and bottom section */ fl_rectf( x, y, w, bw, FL_BOTTOM_BCOL ); /* top */ fl_rectf (x, y + h - bw, w, bw - dp, FL_TOP_BCOL); /* bottom */ /* right trapzoid */ SetPoint( vert, x + w - bw, y + bw ); SetPoint( vert + 1, x + w - bw, y + h - bw ); SetPoint( vert + 2, x + w - dp, y + h ); SetPoint( vert + 3, x + w - dp, y ); fl_polyf( vert, 4, FL_LEFT_BCOL ); /* left trapzoid */ SetPoint( vert, x, y ); SetPoint( vert + 1, x, y + h - 1 ); SetPoint( vert + 2, x + bw, y + h - bw ); SetPoint( vert + 3, x + bw, y + bw ); fl_polyf( vert, 4, FL_RIGHT_BCOL ); /* special hack for B&W */ if ( fli_dithered( fl_vmode ) ) { SetPoint( vert, x + B, y + h - 1 ); SetPoint( vert + 1, x + w - 1, y + h - 1 ); SetPoint( vert + 2, x + w - 1, y + B ); fl_lines( vert, 3, FL_BLACK ); } break; case FL_SHADOW_FRAME: if ( w > 70 && h > 70 ) { if ( ( bw += ( w + h ) / 140 ) > 5 ) bw = 5; } fl_rectf( x + bw, y + h, w, bw, FLI_SHADOW_COL ); fl_rectf( x + w, y + bw, bw, h, FLI_SHADOW_COL ); fl_rect( x - 1, y - 1, w + 1, h + 1, FL_BLACK ); break; case FL_BORDER_FRAME: fl_rect( x - 1, y - 1, w + 1, h + 1, c ); break; case FL_EMBOSSED_FRAME: B = bw > 2 ? ( bw - 2 ) : 1; fl_drw_frame( FL_UP_FRAME, x, y, w, h, 0, -1 ); fl_drw_frame( FL_DOWN_FRAME, x + B, y + B, w - 2 * B, h - 2 * B, 0, 1 ); break; case FL_ENGRAVED_FRAME: B = bw > 2 ? bw - 2 : 1; fl_drw_frame( FL_DOWN_FRAME, x, y, w, h, 0, 1 ); fl_drw_frame( FL_UP_FRAME, x + B, y + B, w - 2 * B, h - 2 * B, 0, -1 ); break; case FL_ROUNDED_FRAME: fl_roundrect( x - 1, y - 1, w + 2, h + 2, c ); break; case FL_OVAL_FRAME: fl_oval( 0, x - 1, y - 1, w + 2, h + 2, c ); break; default: break; } } /********* Some convience functions, sort of GL in X ******{*****/ #define MAX_BUF_POINT 128 static FL_POINT xpbuf[ MAX_BUF_POINT ]; static int npt; static FL_COLOR pcol; /*************************************** ***************************************/ void fli_add_vertex( FL_Coord x, FL_Coord y ) { xpbuf[ npt ].x = x; xpbuf[ npt++ ].y = y; } /*************************************** ***************************************/ void fli_add_float_vertex( float x, float y ) { xpbuf[ npt ].x = FL_nint( x ); xpbuf[ npt++ ].y = FL_nint( y ); } /*************************************** ***************************************/ void fli_reset_vertex( void ) { npt = 0; pcol = flx->color; } /*************************************** ***************************************/ void fli_endline( void ) { if ( npt >= MAX_BUF_POINT ) { M_err( "fli_endline", "Vertices Out of bounds" ); return; } fl_lines( xpbuf, npt, flx->color ); } /*************************************** ***************************************/ void fli_endclosedline( void ) { if ( npt >= MAX_BUF_POINT ) { M_err( "fli_endclosedline", "Vertices Out of bounds" ); return; } fl_polyl( xpbuf, npt, pcol ); } /*************************************** ***************************************/ void fli_endpolygon( void ) { if ( npt >= MAX_BUF_POINT ) { M_err( "fli_endpolygon", "Vertices Out of bounds" ); return; } fl_polyf( xpbuf, npt, flx->color ); } static int Corner = 3; /*************************************** ***************************************/ int fl_set_default_tabfolder_corner( int n ) { int old = Corner; Corner = FL_abs( n ); if ( Corner > 10 ) Corner = 10; return old; } /*************************************** ***************************************/ static void fl_foldertab_box( int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int bw ) { int ctr, right, bott; FL_POINT vert[ 9 ]; /* need one extra for closing of polygon! */ int border; int absbw = FL_abs( bw ), i; int C = Corner; int isbroken = style & FLI_BROKEN_BOX; if ( ! ( border = bw > 0 ) ) bw = -bw; style &= ~ FLI_BROKEN_BOX; /* for foldertab box, actual h is pre-enlarged by absbw pixels so the label is draw centered. Here we recover the pixels */ if ( style == FL_BOTTOMTAB_UPBOX || style == FL_SELECTED_BOTTOMTAB_UPBOX ) h += absbw; else h -= absbw; /* We must guarante the width of the rectangle is larger than 0 */ if ( w - 2 * bw <= 0 ) bw = w / 2 - 1; if ( h - 2 * bw <= 0 ) bw = h / 2 - 1; ctr = absbw / 2; Shrink( x, y, w, h, ctr ); right = x + w - 1; bott = y + h - 1; switch ( style ) { case FL_TOPTAB_UPBOX: SetPoint( vert, x, y + h - ( ctr == 0 ) ); SetPoint( vert + 1, x, y + C - 1 ); SetPoint( vert + 2, x + C - 1, y ); SetPoint( vert + 3, right - C, y ); SetPoint( vert + 4, x + C - 1, y ); SetPoint( vert + 5, right - C + 1, y ); SetPoint( vert + 6, right, y + C - 1 ); SetPoint( vert + 7, right, y + h - ( ctr == 0 ) ); fl_polyf( vert, 8, c ); fl_set_linewidth( absbw ); fl_lines( vert, 3, FL_LEFT_BCOL ); fl_lines( vert + 3, 2, FL_TOP_BCOL ); if ( ! isbroken ) fl_lines( vert + 5, 3, FL_BOTTOM_BCOL ); else { int yc = ( h - ( ctr == 0 ) ) / 2, yc2 = yc / 2, yc4 = yc / 4; fl_line( right, y, right, y + 4, FL_INACTIVE_COL ); fl_line( right, y + 4, right - 3, y + yc4, FL_INACTIVE_COL ); fl_line( right - 3, y + yc4, right - 2, y + yc2, FL_INACTIVE_COL ); fl_line( right - 2, y + yc2, right, y + yc, FL_INACTIVE_COL ); fl_line( right, y + yc, right, y + yc + 2, FL_INACTIVE_COL ); fl_line( right, y + yc + 2, right + 1, y + yc + yc4, FL_INACTIVE_COL ); fl_line( right + 1, y + yc + yc4, right - 2, y + yc + yc, FL_INACTIVE_COL ); } fl_set_linewidth( 0 ); if ( border || fli_dithered( fl_vmode ) ) { for ( i = 0; i < 8; i++ ) { if ( vert[ i ].x > x + w / 2 ) vert[ i ].x += ctr; else vert[ i ].x -= ctr + 1; if ( vert[ i ].y < y + h / 2 ) vert[ i ].y -= ctr + 1; } fl_lines( vert, 8, FL_RIGHT_BCOL ); } break; case FL_SELECTED_TOPTAB_UPBOX: SetPoint( vert, x, bott + absbw + 3 ); SetPoint( vert + 1, x, y + C - 1 ); SetPoint( vert + 2, x + C - 1, y ); SetPoint( vert + 3, right - C, y ); SetPoint( vert + 4, x + C - 1, y ); SetPoint( vert + 5, right - C + 1, y ); SetPoint( vert + 6, right, y + C - 1 ); SetPoint( vert + 7, right, bott + absbw + 3 ); fl_polyf( vert, 8, c ); fl_set_linewidth( absbw ); fl_lines( vert, 3, FL_LEFT_BCOL ); fl_lines( vert + 3, 2, FL_TOP_BCOL ); fl_lines( vert + 5, 3, FL_BOTTOM_BCOL ); fl_set_linewidth( 0 ); if ( border || fli_dithered( fl_vmode ) ) { for ( i = 0; i < 8; i++ ) { if ( vert[ i ].x > x + w / 2 ) vert[ i ].x += ctr; else vert[ i ].x -= ctr + 1; if ( vert[ i ].y < y + h / 2 ) vert[ i ].y -= ctr + 1; } vert[ 0 ].y -= absbw + 1; vert[ 7 ].y -= absbw + 1; fl_lines( vert, 8, FL_RIGHT_BCOL ); } break; case FL_BOTTOMTAB_UPBOX: SetPoint( vert, x, y + ( ctr == 0 ) ); SetPoint( vert + 1, x, bott - C + 1 ); SetPoint( vert + 2, x + C - 1, bott ); SetPoint( vert + 3, x + C - 1, bott ); SetPoint( vert + 4, right - C, bott ); SetPoint( vert + 5, right - C, bott ); SetPoint( vert + 6, right, bott - C ); SetPoint( vert + 7, right, y + ( ctr == 0 ) ); fl_polyf( vert, 8, c ); fl_linewidth( absbw ); fl_lines( vert, 3, FL_TOP_BCOL ); fl_lines( vert + 3, 2, FL_BOTTOM_BCOL ); fl_lines( vert + 5, 3, FL_RIGHT_BCOL ); fl_linewidth( 0 ); if ( border || fli_dithered( fl_vmode ) ) { for ( i = 0; i < 8; i++ ) { if ( vert[ i ].x > x + w / 2 ) vert[ i ].x += ctr; else vert[ i ].x -= ctr + 1; if ( vert[ i ].y > y + h / 2 ) vert[ i ].y += ctr; } fl_lines( vert, 8, FL_RIGHT_BCOL ); } break; case FL_SELECTED_BOTTOMTAB_UPBOX: SetPoint( vert, x, y - absbw - 1 ); SetPoint( vert + 1, x, bott - C + 1 ); SetPoint( vert + 2, x + C - 1, bott ); SetPoint( vert + 3, x + C - 1, bott ); SetPoint( vert + 4, right - C, bott ); SetPoint( vert + 5, right - C, bott ); SetPoint( vert + 6, right, bott - C + 1 ); SetPoint( vert + 7, right, y - absbw - 1 ); fl_polyf( vert, 8, c ); fl_linewidth( absbw ); fl_lines( vert, 3, FL_TOP_BCOL ); fl_lines( vert + 3, 2, FL_BOTTOM_BCOL ); fl_lines( vert + 5, 3, FL_RIGHT_BCOL ); fl_linewidth( 0 ); if ( border || fli_dithered( fl_vmode ) ) { for ( i = 0; i < 8; i++ ) { if ( vert[ i ].x > x + w / 2 ) vert[ i ].x += ctr; else vert[ i ].x -= ctr + 1; if ( vert[ i ].y > y + h / 2 ) vert[ i ].y += ctr; } fl_lines( vert, 8, FL_RIGHT_BCOL ); } break; default: break; } } /*************************************** * draw triangluar box ***************************************/ void fli_drw_tbox( int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int bw_in ) { FL_POINT vert[ 4 ]; /* need one extra for closing of polygon! */ int dp = fli_dithered( fl_vmode ), bw = bw_in; int xc = x + w / 2, yc = y + h / 2; int halfbw = bw / 2; if ( c == FL_NoColor ) c = FL_COL1; if ( bw < 0 ) bw = -bw; if ( bw == 0 && style != FL_NO_BOX ) style = FL_FLAT_BOX; switch ( style ) { case FLI_TRIANGLE_UPBOX8: SetPoint( vert, xc, y + bw ); SetPoint( vert + 1, x + bw, y + h - bw ); SetPoint( vert + 2, x + w - bw, y + h - bw ); fl_polyf( vert, 3, c ); fl_linewidth( bw ); Shrink( x, y, w, h, halfbw ); xc = x + w / 2; fl_line( xc, y, x, y + h - 1, FL_LEFT_BCOL ); fl_line( x, y + h - 1, x + w - 1, y + h - 1, FL_BOTTOM_BCOL ); fl_line( xc, y, x + w - 1, y + h - 1, FL_BOTTOM_BCOL ); fl_linewidth( 0 ); break; case FLI_TRIANGLE_DOWNBOX8: SetPoint( vert, xc, y + bw ); SetPoint( vert + 1, x + bw, y + h - bw ); SetPoint( vert + 2, x + w - bw, y + h - bw ); fl_polyf( vert, 3, c ); fl_linewidth( bw ); Shrink( x, y, w, h, halfbw ); xc = x + w / 2; fl_line( xc, y, x, y + h - 1, FL_BOTTOM_BCOL ); fl_line( x, y + h - 1, x + w - 1, y + h - 1, FL_TOP_BCOL ); fl_line( xc, y, x + w - 1, y + h - 1, FL_LEFT_BCOL ); fl_linewidth( 0 ); break; case FLI_TRIANGLE_UPBOX2: SetPoint( vert, xc, y + h - bw ); SetPoint( vert + 1, x + bw, y + bw ); SetPoint( vert + 2, x + w - bw, y + bw ); fl_polyf( vert, 3, c ); fl_linewidth( bw ); Shrink( x, y, w, h, halfbw ); xc = x + w / 2; fl_line( xc, y + h - 1, x, y, FL_LEFT_BCOL ); fl_line( x, y, x + w - 1, y, FL_TOP_BCOL ); fl_line( x + w - 1, y, xc, y + h - 1, FL_RIGHT_BCOL ); fl_linewidth( 0 ); break; case FLI_TRIANGLE_DOWNBOX2: SetPoint( vert, xc, y + h - bw ); SetPoint( vert + 1, x + bw, y + bw ); SetPoint( vert + 2, x + w - bw, y + bw ); fl_polyf( vert, 3, c ); fl_linewidth( bw ); Shrink( x, y, w, h, halfbw ); xc = x + w / 2; fl_line( xc, y + h - 1, x, y, FL_BOTTOM_BCOL ); fl_line( x, y, x + w - 1, y, FL_BOTTOM_BCOL ); fl_line( x + w - 1, y, xc, y + h - 1, FL_TOP_BCOL ); fl_linewidth( 0 ); break; case FLI_TRIANGLE_UPBOX4: SetPoint( vert, x + bw, yc ); SetPoint( vert + 1, x + w - bw, y + bw ); SetPoint( vert + 2, x + w - bw, y + h - bw ); fl_polyf( vert, 3, c ); fl_linewidth( bw ); Shrink( x, y, w, h, halfbw ); yc = y + h / 2; fl_line( x, yc, x + w - 1, y, FL_TOP_BCOL ); fl_line( x + w - 1, y, x + w - 1, y + h - 1, FL_RIGHT_BCOL ); fl_line( x + w - 1, y + h - 1, x, yc, FL_BOTTOM_BCOL ); fl_linewidth( 0 ); break; case FLI_TRIANGLE_DOWNBOX4: SetPoint( vert, x + bw, yc ); SetPoint( vert + 1, x + w - bw, y + bw ); SetPoint( vert + 2, x + w - bw, y + h - bw ); fl_polyf( vert, 3, c ); fl_linewidth( bw ); Shrink( x, y, w, h, halfbw ); yc = y + h / 2; fl_line( x, yc, x + w - 1, y, FL_BOTTOM_BCOL ); fl_line( x + w - 1, y, x + w - 1, y + h - 1, FL_LEFT_BCOL ); fl_line( x + w - 1, y + h - 1, x, yc, FL_LEFT_BCOL ); fl_linewidth( 0 ); break; case FLI_TRIANGLE_UPBOX6: SetPoint( vert, x + bw, y + bw ); SetPoint( vert + 1, x + w - bw, yc ); SetPoint( vert + 2, x + bw, y + h - bw ); fl_polyf( vert, 3, c ); fl_linewidth( bw ); Shrink( x, y, w, h, halfbw ); yc = y + h / 2; fl_line( x, y, x + w - 1, yc, FL_RIGHT_BCOL ); fl_line( x + w - 1, yc, x, y + h - 1, FL_BOTTOM_BCOL ); fl_line( x, y + h - 1, x, y, FL_LEFT_BCOL ); fl_linewidth( 0 ); break; case FLI_TRIANGLE_DOWNBOX6: SetPoint( vert, x + bw, y + bw ); SetPoint( vert + 1, x + w - bw, yc ); SetPoint( vert + 2, x + bw, y + h - bw ); fl_polyf( vert, 3, c ); fl_linewidth( bw ); Shrink( x, y, w, h, halfbw ); yc = y + h / 2; fl_line( x, y, x + w - 1, yc, FL_LEFT_BCOL ); fl_line( x + w - 1, yc, x, y + h - 1, FL_TOP_BCOL ); fl_line( x, y + h - 1, x, y, FL_RIGHT_BCOL ); fl_linewidth( 0 ); break; } /* handle black and white */ if ( dp ) fl_polyl( vert, 3, FL_BLACK ); } /*************************************** ***************************************/ int fli_boxtype2frametype( int btype ) { if ( btype <= FL_EMBOSSED_BOX ) return btype; else if ( btype == FL_FLAT_BOX ) return FL_NO_FRAME; return FL_DOWN_FRAME; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/xyplot.c0000644000175000017500000027032111376004247014510 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file xyplot.c * * This file is part of the XForms library package. * Copyright (c) 1997-2002 T.C. Zhao * All rights reserved. * * Class FL_XYPLOT. Simple 2D tabulated function plot. * * Possible optimization: break update into DRAW_INSET, DRAW_POINT * etc. so an update of inset does not result in complete redraw. * * Need to re-think about the entire approach to overlay * * The whole thing needs a complete review, lots of things look fishy, * starting with memory allocation! JTT */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include "private/pxyplot.h" #define XMAJOR 5 #define XMINOR 2 #define YMAJOR 1 #define YMINOR 2 #define XRound( s ) ( ( s )->xtic > 0.0 \ && ! *( s )->axtic \ && ( s )->xmajor > 1 ) #define YRound( s ) ( ( s )->ytic > 0.0 \ && ! *( s )->aytic \ && ( s )->ymajor > 1 ) static float gen_tic( float, float, int, int ); static float gen_logtic( float, float, float, int, int ); static void convert_coord( FL_OBJECT *, FLI_XYPLOT_SPEC * ); static void find_xbounds( FLI_XYPLOT_SPEC * ); static void find_ybounds( FLI_XYPLOT_SPEC * ); static int allocate_spec( FLI_XYPLOT_SPEC *, int ); static void add_xgrid( FL_OBJECT * ); static void add_ygrid( FL_OBJECT * ); static void free_spec_dynamic_mem( FLI_XYPLOT_SPEC * ); static void w2s_draw( FL_OBJECT *, double, double, float *, float * ); static void compute_key_position( FL_OBJECT * ); static void draw_inset( FL_OBJECT * ); static void fl_xyplot_gen_xtic( FL_OBJECT * ); static void fl_xyplot_gen_ytic( FL_OBJECT * ); /*************************************** * Free data associated with overlay i ***************************************/ static void free_overlay_data( FLI_XYPLOT_SPEC * sp, int id ) { if ( sp->n[ id ] ) { fl_safe_free( sp->x[ id ] ); fl_safe_free( sp->y[ id ] ); sp->n[ id ] = 0; } } /*************************************** ***************************************/ static void free_atic( char ** atic ) { for ( ; *atic; atic++ ) { fl_free( *atic ); *atic = NULL; } } /*************************************** ***************************************/ static void extend_screen_data( FLI_XYPLOT_SPEC * sp, int n ) { if ( n > sp->cur_nxp ) { sp->xp--; sp->xp = fl_realloc( sp->xp, ( n + 3 ) * sizeof *sp->xp ); sp->xp++; /* Need one extra point for fill */ sp->cur_nxp = n; sp->xpactive = fl_realloc( sp->xpactive, ( n + 3 ) * sizeof *sp->xpactive ); } } /*************************************** ***************************************/ static void free_xyplot( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; fl_clear_xyplot( ob ); /* working arrays */ fl_free( sp->wx ); fl_free( sp->wy ); fl_free( sp->xpactive ); fl_free( --sp->xpi ); fl_free( --sp->xp ); /* various labels */ fl_safe_free( sp->xlabel ); fl_safe_free( sp->ylabel ); fl_safe_free( sp->title ); fl_safe_free( sp->text ); sp->text = NULL; free_atic( sp->axtic ); free_atic( sp->aytic ); fl_safe_free( sp->xmargin1 ); fl_safe_free( sp->xmargin2 ); fl_safe_free( sp->ymargin1 ); fl_safe_free( sp->ymargin2 ); free_spec_dynamic_mem( sp ); } /*************************************** * Symbols. Center at (x,y) spanning a rectangle of (w,h) ***************************************/ static void draw_square( FL_OBJECT * ob FL_UNUSED_ARG, int Id FL_UNUSED_ARG, FL_POINT * p, int n, int w, int h ) { int w2 = w / 2, h2 = h / 2; FL_POINT *ps = p + n; if ( flx->win == None ) return; for ( ; p < ps; p++ ) XDrawRectangle( flx->display, flx->win, flx->gc, p->x - w2, p->y - h2, w, h ); } /*************************************** ***************************************/ static void draw_circle( FL_OBJECT * ob FL_UNUSED_ARG, int id FL_UNUSED_ARG, FL_POINT * p, int n, int w, int h ) { int w2 = w / 2, h2 = h / 2; FL_POINT *ps = p + n; if ( flx->win == None ) return; for ( ; p < ps; p++ ) XDrawArc( flx->display, flx->win, flx->gc, p->x - w2, p->y - h2, w, h, 0, 64 * 360 ); } /*************************************** ***************************************/ static void draw_points( FL_OBJECT * ob FL_UNUSED_ARG, int id FL_UNUSED_ARG, FL_POINT * p, int n, int w, int h ) { FL_POINT *ps = p + n; int w2 = w / 2, h2 = h / 2; if ( flx->win == None ) return; for ( ; p < ps; p++ ) { XSegment seg[ ] = { { p->x - w2, p->y, p->x + w2, p->y }, { p->x, p->y - h2, p->x, p->y + h2 }, { p->x - w2, p->y - h2, p->x + w2, p->y + h2 }, { p->x + w2, p->y - h2, p->x - w2, p->y + h2 } }; XDrawSegments( flx->display, flx->win, flx->gc, seg, sizeof seg / sizeof *seg ); } } /*************************************** ***************************************/ int fli_xyplot_interpolate( FL_OBJECT * ob, int id, int n1, int n2 ) { FLI_XYPLOT_SPEC *sp = ob->spec; int newn; float *x = sp->x[ id ], *y = sp->y[ id ]; /* Need to resize screen points */ newn = 1.01 + ( x[ n2 - 1 ] - x[ n1 ] ) / sp->grid[ id ]; /* Test if number of points exceeds screen resolution by a large margin */ if ( newn > 5000 ) { M_err( "fli_xyplot_interpolate", "interpolating %d points, exceeds screen res", newn ); return -1; } if ( newn > sp->nxpi ) { sp->xpi--; sp->xpi = fl_realloc( sp->xpi, ( newn + 3 ) * sizeof *sp->xpi ); sp->xpi++; sp->nxpi = newn; } if ( newn > sp->ninterpol ) { sp->wx = fl_realloc( sp->wx, newn * sizeof *sp->wx ); sp->wy = fl_realloc( sp->wy, newn * sizeof *sp->wy ); if ( ! sp->wx || ! sp->wy ) { if ( sp->wx ) fl_realloc( sp->wx, sizeof *sp->wx ); M_err( "fli_xyplot_interpolate", "Can't allocate memory for %d points", newn ); return -1; } sp->ninterpol = newn; } if ( fl_interpolate( x + n1, y + n1, n2 - n1, sp->wx, sp->wy, sp->grid[ id ], sp->interpolate[ id ] ) != newn ) { M_err( "fli_xyplot_interpolate", "An error has occured while interpolating" ); return -1; } return newn; } /* To avoid singularity or extreme scaling factors */ #define FMIN 1.0e-25 /*************************************** * This is faster than calling fl_xyplot_w2s N times. Also * we call this while drawing, that means we have to * use sp->bx, but sp->bxm as fl_xyplot_w2s uses ***************************************/ static void mapw2s( FLI_XYPLOT_SPEC * sp, FL_POINT * p, int n1, int n2, float * x, float * y ) { int i, tmp; float t, lbase; if ( sp->xscale == FL_LOG ) { lbase = 1.0 / sp->lxbase; for ( i = n1; i < n2; i++ ) { t = x[ i ] > 0.0 ? x[ i ] : FMIN; p[ i - n1 ].x = sp->ax * log10( t ) * lbase + sp->bx + 0.4; } } else { for ( i = n1; i < n2; i++ ) p[ i - n1 ].x = sp->ax * x[ i ] + sp->bx + 0.4; } if ( sp->yscale == FL_LOG ) { lbase = 1.0 / sp->lybase; for ( i = n1; i < n2; i++ ) { t = y[ i ] > 0.0 ? y[ i ] : FMIN; p[ i - n1 ].y = sp->ay * log10( t ) * lbase + sp->by + 0.4; } } else for ( i = n1; i < n2; i++ ) { /* This can happen if y is zoomed */ if ( ( tmp = sp->ay * y[ i ] + sp->by + 0.4 ) < 0 ) tmp = 0; else if ( tmp > 30000 ) tmp = 30000; p[ i - n1 ].y = tmp; } } /*************************************** * If non-autoscaling some of the data might fall outside the range * desired, get rid of them so actual data that get plotted are bound * by (n1, n2) ***************************************/ void fli_xyplot_compute_data_bounds( FL_OBJECT * ob, int * n1, int * n2, int id ) { FLI_XYPLOT_SPEC *sp = ob->spec; int i; float *x = sp->x[ id ]; float xmin = FL_min( sp->xmin, sp->xmax ); float xmax = FL_max( sp->xmax, sp->xmin ); /* Special case for two points */ if ( sp->n[ id ] < 3 ) { *n1 = 0; *n2 = sp->n[ id ]; return; } for ( *n1 = -1, i = 0; i < sp->n[ id ] && *n1 < 0; i++ ) if ( x[ i ] >= xmin ) *n1 = i; if ( *n1 > 0 ) *n1 -= 1; else if ( *n1 < 0 ) *n1 = 0; for ( *n2 = -1, i = sp->n[ id ]; --i >= 0 && *n2 < 0; ) if ( x[ i ] <= xmax ) *n2 = i; if ( *n2 < 0 ) *n2 = sp->n[ id ] > 1 ? sp->n[ id ] : 1; if ( *n2 < sp->n[ id ] ) *n2 += 1; } /*************************************** * Draw curve itself only ***************************************/ static void draw_curve_only( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int i, n1, n2, noline, nplot, type, nxp, newn, cur_lw = 0; FL_XYPLOT_SYMBOL drawsymbol; FL_POINT *xp; float *x, *y; FL_COLOR col; int savelw = fl_get_linewidth( ), savels = fl_get_linestyle( ); int key_xs, key_ys; fl_set_clipping( sp->xi, sp->yi, sp->xf - sp->xi + 1, sp->yf - sp->yi + 1 ); fl_set_text_clipping( sp->xi, sp->yi, sp->xf - sp->xi + 1, sp->yf - sp->yi + 1 ); if ( sp->xgrid != FL_GRID_NONE && sp->xtic > 0 ) add_xgrid( ob ); if ( sp->ygrid != FL_GRID_NONE && sp->ytic > 0 ) add_ygrid( ob ); compute_key_position( ob ); fl_rect( sp->key_xs, sp->key_ys, sp->key_maxw, sp->key_maxh, *sp->col ); key_xs = sp->key_xs + 2; key_ys = sp->key_ys + sp->key_ascend - sp->key_descend; for ( nplot = 0; nplot <= sp->maxoverlay; nplot++ ) { if ( sp->n[ nplot ] == 0 ) continue; fl_color( col = sp->col[ nplot ] ); drawsymbol = 0; noline = 0; /* Without autoscaling some of the data might fall outside the range desired, get rid of them so actual data that get plotted are bound by (n1, n2) */ fli_xyplot_compute_data_bounds( ob, &n1, &n2, nplot ); /* Convert data */ /* If interpolate, do it here */ if ( sp->interpolate[ nplot ] > 1 && n2 - n1 > 3 && ( newn = fli_xyplot_interpolate( ob, nplot, n1, n2 ) ) >= 0 ) { x = sp->wx; y = sp->wy; xp = sp->xpi; mapw2s( sp, xp, 0, newn, x, y ); nxp = sp->nxpi = newn; mapw2s( sp, sp->xp, n1, n2, sp->x[ nplot ], sp->y[ nplot ] ); sp->nxp = n2 - n1; if ( ( sp->active || sp->inspect ) && sp->iactive == nplot && ! sp->update ) { memcpy( sp->xpactive, sp->xp, sp->nxp * sizeof *xp ); sp->n1 = n1; } } else { x = sp->x[ nplot ]; y = sp->y[ nplot ]; xp = sp->xp; mapw2s( sp, xp, n1, n2, x, y ); nxp = sp->nxp = n2 - n1; if ( ( sp->active || sp->inspect ) && sp->iactive == nplot && ! sp->update ) { memcpy( sp->xpactive, sp->xp, sp->nxp * sizeof *xp ); sp->n1 = n1; } } type = nplot ? sp->type[ nplot ] : ob->type; if ( cur_lw != sp->thickness[ nplot ] ) { cur_lw = sp->thickness[ nplot ]; fl_linewidth( cur_lw ); } switch ( type ) { case FL_ACTIVE_XYPLOT: drawsymbol = sp->mark_active ? draw_square : 0; break; case FL_SQUARE_XYPLOT: drawsymbol = draw_square; break; case FL_CIRCLE_XYPLOT: drawsymbol = draw_circle; break; case FL_POINTS_XYPLOT: noline = 1; /* fall through */ case FL_LINEPOINTS_XYPLOT: drawsymbol = sp->symbol[ nplot ] ? sp->symbol[ nplot ] : draw_points; break; case FL_DOTTED_XYPLOT: fl_linestyle( FL_DOT ); break; case FL_DOTDASHED_XYPLOT: fl_linestyle( FL_DOTDASH ); break; case FL_LONGDASHED_XYPLOT: fl_linestyle( FL_LONGDASH ); break; case FL_DASHED_XYPLOT: fl_dashedlinestyle( 0, 0 ); fl_linestyle( LineOnOffDash ); break; case FL_FILL_XYPLOT: xp[ -1 ].x = xp[ 0 ].x; /* looks ugly, better recheck ! JTT */ xp[ -1 ].y = sp->yf; xp[ nxp ].x = xp[ nxp - 1 ].x; xp[ nxp ].y = sp->yf; fl_polyf( xp - 1, nxp + 2, col ); noline = 1; break; case FL_EMPTY_XYPLOT: noline = 1; drawsymbol = 0; break; case FL_IMPULSE_XYPLOT: noline = 1; drawsymbol = 0; for ( i = 0; i < nxp; i++ ) fl_line( xp[ i ].x, sp->yf - 1, xp[ i ].x, xp[ i ].y, col ); break; case FL_NORMAL_XYPLOT: default: break; } if ( ! noline ) fl_lines( xp, nxp, col ); if ( drawsymbol ) { xp = sp->xp; /* always use original point for symbol */ nxp = sp->nxp; drawsymbol( ob, nplot, xp, nxp, sp->ssize, sp->ssize ); } /* Do keys */ if ( sp->key[ nplot ] ) { fl_linewidth( 0 ); if ( ! noline ) fl_line( key_xs, key_ys, key_xs + 20, key_ys, col ); if ( type == FL_IMPULSE_XYPLOT ) { fl_line( key_xs + 3, key_ys + 2, key_xs + 3, key_ys - 3, col ); fl_line( key_xs + 7, key_ys + 2, key_xs + 7, key_ys - 3, col ); fl_line( key_xs + 11, key_ys + 2, key_xs + 11, key_ys - 3, col ); fl_line( key_xs + 15, key_ys + 2, key_xs + 15, key_ys - 3, col ); } else if ( sp->type[ nplot ] == FL_FILL_XYPLOT ) fl_rectf( key_xs + 1, key_ys - 3, 19, 6, col ); if ( drawsymbol ) { FL_POINT p[ 4 ]; p[ 0 ].x = key_xs + 3; p[ 1 ].x = key_xs + 10; p[ 2 ].x = key_xs + 17; p[ 0 ].y = p[ 1 ].y = p[ 2 ].y = key_ys; drawsymbol( ob, nplot, p, 3, 4, 4 ); } fl_drw_text( FL_ALIGN_LEFT, key_xs + 20, key_ys, 0, 0, col, sp->key_lstyle, sp->key_lsize, sp->key[ nplot ] ); key_ys += sp->key_ascend + sp->key_descend * 0.9; } fl_linestyle( savels ); fl_linewidth( cur_lw = savelw ); } /* Finally we do extra text */ draw_inset( ob ); fl_linestyle( savels ); fl_linewidth( savelw ); fl_unset_clipping( ); fl_unset_text_clipping( ); } /*************************************** ***************************************/ void fli_xyplot_nice_label( float tic, int minor, float f, char label[ ] ) { float crit = tic * minor; if ( tic >= 1.0 && crit < 10.0 ) sprintf( label, "%.1f", f ); else if ( tic > 1.0 && crit < 1000.0 ) sprintf( label, "%.0f", f ); else if ( crit >= 0.40 && crit <= 999.0 ) sprintf( label, "%.1f", f ); else if ( crit < 0.40 && crit > 0.01 ) sprintf( label, "%.2f", f ); else sprintf( label, "%g", f ); } /*************************************** ***************************************/ static void fl_xyplot_gen_xtic( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float tic = sp->xtic; float xmin, xmax = sp->xmax, xw; float mxmin, mxmax, val; int i, j; char *p; if ( tic < 0 ) return; xmin = mxmin = FL_min( sp->xscmin, sp->xscmax ); xmax = mxmax = FL_max( sp->xscmin, sp->xscmax ); if ( XRound( sp ) ) { mxmin = floor( xmin / tic ) * tic; mxmax = ceil( xmax / tic ) * tic; } /* Handle ticlable@location stuff */ if ( *sp->axtic && strchr( *sp->axtic, '@' ) ) { for ( i = j = 0; i < sp->xmajor; i++ ) { if ( ( p = strchr( sp->axtic[ i ], '@' ) ) ) val = atof( p + 1 ); else val = mxmin + ( i * tic * sp->xminor ); if ( val >= xmin && val <= xmax ) { sp->xtic_major[ i ] = sp->ax * val + sp->bx + 0.4; sp->xmajor_val[ i ] = val; j++; } sp->num_xmajor = j; sp->num_xminor = 1; } return; } if ( sp->xscale != FL_LOG ) { /* Other minor tics */ for ( i = 0, xw = mxmin; xw <= mxmax; xw += tic ) { if ( xw >= xmin && xw <= xmax ) sp->xtic_minor[ i++ ] = sp->ax * xw + sp->bx + 0.4; } sp->num_xminor = i; for ( i = 0, xw = mxmin; xw <= mxmax; xw += tic * sp->xminor ) { if ( xw >= xmin && xw <= xmax ) { sp->xtic_major[ i ] = sp->ax * xw + sp->bx + 0.4; sp->xmajor_val[ i ] = xw; i++; } } sp->num_xmajor = i; } else { float minortic = tic / sp->xminor; /* Minor */ for ( i = 0, xw = xmin; xw <= xmax; xw += minortic ) sp->xtic_minor[ i++ ] = sp->ax * xw + sp->bx + 0.4; sp->num_xminor = i; for ( i = 0, xw = xmin; xw <= xmax; xw += tic ) { sp->xtic_major[ i ] = sp->ax * xw + sp->bx + 0.4; sp->xmajor_val[ i ] = xw; i++; } sp->num_xmajor = i; } } /*************************************** ***************************************/ static void fl_xyplot_gen_ytic( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float ymin, ymax, mymin, mymax, tic = sp->ytic, val; double yw; int i, n, j; char *p; if ( tic < 0 ) return; mymin = ymin = FL_min( sp->yscmin, sp->yscmax ); mymax = ymax = FL_max( sp->yscmin, sp->yscmax ); if ( YRound( sp ) ) { mymin = floor( ymin / tic ) * tic; mymax = ceil( ymax / tic ) * tic; } /* Handle ticlable@location stuff */ if ( *sp->aytic && strchr( *sp->aytic, '@' ) ) { for ( i = j = 0; i < sp->ymajor; i++ ) { if ( ( p = strchr( sp->aytic[ i ], '@' ) ) ) val = atof( p + 1 ); else val = mymin + i * tic * sp->yminor; if ( val >= ymin && val <= ymax ) { sp->ytic_major[ i ] = sp->ay * val + sp->by + 0.4; sp->ymajor_val[ i ] = val; j++; } sp->num_ymajor = j; sp->num_yminor = 1; } return; } if ( sp->yscale != FL_LOG ) { for ( i = 0, yw = mymin; yw <= mymax; yw += tic ) if ( yw >= ymin && yw <= ymax ) sp->ytic_minor[i++] = sp->ay * yw + sp->by + 0.4f; sp->num_yminor = i; for ( n = i = 0, yw = mymin; yw <= mymax; n++ ) { if ( yw >= ymin && yw <= ymax ) { sp->ytic_major[ i ] = sp->ay * yw + sp->by + 0.4; sp->ymajor_val[ i ] = yw; i++; } yw = mymin + ( n + 1 ) * tic * sp->yminor; } sp->num_ymajor = i; } else { double minortic = sp->ytic / sp->yminor; for ( i = 0, yw = ymin; yw <= ymax; yw += minortic ) sp->ytic_minor[ i++ ] = sp->ay * yw + sp->by + 0.4; sp->num_yminor = i; for ( i = 0, yw = ymin; yw <= ymax; yw += sp->ytic ) { sp->ytic_major[ i ] = sp->ay * yw + sp->by + 0.4; sp->ymajor_val[ i ] = yw; i++; } sp->num_ymajor = i; } } /*************************************** ***************************************/ static void add_xgrid( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int yi, yf, xr, i; int ls = fl_get_linestyle( ); yi = sp->yi + 1; yf = sp->yf - 1; fl_linestyle( sp->grid_linestyle ); for ( i = 0; sp->xgrid == FL_GRID_MINOR && i < sp->num_xminor; i++ ) { xr = sp->xtic_minor[ i ]; fl_line( xr, yi, xr, yf, ob->col2 ); } for ( i = 0; i < sp->num_xmajor; i++ ) { xr = sp->xtic_major[ i ]; fl_line( xr, yi, xr, yf, ob->col2 ); } fl_linestyle( ls ); } /*************************************** ***************************************/ static void add_ygrid( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int yr, i, xi, xf; int ls = fl_get_linestyle( ); xi = sp->xi + 1; xf = sp->xf - 1; fl_linestyle( sp->grid_linestyle ); for ( i = 0; sp->ygrid == FL_GRID_MINOR && i < sp->num_yminor; i++ ) { yr = sp->ytic_minor[ i ]; fl_line( xi, yr, xf, yr, ob->col2 ); } for ( i = 0; i < sp->num_ymajor; i++ ) { yr = sp->ytic_major[ i ]; fl_line( xi, yr, xf, yr, ob->col2 ); } fl_linestyle( ls ); } /*************************************** ***************************************/ static void add_xtics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float tic = sp->xtic; int xr, ticl = 6, yi, yf, i; char buf[ 80 ], *label; if ( tic <= 0 ) return; yi = sp->yf + 1; yf = yi + ticl / 2; /* Minor tics */ for ( i = 0; i < sp->num_xminor; i++ ) { xr = sp->xtic_minor[ i ]; fl_line( xr, yi, xr, yf, ob->col2 ); } yi = sp->yf + 1; yf = yi + ticl; for ( i = 0; i < sp->num_xmajor; i++ ) { xr = sp->xtic_major[ i ]; fl_line( xr, yi, xr, yf, ob->col2 ); if ( ! *sp->axtic ) fli_xyplot_nice_label( tic, sp->xminor, sp->xmajor_val[ i ], label = buf ); else { char *p; if ( ( p = strchr( sp->axtic[ i ], '@' ) ) ) label = fli_sstrcpy( buf, sp->axtic[ i ], p - sp->axtic[ i ] + 1 ); else label = sp->axtic[ i ]; } fl_drw_text( FL_ALIGN_TOP, xr, sp->yf + ticl - 2, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } } /*************************************** ***************************************/ static void add_logxtics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float tic = sp->xtic, xw; int xr, ticl = 6, i, yi, yf; char label[ 80 ]; if ( tic < 0 ) return; yi = sp->yf + 1; yf = yi + ticl / 2; for ( i = 0; i < sp->num_xminor; i++ ) { xr = sp->xtic_minor[ i ]; fl_line( xr, yi, xr, yf, ob->col2 ); } yi = sp->yf; yf = yi + ticl; for ( i = 0; i < sp->num_xmajor; i++ ) { xr = sp->xtic_major[ i ]; fl_line( xr, yi, xr, yf, ob->col2 ); xw = sp->xmajor_val[ i ]; if ( sp->xbase == 10.0 ) { sprintf( label, "%g", pow( sp->xbase, xw ) ); fl_drw_text( FL_ALIGN_TOP, xr, sp->yf + ticl - 2, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } else { int len1, len2, ll; ll = sprintf( label, "%g", sp->xbase ); fl_drw_text( FL_ALIGN_TOP, xr - 3, yf - 2, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); len1 = fl_get_string_width( sp->lstyle, sp->lsize, label, ll ); ll = sprintf( label, "%d", ( int ) ceil( xw ) ); len2 = fl_get_string_width( sp->lstyle, sp->lsize, label, ll ); fl_drw_text( FL_ALIGN_TOP, xr - 3 + len1 / 2 + 1 + len2 / 2, yf - 6, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } } } /*************************************** ***************************************/ static void add_logytics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float yw; int yr, ticl = 6, i; char label[ 80 ]; if ( sp->ytic <= 0 ) return; for ( i = 0; i < sp->num_yminor; i++ ) { yr = sp->ytic_minor[ i ]; fl_line( sp->xi, yr, sp->xi - ticl / 2, yr, ob->col2 ); } for ( i = 0; i < sp->num_ymajor; i++ ) { yr = sp->ytic_major[ i ]; fl_line( sp->xi - ticl, yr, sp->xi, yr, ob->col2 ); yw = sp->ymajor_val[ i ]; if ( sp->ybase == 10.0 ) { sprintf( label, "%g", pow( sp->ybase, yw ) ); fl_drw_text( FL_ALIGN_RIGHT, sp->xi - ticl + 2, yr, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } else { int len, ll; ll = sprintf( label, "%d", ( int ) ceil( yw ) ); fl_drw_text( FL_ALIGN_RIGHT, sp->xi - ticl + 2, yr - 3, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); len = fl_get_string_width( sp->lstyle, sp->lsize, label, ll ); sprintf( label, "%g", sp->ybase ); fl_drw_text( FL_ALIGN_RIGHT, sp->xi - ticl + 2 - len - 1, yr + 1, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } } } /*************************************** ***************************************/ static void add_ytics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float tic = sp->ytic; int yr, ticl = 6, i; char buf[ 80 ], *label, *p; if ( sp->ytic <= 0 ) return; for ( i = 0; i < sp->num_yminor; i++ ) { yr = sp->ytic_minor[ i ]; fl_line( sp->xi - 4, yr, sp->xi, yr, ob->col2 ); } for ( i = 0; i < sp->num_ymajor; i++ ) { yr = sp->ytic_major[ i ]; fl_line( sp->xi - ticl, yr, sp->xi, yr, ob->col2 ); if ( ! *sp->aytic ) fli_xyplot_nice_label( tic, sp->yminor, sp->ymajor_val[ i ], label = buf ); else { if ( ( p = strchr( sp->aytic[ i ], '@' ) ) ) label = fli_sstrcpy( buf, sp->aytic[ i ], p - sp->aytic[ i ] + 1 ); else label = sp->aytic[ i ]; } fl_drw_text( FL_ALIGN_RIGHT, sp->xi - ticl + 2, yr, 0, 0, ob->col2, sp->lstyle, sp->lsize, label ); } } /*************************************** ***************************************/ static void convert_coord( FL_OBJECT * ob, FLI_XYPLOT_SPEC * sp ) { float extrax1, extray1; float extrax2, extray2; char buf[ 80 ], *label, *p; int j, ticl = 6, w = 0, tmpw = 0, ll; int fh = fl_get_string_height( sp->lstyle, sp->lsize, "1pj", 3, &j, &j ); float halfh = 0.55 * fh; /* Min. margins fixed margins */ extrax1 = extray1 = extrax2 = extray2 = FL_abs( ob->bw ) + 3.0; /* Figure out the plot region */ if ( sp->xtic > 0 ) { extray2 += ticl + fh + ( sp->xscale == FL_LOG ); if ( ! *sp->axtic ) fli_xyplot_nice_label( sp->xtic, sp->xminor, sp->xmax, label = buf ); else label = sp->axtic[ sp->xmajor - 1 ]; w = fl_get_string_width( sp->lstyle, sp->lsize, label, strlen( label ) ) / 2; extrax2 += w + ( sp->xscale == FL_LOG ) * 2; /* Don't need to compute label size if ytic is on */ if ( sp->ytic < 0 ) { if ( ! *sp->axtic ) fli_xyplot_nice_label( sp->xtic, sp->xminor, sp->xmin, label = buf ); else label = *sp->axtic; w = fl_get_string_width( sp->lstyle, sp->lsize, label, strlen( label ) ) / 2; extrax1 += w; } } sp->maxytic = 2; if ( sp->ytic > 0 ) { label = buf; if ( ! *sp->aytic ) { if ( sp->yscale == FL_LOG ) { char *fmt = sp->ybase == 10 ? "%g-e%d" : "%g%d "; ll = sprintf( label, fmt, sp->ybase, ( int ) sp->yscmax ); w = fl_get_string_width( sp->lstyle, sp->lsize, label, ll ); ll = sprintf( label, fmt, sp->ybase, ( int ) sp->yscmin ); tmpw = fl_get_string_width( sp->lstyle, sp->lsize, label, ll ); } else { fli_xyplot_nice_label( sp->ytic, sp->yminor, sp->yscmax, label ); w = fl_get_string_width( sp->lstyle, sp->lsize, label, strlen( label ) ); fli_xyplot_nice_label( sp->ytic, sp->yminor, sp->yscmin, label ); tmpw = fl_get_string_width( sp->lstyle, sp->lsize, label, strlen( label ) ); } w = w > tmpw ? w : tmpw; } else { if ( ( p = strchr( *sp->aytic, '@' ) ) ) label = fli_sstrcpy( buf, *sp->aytic, p - *sp->aytic + 1 ); else label = *sp->aytic; w = fl_get_string_width( sp->lstyle, sp->lsize, label, strlen( label ) ); } /* How much space to leave for ytics ylabels */ extrax1 += ticl + 1; extrax1 += w; sp->maxytic = extrax1; extray1 += halfh + 1; if ( sp->xtic < 0 ) extray2 += halfh + 1; } if ( *sp->ylabel ) extrax1 += 6 + fl_get_char_width( sp->lstyle, sp->lsize ); if ( *sp->xlabel ) extray2 += 2 + 1.1 * fh; if ( *sp->title ) extray1 += 1 + ( sp->ytic > 0 ? halfh : fh ); /* If margin is set use it instead of the computed margin */ if ( sp->xmargin1 ) { extrax1 = extrax2 = FL_abs( ob->bw ) + 1 + fl_get_linewidth( ); extrax1 += fl_get_string_width( sp->lstyle, sp->lsize, sp->xmargin1, strlen( sp->xmargin1 ) ); extrax2 += fl_get_string_width( sp->lstyle, sp->lsize, sp->xmargin2, strlen( sp->xmargin2 ) ); } if ( sp->ymargin1 ) { extray1 = extray2 = FL_abs( ob->bw ) + 1; extray1 += fl_get_string_width( sp->lstyle, sp->lsize, sp->ymargin1, strlen( sp->ymargin1 ) ); extray2 += fl_get_string_width( sp->lstyle, sp->lsize, sp->ymargin2, strlen( sp->ymargin2 ) ); } sp->xi = sp->objx + extrax1; sp->yi = sp->objy + extray1; sp->xf = sp->objx + ob->w - extrax2; sp->yf = sp->objy + ob->h - extray2; sp->ax = ( sp->xf - sp->xi ) / ( sp->xscmax - sp->xscmin ); sp->bx = sp->xi - sp->ax * sp->xscmin; sp->bxm = sp->bx; sp->ay = ( sp->yf - sp->yi ) / ( sp->yscmin - sp->yscmax ); sp->by = sp->yi - sp->ay * sp->yscmax; sp->bym = sp->by; fl_xyplot_gen_xtic( ob ); fl_xyplot_gen_ytic( ob ); } /*************************************** * Draw a string with alignment given relative to a point. * Figure out the bounding box etc so symbols can be drawn ***************************************/ static void fl_drw_text_point( int lalign, int x, int y, FL_COLOR col, int lstyle, int lsize, char * str ) { int align = lalign & ~ FL_ALIGN_INSIDE; int bbox = 1.4 * lsize + 6; int xx = x, yy = y; switch ( align ) { case FL_ALIGN_CENTER : xx = x - bbox / 2; yy = y - bbox / 2; break; case FL_ALIGN_TOP : xx = x - bbox / 2; break; case FL_ALIGN_BOTTOM : xx = x - bbox / 2; yy = y - bbox; break; case FL_ALIGN_LEFT : yy = y - bbox / 2; break; case FL_ALIGN_RIGHT : xx = x - bbox; yy = y - bbox / 2; break; case FL_ALIGN_LEFT_TOP : xx = x - bbox; align = FL_ALIGN_RIGHT_TOP; break; case FL_ALIGN_RIGHT_TOP : align = FL_ALIGN_LEFT_TOP; break; case FL_ALIGN_RIGHT_BOTTOM : yy = y - bbox; align = FL_ALIGN_LEFT_BOTTOM; break; case FL_ALIGN_LEFT_BOTTOM : align = FL_ALIGN_RIGHT_BOTTOM; yy = y - bbox; xx = x - bbox; break; } fl_drw_text_beside( align, xx, yy, bbox, bbox, col, lstyle, lsize, str ); } /*************************************** ***************************************/ static void draw_inset( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int i; float tx, ty; for ( i = 0; i < sp->maxoverlay; i++ ) if ( sp->text[ i ] ) { w2s_draw( ob, sp->xt[ i ], sp->yt[ i ], &tx, &ty ); fl_drw_text_point( sp->talign[ i ], tx, ty, sp->tcol[ i ], sp->lstyle, sp->lsize, sp->text[ i ] ); } } /*************************************** ***************************************/ static void compute_key_position( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int w = 0, i, h, align; float fx, fy; h = fl_get_char_height( sp->key_lstyle, sp->key_lsize, &sp->key_ascend, &sp->key_descend ); /* Find the max width */ sp->key_maxw = sp->key_maxh = 0; for ( i = 0; i < sp->maxoverlay && sp->n[ i ]; i++ ) if ( sp->key[ i ] ) { w = fl_get_string_width( sp->key_lstyle, sp->key_lsize, sp->key[ i ], strlen( sp->key[ i ] ) ); if ( w > sp->key_maxw ) sp->key_maxw = w; sp->key_maxh += h; } if ( sp->key_maxw == 0 ) return; /* Get alignment */ w2s_draw( ob, sp->key_x, sp->key_y, &fx, &fy ); sp->key_xs = fx; sp->key_ys = fy; sp->key_maxw += 32; sp->key_maxh += 1; align = sp->key_align; if ( align == FL_ALIGN_LEFT_TOP ) align = FL_ALIGN_RIGHT_TOP; else if ( align == FL_ALIGN_RIGHT_TOP ) align = FL_ALIGN_LEFT_TOP; else if ( align == FL_ALIGN_RIGHT_BOTTOM ) align = FL_ALIGN_LEFT_BOTTOM; else if ( align == FL_ALIGN_LEFT_BOTTOM ) align = FL_ALIGN_RIGHT_BOTTOM; fl_get_align_xy( align, sp->key_xs, sp->key_ys, 0, 0, sp->key_maxw, sp->key_maxh, 0, 0, &sp->key_xs, &sp->key_ys ); } /*************************************** ***************************************/ static void add_border( FLI_XYPLOT_SPEC * sp, FL_COLOR c ) { if ( sp->xtic > 0 && sp->ytic > 0 ) fl_rect( sp->xi, sp->yi, sp->xf - sp->xi, sp->yf - sp->yi, c ); else if ( sp->xtic > 0 ) fl_line( sp->xi, sp->yf, sp->xf, sp->yf, c ); else if ( sp->ytic > 0 ) fl_line( sp->xi, sp->yi, sp->xi, sp->yf, c ); } /*************************************** * (scxmin, scxmax) ultimately determines the plot area in world coord. ***************************************/ static void round_xminmax( FLI_XYPLOT_SPEC * sp ) { if ( sp->xscale != FL_LOG ) { float xmin = sp->xmin, xmax = sp->xmax, tic = sp->xtic; float threshold = 0.5 * tic; if ( XRound( sp ) ) { xmin = ( xmin < xmax ? floor : ceil )( xmin / tic ) * tic; if ( FL_abs( xmin - sp->xmin ) > threshold ) xmin = sp->xmin; xmax = ( xmin < xmax ? ceil : floor )( xmax / tic ) * tic; if ( FL_abs( xmax - sp->xmax ) > threshold ) xmax = sp->xmax; } sp->xscmin = xmin; sp->xscmax = xmax; } else { sp->xscmax = log10( sp->xmax ) / sp->lxbase; sp->xscmin = log10( sp->xmin ) / sp->lxbase; if ( XRound( sp ) ) { if ( sp->xmin < sp->xmax ) sp->xscmin = sp->xtic * floor( log10( sp->xmin ) / ( sp->lxbase * sp->xtic ) ); else sp->xscmin = sp->xtic * ceil( log10( sp->xmin ) / ( sp->lxbase * sp->xtic ) ); if ( sp->xmin < sp->xmax ) sp->xscmax = sp->xtic * ceil( log10( sp->xmax ) / ( sp->lxbase * sp->xtic ) ); else sp->xscmax = sp->xtic * floor( log10( sp->xmax ) / ( sp->lxbase * sp->xtic ) ); } } } /*************************************** * Do the same with y bounds ***************************************/ static void round_yminmax( FLI_XYPLOT_SPEC * sp ) { if ( sp->yscale != FL_LOG ) { float ymin = sp->ymin, ymax = sp->ymax, tic = sp->ytic; float threshold = 0.7 * tic; if ( YRound( sp ) ) { ymin = ( ymin < ymax ? floor : ceil )( ymin / tic ) * tic; if ( FL_abs( ymin - sp->ymin ) > threshold ) ymin = sp->ymin; ymax = ( ymin < ymax ? ceil : floor )( ymax / tic ) * tic; if ( FL_abs( ymax - sp->ymax ) > threshold ) ymax = sp->ymax; } sp->yscmin = ymin; sp->yscmax = ymax; } else { float lmax = log10( sp->ymax ) / sp->lybase; float lmin = log10( sp->ymin ) / sp->lybase; if ( YRound( sp ) ) { lmin = ( sp->ymin < sp->ymax ? floor : ceil ) ( log10( sp->ymin ) / ( sp->lybase * sp->ytic ) ) * sp->ytic; lmax = ( sp->xmin < sp->xmax ? ceil : floor ) ( log10( sp->ymax ) / ( sp->lybase * sp->ytic ) ) * sp->ytic; } sp->yscmin = lmin; sp->yscmax = lmax; } } /*************************************** ***************************************/ static void draw_xyplot( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; FL_Coord bw = FL_abs( ob->bw ); fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); fl_drw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); if ( *sp->n <= 0 || ! *sp->x || ! *sp->y ) return; sp->xtic = sp->ytic = -1; sp->xscmin = sp->xmin; sp->xscmax = sp->xmax; sp->yscmin = sp->ymin; sp->yscmax = sp->ymax; if ( sp->xmajor > 0 ) { if ( sp->xscale == FL_LOG ) sp->xtic = gen_logtic( sp->xmin, sp->xmax, sp->xbase, sp->xmajor, sp->xminor ); else sp->xtic = gen_tic( sp->xmin, sp->xmax, sp->xmajor, sp->xminor ); round_xminmax( sp ); } if ( sp->ymajor > 0 ) { if ( sp->yscale == FL_LOG ) sp->ytic = gen_logtic( sp->ymin, sp->ymax, sp->ybase, sp->ymajor, sp->yminor ); else sp->ytic = gen_tic( sp->ymin, sp->ymax, sp->ymajor, sp->yminor ); round_yminmax( sp ); } convert_coord( ob, sp ); add_border( sp, ob->col2 ); draw_curve_only( ob ); fl_set_text_clipping( ob->x + bw, ob->y + bw, ob->w - 2 * bw, ob->h - 2 * bw ); fl_set_clipping( ob->x + bw, ob->y + bw, ob->w - 2 * bw, ob->h - 2 * bw ); /* Do the tics and other things */ /* Draw the title */ fl_drw_text( FL_ALIGN_BOTTOM, ( sp->xi + sp->xf ) / 2, sp->yi + 1, 0, 0, ob->col2, sp->lstyle, sp->lsize, sp->title ); ( sp->xscale == FL_LOG ? add_logxtics : add_xtics )( ob ); fl_drw_text( FL_ALIGN_BOTTOM, ( sp->xi + sp->xf ) / 2, ob->y + ob->h - bw, 1, 1, ob->col2, sp->lstyle, sp->lsize, sp->xlabel ); ( sp->yscale == FL_LOG ? add_logytics : add_ytics )( ob ); if ( sp->ylabel && *sp->ylabel ) { int cw = fl_get_char_width( sp->lstyle, sp->lsize ), w; int ch = fl_get_char_height( sp->lstyle, sp->lsize, 0, 0 ); int jj, nc = strlen( sp->ylabel ); char ss[ 2 ]; for ( ss[ 1 ] = '\0', jj = 0; jj < nc; jj++ ) { *ss = sp->ylabel[ jj ]; w = fl_get_string_width( sp->lstyle, sp->lsize, ss, 1 ); fl_drw_text( FL_ALIGN_RIGHT, sp->xi - sp->maxytic + 4 - ( cw - w ) / 2, ( sp->yi + sp->yf ) / 2 + ( jj - nc / 2 ) * ch, 1, 1, ob->col2, sp->lstyle, sp->lsize, ss ); } } fl_unset_text_clipping( ); fl_unset_clipping( ); } #if 0 /* not used at the moment */ /*************************************** * For active xyplot only. point (ux,uy) is dragged to a new position. * * Only need to erase the old drawing and update. draw_xyplot erases * everything by redrawing the box, can cause flicker in single buffer * mode. ***************************************/ static void update_xyplot( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; int n = sp->update - 1; float x, y; int active = sp->iactive; /* Erase the old drawing */ *sp->col = ob->col1; draw_curve_only( ob ); /* Update */ *sp->col = ob->col2; sp->x[ active ][ n ] = sp->ux; sp->y[ active ][ n ] = sp->uy; /* Due to possible double buffering switch mapping */ w2s_draw( ob, sp->ux, sp->uy, &x, &y ); sp->xpactive[ n - sp->n1 ].x = x; sp->xpactive[ n - sp->n1 ].y = y; add_border( sp, ob->col2 ); draw_curve_only( ob ); } #endif /*************************************** * Find the data point the mouse falls on. Since log scale is * non-linear, can't do search in world coordinates given pixel-delta, * thus the xpactive keeps the active screen data. ***************************************/ static int find_data( FL_OBJECT * ob, int deltax, int deltay, int mx, int my, int * n ) { FLI_XYPLOT_SPEC *sp = ob->spec; int found, i, dist, mindist, done, newi; int dx = 0; /* to shut -Wall up */ int dy = 0; /* same here */ FL_POINT *p = sp->xpactive; for ( i = found = 0; i < *sp->n && ! found; i++ ) { dx = p[ i ].x - mx; dy = p[ i ].y - my; found = FL_abs( dx ) < deltax && FL_abs( dy ) < deltay; } /* It's possible that the first point we found is not the closest. Check for the closest using a linear distance */ mindist = FL_abs( dx ) + FL_abs( dy ); newi = i; for ( done = ! found; ! done && i < *sp->n; i++ ) { dx = p[ i ].x - mx; dy = p[ i ].y - my; dist = FL_abs( dx ) + FL_abs( dy ); if ( dist < mindist ) { mindist = dist; newi = i + 1; /* need to overshoot */ } else done = 1; } /* n overshoots by 1 and we're dependent on that ! */ *n = newi; return found; } /*************************************** ***************************************/ static int handle_mouse( FL_OBJECT * ob, FL_Coord mx, FL_Coord my ) { FLI_XYPLOT_SPEC *sp = ob->spec; static FL_Coord lmx, lmy; int i; int deltax = sp->ssize * ( sp->inspect ? 2.5 : 1.5 ) + 1; int deltay = deltax; float fmx, fmy; float xmin = FL_min( sp->xmin, sp->xmax ), xmax = FL_max( sp->xmax, sp->xmin ); float ymin = FL_min( sp->ymin, sp->ymax ), ymax = FL_max( sp->ymax, sp->ymin ); if ( *sp->n == 0 || ! sp->x || ! ( sp->active || sp->inspect ) ) return FL_RETURN_NONE; if ( lmx == mx && lmy == my ) { if ( sp->inside < 0 ) fl_set_cursor( FL_ObjWin( ob ), XC_tcross ); return FL_RETURN_NONE; } lmx = mx; lmy = my; /* If the mouse hadn't been on one of the points (or it had been released, in which case sp->inside is negative) check again. Don't do anything yet except changing the way the cursor looks like if we're now on a point. */ if ( sp->inside <= 0 ) { /* find_data() always overshoots by one and we are dependent on that! */ if ( ( sp->inside = find_data( ob, deltax, deltay, mx, my, &i ) ? i : 0 ) ) { fl_set_cursor( FL_ObjWin( ob ), XC_tcross ); sp->start_x = mx; sp->start_y = my; } return FL_RETURN_NONE; } /* If we arrive here, we were on top of a point the last time round. If we're in inspect mode check if we still are, otherwise reset the cursor and don't do anything further. */ if ( sp->inspect ) { if ( ! ( sp->inside = find_data( ob, deltax, deltay, mx, my, &i ) ? i : 0 ) ) fl_reset_cursor( FL_ObjWin( ob ) ); /* If delayed action, can't keep up with motion event */ #ifndef DELAYED_ACTION return FL_RETURN_CHANGED; #else return FL_RETURN_NONE; #endif } /* Now we are sure we're not in inspect mode and are shifting around one of the points. */ fmx = ( lmx - sp->bxm ) / sp->ax; fmy = ( lmy - sp->bym ) / sp->ay; if ( sp->xscale == FL_LOG ) fmx = pow( sp->xbase, fmx ); if ( sp->yscale == FL_LOG ) fmy = pow( sp->ybase, fmy ); /* Update data and redraw. Need to enforce the bounds */ i = sp->inside - 1; if ( fmx < xmin ) fmx = xmin; else if ( fmx > xmax ) fmx = xmax; if ( fmy < ymin ) fmy = ymin; else if ( fmy > ymax ) fmy = ymax; /* Fix the end points and don't allow crossings */ if ( i == 0 || i == *sp->n - 1 ) fmx = sp->x[ 0 ][ i ]; else { /* Here we need to leave some seperation. Otherwise too much error in interpolation */ if ( fmx >= sp->x[ 0 ][ i + 1 ] ) { if ( sp->xscale == FL_LOG ) fmx = sp->x[ 0 ][ i + 1 ] - ( sp->x[ 0 ][ i + 1 ] - sp->x[ 0 ][ i ] ) / 100; else fmx = sp->x[ 0 ][ i + 1 ] - 1.0 / sp->ax; } else if ( fmx <= sp->x[ 0 ][ i - 1 ] ) { if ( sp->xscale == FL_LOG ) fmx = sp->x[ 0 ][ i - 1 ] + ( sp->x[ 0 ][ i ] - sp->x[ 0 ][ i - 1 ] ) / 100; else fmx = sp->x[ 0 ][ i - 1 ] + 1.0 / sp->ax; } } sp->ux = fmx; sp->uy = fmy; /* Suspend drawing of tics etc */ sp->update = i + 1; fl_redraw_object( ob ); sp->x[ 0 ][ i ] = fmx; sp->y[ 0 ][ i ] = fmy; return ob->how_return & FL_RETURN_END_CHANGED ? FL_RETURN_NONE : FL_RETURN_CHANGED; } /*************************************** ***************************************/ static int handle_xyplot( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_XYPLOT_SPEC *sp = ob->spec; int ret = FL_RETURN_NONE; sp->lsize = ob->lsize; sp->lstyle = ob->lstyle; *sp->col = ob->col2; switch ( event ) { case FL_RESIZED : sp->objx = ob->x; sp->objy = ob->y; break; case FL_DRAW: draw_xyplot( ob ); sp->update = 0; break; case FL_DRAWLABEL: fl_draw_object_label( ob ); break; case FL_PUSH: case FL_MOTION: if ( key == FL_MBUTTON1 ) ret = handle_mouse( ob, mx, my ); break; case FL_RELEASE: if ( key != FL_MBUTTON1 ) break; if ( ! sp->active && ! sp->inspect ) break; /* Mark the release by setting inside < 0 */ if ( sp->inside > 0 ) { sp->inside *= -1; ret = FL_RETURN_END; if ( sp->inspect || ( ( mx != sp->start_x || my != sp->start_y ) && ob->how_return & FL_RETURN_END_CHANGED ) ) ret |= FL_RETURN_CHANGED; } fl_reset_cursor( FL_ObjWin( ob ) ); break; case FL_FREEMEM: free_xyplot( ob ); fl_free( sp ); break; } if ( ret && sp->inside == 0 ) M_err( "handle_xyplot", "Something is wrong\n" ); return ret; } /*************************************** ***************************************/ static int allocate_spec( FLI_XYPLOT_SPEC * sp, int n ) { int i, i0, oldn = sp->maxoverlay, np1; if ( n < sp->maxoverlay && sp->maxoverlay > FL_MAX_XYPLOTOVERLAY ) return oldn; i0 = sp->maxoverlay + ( sp->maxoverlay > 0 ); sp->maxoverlay = n; np1 = sp->maxoverlay + 1; if ( sp->text ) { sp->text = fl_realloc( sp->text, np1 * sizeof *sp->text ); sp->xt = fl_realloc( sp->xt, np1 * sizeof *sp->xt ); sp->yt = fl_realloc( sp->yt, np1 * sizeof *sp->yt ); sp->x = fl_realloc( sp->x, np1 * sizeof *sp->x ); sp->y = fl_realloc( sp->y, np1 * sizeof *sp->y ); sp->grid = fl_realloc( sp->grid, np1 * sizeof *sp->grid ); sp->col = fl_realloc( sp->col, np1 * sizeof *sp->col ); sp->tcol = fl_realloc( sp->tcol, np1 * sizeof *sp->tcol ); sp->type = fl_realloc( sp->type, np1 * sizeof *sp->type ); sp->n = fl_realloc( sp->n, np1 * sizeof *sp->n ); sp->interpolate = fl_realloc( sp->interpolate, np1 * sizeof * sp->interpolate ); sp->talign = fl_realloc( sp->talign, np1 * sizeof *sp->talign ); sp->thickness = fl_realloc( sp->thickness, np1 * sizeof *sp->thickness ); sp->key = fl_realloc( sp->key, np1 * sizeof *sp->key ); sp->symbol = fl_realloc( sp->symbol, np1 * sizeof *sp->symbol ); } else { sp->text = fl_calloc( np1, sizeof *sp->text ); sp->xt = fl_calloc( np1, sizeof *sp->xt ); sp->yt = fl_calloc( np1, sizeof *sp->yt ); sp->x = fl_calloc( np1, sizeof *sp->x ); sp->y = fl_calloc( np1, sizeof *sp->y ); sp->grid = fl_calloc( np1, sizeof *sp->grid ); sp->col = fl_calloc( np1, sizeof *sp->col ); sp->tcol = fl_calloc( np1, sizeof *sp->tcol ); sp->type = fl_calloc( np1, sizeof *sp->type ); sp->n = fl_calloc( np1, sizeof *sp->n ); sp->interpolate = fl_calloc( np1, sizeof *sp->interpolate ); sp->talign = fl_calloc( np1, sizeof *sp->talign ); sp->thickness = fl_calloc( np1, sizeof *sp->thickness ); sp->key = fl_calloc( np1, sizeof *sp->key ); sp->symbol = fl_calloc( np1, sizeof *sp->symbol ); } for ( i = i0; i <= sp->maxoverlay; i++ ) { sp->x[ i ] = sp->y[ i ] = NULL; sp->text[ i ] = NULL; sp->n[ i ] = 0; sp->interpolate[ i ] = 0; sp->type[ i ] = -1; sp->thickness[ i ] = 0; sp->key[ i ] = 0; } return oldn; } /*************************************** * Free all memory that does not depend on the xy-data ***************************************/ static void free_spec_dynamic_mem( FLI_XYPLOT_SPEC * sp ) { fl_safe_free( sp->text ); fl_safe_free( sp->xt ); fl_safe_free( sp->yt ); fl_safe_free( sp->x ); fl_safe_free( sp->y ); fl_safe_free( sp->grid ); fl_safe_free( sp->col ); fl_safe_free( sp->tcol ); fl_safe_free( sp->type ); fl_safe_free( sp->n ); fl_safe_free( sp->interpolate ); fl_safe_free( sp->talign ); fl_safe_free( sp->thickness ); fl_safe_free( sp->key ); } /*************************************** ***************************************/ static void init_spec( FL_OBJECT * ob, FLI_XYPLOT_SPEC * sp ) { allocate_spec( sp, FL_MAX_XYPLOTOVERLAY ); sp->xscale = sp->yscale = FL_LINEAR; sp->xbase = sp->ybase = 10.0; sp->lxbase = sp->lybase = 1.0; sp->xautoscale = sp->yautoscale = 1; sp->xmajor = XMAJOR; sp->ymajor = YMAJOR; sp->xminor = XMINOR; sp->yminor = YMINOR; sp->ssize = 4; sp->lsize = ob->lsize; sp->lstyle = ob->lstyle; sp->grid_linestyle = FL_DOT; sp->wx = fl_malloc( sizeof *sp->wx ); sp->wy = fl_malloc( sizeof *sp->wy ); sp->objx = ob->x; sp->objy = ob->y; sp->active = ob->type == FL_ACTIVE_XYPLOT; sp->key_lsize = ob->lsize; sp->key_lstyle = ob->lstyle; *sp->type = ob->type; sp->nxpi = 1; sp->xpi = fl_malloc( ( sp->nxpi + 3 ) * sizeof *sp->xpi ); sp->xpi++; sp->cur_nxp = 1; sp->xp = fl_malloc( ( sp->cur_nxp + 3 ) * sizeof *sp->xp ); sp->xp++; sp->xpactive = fl_malloc( ( sp->cur_nxp + 3 ) * sizeof *sp->xpactive ); sp->mark_active = 1; } /*************************************** ***************************************/ FL_OBJECT * fl_create_xyplot( int t, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { FL_OBJECT *ob; FLI_XYPLOT_SPEC *sp; ob = fl_make_object( FL_XYPLOT, t, x, y, w, h, l, handle_xyplot ); ob->boxtype = FL_XYPLOT_BOXTYPE; ob->col2 = ob->lcol = FL_BLACK; ob->col1 = FL_COL1; ob->lsize = FL_TINY_SIZE; ob->align = FL_XYPLOT_ALIGN; ob->spec = sp = fl_calloc( 1, sizeof *sp ); init_spec( ob, sp ); fl_set_object_return( ob, FL_RETURN_END_CHANGED ); return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_xyplot( int t, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { FL_OBJECT *ob = fl_create_xyplot( t, x, y, w, h, l ); // FLI_XYPLOT_SPEC *sp = ob->spec; fl_add_object( fl_current_form, ob ); /* Active_xyplot looks a little better in double buffer mode */ // fl_set_object_dblbuffer( ob, sp->active ); return ob; } /*************************************** * This function looks extremely dangerous since the caller must supply * buffers for the data - but where does the caller get the information * from about how large the buffers must be? JTT ***************************************/ void fl_get_xyplot_data( FL_OBJECT * ob, float * x, float * y, int * n ) { FLI_XYPLOT_SPEC *sp = ob->spec; *n = 0; if ( *sp->n > 0 ) { memcpy( x, *sp->x, *sp->n * sizeof *x ); memcpy( y, *sp->y, *sp->n * sizeof *y ); *n = *sp->n; } } /*************************************** ***************************************/ void fl_replace_xyplot_point( FL_OBJECT * ob, int i, double x, double y ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( i < 0 || i >= *sp->n ) return; if ( sp->x[ 0 ][ i ] != x || sp->y[ 0 ][ i ] != y ) { sp->x[ 0 ][ i ] = x; sp->y[ 0 ][ i ] = y; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_replace_xyplot_point_in_overlay( FL_OBJECT * ob, int i, int ID, double x, double y ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( ID < 0 || ID > sp->maxoverlay ) return; if ( i < 0 || i >= sp->n[ ID ] ) return; if ( sp->x[ ID ][ i ] != x || sp->y[ ID ][ i ] != y ) { sp->x[ ID ][ i ] = x; sp->y[ ID ][ i ] = y; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_get_xyplot( FL_OBJECT * ob, float * x, float * y, int * i ) { FLI_XYPLOT_SPEC *sp = ob->spec; *i = FL_abs( sp->inside ) - 1; if ( *i < 0 || *i >= *sp->n ) { *i = -1; return; } *x = sp->x[ 0 ][ *i ]; *y = sp->y[ 0 ][ *i ]; } /*************************************** ***************************************/ int fl_set_xyplot_maxoverlays( FL_OBJECT * ob, int maxover ) { return allocate_spec( ob->spec, maxover ); } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function should be regarded as for internal use * only and fl_set_object_return() should be used instead (which then * will call this function). ***************************************/ void fl_set_xyplot_return( FL_OBJECT * obj, unsigned int when ) { if ( obj->type == FL_ACTIVE_XYPLOT ) obj->how_return = when ? FL_RETURN_CHANGED : FL_RETURN_END_CHANGED; else obj->how_return = FL_RETURN_NONE; } /*************************************** ***************************************/ void fl_set_xyplot_symbolsize( FL_OBJECT * ob, int n ) { ( ( FLI_XYPLOT_SPEC * ) ob->spec )->ssize = n; } /*************************************** ***************************************/ FL_XYPLOT_SYMBOL fl_set_xyplot_symbol( FL_OBJECT * ob, int id, FL_XYPLOT_SYMBOL symbol ) { FLI_XYPLOT_SPEC *sp = ob->spec; FL_XYPLOT_SYMBOL old = 0; int i; if ( id > sp->maxoverlay ) { M_err( "fl_set_xyplot_symbol", "ID %d is not in range (0,%d)", id, sp->maxoverlay ); return 0; } for ( i = 0; i <= sp->maxoverlay; i++ ) { if ( i == id || id < 0 ) { old = sp->symbol[ i ]; if ( sp->symbol[ i ] != symbol ) { sp->symbol[ i ] = symbol; fl_redraw_object( ob ); } } } return old; } /*************************************** ***************************************/ void fl_set_xyplot_inspect( FL_OBJECT * ob, int yes ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( sp->inspect == yes ) return; sp->inspect = yes; if ( ob->type != FL_ACTIVE_XYPLOT ) { /* Work-around, need to get doublebuffer to get inspect work right */ // fl_set_object_dblbuffer( ob, sp->active || sp->inspect ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_xtics( FL_OBJECT * ob, int major, int minor ) { FLI_XYPLOT_SPEC *sp = ob->spec; int ma = major ? major : XMAJOR; int mi = minor ? minor : XMINOR; if ( major > MAX_MAJOR ) major = MAX_MAJOR; if ( minor > MAX_MINOR ) minor = MAX_MINOR; if ( major * minor >= MAX_TIC ) { M_err( "fl_set_xyplot_xtics", "major * minor should be less than %d", MAX_TIC ); minor = 5; major = 10; } if ( sp->xmajor != ma || sp->xminor != mi ) { /* 0 restores the default */ sp->xmajor = major ? major : XMAJOR; sp->xminor = minor ? minor : XMINOR; if ( *sp->axtic ) free_atic( sp->axtic ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_xgrid( FL_OBJECT * ob, int xgrid ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( sp->xgrid != xgrid ) { sp->xgrid = xgrid; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_ygrid( FL_OBJECT * ob, int ygrid ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( sp->ygrid != ygrid ) { sp->ygrid = ygrid; fl_redraw_object( ob ); } } /*************************************** ***************************************/ int fl_set_xyplot_grid_linestyle( FL_OBJECT * ob, int style ) { FLI_XYPLOT_SPEC *sp = ob->spec; int ostyle = sp->grid_linestyle; if ( sp->grid_linestyle != style ) { sp->grid_linestyle = style; fl_redraw_object( ob ); } return ostyle; } /*************************************** ***************************************/ void fl_set_xyplot_xbounds( FL_OBJECT * ob, double xmin, double xmax ) { FLI_XYPLOT_SPEC *sp = ob->spec; int xs = xmax == xmin; if ( sp->xautoscale != xs || sp->xmin != xmin || sp->xmax != xmax ) { sp->xautoscale = xs; sp->xmax = xmax; sp->xmin = xmin; find_xbounds( sp ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_get_xyplot_xbounds( FL_OBJECT * ob, float * xmin, float * xmax ) { FLI_XYPLOT_SPEC *sp = ob->spec; *xmin = sp->xmin; *xmax = sp->xmax; } /*************************************** ***************************************/ void fl_get_xyplot_ybounds( FL_OBJECT * ob, float * ymin, float * ymax ) { FLI_XYPLOT_SPEC *sp = ob->spec; *ymin = sp->ymin; *ymax = sp->ymax; } /*************************************** ***************************************/ void fl_set_xyplot_ybounds( FL_OBJECT * ob, double ymin, double ymax ) { FLI_XYPLOT_SPEC *sp = ob->spec; int ys = ymax == ymin; if ( sp->yautoscale != ys || sp->ymin != ymin || sp->ymax != ymax ) { sp->yautoscale = ys; sp->ymax = ymax; sp->ymin = ymin; find_ybounds( sp ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_ytics( FL_OBJECT * ob, int major, int minor ) { FLI_XYPLOT_SPEC *sp = ob->spec; int yma = major ? major : YMAJOR; int ymi = minor ? minor : YMINOR; if ( major > MAX_MAJOR ) major = MAX_MAJOR; if ( minor > MAX_MINOR ) minor = MAX_MINOR; if ( sp->ymajor != yma || sp->yminor != ymi ) { /* 0 restores the default */ sp->ymajor = yma; sp->yminor = ymi; if ( *sp->aytic ) free_atic( sp->aytic ); if ( sp->ymajor < 0 ) sp->ytic = -1; fl_redraw_object( ob ); } } /*************************************** ***************************************/ static void get_min_max( float * x, int n, float * xmin, float * xmax ) { float *xs = x + n; if ( ! x || ! n ) return; *xmin = *xmax = *x++; for ( ; x < xs; x++ ) { if ( *xmin > *x ) *xmin = *x; else if ( *xmax < *x ) *xmax = *x; } } /*************************************** ***************************************/ static void find_xbounds( FLI_XYPLOT_SPEC * sp ) { if ( sp->xautoscale ) get_min_max( *sp->x, *sp->n, &sp->xmin, &sp->xmax ); if ( sp->xmax - sp->xmin == 0.0 ) { sp->xmin -= 1.0; sp->xmax += 1.0; } } /*************************************** ***************************************/ static void find_ybounds( FLI_XYPLOT_SPEC * sp ) { if ( sp->yautoscale ) get_min_max( *sp->y, *sp->n, &sp->ymin, &sp->ymax ); if ( sp->ymax - sp->ymin == 0.0 ) { sp->ymin -= 1.0; sp->ymax += 1.0; } } /*************************************** * Overloading would've been nice ... ***************************************/ void fl_set_xyplot_data_double( FL_OBJECT * ob, double * x, double * y, int n, const char * title, const char * xlabel, const char * ylabel ) { FLI_XYPLOT_SPEC *sp = ob->spec; int i; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_XYPLOT ) ) { M_err( "fl_set_xyplot_data_double", "%s not an xyplot", ob ? ob->label : "" ); return; } #endif free_overlay_data( sp, 0 ); fl_safe_free( sp->xlabel ); fl_safe_free( sp->ylabel ); fl_safe_free( sp->title ); sp->xlabel = fl_strdup( xlabel ? xlabel : "" ); sp->ylabel = fl_strdup( ylabel ? ylabel : "" ); sp->title = fl_strdup( title ? title : "" ); *sp->x = fl_malloc( n * sizeof **sp->x ); *sp->y = fl_malloc( n * sizeof **sp->y ); if ( ! *sp->x || ! *sp->y ) { if ( *sp->x ) fl_free( *sp->x ); M_err( "fl_set_xyplot_data_double", "Can't allocate memory" ); return; } extend_screen_data( sp, n ); for ( i = 0; i < n ; i++ ) { sp->x[ 0 ][ i ] = x[ i ]; sp->y[ 0 ][ i ] = y[ i ]; } *sp->n = n; find_xbounds( sp ); find_ybounds( sp ); fl_redraw_object( ob ); } /*************************************** ***************************************/ void fl_set_xyplot_data( FL_OBJECT * ob, float * x, float * y, int n, const char * title, const char * xlabel, const char * ylabel ) { FLI_XYPLOT_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_XYPLOT ) ) { M_err( "fl_set_xyplot_data", "%s not an xyplot", ob ? ob->label : "" ); return; } #endif free_overlay_data( sp, 0 ); fl_safe_free( sp->xlabel ); fl_safe_free( sp->ylabel ); fl_safe_free( sp->title ); sp->xlabel = fl_strdup( xlabel ? xlabel : "" ); sp->ylabel = fl_strdup( ylabel ? ylabel : "" ); sp->title = fl_strdup( title ? title : "" ); *sp->x = fl_malloc( n * sizeof **sp->x ); *sp->y = fl_malloc( n * sizeof **sp->y ); if ( ! *sp->x || ! *sp->y ) { if ( *sp->x ) fl_free( *sp->x ); M_err( "fl_set_xyplot_data", "Can't allocate memory" ); return; } extend_screen_data( sp, n ); memcpy( *sp->x, x, n * sizeof **sp->x ); memcpy( *sp->y, y, n * sizeof **sp->y ); *sp->n = n; find_xbounds( sp ); find_ybounds( sp ); fl_redraw_object( ob ); } /*************************************** * Insert a point after n ***************************************/ void fl_insert_xyplot_data( FL_OBJECT * ob, int id, int n, double x, double y ) { FLI_XYPLOT_SPEC *sp = ob->spec; float *xx, *yy; if ( id < 0 || id > sp->maxoverlay ) return; if ( n < -1 ) n = -1; else if ( n >= sp->n[ id ] ) n = sp->n[ id ] - 1; n = n + 1; sp->n[ id ] += 1; if ( n == sp->n[ id ] - 1 ) { sp->x[ id ] = fl_realloc( sp->x[ id ], sp->n[ id ] * sizeof **sp->x ); sp->y[ id ] = fl_realloc( sp->y[ id ], sp->n[ id ] * sizeof **sp->y ); sp->x[ id ][ n ] = x; sp->y[ id ][ n ] = y; } else { xx = fl_malloc( sp->n[ id ] * sizeof *xx ); yy = fl_malloc( sp->n[ id ] * sizeof *yy ); if ( n ) { memcpy( xx, sp->x[ id ], n * sizeof *xx ); memcpy( yy, sp->y[ id ], n * sizeof *yy ); } xx[ n ] = x; yy[ n ] = y; memcpy( xx + n + 1, sp->x[ id ] + n, ( sp->n[ id ] - n - 1 ) * sizeof *xx ); memcpy( yy + n + 1, sp->y[ id ] + n, ( sp->n[ id ] - n - 1 ) * sizeof *yy ); fl_free( sp->x[ id ] ); fl_free( sp->y[ id ] ); sp->x[ id ] = xx; sp->y[ id ] = yy; } extend_screen_data( sp, sp->n[ id ] ); fl_redraw_object( ob ); } /*************************************** ***************************************/ void fl_add_xyplot_overlay( FL_OBJECT * ob, int id, float * x, float * y, int n, FL_COLOR col ) { FLI_XYPLOT_SPEC *sp; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_XYPLOT ) ) { M_err( "fl_add_xyplot_overlay", "%s not XYPLOT class", ob ? ob->label : "" ); return; } #endif sp = ob->spec; if ( id < 1 || id > sp->maxoverlay ) { M_err( "fl_add_xyplot_overlay", "ID %d is not in range (1,%d)", id, sp->maxoverlay ); return; } /* Free old data */ free_overlay_data( sp, id ); /* Copy data */ sp->x[ id ] = fl_malloc( n * sizeof **sp->x ); sp->y[ id ] = fl_malloc( n * sizeof **sp->y ); memcpy( sp->x[ id ], x, n * sizeof **sp->x ); memcpy( sp->y[ id ], y, n * sizeof **sp->y ); sp->n[ id ] = n; /* Extend screen points if needed. */ extend_screen_data( sp, n ); sp->col[ id ] = col; /* Set default only for the first time */ if ( sp->type[ id ] == -1 ) sp->type[ id ] = ob->type; fl_redraw_object( ob ); } #define MAXP 1024 /* this is the initial space */ /*************************************** ***************************************/ static int load_data( const char * f, float ** x, float ** y ) { int n = 0, err = 0; FILE *fp; char buf[ 128 ]; int maxp = MAXP, ncomment = 0; if ( ! f || ! ( fp = fopen( f, "r" ) ) ) { M_err( "load_data", "Can't open datafile '%s'", f ? f : "null" ); return 0; } *x = fl_malloc( maxp * sizeof **x ); *y = fl_malloc( maxp * sizeof **y ); /* Comment chars are ; # ! and seperators are spaces and tabs */ while ( fgets( buf, sizeof buf, fp ) ) { if ( *buf == '!' || *buf == '#' || *buf == ';' || *buf == '\n' ) { ncomment++; continue; } if ( ( err = sscanf( buf, "%f%*[ \t,]%f", *x + n, *y + n ) != 2 ) ) { M_err( "load_data", "An error occured at line %d", ++n + ncomment ); break; } if ( ++n >= maxp ) { maxp *= 2; *x = fl_realloc( *x, maxp * sizeof **x ); *y = fl_realloc( *y, maxp * sizeof **y ); } } fclose( fp ); if ( err || n == 0 ) { fl_free( *x ); fl_free( *y ); n = 0; } return n; } /*************************************** ***************************************/ int fl_add_xyplot_overlay_file( FL_OBJECT * ob, int id, const char * f, FL_COLOR c ) { float *x, *y; int n = load_data( f, &x, &y ); if ( n > 0 ) { fl_add_xyplot_overlay( ob, id, x, y, n, c ); fl_free( x ); fl_free( y ); } return n; } /*************************************** ***************************************/ void fl_set_xyplot_overlay_type( FL_OBJECT * ob, int id, int type ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( id < 0 || ! ob || id > sp->maxoverlay ) return; if ( sp->type[ id ] != type ) { sp->type[ id ] = type; fl_redraw_object( ob ); } } /*************************************** ***************************************/ int fl_get_xyplot_numdata( FL_OBJECT * ob, int id ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( id < 0 || ! ob || id > sp->maxoverlay ) return 0; return sp->n[ id ]; } /*************************************** ***************************************/ void fl_delete_xyplot_overlay( FL_OBJECT * ob, int id ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( id > 0 && id <= sp->maxoverlay && sp->n[ id ] ) { free_overlay_data( sp, id ); sp->type[ id ] = -1; fl_redraw_object( ob ); } } /*************************************** * This function looks extremely dangerous since the caller must supply * buffers for the data - but where does the caller get the information * from about how large the buffers must be? JTT ***************************************/ void fl_get_xyplot_overlay_data( FL_OBJECT * ob, int id, float * x, float * y, int * n ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( id >= 0 && id <= sp->maxoverlay && sp->n[ id ] ) { memcpy( x, sp->x[ id ], sp->n[ id ] * sizeof *x ); memcpy( y, sp->y[ id ], sp->n[ id ] * sizeof *y ); *n = sp->n[ id ]; } } /*************************************** ***************************************/ void fl_get_xyplot_data_pointer( FL_OBJECT * ob, int id, float ** x, float ** y, int * n ) { FLI_XYPLOT_SPEC *sp = ob->spec; *n = 0; if ( id >= 0 && id <= sp->maxoverlay && sp->n[ id ] ) { *x = sp->x[ id ]; *y = sp->y[ id ]; *n = sp->n[ id ]; } } /*************************************** ***************************************/ void fl_set_xyplot_linewidth( FL_OBJECT * ob, int id, int lw ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( id >= 0 && id <= sp->maxoverlay && lw != sp->thickness[ id ] ) { sp->thickness[ id ] = lw; fl_redraw_object( ob ); } } /*************************************** ***************************************/ int fl_set_xyplot_file( FL_OBJECT * ob, const char * f, const char * title, const char * xl, const char * yl ) { float *x, *y; int n; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_XYPLOT ) ) { M_err( "fl_set_xyplot_file", "%s not an xyplot", ob ? ob->label : "" ); return 0; } #endif if ( ( n = load_data( f, &x, &y ) ) > 0 ) { fl_set_xyplot_data( ob, x, y, n, title, xl, yl ); fl_free( x ); fl_free( y ); } return n; } /*************************************** ***************************************/ void fl_add_xyplot_text( FL_OBJECT * ob, double x, double y, const char * text, int al, FL_COLOR col ) { FLI_XYPLOT_SPEC *sp; int i; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_XYPLOT ) ) { M_err( "fl_add_xyplot_text", "%s not an xyplot", ob ? ob->label : "" ); return; } #endif sp = ob->spec; /* Find an appropriate slot for this */ for ( i = 0; sp->text[ i ] && i < sp->maxoverlay; i++ ) /* empty */ ; if ( i < sp->maxoverlay ) { sp->text[ i ] = fl_strdup( text ); sp->xt[ i ] = x; sp->yt[ i ] = y; sp->talign[ i ] = al; sp->tcol[ i ] = col; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_delete_xyplot_text( FL_OBJECT * ob, const char * text ) { FLI_XYPLOT_SPEC *sp; int i; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_XYPLOT ) ) { M_err( "fl_delete_xyplot_text", "%s not an xyplot", ob ? ob->label : "" ); return; } #endif for ( sp = ob->spec, i = 0; i < sp->maxoverlay; i++ ) if ( sp->text[ i ] && strcmp( sp->text[ i ], text ) == 0 ) { fl_free( sp->text[ i ] ); sp->text[ i ] = NULL; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_interpolate( FL_OBJECT * ob, int id, int deg, double grid ) { int intpl; FLI_XYPLOT_SPEC *sp = ob->spec; if ( ! ob || id < 0 || id > sp->maxoverlay ) return; if ( deg >= 2 && grid <= 0.0 ) return; intpl = deg <= 1 ? 0 : ( ( deg < 2 || deg > 7 ) ? 2 : deg ); if ( sp->interpolate[ id ] != intpl ) { sp->interpolate[ id ] = intpl; sp->grid[ id ] = grid; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_fontsize( FL_OBJECT * ob, int size ) { if ( ob->lsize != size ) { ob->lsize = size; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_fontstyle( FL_OBJECT * ob, int style ) { if ( ob->lstyle != style ) { ob->lstyle = style; fl_redraw_object( ob ); } } #define ADVANCE 0.1 /* shoulde not be greater than 0.25 */ #define FACTOR 1.9 /* max major expansion */ static float trunc_f( float, int ); /*************************************** ***************************************/ static float gen_tic( float tmin, float tmax, int major, int minor ) { float r_range, l_range, n_range; float tic; int ipow, digit; /* Handle special case: Min, MAX and one tic */ if ( major == 1 && minor == 2 ) { tic = FL_abs( tmax - tmin ) * 0.5; return tic; } r_range = FL_abs( tmax - tmin ); l_range = log10( r_range ); ipow = l_range > 0.0 ? l_range : l_range - 1; /* Normalized range is between 0 and 10 */ n_range = pow( 10.0, l_range - ipow ); n_range += ADVANCE; if ( n_range <= major && n_range >= major * 0.5 ) tic = 1.0; else tic = n_range / major; digit = tic < 1.0f; tic = trunc_f( tic, digit ); tic /= minor; tic = trunc_f( tic, 1 ); tic *= pow( 10.0, ipow ); /* Final check */ n_range = r_range / ( tic * minor * major ); if ( n_range > FACTOR ) { ipow = n_range / FACTOR; if ( ipow >= 1 ) tic *= 2.0 * ipow; else tic *= 2.0 * n_range / FACTOR; tic = trunc_f( tic, 1 ); } return tic; } /*************************************** ***************************************/ static float gen_logtic( float tmin, float tmax, float base, int major, int minor ) { float tic, lbase = log10( base ), tmp; if ( tmin <= 0.0 || tmax <= 0.0 ) { M_err( "gen_logtic", "range must be greater than 0 for logscale" ); return -1; } if ( major == 1 && minor == 2 ) { tic = floor( log10( tmax ) / lbase + 0.0001 ); if ( tic < 1.0 ) tic = 1.0; return tic; } tmp = log10( tmax ) - log10( tmin ); tic = floor( FL_abs( tmp ) / lbase ) / major + 0.01; tic = floor( tic ); if ( tic < 1.0 ) tic = 1.0; return tic; } /*************************************** * truncate a floating point number to requested significant digits ***************************************/ static float trunc_f( float f, int digit ) { int ipow, c; float expon, tmp; if ( fabs( f ) < 1.e-20 ) return 0.0; if ( digit < 0 ) digit = 1; if ( ! digit ) { if ( f > 0.5 ) return 1.0; else if ( f < 0.5 ) return 0.0; else return ( int ) f; } c = digit - 1; expon = log10( f ); ipow = expon > 0.0 ? expon : expon - 1; tmp = pow( 10.0, expon - ipow ); tmp += ADVANCE; tmp *= pow( 10.0, c ); tmp = ( int ) tmp; tmp *= pow( 10.0, ipow - c ); return tmp; } /*************************************** ***************************************/ void fl_get_xyplot_xmapping( FL_OBJECT * ob, float * a, float * b ) { *a = ( ( FLI_XYPLOT_SPEC * ) ob->spec )->ax; *b = ( ( FLI_XYPLOT_SPEC * ) ob->spec )->bxm; } /*************************************** ***************************************/ void fl_get_xyplot_ymapping( FL_OBJECT * ob, float * a, float * b ) { *a = ( ( FLI_XYPLOT_SPEC * ) ob->spec )->ay; *b = ( ( FLI_XYPLOT_SPEC * ) ob->spec )->bym; } /*************************************** ***************************************/ void fl_xyplot_s2w( FL_OBJECT * ob, double sx, double sy, float * wx, float * wy ) { FLI_XYPLOT_SPEC *sp = ob->spec; *wx = ( sx - sp->bxm ) / sp->ax; *wy = ( sy - sp->bym ) / sp->ay; if ( sp->xscale == FL_LOG ) *wx = pow( sp->xbase, *wx ); if ( sp->yscale == FL_LOG ) *wy = pow( sp->ybase, *wy ); } /*************************************** * Draw means we only call this at draw time, thus * should be ax, bx, not ax, bxm ***************************************/ static void w2s_draw( FL_OBJECT * ob, double wx, double wy, float * sx, float * sy ) { FLI_XYPLOT_SPEC *sp = ob->spec; float sbx = sp->bxm, sby = sp->bym; sp->bxm = sp->bx - sp->objx; sp->bym = sp->by - sp->objy; fl_xyplot_w2s( ob, wx, wy, sx, sy ); sp->bxm = sbx; sp->bym = sby; } /*************************************** * Really should be ints for the screen coordinates ***************************************/ void fl_xyplot_w2s( FL_OBJECT * ob, double wx, double wy, float * sx, float * sy ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( sp->xscale == FL_LOG ) *sx = log10( wx ) / sp->lxbase * sp->ax + sp->bxm + 0.5; else *sx = wx * sp->ax + sp->bxm + 0.5; if ( sp->yscale == FL_LOG ) *sy = log10( wy ) / sp->lybase * sp->ay + sp->bym + 0.5; else *sy = wy * sp->ay + sp->bym + 0.5; } /*************************************** ***************************************/ void fl_set_xyplot_xscale( FL_OBJECT * ob, int scale, double base ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( scale == FL_LOG && ( base <= 0.0 || base == 1.0 ) ) { M_err( "fl_set_xyplot_xscale", "bad log base %g specified", base ); return; } if ( sp->xscale != scale || sp->xbase != base ) { sp->xscale = scale; if ( scale == FL_LOG ) { sp->xbase = base; sp->lxbase = log10( base ); } fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_yscale( FL_OBJECT * ob, int scale, double base ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( scale == FL_LOG && ( base <= 0.0 || base == 1.0 ) ) { M_err( "fl_set_xyplot_yscale", "bad log base %g specified", base ); return; } if ( sp->yscale != scale || sp->ybase != base ) { sp->yscale = scale; if ( scale == FL_LOG ) { sp->ybase = base; sp->lybase = log10( base ); } fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_xyplot_fixed_xaxis( FL_OBJECT * ob, const char * lm, const char * rm ) { FLI_XYPLOT_SPEC *sp = ob->spec; fl_safe_free( sp->xmargin1 ); fl_safe_free( sp->xmargin2 ); sp->xmargin1 = lm ? fl_strdup( lm ) : NULL; sp->xmargin2 = rm ? fl_strdup( rm ) : NULL; if ( sp->xmargin2 && !sp->xmargin1 ) sp->xmargin1 = fl_strdup( "" ); if ( sp->xmargin1 && !sp->xmargin2 ) sp->xmargin2 = fl_strdup( "" ); } /*************************************** ***************************************/ void fl_set_xyplot_fixed_yaxis( FL_OBJECT * ob, const char * bm, const char * tm ) { FLI_XYPLOT_SPEC *sp = ob->spec; fl_safe_free( sp->ymargin1 ); fl_safe_free( sp->ymargin1 ); sp->ymargin1 = tm ? fl_strdup( tm ) : NULL; sp->ymargin2 = bm ? fl_strdup( bm ) : NULL; if ( sp->ymargin2 && ! sp->ymargin1 ) sp->ymargin1 = fl_strdup( "" ); if ( sp->ymargin1 && ! sp->ymargin2 ) sp->ymargin2 = fl_strdup( "" ); } /*************************************** ***************************************/ void fl_set_xyplot_alphaxtics( FL_OBJECT * ob, const char * m, const char * s FL_UNUSED_ARG ) { FLI_XYPLOT_SPEC *sp = ob->spec; char *tmps, *item; int n; tmps = fl_strdup( m ? m : "" ); for ( n = 0, item = strtok( tmps, "|" ); item; item = strtok( NULL, "|" ) ) sp->axtic[ n++ ] = fl_strdup( item ); sp->axtic[ n ] = 0; sp->xmajor = n; sp->xminor = 1; fl_free( tmps ); fl_redraw_object( ob ); } /*************************************** ***************************************/ void fl_set_xyplot_alphaytics( FL_OBJECT * ob, const char * m, const char * s FL_UNUSED_ARG ) { FLI_XYPLOT_SPEC *sp = ob->spec; char *tmps, *item; int n; tmps = fl_strdup( m ? m : "" ); for ( n = 0, item = strtok( tmps, "|" ); item; item = strtok( NULL, "|" ) ) sp->aytic[ n++ ] = fl_strdup( item ); sp->aytic[ n ] = 0; sp->ymajor = n; sp->yminor = 1; fl_free( tmps ); fl_redraw_object( ob ); } /*************************************** * free all data and inset text, alphanumerical labels and other stuff ***************************************/ void fl_clear_xyplot( FL_OBJECT * ob ) { int i; FLI_XYPLOT_SPEC *sp = ob->spec; for ( i = 0; i <= sp->maxoverlay; i++ ) { free_overlay_data( ob->spec, i ); fl_safe_free( sp->text[ i ] ); } fl_redraw_object( ob ); } /*************************************** ***************************************/ void fl_set_xyplot_key( FL_OBJECT * ob, int id, const char * key ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( id >= 0 && id < sp->maxoverlay ) { fl_safe_free( sp->key[ id ] ); if ( key && *key ) sp->key[ id ] = fl_strdup( key ); } } /*************************************** ***************************************/ void fl_set_xyplot_key_position( FL_OBJECT * ob, float x, float y, int align ) { FLI_XYPLOT_SPEC *sp = ob->spec; sp->key_x = x; sp->key_y = y; sp->key_align = align & ~ FL_ALIGN_INSIDE; fl_redraw_object( ob ); } /*************************************** ***************************************/ void fl_set_xyplot_keys( FL_OBJECT * ob, char ** keys, float x, float y, int align ) { int i; FLI_XYPLOT_SPEC *sp = ob->spec; for ( i = 0; i < sp->maxoverlay && keys[ i ]; i++ ) fl_set_xyplot_key( ob, i, keys[ i ] ); fl_set_xyplot_key_position( ob, x, y, align ); } /*************************************** ***************************************/ void fl_set_xyplot_key_font( FL_OBJECT * ob, int style, int size ) { FLI_XYPLOT_SPEC *sp = ob->spec; if ( sp->key_lstyle != style || sp->key_lsize != size ) { sp->key_lstyle = style; sp->key_lsize = size; fl_redraw_object( ob ); } } /*************************************** ***************************************/ int fl_set_xyplot_mark_active( FL_OBJECT * ob, int y ) { FLI_XYPLOT_SPEC *sp = ob->spec; int old = sp->mark_active; if ( old != y ) { sp->mark_active = y; fl_redraw_object( ob ); } return old; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/canvas.c0000644000175000017500000004546011340616254014426 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file canvas.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. *. * Class FL_CANVAS * * Not too much different from an app_win except geometry is managed * by forms and has one of the forms as its parent. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pcanvas.h" /*************************************** * If yield_to_shortcut is set, every key press will have to * be checked for all objects' shortcuts on the current form ***************************************/ static int handle_keyboard_special( FL_OBJECT * ob, XEvent * xev ) { unsigned char keybuf[ 127 ], *ch; KeySym keysym; int kbuflen; int ret = 0; kbuflen = XLookupString( ( XKeyEvent * ) xev, ( char * ) keybuf, sizeof keybuf, &keysym, 0 ); if ( IsModifierKey( keysym ) ) /* empty */ ; else if ( kbuflen == 0 && keysym != None ) ret = fli_do_shortcut( ob->form, keysym, xev->xkey.x, xev->xkey.y, xev ); else for ( ch = keybuf; ch < keybuf + kbuflen && ob->form; ch++ ) ret = fli_do_shortcut( ob->form, *ch, xev->xkey.x, xev->xkey.y, xev ) || ret; return ret; } #define IsValidCanvas( ob ) ( ob && ( ob->objclass == FL_CANVAS \ || ob->objclass == FL_GLCANVAS ) ) /*************************************** * We have to intercept all events destined for the canvas. * Must return 0 if canvas is used just like an arbitary application * window. event processing routine calls the preemptive routine * and continues dispatching events if preemptive handler returns 0. ***************************************/ static int canvas_event_intercept( XEvent * xev, void * vob ) { FL_OBJECT *ob = vob; FLI_CANVAS_SPEC *sp = ob->spec; fli_xevent_name( "CanvasIntercept", xev ); if ( ! sp ) { /* Must be Destroy Event, which is generated after FREEMEM. Probably should block closewindow and handle the events there. Speed penalty? */ return FL_PREEMPT; } if ( xev->type == DestroyNotify && ! sp->canvas_handler[ xev->type ] && sp->cleanup ) { sp->cleanup( ob ); sp->window = None; } if ( xev->type == KeyPress && sp->yield_to_shortcut && handle_keyboard_special( ob, xev ) ) return FL_PREEMPT; if ( xev->type != Expose && xev->type != GraphicsExpose && xev->type != ClientMessage && ( ! ob->active || ob->form->deactivated ) ) return FL_PREEMPT; if ( sp->canvas_handler[ xev->type ] ) { if ( xev->type == Expose && sp->activate && ob->objclass == FL_GLCANVAS ) sp->activate( ob ); sp->canvas_handler[ xev->type ]( ob, sp->window, sp->w, sp->h, xev, sp->user_data[ xev->type ] ); return FL_PREEMPT; } return FL_PREEMPT; } /********** Data Structure maint. ***************{ ***/ /*************************************** ***************************************/ static void free_canvas( FL_OBJECT * ob ) { FLI_CANVAS_SPEC *sp = ob->spec; fli_unmap_canvas_window( ob ); /* Don't free the colormap if it is XForms' internal one */ if ( ! sp->keep_colormap && sp->colormap != fli_colormap( fl_vmode ) ) XFreeColormap( flx->display, sp->colormap ); fl_safe_free( ob->spec ); } /*************************************** * Returns the window ID of the canvas window ***************************************/ Window fl_get_canvas_id( FL_OBJECT * ob ) { FLI_CANVAS_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_DEBUG if ( ! IsValidCanvas( ob ) ) { M_err( "fl_get_canvas_id", "%s not a canvas", ( ob && ob->label ) ? ob->label : "" ); return None; } #endif return sp->window; } /****** End of data struct. maint.************* }********/ /*************************************** ***************************************/ static void BegWMColormap( FLI_CANVAS_SPEC * sp ) { /* Set WM_COLORMAP property. Seems some versions of tvtwm have problems with setting this property. This check simply works around the problem (for most cases). */ if ( sp->colormap != fli_colormap( fl_vmode ) && ! XSetWMColormapWindows( flx->display, sp->parent, &sp->window, 1 ) ) M_err( "BegWMColormap", "WM choked" ); } /*************************************** ***************************************/ void fl_set_canvas_attributes( FL_OBJECT * ob, unsigned int mask, XSetWindowAttributes * xswa ) { FLI_CANVAS_SPEC *sp = ob->spec; /* Must not allow adding/removing events. We take care of soliciting events via canvas handler registrations */ if ( mask & CWEventMask ) { M_err( "fl_set_canvas_attributes", "Changing Events not supported" ); mask &= ~ CWEventMask; } sp->user_mask = mask; sp->user_xswa = *xswa; /* Check if canvas is already active */ if ( sp->window ) { XChangeWindowAttributes( flx->display, sp->window, sp->user_mask, &sp->user_xswa ); if ( mask & CWColormap ) BegWMColormap( sp ); } } /*************************************** ***************************************/ void fl_set_canvas_colormap( FL_OBJECT * ob, Colormap colormap ) { FLI_CANVAS_SPEC *sp = ob->spec; sp->colormap = sp->xswa.colormap = colormap; sp->mask |= CWColormap; if ( sp->window ) { M_warn( "fl_set_canvas_colormap", "Changing colormap for active window" ); XChangeWindowAttributes( flx->display, sp->window, sp->mask, &sp->xswa ); BegWMColormap( sp ); } } /*************************************** ***************************************/ void fl_share_canvas_colormap( FL_OBJECT * ob, Colormap colormap ) { FLI_CANVAS_SPEC *sp = ob->spec; sp->keep_colormap = 1; fl_set_canvas_colormap( ob, colormap ); } /*************************************** ***************************************/ Colormap fl_get_canvas_colormap( FL_OBJECT * ob ) { return ( ( FLI_CANVAS_SPEC * ) ( ob->spec ) )->colormap; } /*************************************** ***************************************/ void fl_set_canvas_visual( FL_OBJECT * obj, Visual * vi ) { ( ( FLI_CANVAS_SPEC * ) ( obj->spec ) )->visual = vi; } /*************************************** ***************************************/ void fl_set_canvas_depth( FL_OBJECT * obj, int depth ) { ( ( FLI_CANVAS_SPEC * ) ( obj->spec ) )->depth = depth; } /*************************************** ***************************************/ int fl_get_canvas_depth( FL_OBJECT * obj ) { return ( ( FLI_CANVAS_SPEC * ) ( obj->spec ) )->depth; } #define Moved( ob, sp ) ( ob->x != sp->x || ob->y != sp->y ) #define Resized( ob, sp ) ( ob->w != sp->w || ob->h != sp->h ) /*************************************** ***************************************/ static void init_canvas( FL_OBJECT * ob ) { FLI_CANVAS_SPEC *sp = ob->spec; static int nc; /* number of canvases */ char name[ 32 ]; if ( ! sp->window || ! fl_winisvalid( sp->window ) ) { /* Find the real parent of the canvas */ sp->parent = fl_get_real_object_window( ob ); sp->window = None; if ( sp->parent == None ) { M_err( "init_canvas", "Internal Error" ); exit( 0 ); } if ( sp->init && sp->init( ob ) < 0 ) { M_err( "init_canvas", "Unable to initialize canvas %s", ob->label ); return; } /* Create the window */ sp->window = XCreateWindow( flx->display, sp->parent, ob->x, ob->y, ob->w, ob->h, 0, sp->depth, InputOutput, sp->visual, sp->mask, &sp->xswa ); if ( sp->user_mask ) XChangeWindowAttributes( flx->display, sp->window, sp->user_mask, &sp->user_xswa ); #if FL_DEBUG >= ML_ERR M_warn( "init_canvas", "Depth = %d colormap = 0x%lx, WinID = %ld", sp->depth, sp->colormap, sp->window ); #endif /* Take over event handling */ fli_set_preemptive_callback( sp->window, canvas_event_intercept, ob ); if ( sp->activate && sp->activate( ob ) < 0 ) { M_err( "init_canvas", "Can't initialize canvas %s", ob->label ); return; } /* Record the name of the window */ if ( *ob->label ) XStoreName( flx->display, sp->window, ob->label ); else { sprintf( name, "flcanvas%d", nc++ ); XStoreName( flx->display, sp->window, name ); } BegWMColormap( sp ); XMapWindow( flx->display, sp->window ); /* Save size */ sp->x = ob->x; sp->y = ob->y; sp->w = ob->w; sp->h = ob->h; } /* Check if moved or resized */ if ( Moved( ob, sp ) || Resized( ob, sp ) ) { M_warn( "init_canvas", "Canvas: WinMoved\n" ); XMoveResizeWindow( flx->display, sp->window, ob->x, ob->y, ob->w, ob->h ); } sp->x = ob->x; sp->y = ob->y; sp->w = ob->w; sp->h = ob->h; if ( ob->col1 != FL_NoColor ) XClearWindow( flx->display, sp->window ); sp->dec_type = fli_boxtype2frametype( ob->boxtype ); fl_drw_frame( sp->dec_type, ob->x, ob->y, ob->w, ob->h, ob->col2, ob->bw ); } /*************************************** ***************************************/ FL_HANDLE_CANVAS fl_add_canvas_handler( FL_OBJECT * ob, int ev, FL_HANDLE_CANVAS h, void * udata ) { FL_HANDLE_CANVAS oldh = NULL; FLI_CANVAS_SPEC *sp = ob->spec; unsigned long emask = fli_xevent_to_mask( ev ); if ( ! IsValidCanvas( ob ) ) { M_err( "fl_add_canvas_handler", "%s not canvas class", ob ? ob->label : "" ); return NULL; } if ( ev < KeyPress ) { M_err( "fl_add_canvas_handler", "Invalid event %d", ev ); return NULL; } if ( ev != 0 && ev < LASTEvent ) { oldh = sp->canvas_handler[ ev ]; sp->canvas_handler[ ev ] = h; sp->user_data[ ev ] = udata; if ( ! sp->window ) sp->xswa.event_mask |= emask; else sp->xswa.event_mask = fl_addto_selected_xevent( sp->window, emask ); } return oldh; } /*************************************** * Remove a particular handler for event ev. If ev is invalid, * remove all handlers and their corresponding event mask ***************************************/ void fl_remove_canvas_handler( FL_OBJECT * ob, int ev, FL_HANDLE_CANVAS h FL_UNUSED_ARG ) { FLI_CANVAS_SPEC *sp = ob->spec; unsigned long emask = fli_xevent_to_mask( ev ); if ( ev < 0 || ev >= LASTEvent ) { M_err( "fl_remove_canvas_handler", "Invalid event %d", ev ); return; } sp->canvas_handler[ ev ] = NULL; if ( ! sp->window ) { if ( emask != 0 ) { sp->xswa.event_mask &= ~emask; sp->xswa.event_mask |= ExposureMask; } return; } /* Knock off the mask. Need to get Expose however */ if ( emask != 0 ) sp->xswa.event_mask = fl_remove_selected_xevent( sp->window, emask ); else if ( ev < 2 ) XSelectInput( flx->display, sp->window, sp->xswa.event_mask = ExposureMask ); if ( ev == 0 ) { for ( ; ev < LASTEvent; ev++ ) sp->canvas_handler[ ev ] = NULL; } } /*************************************** * Handle canvas by calling registered handlers. There is not much * to do as FL_DRAW typically will be followd by Expose on the * canvas ***************************************/ static int handle_canvas( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * xev FL_UNUSED_ARG ) { FLI_CANVAS_SPEC *sp = ob->spec; switch ( event ) { case FL_DRAW: if ( ob->col1 != FL_NoColor ) sp->xswa.background_pixel = fl_get_pixel( ob->col1 ); else sp->xswa.background_pixel = None; sp->mask |= CWBackPixel; init_canvas( ob ); fl_draw_object_label_outside( ob ); break; case FL_FREEMEM: fl_hide_canvas( ob ); free_canvas( ob ); break; } return FL_RETURN_NONE; } /*************************************** ***************************************/ void fl_hide_canvas( FL_OBJECT * ob ) { FLI_CANVAS_SPEC *sp = ob->spec; if ( sp->window && sp->cleanup ) sp->cleanup( ob ); /* If parent is unmapped, sp->window is also unmapped, must cleanup canvas specific stuff before closing window */ if ( ob->visible && sp->window && ob->form && ob->form->window ) fl_winclose( sp->window ); sp->window = None; } /*************************************** ***************************************/ FL_OBJECT * fl_create_generic_canvas( int canvas_class, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_CANVAS_SPEC *sp; int vmode = fl_vmode; int i; ob = fl_make_object( canvas_class, type, x, y, w, h, label, handle_canvas ); ob->boxtype = FL_CANVAS_BOXTYPE; ob->col1 = FL_NoColor; /* indicates no background */ ob->col2 = FL_BLACK; sp = ob->spec = fl_calloc( 1, sizeof *sp ); sp->xswa.border_pixel = 0; sp->xswa.event_mask = ExposureMask | StructureNotifyMask; sp->xswa.do_not_propagate_mask = 0; sp->mask = CWColormap | CWEventMask | CWBorderPixel | CWDontPropagate; if ( ! fli_no_connection ) { sp->visual = fli_visual( vmode ); sp->depth = fli_depth( vmode ); sp->colormap = sp->xswa.colormap = fli_colormap( vmode ); sp->gc = fl_state[ vmode ].gc[ 7 ]; /* NOT USED */ } sp->winname = NULL; sp->window = sp->parent = sp->swindow = None; sp->init = sp->activate = sp->cleanup = NULL; sp->last_active = NULL; sp->context = NULL; for ( i = 0; i < LASTEvent; i++ ) { sp->canvas_handler[ i ] = NULL; sp->user_data[ i ] = NULL; } fl_canvas_yield_to_shortcut( ob, 1 ); return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_create_canvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { return fl_create_generic_canvas( FL_CANVAS, type, x, y, w, h, label ); } /*************************************** ***************************************/ FL_OBJECT * fl_add_canvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_canvas( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** ***************************************/ void fl_modify_canvas_prop( FL_OBJECT * obj, FL_MODIFY_CANVAS_PROP init, FL_MODIFY_CANVAS_PROP activate, FL_MODIFY_CANVAS_PROP cleanup ) { FLI_CANVAS_SPEC *sp = obj->spec; sp->init = init; sp->activate = activate; sp->cleanup = cleanup; } /*************************************** ***************************************/ void fl_canvas_yield_to_shortcut( FL_OBJECT * ob, int yes ) { FLI_CANVAS_SPEC *sp = ob->spec; unsigned int emask = KeyPressMask; if ( ( sp->yield_to_shortcut = yes ) ) { if ( ! sp->window ) sp->xswa.event_mask |= emask; else sp->xswa.event_mask = fl_addto_selected_xevent( sp->window, emask ); } else if ( ! sp->canvas_handler[ KeyPress ] ) { if ( ! sp->window ) sp->xswa.event_mask &= ~emask; else sp->xswa.event_mask = fl_remove_selected_xevent( sp->window, emask ); } } /*************************************** * Clear the canvas to the background color. If no background is * defined use black. ***************************************/ void fl_clear_canvas( FL_OBJECT * ob ) { Window win; if ( ! ob || ! ( win = FL_ObjWin( ob ) ) ) return; if ( ob->col1 != FL_NoColor ) XClearWindow( flx->display, win ); else { fl_winset( win ); fl_rectf( ob->x, ob->y, ob->w, ob->h, FL_BLACK ); } } /*************************************** * Called when a form that contains a canvas is getting hidden ***************************************/ void fli_unmap_canvas_window( FL_OBJECT * ob ) { FLI_CANVAS_SPEC *sp = ob->spec; if ( ob->visible && sp->window && ob->form && ob->form->window ) fl_winclose( sp->window ); sp->window = None; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/flresource.c0000644000175000017500000012157711374317137015335 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file flresource.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Handle XResources. Only rudimetry support is implemented. However, * using this minimum implementation, more powerful and application * specific resources can be developed easily. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" #include #include #include #if 0 #include #endif #ifdef FL_WIN32 #include #endif FLI_WM_STUFF fli_wmstuff; /* also used in win.c */ static XrmDatabase fldatabase; /* final merged database */ static XrmDatabase cmddb; /* command line database */ static char *fl_app_name, *fl_app_class, *fl_ori_app_name; static void fli_init_resources( void ); static void fli_set_debug_level( int ); /* Command line options */ static XrmOptionDescRec copt[ ] = { { "-fldebug", "*fldebug", XrmoptionSepArg, ( caddr_t ) "0" }, { "-flversion", "*flversion", XrmoptionNoArg, ( caddr_t ) "1" }, { "-flhelp", "*flhelp", XrmoptionNoArg, ( caddr_t ) "1" }, { "-name", ".name", XrmoptionSepArg, ( caddr_t ) 0 }, { "-display", ".display", XrmoptionSepArg, ( caddr_t ) 0 }, { "-sync", "*sync", XrmoptionNoArg, ( caddr_t ) "1" }, { "-depth", "*depth", XrmoptionSepArg, ( caddr_t ) 0 }, { "-visual", "*visual", XrmoptionSepArg, ( caddr_t ) 0 }, { "-private", "*privateColormap", XrmoptionNoArg, ( caddr_t ) "1" }, { "-shared", "*sharedColormap", XrmoptionNoArg, ( caddr_t ) "1" }, { "-standard", "*standardColormap", XrmoptionNoArg, ( caddr_t ) "1" }, { "-stdcmap", "*standardColormap", XrmoptionNoArg, ( caddr_t ) "1" }, { "-double", "*doubleBuffer", XrmoptionNoArg, ( caddr_t ) "1" }, { "-bw", "*borderWidth", XrmoptionSepArg, ( caddr_t ) 0 }, { "-vid", "*visualID", XrmoptionSepArg, ( caddr_t ) 0 }, #ifdef DO_GAMMA_CORRECTION { "-rgamma", "*rgamma", XrmoptionSepArg, ( caddr_t ) 0 }, { "-bgamma", "*bgamma", XrmoptionSepArg, ( caddr_t ) 0 }, { "-ggamma", "*ggamma", XrmoptionSepArg, ( caddr_t ) 0 }, #endif { "-bs", "*backingStore", XrmoptionNoArg, ( caddr_t ) "0" } }; #define Ncopt ( sizeof copt / sizeof *copt ) /* Other resources */ #define PV( a ) &( fli_cntl.a ) #define PS( a ) ( fli_cntl.a ) #define NS( a ) #a /* xform and XForm will be generated on the fly */ typedef char Bop[ 8 ]; /* Boolean default */ typedef char Iop[ 8 ]; /* Integer default */ static Bop OpPrivateMap, OpSharedMap, OpStandardMap, OpDouble = "true"; static Bop OpSync, OpULW = "1"; static Iop OpDebug, OpDepth, OpULT = "-1"; static char OpBS[ 12 ] = "1"; /* whenmapped */ static char OpSafe[ 12 ]; static char OpSCBT[ 16 ] = "thin"; static char OpBLsize[ 20 ] = NS( FL_DEFAULT_SIZE ); static char OpMLsize[ 20 ] = NS( FL_DEFAULT_SIZE ); static char OpBrFsize[ 20 ] = NS( FL_DEFAULT_SIZE ); static char OpChFsize[ 20 ] = NS( FL_DEFAULT_SIZE ); static char OpSLsize[ 20 ] = NS( FL_DEFAULT_SIZE ); static char OpLLsize[ 20 ] = NS( FL_DEFAULT_SIZE ); static char OpILsize[ 20 ] = NS( FL_DEFAULT_SIZE ); static char OpIBW[ 20 ] = NS( FL_BOUND_WIDTH ); static char OpPsize[ 20 ] = NS( FL_DEFAULT_SIZE ); static char OpVisualID[ 20 ] = "0"; #ifdef DO_GAMMA_CORRECTION static char OpRgamma[ 12 ] = "1"; static char OpGgamma[ 12 ] = "1"; static char OpBgamma[ 12 ] = "1"; #endif static char OpCoordUnit[ 32 ]; static FLI_VN_PAIR vn_coordunit[ ] = { { FL_COORD_PIXEL, "pixel" }, { FL_COORD_MM, "mm" }, { FL_COORD_POINT, "point" }, { FL_COORD_centiPOINT, "centipoint" }, { FL_COORD_centiPOINT, "cp" }, { FL_COORD_centiMM, "centimm" }, { FL_COORD_centiMM, "cmm" }, { -1, "Invalid" }, { -1, NULL } }; #define SetR( name, rclass, type, deft, buflen ) \ { #name, rclass, type, &fli_cntl.name, deft, buflen } static FL_resource internal_resources[ ] = { SetR( debug, "Debug", FL_INT, OpDebug, 0 ), SetR( sync, "Sync", FL_BOOL, OpSync, 0 ), #ifdef DO_GAMMA_CORRECTION SetR( rgamma, "Gamma", FL_FLOAT, OpRgamma, 0 ), SetR( ggamma, "Gamma", FL_FLOAT, OpGgamma, 0 ), SetR( bgamma, "Gamma", FL_FLOAT, OpBgamma, 0 ), #endif SetR( depth, "Depth", FL_INT, OpDepth, 0 ), { "visual", "Visual", FL_STRING, PS( vname ), PS( vname ), 20 }, { "scrollbarType", "ScrollbarType", FL_STRING, OpSCBT, OpSCBT, 16 }, SetR( doubleBuffer, "DoubleBuffer", FL_BOOL, OpDouble, 0 ), SetR( ulThickness, "ULThickness", FL_INT, OpULT, 0 ), SetR( privateColormap, "PrivateColormap", FL_BOOL, OpPrivateMap, 0 ), SetR( sharedColormap, "SharedColormap", FL_BOOL, OpSharedMap, 0 ), SetR( standardColormap, "StandardColormap", FL_BOOL, OpStandardMap, 0 ), SetR( buttonFontSize, "FontSize", FL_INT, OpBLsize, 0 ), SetR( menuFontSize, "FontSize", FL_INT, OpMLsize, 0 ), SetR( choiceFontSize, "FontSize", FL_INT, OpChFsize, 0 ), SetR( browserFontSize, "FontSize", FL_INT, OpBrFsize, 0 ), SetR( labelFontSize, "FontSize", FL_INT, OpLLsize, 0 ), SetR( sliderLabelSize, "FontSize", FL_INT, OpSLsize, 0 ), SetR( inputLabelSize, "FontSize", FL_INT, OpILsize, 0 ), SetR( pupFontSize, "PupFontSize", FL_INT, OpPsize, 0 ), SetR( borderWidth, "BorderWidth", FL_INT, OpIBW, 0 ), SetR( ulPropWidth, "ULWidth", FL_BOOL, OpULW, 0 ), SetR( backingStore, "BackingStore", FL_INT, OpBS, 0 ), SetR( safe, "Safe", FL_INT, OpSafe, 0 ), { "coordUnit", "CoordUnit", FL_STRING, OpCoordUnit, OpCoordUnit, 32 }, { "visualID", "VisualID", FL_LONG, &fli_requested_vid, OpVisualID, 0 } }; #define Niopt ( sizeof internal_resources / sizeof *internal_resources ) /* Program can set its own default, overriding XForms default */ #define SetMember( a ) fli_cntl.a = cntl->a /*************************************** ***************************************/ void fl_set_defaults( unsigned long mask, FL_IOPT * cntl ) { if ( mask & FL_PDPrivateMap ) { SetMember( privateColormap ); sprintf( OpPrivateMap, "%d", cntl->privateColormap != 0 ); } if ( mask & FL_PDSharedMap ) { SetMember( sharedColormap ); sprintf( OpSharedMap, "%d", cntl->sharedColormap != 0 ); } if ( mask & FL_PDStandardMap ) { SetMember( standardColormap ); sprintf( OpStandardMap, "%d", cntl->standardColormap != 0 ); } if ( mask & FL_PDDouble ) { SetMember( doubleBuffer ); sprintf( OpDouble, "%d", cntl->doubleBuffer != 0 ); } if ( mask & FL_PDDepth ) { SetMember( depth ); sprintf( OpDepth, "%d", cntl->depth ); } if ( mask & FL_PDVisual ) { SetMember( vclass ); strcpy( fli_cntl.vname, fl_vclass_name( cntl->vclass ) ); } if ( mask & FL_PDButtonFontSize ) { SetMember( buttonFontSize ); sprintf( OpBLsize, "%d", cntl->buttonFontSize ); } if ( mask & FL_PDBrowserFontSize ) { SetMember( browserFontSize ); sprintf( OpBrFsize, "%d", cntl->browserFontSize ); } if ( mask & FL_PDMenuFontSize ) { SetMember( menuFontSize ); sprintf( OpMLsize, "%d", cntl->menuFontSize ); } if ( mask & FL_PDChoiceFontSize ) { SetMember( choiceFontSize ); sprintf( OpChFsize, "%d", cntl->choiceFontSize ); } if ( mask & FL_PDSliderFontSize ) { SetMember( sliderFontSize ); sprintf( OpSLsize, "%d", cntl->sliderFontSize ); } if ( mask & FL_PDInputFontSize ) { SetMember( inputFontSize ); sprintf( OpILsize, "%d", cntl->inputFontSize ); } if ( mask & FL_PDLabelFontSize ) { SetMember( labelFontSize ); sprintf( OpLLsize, "%d", cntl->labelFontSize ); } if ( mask & FL_PDBorderWidth ) fl_set_border_width( cntl->borderWidth ); if ( mask & FL_PDScrollbarType ) fl_set_scrollbar_type( cntl->scrollbarType ); if ( mask & FL_PDPupFontSize ) { SetMember( pupFontSize ); sprintf( OpPsize, "%d", cntl->pupFontSize ); } if ( mask & FL_PDSafe ) { SetMember( safe ); sprintf( OpSafe, "%d", cntl->safe ); } if ( mask & FL_PDBS ) { SetMember( backingStore ); sprintf( OpBS, "%d", cntl->backingStore ); } if ( mask & FL_PDCoordUnit ) fl_set_coordunit( cntl->coordUnit ); if ( mask & FL_PDDebug ) fli_set_debug_level( cntl->debug ); } /*************************************** ***************************************/ void fl_get_defaults( FL_IOPT * cntl ) { if ( ! fl_display ) { M_err( "fl_get_defaults", "You forgot to call fl_initialize" ); exit( 1 ); } *cntl = fli_cntl; } /*************************************** * Convenience functions ***************************************/ void fl_set_coordunit( int u ) { const char *cu = fli_get_vn_name( vn_coordunit, u ); if ( cu == NULL ) { M_err( "fl_set_coordunit", "Invald coord unit, defaulting to \"pixel\"" ); u = FL_COORD_PIXEL; cu = "pixel"; } fli_cntl.coordUnit = u; strcpy( OpCoordUnit, cu ); } /*************************************** ***************************************/ void fl_set_border_width( int bw ) { fli_cntl.borderWidth = bw; sprintf( OpIBW, "%d", bw ); } /*************************************** ***************************************/ void fl_set_scrollbar_type( int t ) { fli_cntl.scrollbarType = t; if ( t == FL_NORMAL_SCROLLBAR ) strcpy( OpSCBT, "normal" ); else if ( t == FL_NICE_SCROLLBAR ) strcpy( OpSCBT, "nice" ); else if ( t == FL_PLAIN_SCROLLBAR ) strcpy( OpSCBT, "plain" ); else strcpy( OpSCBT, "thin" ); } /*************************************** ***************************************/ void fl_set_visualID( long id ) { fli_requested_vid = id; sprintf( OpVisualID, "0x%lx", id ); } /*************************************** ***************************************/ int fl_get_border_width( void ) { return fli_cntl.borderWidth; } /*************************************** ***************************************/ int fl_get_coordunit( void ) { return fli_cntl.coordUnit; } /*************************************** ***************************************/ static void fli_set_debug_level( int l ) { fli_cntl.debug = l; sprintf( OpDebug, "%d", fli_cntl.debug ); fli_set_msg_threshold( fli_cntl.debug ); } /*************************************** * Handle XAPPLRESDIR (colon seperated directories) specification. * Ignore the %T %N stuff ***************************************/ static void handle_applresdir( const char * rstr, const char * appclass ) { char *tok; char rbuf[ 512 ], buf[ 512 ]; XrmDatabase fdb = 0; strcpy( rbuf, rstr ); for ( tok = strtok( rbuf, ":" ); tok; tok = strtok( 0, ":" ) ) { fl_snprintf( buf, sizeof buf,"%s/%s", tok,appclass ); M_info( "handle_applresdir", "Trying XAPPLRESDIR: %s", buf ); if ( ( fdb = XrmGetFileDatabase( buf ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "handle_applresdir", "XAPPLRESDIR %s loaded", buf ); } } } /*************************************** * Routine to merge all resource databases, excluding the commandline, * which is done in fl_initialize. ***************************************/ static void init_resource_database( const char *appclass ) { char buf[ FL_PATH_MAX + 127 ], *rstr; XrmDatabase fdb = 0; if ( ! fl_display ) { M_err( "init_resource_database", "fl_initialize is not called" ); return; } if ( fldatabase ) return; XrmInitialize( ); #ifdef __VMS /* For the VMS version try to load the resources from, in this order, DECW$SYSTEM_DEFAULTS:appclass.DAT DECW$USER_DEFAULTS:appclass.DAT DECW$USER_DEFAULTS:DECW$XDEFAULTS.DAT The window resource manager for this display */ fl_snprintf( buf, sizeof buf, "DECW$SYSTEM_DEFAULTS:%s.DAT", appclass ); M_info( "init_resource_database", "Trying Sys_default: %s", buf ); if ( ( fdb = XrmGetFileDatabase( buf ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "System default %s loaded", buf ); } fl_snprintf( buf, sizeof buf, "DECW$USER_DEFAULTS:%s.DAT", appclass ); M_info( "init_resource_database", "Trying User_default: %s", buf ); if ( ( fdb = XrmGetFileDatabase( buf ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "System default %s loaded", buf ); } fl_snprintf( buf, sizeof buf, "DECW$USER_DEFAULTS:DECW$XDEFAULTS.DAT" ); M_info( "init_resource_database", "Trying Sys_default: %s", buf ); if ( ( fdb = XrmGetFileDatabase( buf ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "System default %s loaded", buf ); } M_info( "init_resource_database", "Trying RESOURCE_MANAGER" ); if ( ( rstr = XResourceManagerString( fl_display ) ) ) { if ( ( fdb = XrmGetStringDatabase( rstr ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "RESOURCE_MANAGER loaded" ); } } #else /* !VMS */ fl_snprintf( buf, sizeof buf, "/usr/lib/X11/app-defaults/%s", appclass ); M_info( "init_resource_database", "Trying Sys_default: %s", buf ); if ( ( fdb = XrmGetFileDatabase( buf ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "System default %s loaded", buf ); } /* try XAPPLRESDIR */ M_info( "init_resource_database", "Trying XAPPLRESDIR" ); if ( ( rstr = getenv( "XAPPLRESDIR" ) ) ) handle_applresdir( rstr, appclass ); /* try server defined resources */ M_info( "init_resource_database", "Trying RESOURCE_MANAGER" ); if ( ( rstr = XResourceManagerString( fl_display ) ) ) { if ( ( fdb = XrmGetStringDatabase( rstr ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "RESOURCE_MANAGER loaded" ); } } else { /* try ~/.Xdefaults */ if ( ( rstr = getenv( "HOME" ) ) ) { fl_snprintf( buf, sizeof buf,"%s/.Xdefaults", rstr ); M_info( "init_resource_database", "Trying %s", buf ); if ( ( fdb = XrmGetFileDatabase( buf ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "%s loaded", buf ); } } } /* load file XENVIRONMENT */ M_info( "init_resource_database", "Trying environment variable XEVIRONMENT" ); if ( ( rstr = getenv( "XENVIRONMENT" ) ) ) { if ( ( fdb = XrmGetFileDatabase( rstr ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "%s loaded", rstr ); } } else { /* ~/.Xdefaults- */ M_info( "init_resource_database", "Trying ~/.Xdefaults-" ); if ( ( rstr = getenv( "HOME" ) ) ) { int l; fl_snprintf( buf, sizeof buf,"%s/.Xdefaults", rstr ); l = strlen( strcat( buf, "-" ) ); gethostname( buf + l, sizeof buf - l ); M_info( "init_resource_database", "Trying %s", buf ); if ( ( fdb = XrmGetFileDatabase( buf ) ) ) { XrmMergeDatabases( fdb, &fldatabase ); M_warn( "init_resource_database", "%s loaded", buf ); } } } #endif /* VMS */ errno = 0; if ( ! fldatabase ) { M_warn( "init_resource_database", "Can't find any resource databases!" ); return; } } /*************************************** ***************************************/ static int is_true( const char *s ) { return strncmp( s, "True", 4 ) == 0 || strncmp( s, "true", 4 ) == 0 || strncmp( s, "Yes", 3 ) == 0 || strncmp( s, "yes", 3 ) == 0 || strncmp( s, "On", 2 ) == 0 || strncmp( s, "on", 2 ) == 0 || *s == '1'; } /*************************************** * The resource routine of the lowest level. Only adds the application * name. * * Return the string representation of the resource value ***************************************/ const char * fl_get_resource( const char * rname, /* resource name */ const char * cname, /* class name */ FL_RTYPE dtype, /* data type */ const char * defval, /* default */ void * val, /* variable */ int size ) /* buffer size if string */ { XrmValue entry = { 0, NULL }; char *type = NULL; char res_name[ 256 ] = "", res_class[ 256 ] = ""; if ( ( ! rname || ! * rname ) && ( ! cname || ! *cname ) ) return NULL; if ( rname && *rname ) fl_snprintf( res_name, sizeof res_name,"%s.%s", fl_app_name, rname ); else if ( cname && *cname ) fl_snprintf( res_class, sizeof res_class,"%s.%s", fl_app_class, cname ); /* Just checking the return value of XrmGetResource() doesn't seem to work (as it should, unless I completely mis-understand the man page), and 'entry' seems to return the same data as on a previous call (despite the initialization!), but 'type' seems to get set to NULL in cases of failure to find the requested resource in the database. So in that case we try to use the default value. JTT */ if ( ! XrmGetResource( fldatabase, res_name, res_class, &type, &entry ) || ! type || strcmp( type, "String" ) || ! entry.addr ) { M_warn( "fl_get_resource", "%s (%s): not found", res_name, res_class ); entry.addr = ( XPointer ) defval; } else M_info( "fl_get_resource", "%s (%s): %s", res_name, res_class, entry.addr ); if ( dtype == FL_NONE || ! entry.addr ) return entry.addr; switch ( dtype ) { case FL_SHORT: *( short * ) val = atoi( entry.addr ); break; case FL_INT: *( int * ) val = atoi( entry.addr ); break; case FL_BOOL: *( int * ) val = is_true( entry.addr ); break; case FL_LONG: *( long * ) val = strtol( entry.addr, NULL, 0 ); break; case FL_FLOAT: * ( float * ) val = ( float ) atof( entry.addr ); break; case FL_STRING: if ( val && val != entry.addr && size > 0 ) { strncpy( val, entry.addr, size ); ( ( char * ) val )[ size - 1 ] = '\0'; } break; default: M_err( "fl_get_resource", "Unknown type %d", dtype ); return NULL; } return entry.addr; } /*************************************** ***************************************/ void fl_set_resource( const char * str, const char * val ) { char res_name[ 256 ]; fl_snprintf( res_name, sizeof res_name, "%s.%s", fl_app_name, str ); XrmPutStringResource( &fldatabase, res_name, ( char * ) val ); } /*************************************** * internal resource initialization ***************************************/ static void fli_init_resources( void ) { char res[ 256 ], cls[ 256 ], ores[ 256 ]; char *appname = fl_app_name, *appclass = fl_app_class; char *ori_appname = fl_ori_app_name; /* internal resources need to be prefixed xform and XForm. need to generate for all names */ fl_snprintf( cls, sizeof cls, "%s.XForm", fl_app_class ); fl_app_class = cls; fl_snprintf( res, sizeof res, "%s.xform", fl_app_name ); fl_app_name = res; fl_snprintf( ores, sizeof ores, "%s.xform", fl_ori_app_name ); fl_ori_app_name = ores; fl_get_app_resources( internal_resources, Niopt ); fl_app_name = appname; fl_app_class = appclass; fl_ori_app_name = ori_appname; if ( fli_cntl.sync ) { XSynchronize( fl_display, 1 ); M_err( "fli_init_resources", "**** Synchronous Mode ********" ); fli_set_debug_level( 4 ); } } static int fl_argc; static char **fl_argv; /*************************************** ***************************************/ static void dup_argv( char ** argv, int n ) { int i; if ( ! argv ) return; if ( ! fl_argv ) fl_argv = fl_malloc( ( n + 1 ) * sizeof *fl_argv ); for ( i = 0; i < n; i++ ) fl_argv[ i ] = fl_strdup( argv[ i ] ); fl_argv[ i ] = NULL; } /*************************************** ***************************************/ char ** fl_get_cmdline_args( int *n ) { *n = fl_argc; return fl_argv; } /*************************************** ***************************************/ void fli_free_cmdline_args( void ) { size_t i; if ( ! fl_argv ) return; for ( i = 0; fl_argv[ i ]; i++ ) fl_safe_free( fl_argv[ i ] ); fl_safe_free( fl_argv ); } /*************************************** * find the command name from arg[0] and return a copy of it ***************************************/ static char * get_command_name( const char * arg0 ) { char *p; char *s = fl_strdup( arg0 ); char *cmd_name = s; #ifdef __VMS /* vms command disk:[path]command.exe */ if ( ( p = strrchr( s, ']' ) ) ) cmd_name = p + 1; #else #ifdef FL_WIN32 _splitpath( arg0, NULL, NULL, cmd_name, NULL ); #else if ( ( p = strrchr( s, '/' ) ) ) cmd_name = p + 1; #endif #endif /* Remove the extension and the period */ if ( ( p = strrchr( cmd_name, '.' ) ) ) *p = '\0'; /* Prevent a valgrind warning about a possible memory leak. */ if ( s != cmd_name ) { cmd_name = fl_strdup( cmd_name ); fl_free( s ); } return cmd_name; } /* * Global Routines to do the initialization and resource management * */ #define DumpD( a ) fprintf( stderr,"\t%s:%d\n", #a, fli_cntl.a ) #define DumpS( a ) fprintf( stderr,"\t%s:%s\n", #a, fli_cntl.a ) #define DumpF( a ) fprintf( stderr,"\t%s:%.3f\n", #a, fli_cntl.a ) static Window fli_GetVRoot( Display *, int ); /*************************************** * initialize context ***************************************/ void fli_init_context( void ) { if ( fli_context ) return; fli_context = fl_calloc( 1, sizeof *fli_context ); fli_context->io_rec = NULL; fli_context->idle_rec = NULL; fli_context->atclose = NULL; fli_context->signal_rec = NULL; fli_context->idle_delta = FLI_TIMER_RES; fli_context->hscb = FL_HOR_THIN_SCROLLBAR; fli_context->vscb = FL_VERT_THIN_SCROLLBAR; fli_context->navigate_mask = ShiftMask; /* to navigate input field */ fli_context->xim = NULL; fli_context->xic = NULL; } /*************************************** ***************************************/ void fli_set_input_navigate( unsigned int mask ) { fli_init_context( ); if ( mask == ShiftMask || mask == Mod1Mask || mask == ControlMask ) fli_context->navigate_mask = mask; } /*************************************** ***************************************/ Display * fl_initialize( int * na, char * arg[ ], const char * appclass, FL_CMD_OPT * appopt, int nappopt ) { char disp_name[ 256 ], disp_cls[ 256 ], buf[ 256 ]; XrmValue xval; char *type; float xdpi, ydpi; if ( fl_display ) { M_warn( "fl_initialize", "XForms: already initialized" ); return fl_display; } /* be paranoid */ if ( ! na || ! *na ) { M_err( "fl_initialize", "XForms: argc == 0 or argv == NULL detected\n" ); exit( 1 ); } /* Setting the locale was introduced in 0.89.5 (as far as I could figure out) but never was officially documented. Since it can break programs when run in a different locale then the one the original author used (e.g. because reading of files with scanf() may not work anymore when, due to the locale setting a ',' instead of a '.' as the decimal point is expected) I have thrown it out. Jean-Marc and Angus already planned to do that back in 2004 but obviously never got around to doing it. JTT */ #if 0 setlocale( LC_ALL, "" ); #endif fli_internal_init( ); XrmInitialize( ); /* Save a copy of the command line for later WM hints */ fl_argc = *na; dup_argv( arg, *na ); /* Get appname and class, but without any leading paths */ fl_ori_app_name = fl_app_name = get_command_name( arg[ 0 ] ); fl_app_class = fl_strdup( ( appclass && *appclass ) ? appclass : fl_app_name ); /* Make class name upper case if non supplied */ if ( ! appclass || ! *appclass ) { fl_app_class[ 0 ] = toupper( fl_app_class[ 0 ] ); if ( fl_app_class[ 0 ] == 'X' ) fl_app_class[ 1 ] = toupper( fl_app_class[ 1 ] ); } /* Do form internal resouces first */ XrmParseCommand( &cmddb, copt, Ncopt, fl_app_name, na, arg ); /* if there are still more left and appopt is not zero */ if ( appopt && na && *na ) XrmParseCommand( &cmddb, appopt, nappopt, ( char * ) fl_ori_app_name, na, arg ); /* Check version request */ fl_snprintf( disp_name, sizeof disp_name, "%s.fl_version", fl_app_name ); fl_snprintf( disp_cls, sizeof disp_cls, "%s.flversion", fl_app_name ); if ( XrmGetResource( cmddb, disp_name, disp_cls, &type, &xval ) ) fli_print_version( 0 ); /* Get the display name first before doing anything */ fl_snprintf( disp_name, sizeof disp_name, "%s.display", fl_ori_app_name ); fl_snprintf( disp_cls , sizeof disp_cls , "%s.Display", fl_app_class ); *buf = '\0'; if ( XrmGetResource( cmddb, disp_name, disp_cls, &type, &xval ) ) { strncpy( buf, xval.addr, sizeof buf ); buf[ sizeof buf - 1 ] = '\0'; } /* Open display and quit if failure */ if ( ! ( fl_display = XOpenDisplay( buf ) ) ) { /* if no display is set, there is no guarantee that buf is long enough to contain the DISPLAY setting */ M_err( "fl_initialize", "%s: Can't open display %s", fl_argv[ 0 ], XDisplayName( buf[ 0 ] ? buf : 0 ) ); return 0; } flx->display = fl_display; flx->screen = fl_screen; /* Get debug level settings since all error reporting will be controled by it */ fl_snprintf( disp_name, sizeof disp_name, "%s.fldebug", fl_app_name ); fl_snprintf( disp_cls , sizeof disp_cls , "%s.flDebug", fl_app_class ); if ( XrmGetResource( cmddb, disp_name, disp_cls, &type, &xval ) ) fli_set_debug_level( atoi( xval.addr ) ); /* print help */ fl_snprintf( disp_name, sizeof disp_name, "%s.flhelp", fl_app_name ); fl_snprintf( disp_cls , sizeof disp_cls , "%s.flhelp", fl_app_class ); if ( XrmGetResource( cmddb, disp_name, disp_cls, &type, &xval ) ) { size_t i = 0; while ( i < Ncopt ) { if ( i == 0 ) fprintf( stderr, "%s: ", fl_argv[ 0 ] ); else fprintf( stderr, "%*s ", ( int ) strlen( fl_argv[ 0 ] ), "" ); fprintf( stderr, " %s", copt[ i ].option ); if ( copt[ i ].argKind == XrmoptionSepArg ) fprintf( stderr, " \t[arg]" ); fprintf( stderr, "\n" ); i++; } exit(1); } /* Check if -name is present */ fl_snprintf( disp_name, sizeof disp_name, "%s.name", fl_app_name ); fl_snprintf( disp_cls, sizeof disp_cls , "%s.Name", fl_app_class ); M_warn( "fl_initialize", "Trying display %s", disp_name ); if ( XrmGetResource( cmddb, disp_name, disp_cls, &type, &xval ) ) { fl_app_name = fl_strdup( xval.addr ); M_warn( "fl_initialize", "Changed AppName from %s to %s", fl_ori_app_name, fl_app_name ); } /* Merge other resource database */ init_resource_database( fl_app_class ); /* Override any options in the database with the command line opt */ XrmMergeDatabases( cmddb, &fldatabase ); /* Load FL resources */ fli_init_resources( ); fli_cntl.vclass = fl_vclass_val( fli_cntl.vname ); fli_cntl.coordUnit = fli_get_vn_value( vn_coordunit, OpCoordUnit ); if ( fli_cntl.coordUnit == -1 ) fli_cntl.coordUnit = FL_COORD_PIXEL; #if FL_DEBUG >= ML_WARN if ( fli_cntl.debug ) { fprintf( stderr, "Options Set\n" ); DumpD( debug ); fprintf( stderr, "\tVisual:%s (%d)\n", fli_cntl.vclass >= 0 ? fl_vclass_name( fli_cntl.vclass ) : "To be set", fli_cntl.vclass ); DumpD( depth ); DumpD( privateColormap ); DumpD( sharedColormap ); DumpD( standardColormap ); DumpD( doubleBuffer ); DumpD( ulPropWidth ); DumpD( ulThickness ); DumpD( scrollbarType ); DumpD( backingStore ); fprintf( stderr, "\t%s:%s\n", "coordUnit", fli_get_vn_name( vn_coordunit, fli_cntl.coordUnit ) ); fprintf( stderr, "\t%s: 0x%lx\n", "VisualId", fli_requested_vid ); #ifdef DO_GAMMA_CORRECTION DumpF( rgamma ); DumpF( ggamma ); DumpF( bgamma ); #endif } #endif #ifdef DO_GAMMA_CORRECTION fl_set_gamma( fli_cntl.rgamma, fli_cntl.ggamma, fli_cntl.bgamma ); #endif fl_set_ul_property( fli_cntl.ulPropWidth, fli_cntl.ulThickness ); fli_cntl.vclass = fl_vclass_val( fli_cntl.vname ); /* Get the current keyboard state */ { XKeyboardState xks; XGetKeyboardControl( fl_display, &xks ); fli_keybdcontrol.auto_repeat_mode = xks.global_auto_repeat; fli_keybdmask = KBAutoRepeatMode; } /* Other initializations */ fl_screen = flx->screen = DefaultScreen( fl_display ); fl_root = RootWindow( fl_display, fl_screen ); fl_vroot = fli_GetVRoot( fl_display, fl_screen ); fli_wmstuff.pos_request = USPosition; if ( fl_root != fl_vroot ) { M_warn( "fl_initialize", "fl_root = %lu fl_vroot = %lu", fl_root, fl_vroot ); /* tvtwm requires this to position a window relative to the current desktop */ fli_wmstuff.pos_request = PPosition; } fl_scrh = DisplayHeight( fl_display, fl_screen ); fl_scrw = DisplayWidth( fl_display, fl_screen ); xdpi = fl_scrw * 25.4 / DisplayWidthMM( fl_display, fl_screen ); ydpi = fl_scrh * 25.4 / DisplayHeightMM( fl_display, fl_screen ); if ( xdpi / ydpi > 1.05 || ydpi / xdpi < 0.95 ) M_warn( "fl_initialize", "NonSquarePixel %.1f %.1f", xdpi, ydpi ); fli_dpi = ( xdpi + ydpi ) / 2; fli_dpi = ( ( int ) ( fli_dpi * 10.0 + 0.3 ) ) * 0.1; M_info( "fl_initialize", "screen DPI = %f", fli_dpi ); fl_vmode = fli_initialize_program_visual( ); fli_init_colormap( fl_vmode ); fli_init_font( ); fli_init_context( ); #ifdef XlibSpecificationRelease if ( XSupportsLocale( ) ) { XSetLocaleModifiers( "" ); /* Use the same input method throughout xforms */ fli_context->xim = XOpenIM( fl_display, NULL, NULL, NULL ); /* Also use the same input context */ if ( fli_context->xim ) { int style = XIMPreeditNothing | XIMStatusNothing; fli_context->xic = XCreateIC( fli_context->xim, XNInputStyle, style, ( char * ) NULL ); /* Clean-up on failure */ if ( ! fli_context->xic ) { M_err( "fl_initialize", "Could not create an input context" ); XCloseIM( fli_context->xim ); } } else M_err( "fl_initialize", "Could not create an input method" ); } #endif fli_default_xswa( ); fli_init_stipples( ); /* If using non-default visual or private colormap, need a window with correct visual/colormap and depth */ fl_state[ fl_vmode ].trailblazer = fl_root; if ( fli_visual( fl_vmode ) != DefaultVisual( fl_display, fl_screen ) || fl_state[ fl_vmode ].pcm ) { fl_state[ fl_vmode ].trailblazer = fli_create_window( fl_root, fli_colormap( fl_vmode ), "trailblazer" ); } if ( strcmp( OpSCBT, "plain" ) == 0 ) { fli_context->hscb = FL_HOR_PLAIN_SCROLLBAR; fli_context->vscb = FL_VERT_PLAIN_SCROLLBAR; } else if ( strcmp( OpSCBT, "normal" ) == 0 ) { fli_context->hscb = FL_HOR_SCROLLBAR; fli_context->vscb = FL_VERT_SCROLLBAR; } else if ( ! strcmp( OpSCBT, "thin" ) ) { fli_context->hscb = FL_HOR_THIN_SCROLLBAR; fli_context->vscb = FL_VERT_THIN_SCROLLBAR; } else if ( ! strcmp( OpSCBT, "nice" ) ) { fli_context->hscb = FL_HOR_NICE_SCROLLBAR; fli_context->vscb = FL_VERT_NICE_SCROLLBAR; } fli_context->max_request_size = XMaxRequestSize( fl_display ); if ( fli_context->max_request_size < 4096 ) { M_err( "fl_initialize", "Something is wrong with max_request_size: %ld", fli_context->max_request_size ); fli_context->max_request_size = 4096; } #if XlibSpecificationRelease >= 6 fli_context->ext_request_size = XExtendedMaxRequestSize( fl_display ); #else fli_context->ext_request_size = 0; #endif if ( ! fli_context->ext_request_size ) fli_context->ext_request_size = fli_context->max_request_size; fli_context->max_request_size -= 8; fli_context->ext_request_size -= 8; fli_context->tooltip_time = 600; fl_add_io_callback( ConnectionNumber( fl_display ), FL_READ, 0, 0 ); /* has to be here, otherwise fl_add_symbol won't be able to replace the built-in */ fli_init_symbols( ); /* hang the database on the display so application can get it */ XrmSetDatabase( fl_display, fldatabase ); /* Initialize popup system */ fli_popup_init( ); return fl_display; } /*************************************** * Cleanup everything. At the moment, only need to restore the keyboard * settings and deallocate memory used for the object and event queue etc. * This routine is registered as an atexit in fl_initialize in flresource. ***************************************/ void fl_finish( void ) { /* Make sure the connection is alive */ if ( ! flx->display ) return; XChangeKeyboardControl( flx->display, fli_keybdmask, &fli_keybdcontrol ); fl_remove_all_signal_callbacks( ); fl_remove_all_timeouts( ); /* Get rid of all forms, first hide all of them */ while ( fli_int.formnumb > 0 ) fl_hide_form( fli_int.forms[ 0 ] ); /* Now also delete them (to deallocate memory) - problem is that the tooltip form may only be deleted as the very last one since the objects that have a tooltip (and that get deleted in the process of deleting the form they belong to) still try to access the tooltip form */ while ( fli_int.hidden_formnumb > 0 ) { if ( fli_int.hidden_formnumb > 1 && fli_is_tooltip_form( fli_int.forms[ 0 ] ) ) fl_free_form( fli_int.forms[ 1 ] ); else fl_free_form( fli_int.forms[ 0 ] ); } /* Delete the object and event queue */ fli_obj_queue_delete( ); fli_event_queue_delete( ); /* Free memory allocated in xtext.c */ fli_free_xtext_workmem( ); /* Release memory used for symbols */ fli_release_symbols( ); /* Release memory allocated in goodies */ fli_goodies_cleanup( ); /* Release memory allocated for file selectors */ fli_free_fselectors( ); /* Release memory used by the popup system */ fli_popup_finish( ); /* Release memory used for the copy of the command line arguments */ fli_free_cmdline_args( ); /* Release memory used for cursors */ fli_free_cursors( ); /* Free memory used for colormaps */ fli_free_colormap( fl_vmode ); /* Get rid of memory for input methods */ #ifdef XlibSpecificationRelease if ( fli_context && XSupportsLocale( ) && fli_context->xim ) { if ( fli_context->xic ) XDestroyIC( fli_context->xic ); XCloseIM( fli_context->xim ); } #endif fl_safe_free( fli_context ); /* Close the display */ XCloseDisplay( flx->display ); flx->display = fl_display = None; } /*************************************** * Find out about virtual root. Taken from XFaq ***************************************/ #include static Window fli_GetVRoot( Display * dpy, int scr ) { Window rootReturn; Window parentReturn; Window *children; unsigned int numChildren; Window root = RootWindow( dpy, scr ); Atom __SWM_VROOT = None; unsigned int i; __SWM_VROOT = XInternAtom( dpy, "__SWM_VROOT", False ); XQueryTree( dpy, root, &rootReturn, &parentReturn, &children, &numChildren ); for ( i = 0; i < numChildren; i++ ) { Atom actual_type; int actual_format; unsigned long nitems, bytesafter; Window *newRoot = NULL; /* Kludge here: the ( void * ) bit in ( unsigned char ** ) ( void * ) &newRoot is there to avoid a spurious GCC warning JTT */ if ( XGetWindowProperty( dpy, children[ i ], __SWM_VROOT, 0, 1, False, XA_WINDOW, &actual_type, &actual_format, &nitems, &bytesafter, ( unsigned char ** ) ( void * ) &newRoot ) == Success && newRoot ) { root = *newRoot; break; } } XFree( ( char * ) children ); return root; } /*************************************** * For Application programs ***************************************/ static void fli_get_app_resource( FL_resource * appresource, int n ) { FL_resource *flr = appresource, *flrs = flr + n; for ( ; flr < flrs; flr++ ) if ( flr->type == FL_STRING && flr->nbytes == 0 ) M_err( "fl_get_app_resources", "%s: buflen == 0", flr->res_name ); else fl_get_resource( flr->res_name, flr->res_class, flr->type, flr->defval, flr->var, flr->nbytes ); } /*************************************** ***************************************/ void fl_get_app_resources( FL_resource * appresource, int n ) { char *tmp = fl_app_name; fl_app_name = fl_ori_app_name; fli_get_app_resource( appresource, n ); if ( fl_app_name != tmp ) { fl_app_name = tmp; fli_get_app_resource( appresource, n ); } } /*************************************** ***************************************/ void fl_flip_yorigin( void ) { if ( ! fl_display ) fli_inverted_y = 1; else M_err( "fl_flip_yorigin", "Only supported before fl_initialize" ); } /*************************************** ***************************************/ void fli_set_app_name( const char * n, const char * c ) { if ( n ) fl_app_name = fl_strdup( n ); if ( c ) fl_app_class = fl_strdup( c ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/dial.c0000644000175000017500000003500011316735076014060 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file dial.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Default 0 is at 6 oclock and clock-wise is positive. */ #define SIX_OCLOCK 1 #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pdial.h" #include #include #include #ifndef M_PI #define M_PI 3.14159265359 #endif static double xo, yo; /*************************************** ***************************************/ static void rotate_it( FL_POINT * xp, double x, double y, double a ) { double sina = sin( a ); double cosa = cos( a ); xp->x = FL_crnd( xo + ( x - xo ) * cosa + ( y - yo ) * sina ); xp->y = FL_crnd( yo - ( x - xo ) * sina + ( y - yo ) * cosa ); } /*************************************** * Draws a dial ***************************************/ static void draw_dial( FL_OBJECT * ob ) { FL_Coord x, y, w, h, radius; double dangle; FLI_DIAL_SPEC *sp = ob->spec; FL_POINT xp[ 5 ]; /* need one extra for closing of polygon! */ int boxtype, iradius; /* Since rotate_it() always does the rotation in the math way, i.e. 0 at three o'clock and CCW, need to translate the current theta into that coordiante system */ dangle = ( sp->val - sp->b ) / sp->a; if ( sp->direction == FL_DIAL_CW ) dangle = sp->origin - dangle; else dangle += sp->origin; if ( ( dangle = fmod( dangle, 360.0 ) ) < 0.0 ) dangle += 360.0; dangle *= M_PI / 180.0; w = ob->w - 3; h = ob->h - 3; x = xo = ob->x + ob->w / 2; y = yo = ob->y + ob->h / 2; if ( FL_IS_UPBOX( ob->boxtype ) ) boxtype = FL_OVAL3D_UPBOX; else if ( FL_IS_DOWNBOX( ob->boxtype ) ) boxtype = FL_OVAL3D_DOWNBOX; else if ( ob->boxtype == FL_FRAME_BOX ) boxtype = FL_OVAL3D_FRAMEBOX; else if ( ob->boxtype == FL_EMBOSSED_BOX ) boxtype = FL_OVAL3D_EMBOSSEDBOX; else boxtype = FL_OVAL_BOX; /* the dial itself */ radius = 0.5 * FL_min( w, h ); iradius = radius - 1; /* internal radius */ fl_drw_box( boxtype, x - radius, y - radius, 2 * radius, 2 * radius, ob->col1, ob->bw ); /* the "hand" */ if ( ob->type == FL_NORMAL_DIAL ) { FL_Coord r; r = FL_min( 0.5 * iradius, 15 ); rotate_it( xp, x + iradius - 1, y - 2, dangle ); rotate_it( xp + 1, x + iradius - 1 - r, y - 2, dangle ); rotate_it( xp + 2, x + iradius - 1 - r, y + 2, dangle ); rotate_it( xp + 3, x + iradius - 1, y + 2, dangle ); fl_polyf( xp, 4, ob->col2 ); } else if ( ob->type == FL_LINE_DIAL ) { double dx = 0.1 + 0.08 * iradius, dy = 0.1 + 0.08 * iradius; rotate_it( xp, x, y, dangle ); rotate_it( xp + 1, x + dx, y - dy, dangle ); rotate_it( xp + 2, x + iradius - 2, y, dangle ); rotate_it( xp + 3, x + dx, y + dy, dangle ); fl_polybound( xp, 4, ob->col2 ); } else if ( ob->type == FL_FILL_DIAL ) { double ti, delta; delta = ( sp->val - sp->b ) / sp->a; delta = FL_abs( sp->thetai - delta ); delta = sp->direction == FL_DIAL_CW ? -delta : delta; iradius -= boxtype != FL_OVAL_BOX; if ( sp->direction == FL_DIAL_CCW ) ti = sp->thetai + sp->origin; else ti = sp->origin - sp->thetai; if ( ( ti = fmod( ti, 360.0 ) ) < 0.0 ) ti += 360.0; fl_ovalarc( 1, xo - iradius, yo - iradius, 2 * iradius, 2 * iradius, ti * 10, delta * 10, ob->col2 ); rotate_it( xp, xo + iradius - 1, yo, dangle ); rotate_it( xp + 1, xo + iradius - 1, yo, ti * M_PI / 180.0 ); fl_simple_line( FL_crnd( xo ), FL_crnd( yo ), xp[ 0 ].x, xp[ 0 ].y, FL_BLACK ); fl_simple_line( FL_crnd( xo ), FL_crnd( yo ), xp[ 1 ].x, xp[ 1 ].y, FL_BLACK ); if ( boxtype == FL_OVAL_BOX ) fl_circ( x, y, iradius, FL_BLACK ); } else M_err( "draw_dial", "Bad type" ); fl_drw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); } /*************************************** * Handle a mouse position change ***************************************/ static int handle_mouse( FL_OBJECT * ob, FL_Coord mousex, FL_Coord mousey ) { FLI_DIAL_SPEC *sp = ob->spec; double oldv, val, olda; double mx, my, angle, range = sp->max - sp->min; oldv = sp->val; olda = ( oldv - sp->b ) / sp->a; /* convert to sane FL_coordinate system, i.e., +y up */ mx = mousex - ( ob->x + ob->w * 0.5 ); my = - mousey + ( ob->y + ob->h * 0.5 ); /* Don't react to clicks very close to center */ if ( fabs( mx ) < 2 && fabs( my ) < 2 ) return FL_RETURN_NONE; /* Get angle and normalize to [0, 2 * PI] */ angle = atan2( my, mx ) * 180.0 / M_PI; if ( sp->direction == FL_DIAL_CW ) angle = sp->origin - angle; else angle -= sp->origin; if ( ( angle = fmod( angle, 360.0 ) ) < 0.0 ) angle += 360.0; val = fli_clamp( sp->a * angle + sp->b, sp->min, sp->max ); /* Check if crossed boundary. Fix it if it did. Fixing is necessary otherwise might be unable to reach thetaf(360) */ if ( ! sp->cross_over && fabs( oldv - val ) > 0.6 * range ) { if ( fabs( olda - sp->thetai ) < fabs( olda - sp->thetaf ) ) angle = sp->thetai; else angle = sp->thetaf; val = sp->a * angle + sp->b; } if ( sp->step != 0.0 ) val = ( int ) ( val / sp->step + 0.5 ) * sp->step; /* Allow a resolution of about 0.2 degrees */ if ( fabs( val - oldv ) > range / 1800.0 ) { sp->val = val; fl_redraw_object( ob ); return FL_RETURN_CHANGED; } return FL_RETURN_NONE; } /*************************************** * Function for handling mouse wheel input ***************************************/ static int handle_mouse_wheel( FL_OBJECT * ob, XEvent * xev, int key ) { FLI_DIAL_SPEC *sp = ob->spec; double val, step, oldv = sp->val, range = sp->max - sp->min; if ( key != FL_MBUTTON4 && key != FL_MBUTTON5 ) return FL_RETURN_NONE; step = sp->step > 0.0 ? 10.0 * sp->step : 0.1 * range; if ( shiftkey_down( ( ( XButtonEvent * ) xev )->state ) ) step *= 0.1; else if ( controlkey_down( ( ( XButtonEvent * ) xev )->state ) ) step *= 2.5; if ( sp->direction == FL_DIAL_CW ) step = key == FL_MBUTTON4 ? - step : step; else step = key == FL_MBUTTON4 ? step : - step; val = sp->val + step; if ( sp->cross_over ) { while ( val > sp->max ) val -= range; while ( val < sp->min ) val += range; } else { if ( val > sp->max ) val = sp->max; else if ( val < sp->min ) val = sp->min; } if ( val != oldv ) { sp->val = val; fl_redraw_object( ob ); return FL_RETURN_CHANGED; } return FL_RETURN_NONE; } /*************************************** * Handles an event ***************************************/ static int handle_dial( FL_OBJECT * obj, int event, FL_Coord mx, FL_Coord my, int key FL_UNUSED_ARG, void * ev ) { FLI_DIAL_SPEC *sp = obj->spec; int ret = FL_RETURN_NONE; switch ( event ) { case FL_DRAW: draw_dial( obj ); break; case FL_DRAWLABEL: fl_drw_text_beside( obj->align, obj->x, obj->y, obj->w, obj->h, obj->lcol, obj->lstyle, obj->lsize, obj->label ); break; case FL_PUSH: if ( key != FL_MBUTTON1 ) break; sp->start_val = sp->val; /* fall through */ case FL_MOTION: if ( key != FL_MBUTTON1 ) break; if ( ( ret = handle_mouse( obj, mx, my ) ) && ! ( obj->how_return & FL_RETURN_END_CHANGED ) ) sp->start_val = sp->val; break; case FL_RELEASE: if ( key == FL_MBUTTON2 || key == FL_MBUTTON3 ) break; ret = handle_mouse_wheel( obj, ev, key ) | FL_RETURN_END; if ( sp->start_val != sp->val ) ret |= FL_RETURN_CHANGED; break; case FL_FREEMEM: fl_free( obj->spec ); break; } return ret; } /*************************************** ***************************************/ static void get_mapping( FLI_DIAL_SPEC *sp ) { sp->a = ( sp->max - sp->min ) / ( sp->thetaf - sp->thetai ); sp->b = sp->max - sp->a * sp->thetaf; } /*************************************** * creates an object ***************************************/ FL_OBJECT * fl_create_dial( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_DIAL_SPEC *sp; ob = fl_make_object( FL_DIAL, type, x, y, w, h, label, handle_dial ); ob->col1 = FL_DIAL_COL1; ob->col2 = FL_DIAL_COL2; ob->align = FL_DIAL_ALIGN; ob->lcol = FL_DIAL_LCOL; ob->boxtype = FL_DIAL_BOXTYPE; ob->spec = sp = fl_calloc( 1, sizeof *sp ); sp->min = 0.0; sp->max = 1.0; sp->val = 0.5; sp->step = 0.0; sp->thetai = 0.0; sp->thetaf = 360.0; sp->origin = 270.0; sp->direction = FL_DIAL_CW; get_mapping( sp ); return ob; } /*************************************** * Add an object ***************************************/ FL_OBJECT * fl_add_dial( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_dial( type, x, y, w, h, label ); /* Set default return policy for the object */ fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fl_add_object( fl_current_form, obj ); fl_set_object_dblbuffer( obj, 1 ); return obj; } /*************************************** ***************************************/ void fl_set_dial_value( FL_OBJECT * ob, double val ) { FLI_DIAL_SPEC *sp = ob->spec; if ( sp->val != val ) { sp->val = sp->start_val = val; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_dial_bounds( FL_OBJECT * ob, double min, double max ) { FLI_DIAL_SPEC *sp = ob->spec; if ( sp->min != min || sp->max != max ) { sp->min = min; sp->max = max; get_mapping( sp ); sp->val = fli_clamp( sp->val, sp->min, sp->max ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_dial_angles( FL_OBJECT * ob, double amin, double amax ) { FLI_DIAL_SPEC *sp = ob->spec; if ( ( amin = fmod( amin, 360.0 ) ) < 0.0 ) amin += 360.0; if ( ( amax = fmod( amax, 360.0 ) ) < 0.0 ) amax += 360.0; if ( sp->thetaf != amax || sp->thetai != amin ) { sp->thetaf = amax; sp->thetai = amin; get_mapping( sp ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_dial_cross( FL_OBJECT * ob, int flag ) { ( ( FLI_DIAL_SPEC * ) ob->spec )->cross_over = flag; } /*************************************** ***************************************/ double fl_get_dial_value( FL_OBJECT * ob ) { return ( ( FLI_DIAL_SPEC * ) ob->spec )->val; } /*************************************** ***************************************/ void fl_get_dial_bounds( FL_OBJECT * ob, double * min, double * max ) { *min = ( ( FLI_DIAL_SPEC * ) ob->spec )->min; *max = ( ( FLI_DIAL_SPEC * ) ob->spec )->max; } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function should be regarded as deprecated and * fl_set_object_return() should be used instead. ***************************************/ void fl_set_dial_return( FL_OBJECT * obj, unsigned int when ) { fl_set_object_return( obj, when ); } /*************************************** * Sets the step size to which values are rounded. ***************************************/ void fl_set_dial_step( FL_OBJECT * ob, double value ) { ( ( FLI_DIAL_SPEC * ) ob->spec )->step = value; } /*************************************** ***************************************/ void fl_set_dial_direction( FL_OBJECT * ob, int dir ) { FLI_DIAL_SPEC *sp = ob->spec; if ( sp->direction != dir ) { sp->direction = dir; get_mapping( sp ); fl_redraw_object( ob ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/goodie_choice.c0000644000175000017500000001657411311775307015742 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file goodie_choice.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" /****************** Make a choice ***********************{**/ typedef struct { FL_FORM * form; FL_OBJECT * str; FL_OBJECT * but[ 3 ]; const char * sc[ 3 ]; } FD_choice; static FD_choice *fd_choice; static int default_choice; /*************************************** ***************************************/ static FD_choice * create_choice( void ) { FD_choice *fdui = fl_malloc( sizeof *fdui ); int oldy = fli_inverted_y; int oldu = fl_get_coordunit(); fli_inverted_y = 0; fl_set_coordunit( FL_COORD_PIXEL ); fdui->form = fl_bgn_form( FL_UP_BOX, 460, 130 ); fl_set_form_title( fdui->form, "Choice" ); fdui->str = fl_add_box( FL_FLAT_BOX, 20, 15, 420, 65, "" ); fdui->but[ 0 ] = fl_add_button( FL_NORMAL_BUTTON, 40, 93, 90, 27, "" ); fdui->but[ 1 ] = fl_add_button( FL_NORMAL_BUTTON, 185, 93, 90, 27, "" ); fdui->but[ 2 ] = fl_add_button( FL_NORMAL_BUTTON, 330, 93, 90, 27, "" ); fdui->sc[ 0 ] = fl_strdup( "1" ); fdui->sc[ 1 ] = fl_strdup( "2" ); fdui->sc[ 2 ] = fl_strdup( "3" ); fl_end_form( ); fli_inverted_y = oldy; fl_set_coordunit( oldu ); return fdui; } /*************************************** ***************************************/ int fl_show_choices( const char * msg, int numb, const char * c0, const char * c1, const char * c2, int def ) { FL_OBJECT *retobj; const char *c[ ] = { c0, c1, c2 }; int i; if ( ! fd_choice ) fd_choice = create_choice( ); fli_handle_goodie_font( fd_choice->but[ 0 ], fd_choice->but[ 1 ] ); fli_handle_goodie_font( fd_choice->but[ 2 ], fd_choice->str ); fl_set_object_label( fd_choice->str, msg ); fl_hide_object( fd_choice->but[ 0 ] ); fl_hide_object( fd_choice->but[ 1 ] ); fl_hide_object( fd_choice->but[ 2 ] ); default_choice = def; switch ( numb ) { case 3: for ( i = 0; i < 3; i++ ) { fl_set_object_label( fd_choice->but[ i ], c[ i ] ); fl_set_object_shortcut( fd_choice->but[ i ], fd_choice->sc[ i ], 1 ); fl_show_object( fd_choice->but[ i ] ); fl_fit_object_label( fd_choice->but[ i ], 1, 1 ); } break; case 2: /* pick button 0 and 2 */ fl_set_object_label( fd_choice->but[ 0 ], c[ 0 ] ); fl_set_object_shortcut( fd_choice->but[ 0 ], fd_choice->sc[ 0 ], 1 ); fl_show_object( fd_choice->but[ 0 ] ); fl_fit_object_label( fd_choice->but[ 0 ], 1, 1 ); fl_set_object_label( fd_choice->but[ 2 ], c[ 1 ] ); fl_set_object_shortcut( fd_choice->but[ 2 ], fd_choice->sc[ 2 ], 1 ); fl_show_object( fd_choice->but[ 2 ] ); fl_fit_object_label( fd_choice->but[ 2 ], 1, 1 ); break; case 1: fl_set_object_label( fd_choice->but[ 0 ], c[ 0 ] ); fl_set_object_shortcut( fd_choice->but[ 0 ], fd_choice->sc[ 0 ], 1 ); fl_show_object( fd_choice->but[ 0 ] ); fl_fit_object_label( fd_choice->but[ 0 ], 1, 1 ); break; default: return 0; } fli_get_goodie_title( fd_choice->form, FLChoiceTitle ); if ( ! fd_choice->form->visible ) fl_deactivate_all_forms( ); if ( def > 0 && def <= 3 ) fl_set_form_hotobject( fd_choice->form, fd_choice->but[ def - 1 ] ); else fl_set_form_hotspot( fd_choice->form, -1, -1 ); fl_show_form( fd_choice->form, FL_PLACE_HOTSPOT, FL_TRANSIENT, fd_choice->form->label ); fl_update_display( 0 ); retobj = fl_do_only_forms( ); fl_hide_form( fd_choice->form ); fl_activate_all_forms( ); return retobj == fd_choice->but[ 0 ] ? 1 : ( ( retobj == fd_choice->but[ 1 ] || numb == 2 ) ? 2 : 3); } /*************************************** ***************************************/ int fl_show_choice( const char * m1, const char * m2, const char * m3, int numb, const char * c1, const char * c2, const char * c3, int def ) { char *buf; size_t len; int ret; len = ( m1 ? strlen( m1 ) : 0 ) + 1 + ( m2 ? strlen( m2 ) : 0 ) + 1 + ( m3 ? strlen( m3 ) : 0 ) + 1; if ( len == 3 ) { M_warn( "fl_show_choice", "Only NULL or empty strings" ); return 0; } buf = fl_malloc( len ); sprintf( buf, "%s\n%s\n%s", m1 ? m1 : "", m2 ? m2 : "", m3 ? m3 : "" ); ret = fl_show_choices( buf, numb, c1, c2, c3, def ); fl_free( buf ); return ret; } /*************************************** ***************************************/ void fl_set_choices_shortcut( const char * a, const char * b, const char * c ) { if ( ! fd_choice ) fd_choice = create_choice( ); if ( fd_choice->sc[ 0 ] ) fl_free( ( char * ) fd_choice->sc[ 0 ] ); fd_choice->sc[ 0 ] = ( a && *a ) ? fl_strdup( a ) : NULL; if ( fd_choice->sc[ 1 ] ) fl_free( ( char * ) fd_choice->sc[ 1 ] ); fd_choice->sc[ 1 ] = ( b && *b ) ? fl_strdup( b ) : NULL; if ( fd_choice->sc[ 2 ] ) fl_free( ( char * ) fd_choice->sc[ 2 ] ); fd_choice->sc[ 2 ] = ( c && *c ) ? fl_strdup( c ) : NULL; } /*************************************** ***************************************/ void fl_hide_choice( void ) { if ( fd_choice && fd_choice->form->visible ) { if ( default_choice <= 0 || default_choice > 3 ) default_choice = 1; fl_trigger_object( fd_choice->but[ default_choice ] ); } } /*************************************** ***************************************/ void fli_choice_cleanup( void ) { if ( ! fd_choice ) return; if ( fd_choice->sc[ 0 ] ) fl_free( ( char * ) fd_choice->sc[ 0 ] ); if ( fd_choice->sc[ 1 ] ) fl_free( ( char * ) fd_choice->sc[ 1 ] ); if ( fd_choice->sc[ 2 ] ) fl_free( ( char * ) fd_choice->sc[ 2 ] ); fl_safe_free( fd_choice ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/xdraw.c0000644000175000017500000004614111247055071014275 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file xdraw.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Basic low level drawing routines in Xlib. * * BUGS: All form window share a common GC and Colormap. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" static int fli_mono_dither( unsigned long ); static void fli_set_current_gc( GC ); static GC dithered_gc; /******************************************************************* * * Rectangle routines * ****************************************************************{**/ /*************************************** * General rectangle routine ***************************************/ void fl_rectangle( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ) { int bw = fli_dithered( fl_vmode ) && fli_mono_dither( col ); GC gc = flx->gc; int ( * draw_as )( Display *, Drawable, GC, int, int, unsigned int, unsigned int ); if ( flx->win == None || w <= 0 || h <= 0 ) return; fli_canonicalize_rect( &x, &y, &w, &h ); draw_as = fill ? XFillRectangle : XDrawRectangle; if ( bw && fill ) { fli_set_current_gc( fli_whitegc ); draw_as( flx->display, flx->win, flx->gc, x, y, w, h ); fli_set_current_gc( dithered_gc ); } fl_color( bw ? FL_BLACK : col ); draw_as( flx->display, flx->win, flx->gc, x, y, w, h ); if ( bw ) fli_set_current_gc( gc ); } /****** End of rectangle routines ***********************}***/ /**************************************************************** * * Polygon and polylines * ***********************************************************{****/ /*************************************** * xp must have n + 1 elements !!! ***************************************/ void fl_polygon( int fill, FL_POINT * xp, int n, FL_COLOR col ) { int bw = fli_dithered( fl_vmode ) && fli_mono_dither( col ); GC gc = flx->gc; if ( flx->win == None || n <= 0 ) return; if ( bw ) { flx->gc = dithered_gc; fl_color( FL_WHITE ); if ( fill ) XFillPolygon( flx->display, flx->win, flx->gc, xp, n, Nonconvex, CoordModeOrigin ); else { xp[ n ].x = xp[ 0 ].x; xp[ n ].y = xp[ 0 ].y; n++; XDrawLines( flx->display, flx->win, flx->gc, xp, n, CoordModeOrigin ); } } fl_color( bw ? FL_BLACK : col ); if ( fill ) XFillPolygon( flx->display, flx->win, flx->gc, xp, n, Nonconvex, CoordModeOrigin ); else { xp[ n ].x = xp[ 0 ].x; xp[ n ].y = xp[ 0 ].y; n++; XDrawLines( flx->display, flx->win, flx->gc, xp, n, CoordModeOrigin ); } if ( bw ) flx->gc = gc; } /****************** End of polygons *******************}********/ /**************************************************************** * * Ellipse * **********************************************************{******/ void fl_oval( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ) { int bw = fli_dithered( fl_vmode ) && fli_mono_dither( col ); GC gc = flx->gc; int ( * draw_as )( Display *, Drawable, GC, int, int, unsigned int, unsigned int, int, int ); if ( flx->win == None || w <= 0 || h <= 0 ) return; draw_as = fill ? XFillArc : XDrawArc; if ( bw ) { fli_set_current_gc( fli_whitegc ); draw_as( flx->display, flx->win, flx->gc, x, y, w, h, 0, 360 * 64 ); fli_set_current_gc( dithered_gc ); } fl_color( bw ? FL_BLACK : col ); if ( w >= 0 && h >= 0 ) draw_as( flx->display, flx->win, flx->gc, x, y, w, h, 0, 360 * 64 ); if ( bw ) fli_set_current_gc( gc ); } /*************************************** ***************************************/ void fl_ovalbound( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ) { if ( flx->win == None || w <= 0 || h <= 0 ) return; fl_color( col ); XFillArc( flx->display, flx->win, flx->gc, x, y, w, h, 0, 360 * 64 ); fl_color( FL_BLACK ); XDrawArc( flx->display, flx->win, flx->gc, x, y, w - 1, h - 1, 0, 360 * 64 ); } /******* End of ellipse routines ****************}***********/ /**************************************************************** * * Arcs ****************************************************************/ /*************************************** ***************************************/ void fl_ovalarc( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int t0, int dt, FL_COLOR col ) { int mono = fli_dithered( fl_vmode ) && fli_mono_dither( col ); int ( * draw_as )( Display *, Drawable, GC, int, int, unsigned int, unsigned int, int, int ); if ( flx->win == None || w <= 0 || h <= 0 ) return; draw_as = fill ? XFillArc : XDrawArc; if ( mono ) { fli_set_current_gc( fli_whitegc ); draw_as( flx->display, flx->win, flx->gc, x, y, w, h, t0 * 6.4, dt * 6.4 ); fli_set_current_gc( dithered_gc ); } fl_color( mono ? FL_BLACK : col ); if ( w >= 0 && h >= 0 ) draw_as( flx->display, flx->win, flx->gc, x, y, w, h, t0 * 6.4, dt * 6.4 ); if ( mono ) fli_set_current_gc( fl_state[ fl_vmode ].gc[ 0 ] ); } /*************************************** ***************************************/ void fl_pieslice( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int a1, int a2, FL_COLOR col ) { int delta = a2 - a1, bw = fli_dithered( fl_vmode ) && fli_mono_dither( col ); GC gc = flx->gc; int ( * draw_as )( Display *, Drawable, GC, int, int, unsigned int, unsigned int, int, int ); if ( flx->win == None || w <= 0 || h <= 0) return; draw_as = fill ? XFillArc : XDrawArc; if ( bw ) { fli_set_current_gc( fli_whitegc ); draw_as( flx->display, flx->win, flx->gc, x, y, w, h, a1 * 6.4, delta * 6.4 ); fli_set_current_gc( dithered_gc ); } fl_color( bw ? FL_BLACK : col ); if ( w >= 0 && h >= 0 ) draw_as( flx->display, flx->win, flx->gc, x, y, w, h, a1 * 6.4, delta * 6.4 ); if ( bw ) fli_set_current_gc( gc ); } /********************************************************************* * Line segments *****************************************************************{***/ /*************************************** ***************************************/ void fl_lines( FL_POINT * xp, int n, FL_COLOR col ) { if ( flx->win == None || n <= 0 ) return; fl_color( col ); /* we may need to break up the request into smaller pieces */ if ( fli_context->ext_request_size >= n ) XDrawLines( flx->display, flx->win, flx->gc, xp, n, CoordModeOrigin ); else { int req = fli_context->ext_request_size; int i, nchunks = ( n + ( n / req ) ) / req, left; FL_POINT *p = xp; for ( i = 0; i < nchunks; i++, p += req - 1 ) XDrawLines( flx->display, flx->win, flx->gc, p, req, CoordModeOrigin ); left = xp + n - p; if ( left ) { if ( left == 1 ) { p--; left++; } XDrawLines( flx->display, flx->win, flx->gc, p, left, CoordModeOrigin ); } } } /*************************************** * simple line (x1,y1) (x2,y2) ***************************************/ void fl_line( FL_Coord xi, FL_Coord yi, FL_Coord xf, FL_Coord yf, FL_COLOR c ) { if ( flx->win == None ) return; fl_color( c ); XDrawLine( flx->display, flx->win, flx->gc, xi, yi, xf, yf ); } /**************** End of line segments *******************}*********/ /* points */ /*************************************** ***************************************/ void fl_point( FL_Coord x, FL_Coord y, FL_COLOR c ) { if ( flx->win == None ) return; fl_color( c ); XDrawPoint( flx->display, flx->win, flx->gc, x, y ); } /*************************************** ***************************************/ void fl_points( FL_POINT * p, int np, FL_COLOR c ) { if ( flx->win == None || np <= 0 ) return; fl_color( c ); XDrawPoints( flx->display, flx->win, flx->gc, p, np, CoordModeOrigin ); } /******************************************************************** * Basic drawing attributes ****************************************************************{*/ static int lw = 0, ls = LineSolid, drmode = GXcopy; /*************************************** ***************************************/ void fl_linewidth( int n ) { XGCValues gcvalue; unsigned long gcmask; if ( lw == n ) return; gcmask = GCLineWidth; gcvalue.line_width = lw = n; XChangeGC( flx->display, flx->gc, gcmask, &gcvalue ); } /*************************************** ***************************************/ int fl_get_linewidth( void ) { return lw; } static void fli_xdashedlinestyle( Display *, GC, const char *, int ); /*************************************** ***************************************/ void fli_xlinestyle( Display * d, GC gc, int n ) { static char dots[ ] = { 2, 4 }; static char dotdash[ ] = { 7, 3, 2, 3 }; static char ldash[ ] = { 10, 4 }; XGCValues gcvalue; unsigned long gcmask; if ( ls == n ) return; ls = n; gcmask = GCLineStyle; if ( n == FL_DOT ) fli_xdashedlinestyle( d, gc, dots, 2 ); else if ( n == FL_DOTDASH ) fli_xdashedlinestyle( d, gc, dotdash, 4 ); else if ( n == FL_LONGDASH ) fli_xdashedlinestyle( d, gc, ldash, 2 ); if ( n > LineDoubleDash ) n = LineOnOffDash; gcvalue.line_style = n; XChangeGC( d, gc, gcmask, &gcvalue ); } /*************************************** ***************************************/ void fl_linestyle( int n ) { fli_xlinestyle( flx->display, flx->gc, n ); } /*************************************** ***************************************/ int fl_get_linestyle( void ) { return ls; } /*************************************** ***************************************/ int fl_get_drawmode( void ) { return drmode; } /*************************************** ***************************************/ void fl_drawmode( int request ) { if ( drmode != request ) XSetFunction( flx->display, flx->gc, drmode = request ); } /*************************************** ***************************************/ static void fli_xdashedlinestyle( Display * d, GC gc, const char * dash, int ndash ) { static char default_dash[ ] = { 4, 4 }; if ( dash == NULL ) { dash = default_dash; ndash = 2; } XSetDashes( d, gc, 0, ( char * ) dash, ndash ); } /*************************************** ***************************************/ void fl_dashedlinestyle( const char * dash, int ndash ) { static char default_dash[ ] = { 4, 4 }; if ( dash == NULL ) { dash = default_dash; ndash = 2; } XSetDashes( flx->display, flx->gc, 0, ( char * ) dash, ndash ); } /************************************************************************ * Clipping stuff ***********************************************************************/ /* * Remember global clipping so unset_clipping will restore it. Most * useful as part of event dispatching */ XRectangle fli_perm_xcr; int fli_perm_clip; static FL_RECT cur_clip; /* not includng perm clip, probably should */ /*************************************** ***************************************/ void fli_set_perm_clipping( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { fli_perm_clip = 1; fli_perm_xcr.x = x; fli_perm_xcr.y = y; fli_perm_xcr.width = w; fli_perm_xcr.height = h; } /*************************************** ***************************************/ void fli_unset_perm_clipping( void ) { fli_perm_clip = 0; } /*************************************** ***************************************/ void fl_set_clipping( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { cur_clip.x = x; cur_clip.y = y; cur_clip.width = w; cur_clip.height = h; if ( w > 0 && h > 0 ) XSetClipRectangles( flx->display, flx->gc, 0, 0, &cur_clip, 1, Unsorted ); else XSetClipMask( flx->display, flx->gc, None ); } /*************************************** ***************************************/ void fl_set_text_clipping( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { fl_set_gc_clipping( flx->textgc, x, y, w, h ); } /*************************************** ***************************************/ void fl_unset_text_clipping( void ) { fl_unset_gc_clipping( flx->textgc ); } /*************************************** ***************************************/ void fli_get_clipping( FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ) { *x = cur_clip.x; *y = cur_clip.y; *w = cur_clip.width; *h = cur_clip.height; } /*************************************** ***************************************/ void fli_set_additional_clipping( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { FL_RECT rect[ 2 ], *r; rect[ 0 ] = cur_clip; rect[ 1 ].x = x; rect[ 1 ].y = y; rect[ 1 ].width = w; rect[ 1 ].height = h; r = fli_union_rect( rect, rect + 1 ); if ( r != NULL ) { XSetClipRectangles( flx->display, flx->gc, 0, 0, r, 1, Unsorted ); fl_free( r ); } } /*************************************** ***************************************/ void fl_set_gc_clipping( GC gc, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { XRectangle xrect; xrect.x = x; xrect.y = y; xrect.width = w; xrect.height = h; XSetClipRectangles( flx->display, gc, 0, 0, &xrect, 1, Unsorted ); } /*************************************** ***************************************/ void fl_set_clippings( FL_RECT * xrect, int n ) { XSetClipRectangles( flx->display, flx->gc, 0, 0, xrect, n, Unsorted ); } /*************************************** ***************************************/ void fl_unset_clipping( void ) { if ( ! fli_perm_clip ) { XSetClipMask( flx->display, flx->gc, None ); cur_clip.x = cur_clip.y = cur_clip.width = cur_clip.height = 0; } else { XSetClipRectangles( flx->display, flx->gc, 0, 0, &fli_perm_xcr, 1, Unsorted ); cur_clip = fli_perm_xcr; } } /*************************************** ***************************************/ void fl_unset_gc_clipping( GC gc ) { if ( ! fli_perm_clip ) XSetClipMask( flx->display, gc, None ); else XSetClipRectangles( flx->display, gc, 0, 0, &fli_perm_xcr, 1, Unsorted ); } /*************************************** ***************************************/ static void fli_set_current_gc( GC gc ) { if ( flx->gc != gc ) { flx->gc = gc; flx->color = FL_NoColor; } } /*************************************** * manually dither non-gray scale colors by changing default GC. Grayscales * are typically used in buttons, boxes etc, better not to dither them ***************************************/ static int fli_mono_dither( unsigned long col ) { int bwtrick = 0; switch ( col ) { case FL_RED: case FL_MAGENTA: case FL_SLATEBLUE: case FL_PALEGREEN: case FL_DARKGOLD: case FL_INACTIVE_COL: dithered_gc = fli_bwgc[ 1 ]; bwtrick = 1; break; case FL_YELLOW: case FL_CYAN: case FL_INDIANRED: case FL_GREEN: dithered_gc = fli_bwgc[ 2 ]; bwtrick = 1; break; case FL_BLUE: dithered_gc = fli_bwgc[ 0 ]; bwtrick = 1; break; default: if ( col >= FL_FREE_COL1 ) { int r, g, b; fl_get_icm_color( col, &r, &g, &b ); if ( ( bwtrick = ( r > 70 && r <= 210 ) ) ) dithered_gc = fli_bwgc[ r / 70 - 1 ]; } break; } return bwtrick; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/spinner.c0000644000175000017500000004410711376513325014632 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pspinner.h" #include #include #include static void set_spinner_return( FL_OBJECT *, unsigned int ); /*************************************** * This function got to be called before a redraw, at least if * the form the spinner belongs to has been resized or proper- * ties of the spinner have been changed. It calculates the * new positions and sizes of the objectes the spinner widget * is made up from. ***************************************/ static void set_geom( FL_OBJECT * obj ) { FLI_SPINNER_SPEC *sp = obj->spec; FL_Coord bwh; if ( obj->w >= obj->h ) { bwh = obj->h / 2; bwh = FL_max( bwh, 1 ); obj->h = 2 * bwh; sp->input->x = obj->x; sp->input->y = obj->y; sp->input->w = obj->w - bwh - 1; sp->input->h = obj->h; sp->up->x = sp->down->x = obj->x + obj->w - bwh - 1; sp->up->y = obj->y; sp->down->y = obj->y + bwh; sp->up->w = sp->up->h = sp->down->w = sp->down->h = bwh; if ( sp->orient == 1 ) { sp->orient = 0; fl_set_object_label( sp->up, "@8>" ); fl_set_object_label( sp->down, "@2>" ); } } else { bwh = obj->w / 2; bwh = FL_max( bwh, 1 ); obj->w = sp->input->w = 2 * bwh; sp->input->x = obj->x; sp->input->y = obj->y; sp->input->w = obj->w; sp->input->h = obj->h - bwh - 1; sp->up->y = sp->down->y = obj->y + obj->h - bwh - 1; sp->up->x = obj->x + bwh; sp->down->x = obj->x; sp->up->w = sp->up->h = sp->down->w = sp->down->h = bwh; if ( sp->orient == 0 ) { sp->orient = 1; fl_set_object_label( sp->up, "@6>" ); fl_set_object_label( sp->down, "@4>" ); } } /* Also avoid changes of the box type and check for color changes (that must be passed on to the child input object) */ obj->boxtype = FL_NO_BOX; sp->input->col1 = obj->col1; sp->input->col2 = obj->col2; } /*************************************** * There aren't many types of events a spinner object must directly * react to. If it got resized the positions and sizes of the child * objects it's made up from need to be recalculated, but that can * be deferred until it's redrawn. Drawing it works mostly auto- * matically except the redraw of the label. And on deletion just * the FLI_SPINNER_SPEC needs to be deallocated (the child objects * referenced there-in have already been deallocated before). ***************************************/ static int handle_spinner( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_SPINNER_SPEC *sp = obj->spec; switch ( event ) { case FL_ATTRIB : case FL_RESIZED : sp->attrib = 1; break; case FL_DRAW : if ( sp->attrib ) { set_geom( obj ); sp->attrib = 0; } case FL_DRAWLABEL : fl_draw_object_label_outside( obj ); break; case FL_FREEMEM : fl_safe_free( obj->spec ); break; } return 0; } /*************************************** * Callback for the input and button objects of the spinner, * called with 'data' set to 0 for the input object and with * 'data' being 1 or -1 for the up and down buttons ***************************************/ static void spinner_callback( FL_OBJECT * obj, long data ) { FLI_SPINNER_SPEC *sp = obj->parent->spec; const char *s_val = fl_get_input( sp->input ); int max_len = 4 + sp->prec + log10( DBL_MAX ); char buf[ max_len ]; /* Don't react to editing the input field unless user ended interaction with input field */ if ( data == 0 && ! ( obj->returned & FL_RETURN_END ) ) return; if ( obj->parent->type == FL_INT_SPINNER ) { int old_i_val = sp->i_val; if ( data == 0 ) { char *eptr; long i_val = strtol( s_val, &eptr, 10 ); /* Check for an invalid value entered */ if ( eptr == s_val || i_val > sp->i_max || i_val < sp->i_min ) { if ( ! ( obj->returned & FL_RETURN_END ) ) return; if ( i_val > sp->i_max ) sp->i_val = sp->i_max; else if ( i_val < sp->i_min ) sp->i_val = sp->i_min; } else sp->i_val = i_val; } else if ( data == 1 && obj->returned & FL_RETURN_CHANGED ) { if ( sp->i_val <= sp->i_max - sp->i_incr ) sp->i_val += sp->i_incr; else sp->i_val = sp->i_max; } else if ( data == -1 && obj->returned & FL_RETURN_CHANGED ) { if ( sp->i_val >= sp->i_min + sp->i_incr ) sp->i_val -= sp->i_incr; else sp->i_val = sp->i_min; } sprintf( buf, "%d", sp->i_val ); fl_set_input( sp->input, buf ); if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; if ( sp->i_val != old_i_val ) obj->parent->returned |= FL_RETURN_CHANGED; if ( sp->i_val != sp->old_ival && data != 0 && obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_CHANGED | FL_RETURN_END; if ( obj->parent->returned & FL_RETURN_END ) sp->old_ival = sp->i_val; if ( obj->parent->how_return & FL_RETURN_END_CHANGED && ! ( obj->parent->returned & FL_RETURN_CHANGED && obj->parent->returned & FL_RETURN_END ) ) obj->parent->returned = FL_RETURN_NONE; } else { int old_f_val = sp->f_val; if ( data == 0 ) { char *eptr; double f_val = strtod( s_val, &eptr ); if ( eptr == s_val || f_val > sp->f_max || f_val < sp->f_min ) { if ( ! ( obj->returned & FL_RETURN_END ) ) return; if ( f_val > sp->f_max ) sp->f_val = sp->f_max; if ( f_val < sp->f_min ) sp->f_val = sp->f_min; } else sp->f_val = f_val; } else if ( data == 1 && obj->returned & FL_RETURN_CHANGED ) { if ( sp->f_val <= sp->f_max - sp->f_incr ) sp->f_val += sp->f_incr; else sp->f_val = sp->f_max; } else if ( data == -1 && obj->returned & FL_RETURN_CHANGED ) { if ( sp->f_val >= sp->f_min + sp->f_incr ) sp->f_val -= sp->f_incr; else sp->f_val = sp->f_min; } sprintf( buf, "%.*f", sp->prec, sp->f_val ); fl_set_input( sp->input, buf ); if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; if ( sp->f_val != old_f_val ) obj->parent->returned |= FL_RETURN_CHANGED; if ( sp->f_val != sp->old_fval && data != 0 && obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_CHANGED | FL_RETURN_END; if ( obj->parent->returned & FL_RETURN_END ) sp->old_fval = sp->f_val; if ( obj->parent->how_return & FL_RETURN_END_CHANGED && ! ( obj->parent->returned & FL_RETURN_CHANGED && obj->parent->returned & FL_RETURN_END ) ) obj->parent->returned = FL_RETURN_NONE; } } /*************************************** ***************************************/ FL_OBJECT * fl_create_spinner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_SPINNER_SPEC *sp; FL_Coord iw, ih, ux, uy, dx, dy, bwh; int orient; if ( w >= h ) { orient = 0; bwh = h / 2; bwh = FL_max( bwh, 1 ); h = ih = 2 * bwh; iw = w - bwh - 1; ux = dx = x + iw - 1; uy = x; dy = uy + bwh; } else { orient = 1; bwh = w / 2; bwh = FL_max( bwh, 1 ); w = iw = 2 * bwh; ih = h - bwh - 1; dx = x; ux = dx + bwh; uy = dy = y + ih - 1; } obj = fl_make_object( FL_SPINNER, type, x, y, w, h, label, handle_spinner ); obj->boxtype = FL_NO_BOX; obj->align = FL_ALIGN_LEFT; obj->set_return = set_spinner_return; obj->spec = sp = malloc( sizeof *sp ); sp->input = fl_create_input( type == FL_INT_SPINNER ? FL_INT_INPUT : FL_FLOAT_INPUT, 0, 0, 0, 0, NULL ); sp->up = fl_create_button( FL_TOUCH_BUTTON, 0, 0, 0, 0, orient == 0 ? "@8>" : "@6>" ); sp->down = fl_create_button( FL_TOUCH_BUTTON, 0, 0, 0, 0, orient == 0 ? "@2>" : "@4>" ); fl_set_object_callback( sp->input, spinner_callback, 0 ); fl_set_object_callback( sp->up, spinner_callback, 1 ); fl_set_object_callback( sp->down, spinner_callback, -1 ); fl_set_button_mouse_buttons( sp->up, 1 ); fl_set_button_mouse_buttons( sp->down, 1 ); fl_set_object_lcolor( sp->up, FL_BLUE ); fl_set_object_lcolor( sp->down, FL_BLUE ); obj->col1 = sp->input->col1; obj->col2 = sp->input->col2; sp->i_val = sp->old_ival = 0; sp->i_min = - 10000; sp->i_max = 10000; sp->i_incr = 1; sp->f_val = sp->old_fval = 0.0; sp->f_min = - 10000.0; sp->f_max = 10000.0; sp->f_incr = 1.0; sp->orient = orient; sp->prec = DEFAULT_SPINNER_PRECISION; sp->attrib = 1; fl_add_child( obj, sp->input ); fl_add_child( obj, sp->up ); fl_add_child( obj, sp->down ); fl_set_input( sp->input, type == FL_INT_SPINNER ? "0" : "0.0" ); /* Set default return policy for a spinner object */ fl_set_object_return( obj, FL_RETURN_CHANGED ); return obj; } /*************************************** ***************************************/ FL_OBJECT * fl_add_spinner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_spinner( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** ***************************************/ double fl_get_spinner_value( FL_OBJECT * obj ) { FLI_SPINNER_SPEC *sp = obj->spec; const char *s_val = fl_get_input( sp->input ); char *eptr; if ( obj->type == FL_INT_SPINNER ) { long i_val = strtol( s_val, &eptr, 10 ); if ( eptr == s_val || i_val > sp->i_max || i_val < sp->i_min ) i_val = sp->i_val; return sp->i_val = i_val; } else { double f_val = strtod( s_val, &eptr ); if ( ( *eptr && *eptr != 'e' && *eptr != 'E' ) || errno == ERANGE || f_val > sp->f_max || f_val < sp->f_min ) f_val = sp->f_val; if ( *eptr ) { int max_len = 4 + sp->prec + log10( DBL_MAX ); char buf[ max_len ]; sprintf( buf, "%.*f", sp->prec, f_val ); fl_set_input( sp->input, buf ); } return sp->f_val = f_val; } } /*************************************** ***************************************/ double fl_set_spinner_value( FL_OBJECT * obj, double val ) { FLI_SPINNER_SPEC *sp = obj->spec; int max_len = 4 + sp->prec + log10( DBL_MAX ); char buf[ max_len ]; if ( obj->type == FL_INT_SPINNER ) { sp->i_val = FL_nint( val ); if ( val > sp->i_max ) sp->i_val = sp->i_max; else if ( val < sp->i_min ) sp->i_val = sp->i_min; sprintf( buf, "%d", sp->i_val ); fl_set_input( sp->input, buf ); return sp->old_ival = sp->i_val; } sp->f_val = val; if ( val > sp->f_max ) sp->f_val = sp->f_max; else if ( val < sp->f_min ) sp->f_val = sp->f_min; sprintf( buf, "%.*f", sp->prec, sp->f_val ); fl_set_input( sp->input, buf ); return sp->old_fval = sp->f_val; } /*************************************** ***************************************/ void fl_set_spinner_bounds( FL_OBJECT * obj, double min, double max ) { FLI_SPINNER_SPEC *sp = obj->spec; double tmp; if ( min > max ) { tmp = min; min = max; max = min; } if ( obj->type == FL_INT_SPINNER ) { sp->i_min = FL_nint( min ); sp->i_max = FL_nint( max ); if ( min < INT_MIN ) sp->i_min = INT_MIN; else if ( min > INT_MAX ) sp->i_min = INT_MAX; if ( max < INT_MIN ) sp->i_max = INT_MIN; else if ( max > INT_MAX ) sp->i_max = INT_MAX; fl_get_spinner_value( obj ); fl_set_spinner_value( obj, sp->i_val ); } else { sp->f_min = min; sp->f_max = max; if ( min < - DBL_MAX ) sp->f_min = - DBL_MAX; else if ( min > DBL_MAX ) sp->f_min = DBL_MAX; if ( max < - DBL_MAX ) sp->f_max = - DBL_MAX; else if ( max > DBL_MAX ) sp->f_max = DBL_MAX; fl_get_spinner_value( obj ); fl_set_spinner_value( obj, sp->f_val ); } } /*************************************** ***************************************/ void fl_get_spinner_bounds( FL_OBJECT * obj, double * min, double * max ) { FLI_SPINNER_SPEC *sp = obj->spec; if ( obj->type == FL_INT_SPINNER ) { *min = sp->i_min; *max = sp->i_max; } else { *min = sp->f_min; *max = sp->f_max; } } /*************************************** ***************************************/ void fl_set_spinner_step( FL_OBJECT * obj, double step ) { FLI_SPINNER_SPEC *sp = obj->spec; if ( step <= 0.0 ) return; if ( obj->type == FL_INT_SPINNER ) { if ( FL_nint( step ) > sp->i_max - sp->i_min ) sp->i_incr = sp->i_max - sp->i_min; else sp->i_incr = FL_nint( step ); } else { if ( step > sp->f_max - sp->f_min ) sp->f_incr = sp->f_max - sp->f_min; else sp->f_incr = step; } } /*************************************** ***************************************/ double fl_get_spinner_step( FL_OBJECT * obj ) { FLI_SPINNER_SPEC *sp = obj->spec; return obj->type == FL_INT_SPINNER ? sp->i_incr : sp->f_incr; } /*************************************** ***************************************/ void fl_set_spinner_precision( FL_OBJECT * obj, int prec ) { FLI_SPINNER_SPEC *sp = obj->spec; if ( obj->type == FL_INT_SPINNER || prec < 0 ) return; if ( prec > DBL_DIG ) prec = DBL_DIG; if ( prec < 0 ) prec = 0; if ( sp->prec != prec ) { sp->prec = prec; fl_set_spinner_value( obj, fl_get_spinner_value( obj ) ); } } /*************************************** ***************************************/ int fl_get_spinner_precision( FL_OBJECT * obj ) { if ( obj->type == FL_INT_SPINNER ) return 0; return ( ( FLI_SPINNER_SPEC * ) obj->spec )->prec; } /*************************************** ***************************************/ FL_OBJECT * fl_get_spinner_input( FL_OBJECT * obj ) { return ( ( FLI_SPINNER_SPEC * ) obj->spec )->input; } /*************************************** ***************************************/ FL_OBJECT * fl_get_spinner_up_button( FL_OBJECT * obj ) { return ( ( FLI_SPINNER_SPEC * ) obj->spec )->up; } /*************************************** ***************************************/ FL_OBJECT * fl_get_spinner_down_button( FL_OBJECT * obj ) { return ( ( FLI_SPINNER_SPEC * ) obj->spec )->down; } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function is for internal use only and to set * the return policy for a spinner fl_set_object_return() should * be used instead (which then will call this function). ***************************************/ static void set_spinner_return( FL_OBJECT * obj, unsigned int when ) { FLI_SPINNER_SPEC *sp = obj->spec; obj->how_return = when; fl_set_object_return( sp->input, FL_RETURN_ALWAYS ); fl_set_object_return( sp->up, FL_RETURN_CHANGED | FL_RETURN_END ); fl_set_object_return( sp->down, FL_RETURN_CHANGED | FL_RETURN_END ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/lframe.c0000644000175000017500000001154211247055071014413 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file lframe.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * similar to FL_FRAME, but label is drawn on the frame */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ static int handle_lframe( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { int sx, sy, sw, sh, align, bw = FL_abs( ob->bw ), dy; int margin, len; switch ( event ) { case FL_DRAW : fl_drw_frame( ob->type, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); /* fall through */ case FL_DRAWLABEL : if ( ! ( len = strlen( ob->label ) ) ) return 0; fl_get_string_dimension( ob->lstyle, ob->lsize, ob->label, len, &sw, &sh ); align = ob->align & ~FL_ALIGN_INSIDE; sw += 8; margin = 11 + ob->w * 0.02; dy = 0; if ( ob->type == FL_ROUNDED_FRAME ) margin += 7; if ( ob->w - sw < 2 * margin ) { margin /= 2; sw -= 2; } if ( ob->w - sw < 2 * margin ) { margin /= 2; sw -= 2; } if ( ob->type == FL_UP_FRAME || ob->type == FL_DOWN_FRAME ) dy = ( bw + 1 ) / 2; if ( align == FL_ALIGN_RIGHT_TOP || align == FL_ALIGN_RIGHT ) { sx = ob->x + ob->w - margin - sw; sy = ob->y - sh / 2 - dy; } else if ( align == FL_ALIGN_TOP ) { sx = ob->x + ( ob->w - sw ) / 2; sy = ob->y - sh / 2 - dy; } else if ( align == FL_ALIGN_LEFT_BOTTOM ) { sx = ob->x + margin; sy = ob->y + ob->h - sh / 2 + dy; } else if ( align == FL_ALIGN_RIGHT_BOTTOM ) { sx = ob->x + ob->w - margin - sw; sy = ob->y + ob->h - sh / 2 + dy; } else if ( align == FL_ALIGN_BOTTOM ) { sx = ob->x + ( ob->w - sw ) / 2; sy = ob->y + ob->h - sh / 2 + dy; } else { sx = ob->x + margin; sy = ob->y - sh / 2 - dy; } fl_drw_box( FL_FLAT_BOX, sx, sy, sw, sh, ob->col2, 0 ); fl_drw_text( FL_ALIGN_CENTER, sx, sy, sw, sh, ob->lcol, ob->lstyle, ob->lsize, ob->label ); break; } return FL_RETURN_NONE; } /*************************************** ***************************************/ FL_OBJECT * fl_create_labelframe( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_make_object( FL_LABELFRAME, type, x, y, w, h, label, handle_lframe ); ob->boxtype = FL_NO_BOX; ob->col1 = FL_FRAME_COL1; ob->col2 = FL_FRAME_COL2; ob->lcol = FL_FRAME_LCOL; ob->align = FL_ALIGN_LEFT_TOP; ob->active = 0; return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_labelframe( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_labelframe( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/fd/0000755000175000017500000000000011377311602013366 5ustar jensjensxforms-1.0.93sp1/lib/fd/cmdbr.c0000644000175000017500000000204611171560225014622 0ustar jensjens#include "include/forms.h" #include #include "cmdbr.h" FD_cmd * create_form_cmd( void ) { FL_OBJECT *obj; FD_cmd *fdui = fl_calloc( 1, sizeof *fdui ); fdui->cmd = fl_bgn_form( FL_NO_BOX, 430, 190 ); fdui->backface = obj = fl_add_box( FL_UP_BOX, 0, 0, 430, 190, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 10, 152, 410, 31, "" ); fl_set_object_gravity( obj, FL_SouthWest, FL_SouthEast ); fdui->browser = obj = fl_add_browser( FL_NORMAL_BROWSER, 10, 8, 410, 140, "" ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); fdui->close_br = obj = fl_add_button( FL_NORMAL_BUTTON, 299, 155, 60, 25, "Close" ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fl_set_object_callback( obj, fl_cmdbr_close_cb, 0 ); fdui->clear_br = obj = fl_add_button( FL_NORMAL_BUTTON, 238, 155, 61, 25, "Clear" ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fl_set_object_callback( obj, fl_cmdbr_clear_cb, 0 ); fl_end_form( ); fdui->cmd->fdui = fdui; return fdui; } xforms-1.0.93sp1/lib/fd/micntl.c0000644000175000017500000000433411171560225015023 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ /* Form definition file generated with fdesign. */ #include "include/forms.h" #include #include "micntl.h" FD_micntl *create_form_micntl(void) { FL_OBJECT *obj; FD_micntl *fdui = (FD_micntl *) fl_calloc(1, sizeof(*fdui)); fdui->micntl = fl_bgn_form(FL_NO_BOX, 180, 190); obj = fl_add_box(FL_UP_BOX,0,0,180,190,""); obj = fl_add_button(FL_NORMAL_BUTTON,20,160,20,20,"@<<"); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_color(obj,FL_COL1,FL_BLUE); fl_set_object_lcolor(obj,FL_BLUE); obj = fl_add_button(FL_NORMAL_BUTTON,40,160,20,20,"@<"); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_color(obj,FL_COL1,FL_BLUE); fl_set_object_lcolor(obj,FL_BLUE); obj = fl_add_button(FL_NORMAL_BUTTON,60,160,20,20,"@square"); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_color(obj,FL_COL1,FL_YELLOW); fl_set_object_lcolor(obj,FL_BLUE); obj = fl_add_button(FL_NORMAL_BUTTON,80,160,20,20,"@>"); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_color(obj,FL_COL1,FL_BLUE); fl_set_object_lcolor(obj,FL_BLUE); obj = fl_add_button(FL_NORMAL_BUTTON,100,160,20,20,"@>>"); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_color(obj,FL_COL1,FL_BLUE); fl_set_object_lcolor(obj,FL_BLUE); fdui->delay = obj = fl_add_choice(FL_NORMAL_CHOICE2,20,60,80,20,""); fl_end_form(); fdui->micntl->fdui = fdui; return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/lib/fd/ginput.c0000644000175000017500000000144011200771013015026 0ustar jensjens#include "include/forms.h" #include #include "ginput.h" FD_form *create_form_form(void) { FL_OBJECT *obj; FD_form *fdui = (FD_form *) fl_calloc(1, sizeof(*fdui)); fdui->form = fl_bgn_form(FL_NO_BOX, 410, 120); obj = fl_add_box(FL_UP_BOX,0,0,410,120,""); obj = fl_add_frame(FL_ENGRAVED_FRAME,8,9,394,67,""); fdui->input = obj = fl_add_input(FL_NORMAL_INPUT,20,33,370,30,""); fl_set_object_lalign(obj,FL_ALIGN_LEFT_TOP); fdui->cancel = obj = fl_add_button(FL_NORMAL_BUTTON,30,85,80,26,"Cancel"); fl_set_button_shortcut(obj,"^[",1); obj = fl_add_button(FL_NORMAL_BUTTON,300,85,80,26,"Clear"); fl_set_object_callback(obj,clear_cb,0); fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON,165,85,80,26,"OK"); fl_end_form(); fdui->form->fdui = fdui; return fdui; } xforms-1.0.93sp1/lib/fd/ginput.fd0000644000175000017500000000415511171560225015213 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: form Width: 410 Height: 120 Number of Objects: 6 -------------------- class: FL_BOX type: UP_BOX box: 0 0 410 120 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 8 9 394 67 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 20 33 370 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 30 85 80 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Cancel shortcut: ^[ resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: cancel callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 300 85 80 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Clear shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: clear_cb argument: 0 -------------------- class: FL_BUTTON type: RETURN_BUTTON box: 165 85 80 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: OK shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: ok callback: argument: ============================== create_the_forms xforms-1.0.93sp1/lib/fd/Makefile.am0000644000175000017500000000024111171560225015416 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = \ cmdbr.c \ cmdbr.fd \ cmdbr.h \ ginput.c \ ginput.fd \ ginput.h \ micntl.c \ micntl.fd \ micntl.h xforms-1.0.93sp1/lib/fd/ginput.h0000644000175000017500000000222611171560225015046 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ #ifndef FD_form_h_ #define FD_form_h_ /* Header file generated with fdesign. */ /**** Callback routines ****/ extern void clear_cb(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM *form; void *vdata; long ldata; FL_OBJECT *input; FL_OBJECT *cancel; FL_OBJECT *ok; } FD_form; extern FD_form * create_form_form(void); #endif /* FD_form_h_ */ xforms-1.0.93sp1/lib/fd/micntl.h0000644000175000017500000000222311171560225015023 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ /** Header file generated with fdesign on Sun Jan 31 02:00:27 1999.**/ #ifndef FD_micntl_h_ #define FD_micntl_h_ /** Callbacks, globals and object handlers **/ /**** Forms and Objects ****/ typedef struct { FL_FORM *micntl; void *vdata; char *cdata; long ldata; FL_OBJECT *delay; } FD_micntl; extern FD_micntl * create_form_micntl(void); #endif /* FD_micntl_h_ */ xforms-1.0.93sp1/lib/fd/cmdbr.fd0000644000175000017500000000354311171560225014774 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: cmd Width: 430 Height: 190 Number of Objects: 5 -------------------- class: FL_BOX type: UP_BOX box: 0 0 430 190 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: backface callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 10 152 410 31 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthWest FL_SouthEast name: callback: argument: -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 10 8 410 140 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthWest FL_SouthEast name: browser callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 299 155 60 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Close shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: close_br callback: fl_cmdbr_close_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 238 155 61 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Clear shortcut: resize: FL_RESIZE_ALL gravity: FL_SouthEast FL_SouthEast name: clear_br callback: fl_cmdbr_clear_cb argument: 0 ============================== create_the_form xforms-1.0.93sp1/lib/fd/micntl.fd0000644000175000017500000000471511171560225015175 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: micntl Width: 180 Height: 190 Number of Objects: 7 -------------------- class: FL_BOX type: UP_BOX box: 0 0 180 190 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 160 20 20 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @<< shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 40 160 20 20 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @< shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: (long)"prev frame" -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 60 160 20 20 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @square shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: (long)"stop" -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 80 160 20 20 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: (long)"Play" -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 100 160 20 20 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @>> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 20 60 80 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: delay callback: argument: ============================== create_the_forms xforms-1.0.93sp1/lib/fd/.cvsignore0000644000175000017500000000002511171560225015362 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/lib/fd/Makefile.in0000644000175000017500000002413211377311602015435 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = lib/fd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = \ cmdbr.c \ cmdbr.fd \ cmdbr.h \ ginput.c \ ginput.fd \ ginput.h \ micntl.c \ micntl.fd \ micntl.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/fd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign lib/fd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/lib/fd/cmdbr.h0000644000175000017500000000243311171560225014627 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ #ifndef FD_cmd_h_ #define FD_cmd_h_ /* Header file generated with fdesign. */ /**** Callback routines ****/ extern void fl_cmdbr_close_cb( FL_OBJECT *, long ); extern void fl_cmdbr_clear_cb( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * cmd; void * vdata; long ldata; FL_OBJECT * backface; FL_OBJECT * browser; FL_OBJECT * close_br; FL_OBJECT * clear_br; } FD_cmd; extern FD_cmd * create_form_cmd( void ); #endif /* FD_cmd_h_ */ xforms-1.0.93sp1/lib/free.c0000644000175000017500000000455311247055071014072 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file free.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ FL_OBJECT * fl_create_free( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label, FL_HANDLEPTR handle ) { FL_OBJECT *obj; obj = fl_make_object( FL_FREE, type, x, y, w, h, label, handle ); obj->boxtype = FL_FLAT_BOX; if ( type == FL_INACTIVE_FREE ) obj->active = 0; else if ( type == FL_CONTINUOUS_FREE ) obj->automatic = 1; else if ( type == FL_INPUT_FREE ) obj->input = 1; else if ( type == FL_ALL_FREE ) { obj->input = 1; obj->automatic = 1; } if ( type != FL_INACTIVE_FREE ) obj->click_timeout = FL_CLICK_TIMEOUT; return obj; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_free( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label, FL_HANDLEPTR handle) { FL_OBJECT *ob; ob = fl_create_free( type, x, y, w, h, label, handle ); fl_add_object( fl_current_form, ob ); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/timeout.c0000644000175000017500000001114511247055071014632 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file timeout.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Check timeout */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include #include #include #include long msec0 = 0; /*************************************** ***************************************/ int fl_add_timeout( long msec, FL_TIMEOUT_CALLBACK callback, void * data ) { FLI_TIMEOUT_REC *rec; static int id = 1; rec = fl_malloc( sizeof *rec ); fl_gettime( &rec->start_sec, &rec->start_usec ); rec->id = id; rec->ms_to_wait = FL_max( msec, 0 ); rec->callback = callback; rec->data = data; rec->prev = NULL; /* Make it the start of the (doubly) linked list */ rec->next = fli_context->timeout_rec; if ( fli_context->timeout_rec ) fli_context->timeout_rec->prev = rec; fli_context->timeout_rec = rec; /* Deal with wrap around of IDs- rather unlikely to happen but if it does it's not a 100% safe way to do it, we can only bet on the chance that the timeouts with the re-used numbers have expired a long time ago... */ if ( id++ <= 0 ) id = 1; return rec->id; } /*************************************** * Internal function for remving a timeout - remove * it from the (doubly) linked list and free memory ***************************************/ static void remove_timeout( FLI_TIMEOUT_REC * rec ) { if ( rec == fli_context->timeout_rec ) { fli_context->timeout_rec = rec->next; if ( rec->next ) fli_context->timeout_rec->prev = NULL; } else { rec->prev->next = rec->next; if ( rec->next ) rec->next->prev = rec->prev; } fl_free( rec ); } /*************************************** * Public function for removing a timeout ***************************************/ void fl_remove_timeout( int id ) { FLI_TIMEOUT_REC *rec = fli_context->timeout_rec; while ( rec && rec->id != id ) rec = rec->next; if ( rec ) remove_timeout( rec ); else M_err( "fl_remove_timeout", "ID %d not found", id ); } /*************************************** * Function that periodically gets called to deal with expired * timeouts, invoking their handlers and removing them. Via the * argument the time until the next timeout expires gets returned * (if this is earlier than the original value). ***************************************/ void fli_handle_timeouts( long * msec ) { FLI_TIMEOUT_REC *rec, *next; long sec = 0, usec, elapsed, diff; if ( ! fli_context->timeout_rec ) return; fl_gettime( &sec, &usec ); /* Loop over all candidates, dealing with those that expired and removing them, while also keeping looking for the time the next one is going to expire */ for ( rec = fli_context->timeout_rec; rec; rec = next ) { next = rec->next; elapsed = 1000 * ( sec - rec->start_sec ) + ( usec - rec->start_usec ) / 1000; diff = rec->ms_to_wait - elapsed; if ( diff <= 0 ) { if ( rec->callback ) { rec->callback( rec->id, rec->data ); fl_gettime( &sec, &usec ); } remove_timeout( rec ); } else *msec = FL_min( *msec, diff ); } } /*************************************** ***************************************/ void fl_remove_all_timeouts( void ) { while ( fli_context->timeout_rec ) fl_remove_timeout( fli_context->timeout_rec->id ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/readint.c0000644000175000017500000000771611247055071014603 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file readint.c * * Copyright(c) 1993,1994 by T.C. Zhao * All rights reserved. * * Read an integer (decimal or hex) from a file. * Valid sepertors are SPACE, \t \n and , * Comment is introduced by # * * For hex integers, a-f, A-F is assumed continous */ #ifdef HAVE_CONFIG_H #include #endif #include #include /* for isdigit */ #include "include/forms.h" #include "flinternal.h" #include "ulib.h" #define IS_FS( c ) \ ( ( c ) == ' ' || ( c ) == '\t' || ( c ) == '\n' || ( c ) == ',' ) #define IS_COMMENT( c ) ( ( c ) == '#' ) static int yell = 0; /*************************************** ***************************************/ static void bad_character( int c ) { if ( yell && c != EOF ) fprintf(stderr, "Bad character %c Code=%d\n", c, c); } /*************************************** ***************************************/ static int skip_comment( FILE * fp ) { int c; while ( ( c = getc( fp ) ) != EOF && c != '\n' ) /* empty */ ; return c != EOF ? getc( fp ) : EOF; } /*************************************** * read an integer [+-]nnn. No way to return error status ***************************************/ int fli_readint( FILE * fp ) { int c, num = 0, sign = 1; do { c = getc( fp ); while ( IS_COMMENT( c ) ) c = skip_comment( fp ); } while ( IS_FS( c ) ); if ( c == '-' || c == '+' ) { sign = ( c == '-' ) ? -1 : 1; c = getc( fp ); } while ( isdigit( c ) ) { num = 10 * num + c - '0'; c = getc( fp ); } if ( ! IS_FS( c ) ) { bad_character( c ); num = 123456; } return sign * num; } /*************************************** * Read a positive integer. return EOF if error ***************************************/ int fli_readpint( FILE * fp ) { int c, num = 0; do { c = getc( fp ); while ( IS_COMMENT( c ) ) c = skip_comment( fp ); } while ( IS_FS( c ) ); if ( ! ( c == '+' || isdigit( c ) ) ) { bad_character( c ); return EOF; } do { num = 10 * num + c - '0'; c = getc( fp ); } while ( isdigit( c ) ); return num; } /*************************************** * Read a hex integer ***************************************/ int fli_readhexint( FILE * fp ) { int num = 0, i, c; static short hextab[ 256 ]; /* initialize the hex table */ if ( ! hextab[ '1' ] ) { for ( i = '1'; i <= '9'; i++ ) hextab[ i ] = i - '0'; for ( i = 'A'; i <= 'F'; i++ ) hextab[ i ] = 10 + i - 'A'; for ( i = 'a'; i <= 'f'; i++ ) hextab[ i ] = 10 + i - 'a'; } do { c = getc( fp ); while ( IS_COMMENT( c ) ) c = skip_comment( fp ); } while ( IS_FS( c ) ); /* demand 0[xX] */ if ( c != '0' || ( ( c = getc( fp ) ) != 'x' && c != 'X' ) ) { bad_character( c ); return EOF; } /* now do the coversion */ while ( ( c = getc( fp ) ), isxdigit( c ) ) num = ( num << 4 ) + hextab[ c ]; return num; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/timer.c0000644000175000017500000002201311247055071014260 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file timer.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Forms Object class: TIMER */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" #include "flinternal.h" /* Extra information need for input boxes. */ typedef struct { double time_left; /* the time (sec) left to wait */ double timer; /* total duration */ long sec, /* start time */ usec; int on, up; FL_TIMER_FILTER filter; } SPEC; static int update_only; /*************************************** ***************************************/ static char * default_filter( FL_OBJECT * ob FL_UNUSED_ARG, double totalsec ) { static char buf[ 32 ]; int hr, minutes; double sec; if ( totalsec >= 3600.0 ) { hr = totalsec / 3600.0 + 0.001; minutes = totalsec / 60.0 + 0.001; minutes -= hr * 60; sec = totalsec - 60 * ( minutes + 60 * hr ); sprintf( buf, "%d:%02d:%04.1f", hr, minutes, sec ); } else if ( totalsec >= 60.0 ) { minutes = totalsec / 60.0 + 0.001; sec = totalsec - minutes * 60; sprintf( buf, "%d:%04.1f", minutes, sec ); } else sprintf( buf, "%.1f", totalsec ); return buf; } /*************************************** * draws the timer ***************************************/ static void draw_timer( FL_OBJECT * ob ) { FL_COLOR col; char *str; SPEC *sp = ob->spec; if ( ob->type == FL_HIDDEN_TIMER ) return; if ( ! sp->on || sp->time_left > 0.0 ) col = ob->col1; else if ( ( int ) ( sp->time_left / FL_TIMER_BLINKRATE ) % 2 ) col = ob->col1; else col = ob->col2; fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, col, ob->bw ); if ( ob->type == FL_VALUE_TIMER && sp->time_left > 0.0 ) { double time_shown = sp->up ? sp->timer - sp->time_left : sp->time_left; str = ( sp->filter ? sp->filter : default_filter )( ob, time_shown ); fl_drw_text( FL_ALIGN_CENTER, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, str ); } } /*************************************** * Handles an event ***************************************/ static int handle_timer( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { SPEC *sp = ob->spec; long sec, usec; double lasttime_left; int ret = FL_RETURN_NONE; switch ( event ) { case FL_DRAW: draw_timer( ob ); /* fall through */ case FL_DRAWLABEL: if ( ob->type != FL_HIDDEN_TIMER && ! update_only ) { if ( ob->type == FL_VALUE_TIMER && ( ob->align & ~ FL_ALIGN_INSIDE ) == FL_ALIGN_CENTER ) fl_drw_text_beside( FL_ALIGN_LEFT, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else fl_drw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); } break; case FL_RELEASE: if ( ob->type != FL_HIDDEN_TIMER && sp->time_left < 0.0 ) fl_set_timer( ob, 0.0 ); break; case FL_STEP: if ( ! sp->on ) break; lasttime_left = sp->time_left; fl_gettime( &sec, &usec ); sp->time_left = sp->timer - ( sec - sp->sec ) - ( usec - sp->usec ) * 1.0e-6; update_only = 1; /* Don't check for zero. we can overshoot by as much as 50msec. try to split the error */ if ( sp->time_left > 0.02 ) { if ( ob->type == FL_VALUE_TIMER && ( int ) ( 10.0 * sp->time_left ) != ( int ) ( 10.0 * lasttime_left ) ) fl_redraw_object( ob ); } else if ( lasttime_left > 0.0 ) { if ( ob->type == FL_HIDDEN_TIMER ) fl_set_timer( ob, 0.0 ); else fl_redraw_object( ob ); update_only = 0; ret = FL_RETURN_CHANGED | FL_RETURN_END; break; } else if ( ( int ) ( lasttime_left / FL_TIMER_BLINKRATE ) != ( int ) ( sp->time_left / FL_TIMER_BLINKRATE ) ) fl_redraw_object( ob ); update_only = 0; break; case FL_FREEMEM: fl_free( ob->spec ); break; } return ret; } /*************************************** * creates an object ***************************************/ FL_OBJECT * fl_create_timer( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { FL_OBJECT *ob; ob = fl_make_object( FL_TIMER, type, x, y, w, h, l, handle_timer ); ob->boxtype = FL_TIMER_BOXTYPE; ob->col1 = FL_TIMER_COL1; ob->col2 = FL_TIMER_COL2; ob->align = FL_TIMER_ALIGN; ob->lcol = FL_TIMER_LCOL; ob->spec = fl_calloc( 1, sizeof( SPEC ) ); fl_set_timer( ob, 0.0 ); /* disabled timer */ ( ( SPEC * ) ob->spec )->filter = default_filter; return ob; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_timer( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { FL_OBJECT *ob= fl_create_timer( type, x, y, w, h, l ); fl_add_object( fl_current_form, ob ); if ( ob->type == FL_VALUE_TIMER ) fl_set_object_dblbuffer( ob, 1 ); return ob; } /*************************************** * Sets the timer clock to the particular delay. (0.0 to reset) ***************************************/ void fl_set_timer( FL_OBJECT * ob, double total ) { SPEC *sp = ob->spec; sp->time_left = sp->timer = total; sp->on = total > 0.0; fl_set_object_automatic( ob, sp->on ); fl_gettime( &sp->sec, &sp->usec ); if ( ob->type != FL_HIDDEN_TIMER ) fl_redraw_object( ob ); } /*************************************** * returns the amount of time left ***************************************/ double fl_get_timer( FL_OBJECT * ob ) { SPEC *sp = ob->spec; return sp->time_left > 0.0 ? sp->time_left : 0.0; } /*************************************** ***************************************/ void fl_set_timer_countup( FL_OBJECT * ob, int yes ) { ( ( SPEC * ) ob->spec )->up = yes; } /*************************************** ***************************************/ FL_TIMER_FILTER fl_set_timer_filter( FL_OBJECT * ob, FL_TIMER_FILTER filter ) { SPEC *sp = ob->spec; FL_TIMER_FILTER old = sp->filter; if ( filter != sp->filter ) { sp->filter = filter; fl_redraw_object( ob ); } return old; } /*************************************** ***************************************/ void fl_suspend_timer( FL_OBJECT * ob ) { ( ( SPEC * ) ob->spec )->on = 0; fl_set_object_automatic( ob, 0 ); } /*************************************** ***************************************/ void fl_resume_timer( FL_OBJECT * ob ) { SPEC *sp = ob->spec; long sec, usec; double elapsed; if ( sp->on ) return; elapsed = sp->timer - sp->time_left; fl_gettime( &sec, &usec ); sp->sec = sec - ( long ) elapsed; sp->usec = usec - ( long ) ( ( elapsed - ( long ) elapsed ) * 1.0e6 ); fl_set_object_automatic( ob, 1 ); sp->on = 1; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/valuator.c0000644000175000017500000000725511253410312014776 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file valuator.c * * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * Handle some common valuator tasks. * TODO: move slider and counter handler here */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pvaluator.h" /*************************************** ***************************************/ void * fli_init_valuator( FL_OBJECT * ob ) { FLI_VALUATOR_SPEC *sp = ob->spec; if ( ! sp ) ob->spec = sp = fl_calloc( 1, sizeof *sp ); sp->min = 0.0; sp->max = 1.0; sp->val = 0.5; sp->prec = 2; sp->step = 0.01; sp->draw_type = COMPLETE_DRAW; return sp; } #define CROSS_OVER( v, vmin, vmax ) \ ( ( v ) < ( vmin ) ? ( vmax ) : ( ( v ) > ( vmax ) ? ( vmin ) : ( v ) ) ) /*************************************** ***************************************/ double fli_valuator_round_and_clamp( FL_OBJECT * ob, double val ) { FLI_VALUATOR_SPEC *sp = ob->spec; double vmin, vmax; if ( sp->step != 0.0 ) { val /= sp->step; val = sp->step * ( val >= 0 ? floor( val + 0.5 ) : ceil( val - 0.5 ) ); } vmin = FL_min( sp->min, sp->max ); vmax = FL_max( sp->min, sp->max ); if ( ! sp->cross_over ) return FL_clamp( val, vmin, vmax ); else return CROSS_OVER( val, vmin, vmax ); } /*************************************** ***************************************/ int fli_valuator_handle_drag( FL_OBJECT * ob, double value ) { FLI_VALUATOR_SPEC *sp = ob->spec; int ret = FL_RETURN_NONE; value = fli_valuator_round_and_clamp( ob, value ); if ( value != sp->val ) { sp->val = value; sp->draw_type = VALUE_DRAW; fl_redraw_object( ob ); ret |= FL_RETURN_CHANGED; } return ret; } /*************************************** ***************************************/ int fli_valuator_handle_release( FL_OBJECT * ob, double value ) { FLI_VALUATOR_SPEC *sp = ob->spec; int ret = FL_RETURN_END; value = fli_valuator_round_and_clamp( ob, value ); if ( value != sp->val ) { sp->val = value; sp->draw_type = VALUE_DRAW; fl_redraw_object( ob ); if ( ! ( ob->how_return & FL_RETURN_END_CHANGED ) ) ret |= FL_RETURN_CHANGED; } if ( sp->start_val != sp->val && ob->how_return & FL_RETURN_END_CHANGED ) ret |= FL_RETURN_CHANGED; return ret; } /*************************************** ***************************************/ double fli_clamp( double val, double min, double max) { double vmin = FL_min( min, max ), vmax = FL_max( min, max ); return FL_clamp( val, vmin, vmax ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/strdup.c0000644000175000017500000000240111247055071014460 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file strdup.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ char * fl_strdup( const char * s ) { char *p = fl_malloc( strlen( s ) + 1 ); return p ? strcpy( p, s ) : p; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/align.c0000644000175000017500000001447511247055071014247 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file align.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Handles align requests */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ void fli_get_hv_align( int align, int * halign, int * valign ) { align &= ~ FL_ALIGN_INSIDE; switch ( align ) { case FL_ALIGN_LEFT: *halign = FL_ALIGN_LEFT; *valign = FL_ALIGN_CENTER; break; case FL_ALIGN_RIGHT: *halign = FL_ALIGN_RIGHT; *valign = FL_ALIGN_CENTER; break; case FL_ALIGN_CENTER: *halign = FL_ALIGN_CENTER; *valign = FL_ALIGN_CENTER; break; case FL_ALIGN_TOP: *halign = FL_ALIGN_CENTER; *valign = FL_ALIGN_TOP; break; case FL_ALIGN_BOTTOM: *halign = FL_ALIGN_CENTER; *valign = FL_ALIGN_BOTTOM; break; case FL_ALIGN_LEFT_BOTTOM: *halign = FL_ALIGN_LEFT; *valign = FL_ALIGN_BOTTOM; break; case FL_ALIGN_RIGHT_BOTTOM: *halign = FL_ALIGN_RIGHT; *valign = FL_ALIGN_BOTTOM; break; case FL_ALIGN_LEFT_TOP: *halign = FL_ALIGN_LEFT; *valign = FL_ALIGN_TOP; break; case FL_ALIGN_RIGHT_TOP: *halign = FL_ALIGN_RIGHT; *valign = FL_ALIGN_TOP; break; default: M_err( "fli_get_hv_align", "Bad request: %d\n", align ); *halign = FL_ALIGN_CENTER; *valign = FL_ALIGN_CENTER; break; } } /*************************************** ***************************************/ void fli_get_outside_align( int align, int x, int y, int w, int h, int * new_align, int * newx, int * newy ) { *newx = x; *newy = y; *new_align = FL_ALIGN_CENTER; align &= ~ FL_ALIGN_INSIDE; switch ( align ) { case FL_ALIGN_LEFT: *new_align = FL_ALIGN_RIGHT; *newx = x - w; break; case FL_ALIGN_RIGHT: *new_align = FL_ALIGN_LEFT; *newx = x + w; break; case FL_ALIGN_TOP: *new_align = FL_ALIGN_BOTTOM; *newy = y - h; break; case FL_ALIGN_BOTTOM: *new_align = FL_ALIGN_TOP; *newy = y + h; break; case FL_ALIGN_LEFT_TOP: *new_align = FL_ALIGN_LEFT_BOTTOM; *newy = y - h; break; case FL_ALIGN_RIGHT_TOP: *new_align = FL_ALIGN_RIGHT_BOTTOM; *newy = y - h; break; case FL_ALIGN_LEFT_BOTTOM: *new_align = FL_ALIGN_LEFT_TOP; *newy = y + h; break; case FL_ALIGN_RIGHT_BOTTOM: *new_align = FL_ALIGN_RIGHT_TOP; *newy = y + h; break; } } /*************************************** ***************************************/ static void get_align_inside( int align, int x, int y, int w, int h, int xsize, int ysize, int xoff, int yoff, int * xx, int * yy ) { int hor, vert; fli_get_hv_align( align, &hor, &vert ); x += xoff; y += yoff; w -= 2 * xoff; h -= 2 * yoff; switch ( hor ) { case FL_ALIGN_LEFT: *xx = x; break; case FL_ALIGN_RIGHT: *xx = x + w - xsize; break; case FL_ALIGN_CENTER: default: *xx = x + ( w - xsize ) / 2; break; } switch ( vert ) { case FL_ALIGN_TOP: *yy = y; break; case FL_ALIGN_BOTTOM: *yy = y + h - ysize; break; case FL_ALIGN_CENTER: default: *yy = y + ( h - ysize ) / 2; break; } } /*************************************** ***************************************/ static void get_align_outside( int align, int x, int y, int w, int h, int xsize, int ysize, int xoff, int yoff, int * xx, int * yy ) { int newx, newy, new_align; fli_get_outside_align( align, x, y, w, h, &new_align, &newx, &newy ); get_align_inside( new_align, newx, newy, w, h, xsize, ysize, xoff, yoff, xx, yy ); } /*************************************** ***************************************/ void fl_get_align_xy( int align, int x, int y, int w, int h, int xsize, int ysize, int xoff, int yoff, int * xx, int * yy ) { ( ( align & FL_ALIGN_INSIDE ) ? get_align_inside : get_align_outside ) ( align, x, y, w, h, xsize, ysize, xoff, yoff, xx, yy ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/global.h0000644000175000017500000000531311247055071014411 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file global.h * * This file is part of the XForms library package. * Copyright (c) 1996-1998 T.C. Zhao and Mark Overmars * All rights reserved. * * All gloabl varialbes used in XForms. It is important to start all * variables with fl/FL to avoid name space pollution. */ #ifndef FL_GLOBAL_H #define FL_GLOBAL_H Window fl_root, fl_vroot; int fl_screen; /* memory routines */ void * ( * fl_calloc )( size_t, size_t ) = calloc; void * ( * fl_malloc )( size_t ) = malloc; void * ( * fl_realloc )( void *, size_t ) = realloc; void ( * fl_free )( void * ) = free; FL_State fl_state[ 6 ]; int fl_vmode = -1; int fl_scrh, fl_scrw; char *fl_ul_magic_char = "\b"; XKeyboardControl fli_keybdcontrol; unsigned long fli_keybdmask = ( 1L << 8 ) - 1; float fli_dpi = 80.0; int fli_inverted_y; long fli_requested_vid; FLI_INTERNAL fli_int = { NULL, /* forms */ 0, /* formnumb */ 0, /* hidden_formnumb */ 0, /* auto)count */ 0, /* unmanaged_count */ 0, /* mousex */ 0, /* mousey */ 0, /* keymask */ UINT_MAX, /* query_age */ NULL, /* mouseform */ NULL, /* keyform */ NULL, /* pushobj */ NULL /* mouseobj */ }; FL_IOPT fli_cntl; FLI_CONTEXT *fli_context; char fli_curfnt[ 127 ]; FL_FORM *fl_current_form; FL_OBJECT *fli_current_group; int fli_no_connection = 0; /* Set only when fdesign is run with the '-convert' option */ FLI_WIN *fli_app_win; FL_OBJECT *FL_EVENT = ( FL_OBJECT * ) - 1L; /* The special event object */ FLI_TARGET *flx; #endif /* ! def GLOBAL_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/frame.c0000644000175000017500000000571111253414752014242 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file frame.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ static int handle_frame( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { switch ( event ) { case FL_DRAW: fl_drw_frame( ob->type, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); fl_drw_text( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); break; case FL_DRAWLABEL: if ( ob->align != FL_ALIGN_CENTER ) fl_drw_text( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); break; } return FL_RETURN_NONE; } /*************************************** ***************************************/ FL_OBJECT * fl_create_frame( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; obj = fl_make_object( FL_FRAME, type, x, y, w, h, label, handle_frame ); obj->boxtype = FL_NO_BOX; obj->col1 = FL_FRAME_COL1; obj->col2 = FL_FRAME_COL2; obj->lcol = FL_FRAME_LCOL; obj->align = FL_ALIGN_CENTER; obj->active = 0; return obj; } /*************************************** ***************************************/ FL_OBJECT * fl_add_frame( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_frame( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/listdir.c0000644000175000017500000006123511301052654014616 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file listdir.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Read a directory. Hightly system dependent. * Seems opendir/readdir/closedir is the most portable. * * Original BSD scandir is emulated using the opendir stuff. * * This file has no xforms dependencies */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #ifndef _WIN32 #include #else #include #include #include #define FL_WIN32 #endif /* vms 7.0 has dirent.h */ #if defined(__VMS) && __VMS_VER < 70000000 #include "dirent_vms.h" #endif /* Work around the bugs in various cpp */ #if defined Lynx && ! defined __VMS #include #include #endif #if ! defined __VMS && ! defined Lynx && ! defined FL_WIN32 #include #endif #include #include "include/forms.h" /* for definitation of FL_EXPORT */ #include "flinternal.h" #include "local.h" #include "ulib.h" /******** limits and macros *********/ #ifndef S_ISREG #define S_ISREG( m ) ( ( ( m ) & S_IFREG ) == S_IFREG ) #define S_ISDIR( m ) ( ( ( m ) & S_IFDIR ) == S_IFDIR ) #endif #if defined (__EMX__) || defined (FL_WIN32) || defined (opennt) #define S_ISLNK( m ) 0 /* no links in OS/2 */ #define S_ISBLB( m ) 0 /* no blk devices in OS2 */ #else #ifndef S_ISLNK #define S_ISLNK( m ) ( ( ( m ) & S_IFLNK ) == S_IFLNK ) #endif #ifndef S_ISBLK #define S_ISBLK( m ) ( ( ( m ) & S_IFBLK ) == S_IFBLK ) #endif #endif /* __EMX__ */ #ifndef S_ISCHR #define S_ISCHR( m ) ( ( ( m ) & S_IFCHR ) == S_IFCHR ) #endif #ifndef S_ISSOCK # if defined( S_IFSOCK ) # ifdef S_IFMT # define S_ISSOCK( m ) ( ( ( m ) & S_IFMT ) == S_IFSOCK ) # else # define S_ISSOCK( m ) ( ( m ) & S_IFSOCK ) # endif /* S_IFMT */ # elif defined( S_ISNAM ) /* SCO OpenServer 5.0.7 */ # define S_ISSOCK S_ISNAM # endif /* !S_IFSOCK && S_ISNAM */ #endif /* !S_ISSOCK */ #define MAXCACHE 10 /* upto MAXCACHE dir will be cached */ #define MAXFL ( FL_PATH_MAX + FL_FLEN )/* maximum file length */ #ifndef StrReDup #define StrReDup( a, b ) do \ { \ if( a ) \ fl_free( a ); \ a = fl_strdup( b ); \ } while( 0 ) #endif #if defined NEED_DIRECT #define DIRENT direct #else #define DIRENT dirent #endif #if defined NEED_GETCWD #if defined Lynx /*************************************** ***************************************/ char * getcwd( char * a, int b ) { return getwd( a ); } #endif #if defined __VMS #define getcwd( a, b ) getcwd( a, b, 0 ) /* use unix file/path syntax */ #endif #endif #ifdef FL_WIN32 /*************************************** * Convert the backslash to slash ***************************************/ static char * fl_b2f_slash( char *dir ) { char *p = dir; while ( ( p = strchr( p, '\\' ) ) ) *p = '/'; return dir; } #else #define fl_b2f_slash( a ) #endif /************* local variables ****************/ static const char *cpat; /* current pattern */ static const char *cdir; /* current working directory */ static char fname[ MAXFL + 2 ]; #define FL_NONE 0 /******* local function forward dec **********/ static int fli_wildmat( const char *, const char * ); static int tc_sort( const void *, const void * ); static int tc_scandir( const char *, struct DIRENT *** ); static int default_filter( const char *, int ); /* default filter and sort method */ int fli_sort_method = FL_ALPHASORT; static FL_DIRLIST_FILTER ffilter = default_filter; static int filter_directory = 0; /* true to filter directory entries */ /* * convert native file types to FL */ #ifndef FL_WIN32 /* [ */ /*************************************** ***************************************/ static void mode2type( unsigned int mode, int * type ) { if ( S_ISDIR( mode ) ) *type = FT_DIR; else if ( S_ISREG( mode ) ) *type = FT_FILE; else if ( S_ISLNK( mode ) ) *type = FT_LINK; else if ( S_ISSOCK(mode ) ) *type = FT_SOCK; else if ( S_ISFIFO( mode ) ) *type = FT_FIFO; else if ( S_ISCHR( mode ) ) *type = FT_CHR; #if !defined __EMX__ else if ( S_ISBLK( mode ) ) *type = FT_BLK; #endif else *type = FT_OTHER; } /****************************************************************** * Filter the filename before handing it over to the "file is here" * list. Per default only files (including links) are shown. ******************************************************************/ static int fselect( const char * d_name, struct stat * ffstat, int * type ) { int ret = 0; unsigned int mode; strcat(strcpy( fname, cdir), d_name ); stat( fname, ffstat ); mode = ffstat->st_mode; mode2type( mode, type ); if ( ! ffilter ) ret = 1; else if ( ffilter == default_filter ) { /* Always keep directory and links */ ret = S_ISDIR(mode) || ( ( S_ISREG( mode ) || S_ISLNK( mode ) ) && fli_wildmat( d_name, cpat ) ); } else { /* We don't filter directories unless requested */ if ( ! filter_directory ) ret = *type == FT_DIR || ( fli_wildmat( d_name, cpat ) && ffilter( fname, *type ) ); else ret = ( *type == FT_DIR || fli_wildmat( d_name, cpat ) ) && ffilter( fname, *type ); } return ret; } #else /* WIN 32 ][ */ /*************************************** ***************************************/ static int fselect( struct _finddata_t * c_file, FL_Dirlist * dl ) { int type, ret = 0; if ( c_file->attrib & _A_SUBDIR ) type = FT_DIR; else type = FT_FILE; if ( ! ffilter ) ret = 1; else if ( ffilter == default_filter ) { /* always keep directory and links */ ret = type == FT_DIR || fli_wildmat( c_file->name, cpat ); } else { strcat( strcpy( fname, cdir ), c_file->name ); ret = type == FT_DIR || ( flo_wildmat( c_file->name, cpat ) && ffilter( fname, type ) ); } if ( ret ) { dl->name = fl_strdup( c_file->name ); dl->type = type; dl->dl_mtime = c_file->time_write; dl->dl_size = c_file->size; } return ret; } #endif /* FL_WIN32 ] */ /*************************************** * Sort the directory entries according to the sort method ***************************************/ static int tc_sort( const void * a, const void * b ) { FL_Dirlist *da = ( FL_Dirlist * ) a; FL_Dirlist *db = ( FL_Dirlist * ) b; switch ( fli_sort_method ) { case FL_RALPHASORT: return strcmp( db->name, da->name ); case FL_RCASEALPHASORT: return strcasecmp( db->name, da->name ); case FL_MTIMESORT: return da->dl_mtime - db->dl_mtime; case FL_RMTIMESORT: return db->dl_mtime - da->dl_mtime; case FL_SIZESORT: return da->dl_size > db->dl_size ? 1 : ( da->dl_size == db->dl_size ? 0 : -1 ); case FL_RSIZESORT: return da->dl_size < db->dl_size ? 1 : ( da->dl_size == db->dl_size ? 0 : -1 ); case FL_CASEALPHASORT: return strcasecmp( da->name, db->name ); case FL_ALPHASORT: default: return strcmp( da->name, db->name ); } } /******************************************************************* * On entry, dir must be no zero and be terminated properly, i.e., * ends with / *******************************************************************/ #ifndef FL_WIN32 static int scandir_get_entries( const char * dir, const char * pat, FL_Dirlist ** dirlist ) { static struct DIRENT **dlist; FL_Dirlist *dl; static int lastn; static struct stat ffstat; int i, n; cpat = pat; cdir = dir; /* Free all memory used last time we were here */ if ( dlist ) { while ( --lastn >= 0 ) if ( dlist[ lastn ] ) fl_free( dlist[ lastn ]); fl_free( dlist ); dlist = NULL; } n = 0; if ( ( lastn = tc_scandir( dir, &dlist ) ) > 0 ) { dl = *dirlist = fl_malloc( ( lastn + 1 ) * sizeof **dirlist ); for ( i = n = 0; i < lastn; i++ ) { if ( fselect( dlist[ i ]->d_name, &ffstat, &dl->type ) ) { dl->name = fl_strdup( dlist[ i ]->d_name ); dl->dl_mtime = ffstat.st_mtime; dl->dl_size = ffstat.st_size; dl++; n++; } } dl->name = NULL; /* sentinel */ if ( fli_sort_method != FL_NONE ) qsort( *dirlist, n, sizeof **dirlist, tc_sort ); } return n; } #else /* FL_WIN32 */ /*************************************** ***************************************/ static int scandir_get_entries( const char * dir, const char * pat, FL_Dirlist ** dirlist ) { FL_Dirlist *dl; char cwd[ FL_PATH_MAX ]; struct _finddata_t c_file; long hFile; int n, lastn; cpat = pat; cdir = dir; n = 0; /* Save the working directory */ getcwd( cwd, FL_PATH_MAX ); if ( chdir( dir ) != 0 ) /* invalid directory */ return 0; /* Find all files matched the pattern in current directory */ if ( ( hFile = _findfirst( "*", &c_file ) ) == -1L ) { /* Directory is empty, nothing to do */ chdir( cwd ); return 0; } lastn = 10; dl = *dirlist = fl_malloc( ( lastn + 1 ) * sizeof **dirlist ); if ( fselect( &c_file, dl ) ) { dl++; n++; } /* Find the rest of the files */ while ( _findnext( hFile, &c_file ) == 0 ) { if ( fselect( &c_file, dl ) ) { dl++; n++; if ( n > lastn ) { lastn += 10; *dirlist = fl_realloc( *dirlist, ( lastn + 1 ) * sizeof **dirlist ); dl = *dirlist + n; } } } _findclose( hFile ); chdir( cwd ); dl->name = NULL; /* sentinel */ if ( fli_sort_method != FL_NONE ) qsort( *dirlist, n, sizeof **dirlist, tc_sort ); return n; } #endif /* FL_WIN32 */ /******************************************************************** * The user routine. * * Get a list of files in directory, subject to pattern matching, * and return the file list. Rescan will force a read even the requested * directory is cached. * ********************************************************************/ static char *lastdir[ MAXCACHE ], *lastpat[ MAXCACHE ]; static int lastn[ MAXCACHE ], last_sort[ MAXCACHE ]; static FL_Dirlist *dirlist[ MAXCACHE ]; /******************************************************************** * Check if a particular directory is cached ********************************************************************/ static int is_cached( const char * dir, const char * pat, int * c ) { int cached = 0, i = 0; static int lastcache; do { cached = lastpat[ i ] && lastdir[ i ] && strcmp( lastdir[ i ], dir ) == 0 && strcmp( lastpat[ i ], pat ) == 0 && dirlist[ i ] && dirlist[ i ]->name; *c = i++; } while ( ! cached && i < MAXCACHE ); /* search for the least used slot if not cached */ if ( ! cached ) *c = ++lastcache % MAXCACHE; lastcache = *c; M_info( "is_cached", "%s is %s cached", dir, cached ? "" : "not" ); return cached; } /*************************************** ***************************************/ void fl_free_dirlist( FL_Dirlist * dl ) { size_t i; for ( i = 0; i < MAXCACHE; i++ ) if ( dl == dirlist[ i ] ) break; if ( i >= MAXCACHE ) { M_err( "fl_free_dirlist", "Bad list" ); return; } while ( dl && dl->name ) { fl_free( dl->name ); dl->name = NULL; /* important: signifies empty list */ dl++; } if ( dirlist[ i ] ) { fl_free( dirlist[ i ] ); dirlist[ i ] = NULL; } } /*************************************** ***************************************/ void fl_free_all_dirlist( void ) { int i; for ( i = 0; i < MAXCACHE; i++ ) fl_free_dirlist( dirlist[ i ] ); } /********************************************************************** * The user callable routine to read a directory *********************************************************************/ const FL_Dirlist * fl_get_dirlist( const char * dir, const char * pattern, int * n, int rescan ) { int i, c; const char *pat = pattern; char okdir[ FL_PATH_MAX + 1 ]; if ( ! dir || ! *dir ) return NULL; if ( ! pat || ! *pat ) pat = "*"; /* Fix the directory on the fly */ i = strlen( strcpy( okdir, dir ) ); if ( okdir[ i - 1 ] != '/' ) { okdir[ i ] = '/'; okdir[ ++i ] = '\0'; } /* is_cached must go first to get correct cache location */ if ( ! is_cached( okdir, pat, &c ) || rescan ) { fl_free_dirlist( dirlist[ c ] ); lastn[ c ] = scandir_get_entries( okdir, pat, dirlist + c ); last_sort[ c ] = fli_sort_method; StrReDup( lastpat[ c ], pat ); StrReDup( lastdir[ c ], okdir ); } *n = lastn[ c ]; if ( last_sort[ c ] != fli_sort_method ) { qsort( dirlist[ c ], *n, sizeof **dirlist, tc_sort ); last_sort[ c ] = fli_sort_method; } return dirlist[ c ]; } /*********************************************************************** * Misc. routines related to directory handling **********************************************************************/ int fl_is_valid_dir( const char *name ) { struct stat stbuf; #ifdef __EMX__ if ( isalpha( name[ 0 ] ) && name[ 1 ] == ':' && name[ 2 ] == '0' ) return 1; #endif /* On some machines name should be a plain char * (why? JTT) */ return name && stat( ( char * ) name, &stbuf ) == 0 && S_ISDIR( stbuf.st_mode ); } /*************************************** * Fix directory names such as ../../a/b etc ***************************************/ static void add_one( char *, char * ); char * fl_fix_dirname( char * dir ) { static char ldir[ FL_PATH_MAX ], one[ FL_PATH_MAX ]; char *p = ldir, *q = one; fl_b2f_slash( dir ); if ( ! *dir ) /* Here's some bullshit going one, what's ldir set to ? */ return fli_getcwd( dir ? dir : ldir, FL_PATH_MAX - 2 ); else if ( dir[ 0 ] == '.' && dir[ 1 ] == '.' && dir[ 2 ] == '\0' ) { fli_getcwd( dir ? dir : ldir, FL_PATH_MAX - 2 ); if ( ( p = strrchr( dir ? dir : ldir, '/' ) ) ) *p = '\0'; return dir ? dir : ldir; } else if ( *dir == '/') { if ( dir[ 1 ] == '\0' || ( dir[ 1 ] == '.' && dir[ 2 ] == '.' && ( dir[ 3 ] == '/' || dir[ 3 ] == '\0' ) ) ) return strcpy( dir, "/" ); } strcpy( ldir, dir ); p = ldir; #if defined __EMX__ || defined FL_WIN32 if ( isalpha( ldir[ 0 ] ) && ldir[ 1 ] == ':' ) { /* drive letter */ dir[ 0 ] = ldir[ 0 ]; dir[ 1 ] = ldir[ 1 ]; dir[ 2 ] = '\0'; p = ldir + 2; } else #elif defined opennt if ( ldir[ 0 ] == '/' && ldir[ 1 ] == '/' && isalpha( ldir[ 2 ] ) ) { /* //E is E dirver */ dir[ 0 ] = ldir[ 0 ]; dir[ 1 ] = ldir[ 1 ]; dir[ 2 ] = ldir[ 2 ]; dir[ 3 ] = '\0'; p = ldir + 3; } else #endif if ( ldir[ 0 ] != '/' && ldir[ 0 ] != '~' ) fli_getcwd( dir, FL_PATH_MAX - 2 ); else dir[ 0 ] = '\0'; while ( *p ) { #ifdef __EMX__ if ( *p == '/' || *p == '\\' ) { #else if ( *p == '/' ) { #endif *q = '\0'; if ( q > one ) add_one( dir, q = one ); } else *q++ = *p; p++; } *q = '\0'; if ( q > one ) add_one( dir, one ); #if defined __EMX__ || defined FL_WIN32 if ( strlen( dir ) == 2 && dir[ 1 ] == ':' ) { /* fix a single "C:" */ dir[ 2 ] = '/'; dir[ 3 ] = '\0'; } #endif #if defined opennt if ( strlen( dir ) == 3 && dir[ 0 ] == '/' && dir[ 1 ] == '/' && isalpha( ldir[ 2 ] ) ) { /* fix "//C" */ dir[ 3 ] = '/'; dir[ 4 ] = '\0'; } #endif fl_b2f_slash( dir ); return dir; } #ifndef FL_WIN32 #include #endif /*************************************** ***************************************/ static void add_one( char dir[ ], char one[ ] ) { char *q; if ( one[ 0 ] == '.' && one[ 1] == '.' && one[ 2 ] == '\0' ) { if ( ( q = strrchr( dir, '/' ) ) ) *( q + ( q == dir ) ) = '\0'; #ifndef FL_WIN32 } else if ( one[ 0 ] == '~' ) { if ( one[ 1 ] == '\0' ) { /* must be ~/ ... */ strcat( dir, ( q = getenv( "HOME" ) ) ? q : "/" ); } else { /* must be ~name */ /* Mathod: vms <7.0 has no getpwnam(). Ignore ~name */ #if !defined __VMS || __VMS_VER >= 70000000 struct passwd *p = getpwnam( one + 1 ); strcat( dir, p ? p->pw_dir : "/" ); #ifndef opennt endpwent( ); #endif #endif } #endif /* FL_WIN32 */ } else if ( ! ( one[0] == '.' && one[ 1 ] == '\0' ) ) { strcat( strcat( dir, "/" ), one ); } #ifdef __VMS /* VMS has directory extensions, strip it */ { int n = strlen( dir ); char *p; if ( n > 4 ) { for ( p = dir + n - 4; *p; p++ ) *p = toupper( *p ); if ( strcmp( ( p = dir + n - 4 ), ".DIR" ) == 0 ) *p = '\0'; } } #endif } /************************************************************ * File modification time ***********************************************************/ unsigned long fl_fmtime( const char * s ) { struct stat fffstat; stat( ( char * ) s, &fffstat ); return fffstat.st_mtime; } /* String matching routine is adapted from Rick Salz */ static int match_star( const char * s, const char * p ); /*************************************** * Match string "s" to pattern "p" ***************************************/ static int do_matching( const char * s, const char * p ) { int last, matched, reverse; for ( ; *p; s++, p++ ) { if ( *s == '\0' ) return *p == '*' && *++p == '\0' ? 1 : -1; switch ( *p ) /* parse pattern */ { case '\\': /* Literal match with following character. */ if ( *s != *++p ) return 0; continue; default: /* literal match */ #ifdef __VMS /* vms filenames are not case sensitive */ if ( toupper( *s ) != toupper( *p ) ) #else if ( *s != *p ) #endif return 0; continue; case '?': /* Match anything. */ continue; case '*': /* Trailing star matches everything. */ return *++p ? match_star( s, p ) : 1; case '[': /* [!....] means inverse character class. */ if ( ( reverse = p[ 1 ] == '!' ) ) p++; for ( last = 0400, matched = 0; *++p && *p != ']'; last = *p ) if ( ( *p == '-' && *s <= *++p && *s >= last ) || ( *p != '-' && *s == *p ) ) matched = 1; if ( matched == reverse ) return 0; continue; } } return *s == '\0'; } /*************************************** ***************************************/ static int match_star( const char * s, const char * p ) { int result; while ( ( result = do_matching( s, p ) ) == 0 ) /* gobble up * match */ if ( *++s == '\0' ) return -1; return result; } /*************************************** * check if s matches pattern p ***************************************/ static int fli_wildmat( const char * s, const char * p ) { if ( *p == '\0' && *s != '.' ) return 1; else if ( *p == '\0' ) return 0; else if ( ( *p == '?' || *p == '*' ) && *s == '.' ) return 0; else return do_matching( s, p ) == 1; } /*************************************** * scandir emulation ***************************************/ #ifndef FL_WIN32 static int tc_scandir( const char * dirname, struct DIRENT *** namelist ) { DIR *dir; struct DIRENT *dentry, **head = NULL; int n = 0, total; static int dname_is_1; if ( ! ( dir = opendir( dirname ) ) ) return -1; if ( sizeof( struct DIRENT ) < 100 && ! dname_is_1 ) { M_warn("tc_scandir", "Bad dirent -- will fix it on the fly" ); dname_is_1 = 1; } /* Start reading the darn thing */ for ( n = 0; ( dentry = readdir( dir ) ) != NULL; n++ ) { head = fl_realloc( head, ( n + 1 ) * sizeof *head ); /* Here it is even weirder: some systems have d_reclen = sizeof(struct dirent) + strlen(d_name) and some have it as d_reclen = strlen(d_name) */ /* Mathog, VMS<7.0, at least has no d_reclen *at all */ #if defined __VMS && __VMS_VER < 70000000 || defined opennt || defined __CYGWIN__ total = dname_is_1 ? strlen( dentry->d_name ) : sizeof *dentry; #else total = dname_is_1 ? dentry->d_reclen : sizeof *dentry; #endif memcpy( head[ n ] = fl_malloc( total ), dentry, total ); } closedir( dir ); *namelist = head; return n; } #endif /* ! FL_WIN32 */ /*************************************** ***************************************/ FL_DIRLIST_FILTER fl_set_dirlist_filter( FL_DIRLIST_FILTER filter ) { FL_DIRLIST_FILTER old = ffilter; ffilter = filter; return old; } /*************************************** ***************************************/ int fl_set_dirlist_filterdir( int yes ) { int old = filter_directory; filter_directory = yes; return old; } /*************************************** * for application's benifit ***************************************/ static int default_filter( const char * name FL_UNUSED_ARG, int type ) { return type == FT_FILE || type == FT_DIR || type == FT_LINK; } /*************************************** ***************************************/ int fl_set_dirlist_sort( int method ) { int old = fli_sort_method; fli_sort_method = method; return old; } #ifdef __VMS #include "vms_readdir.c" #endif /*************************************** ***************************************/ char * fli_getcwd( char * buf, int len ) { #ifdef FL_WIN32 return fl_b2f_slash( getcwd( buf, len ) ); #else return getcwd( buf, len ); #endif } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/bitmap.c0000644000175000017500000003077711315731443014434 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file bitmap.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * FL_BITMAP & FL_BITMAPBUTTON class. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ static void free_bitmap( FL_BUTTON_STRUCT * p ) { if ( p->pixmap ) XFreePixmap( flx->display, p->pixmap ); p->pixmap = None; } /******************************************************************** * static bitmap ******************************************************************{*/ static void drawit( Window win, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_Coord src_x, FL_Coord src_y, FL_COLOR fcol, FL_COLOR bcol, Pixmap bitmap ) { FL_Coord clip_x, clip_y, clip_w, clip_h; /* Get the currently set clipping */ fli_get_clipping( &clip_x, &clip_y, &clip_w, &clip_h ); if ( clip_w > 0 && clip_h > 0 ) { /* If the bitmap is not within the clipping region nothing is to be drawn */ if ( x + w < clip_x || x > clip_x + clip_w || y + h < clip_y || y > clip_y + clip_h ) return; /* If the bitmap isn't completely within the clipping region recalculate what to draw */ if ( x <= clip_x || x + w >= clip_x + clip_w || y <= clip_y || y + h >= clip_y + clip_h ) { if ( x < clip_x ) { src_x += clip_x - x; w -= clip_x - x; x = clip_x; } if ( x + w > clip_x + clip_w ) w = clip_x + clip_w - x; if ( y < clip_y ) { src_y += clip_y - y; h -= clip_y - y; y = clip_y; } if ( y + h > clip_y + clip_h ) h = clip_y + clip_h - y; } } fl_color( fcol ); fl_bk_color( bcol ); XCopyPlane( flx->display, bitmap, win, flx->gc, src_x, src_y, w, h, x, y, 1 ); } /*************************************** ***************************************/ static void draw_bitmap( FL_OBJECT * obj ) { FL_BUTTON_STRUCT *sp = obj->spec; FL_Coord xx, /* position of bitmap */ yy; /* Draw the box */ fl_drw_box( obj->boxtype, obj->x, obj->y, obj->w, obj->h, obj->col1, obj->bw ); /* do nothing is not empty data */ if ( sp->bits_w == 0 || ! sp->pixmap ) return; /* Calculate position so the bitmap is centered */ xx = obj->x + ( obj->w - sp->bits_w ) / 2; yy = obj->y + ( obj->h - sp->bits_h ) / 2; drawit( FL_ObjWin( obj ), xx, yy, sp->bits_w, sp->bits_h, 0, 0, obj->lcol, obj->col1, sp->pixmap ); } /*************************************** * Handles an event, returns whether value has changed. ***************************************/ static int handle_bitmap( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { switch ( event ) { case FL_DRAW: draw_bitmap( obj ); /* fall through */ case FL_DRAWLABEL: fl_draw_object_label( obj ); break; case FL_FREEMEM: free_bitmap( obj->spec ); fl_free( obj->spec ); break; } return FL_RETURN_NONE; } /*************************************** * Creates an object ***************************************/ FL_OBJECT * fl_create_bitmap( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FL_BUTTON_STRUCT *sp; obj = fl_make_object( FL_BITMAP, type, x, y, w, h, label, handle_bitmap ); obj->boxtype = FL_BITMAP_BOXTYPE; obj->col1 = FL_BITMAP_COL1; obj->col2 = FL_BITMAP_COL2; obj->lcol = FL_BITMAP_LCOL; obj->align = FL_BITMAP_ALIGN; obj->active = type != FL_NORMAL_BITMAP; sp = obj->spec = fl_calloc( 1, sizeof *sp ); sp->pixmap = sp->mask = sp->focus_pixmap = sp->focus_mask = None; sp->cspecv = NULL; sp->filename = sp->focus_filename = NULL; return obj; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_bitmap( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_bitmap( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** * Fills the bitmap with a bitmap. ***************************************/ void fl_set_bitmap_data( FL_OBJECT * obj, int w, int h, unsigned char * data ) { FL_BUTTON_STRUCT *sp; Pixmap p; if ( obj == NULL || obj->objclass != FL_BITMAP ) return; /* only occurs with fdesign -convert */ if ( ! flx->display ) return; sp = obj->spec; p = XCreateBitmapFromData( flx->display, FL_ObjWin( obj ) ? FL_ObjWin( obj ) : fl_root, ( char * ) data, w, h ); if ( p == None ) { M_err( "fl_set_bitmap_data", "Can't create bitmap" ); return; } sp->bits_w = w; sp->bits_h = h; sp->pixmap = p; fl_redraw_object( obj ); } /*************************************** ***************************************/ Pixmap fl_read_bitmapfile( Window win, const char * file, unsigned int * w, unsigned int * h, int * hotx, int * hoty ) { Pixmap p = None; int status; status = XReadBitmapFile( flx->display, win, ( char * ) file, w, h, &p, hotx, hoty ); if ( status != BitmapSuccess ) M_err( "fl_read_bitmapfile", "%s: %s", file, status == BitmapFileInvalid ? "Invalid file" : "Can't read" ); return p; } /*************************************** ***************************************/ void fl_set_bitmap_file( FL_OBJECT * obj, const char * fname ) { unsigned int w, h; int xhot, yhot; Pixmap p; if ( ! flx->display ) return; if ( ! obj || ( obj->objclass != FL_BITMAP && obj->objclass != FL_BITMAPBUTTON ) ) { M_err( "fl_set_bitmap_file", "object %s not bitmap or bitmap button", ( obj && obj->label ) ? obj->label : "null" ); return; } p = fl_read_bitmapfile( FL_ObjWin( obj ) ? FL_ObjWin( obj ) : fl_root, fname, &w, &h, &xhot, &yhot ); if ( p != None ) { FL_BUTTON_STRUCT *sp = obj->spec; free_bitmap( sp ); sp->pixmap = p; sp->bits_w = w; sp->bits_h = h; } fl_redraw_object( obj ); } /***** End of static BITMAP ************************/ /******************************************************************* * BITMAP buttons ****************************************************************{*/ /*************************************** ***************************************/ static void draw_bitmapbutton( FL_OBJECT * obj ) { FL_BUTTON_STRUCT *sp = obj->spec; fli_draw_button( obj ); if ( sp->pixmap != None && sp->bits_w > 0 && sp->bits_h > 0 ) { int dest_x, dest_y, dest_w, dest_h, src_x, src_y; FL_COLOR col; /* Make sure the bitmap gets clipped to the maximum size fitting into the button */ if ( obj->w - 2 * FL_abs( obj->bw ) > ( int ) sp->bits_w ) { dest_x = obj->x + ( obj->w - sp->bits_w ) / 2; dest_w = sp->bits_w; src_x = 0; } else { dest_x = obj->x + FL_abs( obj->bw ); dest_w = obj->w - 2 * FL_abs( obj->bw ); src_x = ( sp->bits_w - dest_w ) / 2; } if ( obj->h - 2 * FL_abs( obj->bw ) > ( int ) sp->bits_h ) { dest_y = obj->y + ( obj->h - sp->bits_h ) / 2; dest_h = sp->bits_h; src_y = 0; } else { dest_y = obj->y + FL_abs( obj->bw ); dest_h = obj->h - 2 * FL_abs( obj->bw ); src_y = ( sp->bits_h - dest_h ) / 2; } col = sp->val ? obj->col2 : obj->col1; if ( obj->belowmouse && col == FL_BUTTON_COL1 ) col = FL_BUTTON_MCOL1; if ( obj->belowmouse && col == FL_BUTTON_COL2 ) col = FL_BUTTON_MCOL2; drawit( FL_ObjWin( obj ), dest_x, dest_y, dest_w, dest_h, src_x, src_y, obj->lcol, col, sp->pixmap ); } fl_draw_object_label( obj ); } /*************************************** ***************************************/ FL_OBJECT * fl_create_bitmapbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; fl_add_button_class( FL_BITMAPBUTTON, draw_bitmapbutton, 0 ); obj = fl_create_generic_button( FL_BITMAPBUTTON, type, x, y, w, h, label ); obj->boxtype = FL_BITMAPBUTTON_BOXTYPE; obj->col1 = FL_BITMAPBUTTON_COL1; obj->col2 = FL_BITMAPBUTTON_COL2; obj->align = FL_BITMAPBUTTON_ALIGN; obj->lcol = FL_BITMAP_LCOL; return obj; } /*************************************** ***************************************/ FL_OBJECT * fl_add_bitmapbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_bitmapbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** ***************************************/ void fl_set_bitmapbutton_data( FL_OBJECT * obj, int w, int h, unsigned char * bits ) { FL_BUTTON_STRUCT *sp; Window win; if ( ! obj || obj->objclass != FL_BITMAPBUTTON ) return; win = FL_ObjWin( obj ) ? FL_ObjWin( obj ) : fl_root; sp = obj->spec; free_bitmap( sp ); sp->bits_w = w; sp->bits_h = h; sp->pixmap = XCreateBitmapFromData( flx->display, win, ( char * ) bits, sp->bits_w, sp->bits_h ); fl_redraw_object( obj ); } /*************************************** ***************************************/ Pixmap fl_create_from_bitmapdata( Window win, const char * data, int width, int height ) { return XCreateBitmapFromData( fl_display, win, data, width, height ); } /*************************************** ***************************************/ void fl_free_pixmap( Pixmap id ) { if ( id != None ) XFreePixmap( fl_display, id ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/Makefile.am0000644000175000017500000000362611236630005015033 0ustar jensjensinclude $(top_srcdir)/config/common.am if USE_BWC_BS_HACK BWC = -D USE_BWC_BS_HACK else BWC = endif CLEANFILES = forms.h xforms.5 EXTRA_DIST = xforms.man \ dirent_vms.h \ vms_readdir.c SUBDIRS = bitmaps fd include private # The Autobook recommends using "man5_MANS = xforms.man" which certainly # simplifies things but appears not to work with automake 1.5. man_MANS = xforms.5 xforms.5: cp -p $(srcdir)/xforms.man xforms.5 INCLUDES = -DMAKING_FORMS $(X_CFLAGS) $(BWC) lib_LTLIBRARIES = libforms.la libforms_la_LDFLAGS = -no-undefined -Wl,--no-undefined -version-info @SO_VERSION@ libforms_la_LIBADD = $(X_LIBS) $(XPM_LIB) -lX11 libforms_la_SOURCES = \ align.c \ appwin.c \ asyn_io.c \ bitmap.c \ box.c \ browser.c \ button.c \ canvas.c \ chart.c \ checkbut.c \ child.c \ choice.c \ clipboard.c \ clock.c \ cmd_br.c \ colsel.c \ combo.c \ counter.c \ cursor.c \ dial.c \ display.c \ dmalloc.h \ errmsg.c \ events.c \ extern.h \ flcolor.c \ fldraw.c \ flinternal.h \ flsnprintf.c \ flresource.c \ flvisual.c \ fonts.c \ formbrowser.c \ forms.c \ frame.c \ free.c \ fselect.c \ global.h \ goodie_alert.c \ goodie_choice.c \ goodie_input.c \ goodie_msg.c \ goodies.c \ goodie_sinput.c \ goodie_yesno.c \ handling.c \ input.c \ interpol.c \ keyboard.c \ labelbut.c \ lframe.c \ lightbut.c \ listdir.c \ local.h \ menu.c \ nmenu.c \ objects.c \ oneliner.c \ pixmap.c \ popup.c \ positioner.c \ read2lsbf.c \ read2msbf.c \ read4lsb.c \ read4msb.c \ readint.c \ round3d.c \ roundbut.c \ scrollbar.c \ scrollbut.c \ select.c \ signal.c \ sldraw.c \ slider.c \ space.c \ spline.c \ spinner.c \ strdup.c \ symbols.c \ sysdep.c \ tabfolder.c \ tbox.c \ text.c \ thumbwheel.c \ timeout.c \ timer.c \ tooltip.c \ ulib.h \ util.c \ valuator.c \ version.c \ vn_pair.c \ vstrcat.c \ win.c \ xdraw.c \ xpopup.c \ xsupport.c \ xtext.c \ xyplot.c xforms-1.0.93sp1/lib/flvisual.c0000644000175000017500000002415411247055071014775 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file flvisual.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Visual * * XForm will by default use the visual that has the most depth */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #ifdef XlibSpecificationRelease #define XlibVersion ( XlibSpecificationRelease == 5 ) ? "R5": \ ( ( XlibSpecificationRelease == 6 ) ? "R6" : "Post-R6" ) #else #define XlibVersion "Pre-R5" #endif /******************* Local variables ************************/ static int max_server_depth; /******************************************************************** * Setup the most appropriate visual for FORMS ****************************************************************{***/ /*************************************** * Get the conversion factors from RGB->pixel in TrueColor and * DirectColor ***************************************/ static void RGBmode_init( int v ) { FL_State *s = fl_state + v; fli_xvisual2flstate( s, s->xvinfo ); #if FL_DEBUG >= ML_WARN M_info( "RGBmode_init", "%s: bits_per_rgb = %d", fl_vclass_name( v ), s->rgb_bits ); M_info( "RGBmode_init", "RS = %d GS = %d BS = %d", s->rshift, s->gshift, s->bshift ); M_info( "RGBmode_init", "RB = %d GB = %d BB = %d", s->rbits, s->gbits, s->bbits ); #endif } /*************************************** * User has the option to select visual class/depth independently via * fl_set_defaults() or through resource/command lines. The request is * stored in fli_cntl. This routine just checks if the request itself * is valid or not. It is possible both visual and depth are valid * but the combination is not. So need to follow this routine * with XMatchVisual(). ***************************************/ static void check_user_preference( int * vmode, int * depth ) { int reqv = -1, reqd = 0; reqv = fli_cntl.vclass; reqd = fli_cntl.depth; #if FL_DEBUG >= ML_WARN M_warn( "check_user_preference", "UserRequest: %s %d", reqv >= 0 ? fl_vclass_name( reqv ) : "None", reqd > 0 ? reqd : 0 ); #endif /* Need to check special value FL_DefaultVisual */ if ( reqv == FL_DefaultVisual ) { reqd = DefaultDepth( fl_display, fl_screen ); reqv = DefaultVisual( fl_display, fl_screen )->class; } /* Here make a guess if incomplete request is made */ if ( reqv >= 0 && reqd == 0 ) reqd = fli_depth( reqv ); /* If only depth is requested, select a visual */ if ( reqd > 0 && reqv < 0 ) reqv = reqd > 12 ? TrueColor : PseudoColor; if ( reqv >= 0 && reqd >= FL_MINDEPTH ) { *vmode = reqv; *depth = reqd; } } /*************************************** * Find best visual among each visual class and store all info * in fl_state structure ***************************************/ #define setmode( m, n ) ( fli_depth( m ) >= n && fl_mode_capable( m, n ) ) static int select_best_visual( void ) { static XVisualInfo *xv; static XVisualInfo *bestv[ 6 ]; static XVisualInfo xvt; /* fl_state uses it */ int xvn, i, j, depth; static int bvmode = -1; /* initial default if no user prefernce */ /* Have already done it */ if ( xv ) return bvmode; /* Request for a list of all supported visuals on fl_screen */ xvt.screen = fl_screen; if ( ! ( xv = XGetVisualInfo( fl_display, VisualScreenMask, &xvt, &xvn ) ) ) { M_err( "select_best_visual", " Can't get VisualInfo!" ); exit( 1 ); } /* Choose the visual that has the most colors among each class. */ for ( i = 0; i < xvn; i++ ) { depth = xv[ i ].depth; j = xv[ i ].class; /* Simply use visuals returned by GetVisualInfo and make sure xv is NOT freed */ if ( ! bestv[ j ] || depth > bestv[ j ]->depth ) { FL_State *fs = fl_state + j; bestv[ j ] = xv + i; fs->xvinfo = bestv[ j ]; fs->depth = bestv[ j ]->depth; fs->vclass = bestv[ j ]->class; fs->rgb_bits = bestv[ j ]->bits_per_rgb; if ( depth > max_server_depth ) max_server_depth = fs->depth; } } #if FL_DEBUG >= ML_DEBUG if ( fli_cntl.debug ) { M_warn( "select_best_visual", "XlibVersion: %s", XlibVersion ); M_info( "select_best_visual", "DPI = %d", fli_dpi ); M_warn( "select_best_visual", "No. of Visuals: %d", xvn ); for ( j = 0; j < 6; j++ ) if ( bestv[ j ] ) fprintf( stderr, "Best %11s: Id = 0x%lx Depth = %2u RGBbits = %d\n", fl_vclass_name( fli_class( j ) ), bestv[ j ]->visualid, bestv[ j ]->depth, bestv[ j ]->bits_per_rgb ); } #endif /* Demand FL_MINDEPTH bits. Since V0.63, FL_MINDEPTH is 1, so this this check is basically a no-op unless something is wrong. */ if ( max_server_depth < FL_MINDEPTH ) { M_err( "select_best_visual", "MaxServerDepth = %d. XForms requires at least %d. Sorry", max_server_depth, FL_MINDEPTH ); exit( 1 ); } /* If depth is smaller than 10, RGBmode offers no advantage over PseudoColor in that PseudoColors offers better flexibility */ if ( setmode( TrueColor, 12 ) ) bvmode = TrueColor; else if ( setmode( DirectColor, 12 ) ) bvmode = DirectColor; else if ( setmode( PseudoColor, FL_MINDEPTH ) ) bvmode = PseudoColor; else if ( setmode( StaticColor, FL_MINDEPTH ) ) bvmode = StaticColor; else if ( setmode( GrayScale, FL_MINDEPTH ) ) bvmode = GrayScale; else if ( setmode( StaticGray, FL_MINDEPTH ) ) bvmode = StaticGray; else if ( xvn ) /* have to take what we have */ bvmode = xv[ 0 ].class; else { M_err( "select_best_visual", "Can't find an appropriate visual" ); exit( 1 ); } return bvmode; } /*************************************** * After this routine, program should have selected a workable * visual/depth combination ***************************************/ int fli_initialize_program_visual( void ) { int vmode, depth; static XVisualInfo xvt; static int visual_initialized; static int program_vclass; if ( visual_initialized ) return program_vclass; vmode = select_best_visual( ); #if FL_DEBUG >= ML_WARN M_warn( "fli_initialize_program_visual", "Initial visual: %s (ID = 0x%lx) depth = %d", fl_vclass_name( vmode ), fli_visual( vmode )->visualid, fli_depth( vmode ) ); #endif /* Check program default, settable by user fl_vmode */ if ( fl_vmode >= 0 ) vmode = fl_vmode; depth = fli_depth( vmode ); M_warn( "fli_initialize_program_visual", "ProgramDefault: %s %d", fl_vclass_name( vmode ), depth); /* Give user a chance to select a visual */ check_user_preference( &vmode, &depth ); M_warn( "fli_initialize_program_visual", "UserPreference: %s %d", fl_vclass_name( vmode ), depth ); /* If requested a visualID directly, honor it here */ if ( fli_requested_vid > 0 ) { XVisualInfo xv, *retxv; int nv; M_warn( "fli_initialize_program_visual", "UserRequestedVID: 0x%lx", fli_requested_vid ); xv.visualid = fli_requested_vid; if ( ( retxv = XGetVisualInfo( fl_display, VisualIDMask, &xv, &nv ) ) ) { FL_State *fs = fl_state + retxv->class; vmode = retxv->class; fs->xvinfo = retxv; fs->depth = retxv->depth; fs->vclass = retxv->class; fs->rgb_bits = retxv->bits_per_rgb; } else { M_err( "fli_initialize_program_visual", "Can't find visualID 0x%lx", fli_requested_vid ); fli_requested_vid = 0; } } /* Make sure the stuff flies. */ if ( ! fli_requested_vid ) { if ( XMatchVisualInfo( fl_display, fl_screen, depth, vmode, &xvt ) ) { FL_State *fs = fl_state + xvt.class; vmode = xvt.class; fs->xvinfo = &xvt; fs->depth = xvt.depth; fs->vclass = xvt.class; fs->rgb_bits = xvt.bits_per_rgb; } else { /* Bogus request. Revert to the best visual we have found */ M_err( "fli_initialize_program_visual", "Bogus request: %s with depth = %d", fl_vclass_name( vmode ), depth ); vmode = select_best_visual( ); } } program_vclass = vmode; #if FL_DEBUG >= ML_WARN M_warn( "fli_initialize_program_visual", "SelectedVisual: %s (ID = 0x%lx) depth = %d", fl_vclass_name( vmode ), fli_visual( vmode )->visualid, fli_depth( vmode ) ); #endif /* If RGB Visual is supported, need to find out the masks and shifts stuff to be used in RGB -> pixel mapping */ if ( fli_depth( TrueColor ) ) RGBmode_init( TrueColor ); if ( fli_depth( DirectColor ) ) RGBmode_init( DirectColor ); visual_initialized = 1; return program_vclass; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/cmd_br.c0000644000175000017500000004214511250740677014405 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file cmd_br.c * * This file is part of the XForms library package. * Copyright (c) 1997-2002 T.C. Zhao * All rights reserved. * * Run a command and have its output re-directed to a browser. * Not very robust as signals are not handled. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "fd/cmdbr.h" #include "private/flsnprintf.h" #ifndef FL_WIN32 #include #include #include #else #include #include #include #include #define waitpid( pid,pstat, code ) _cwait( pstat, pid, code ) #define pid_t HANDLE #endif /* FL_WIN32 */ /* structures that hold the current running processes */ typedef struct pidlist { struct pidlist * next; pid_t pid; int fd_out, fd_err, fd_user; } PIDList; static PIDList *pidlist = NULL; static FD_cmd *logger = NULL; /*************************************** ***************************************/ static void io_cb( int fd, void * data FL_UNUSED_ARG ) { char buf[ 1024 ]; int n; #ifndef FL_WIN32 if ( ( n = read( fd, buf, sizeof buf - 1 ) ) > 0 ) { buf[ n ] = '\0'; fl_addto_browser_chars( logger->browser, buf ); } else if ( n <= 0 ) { /* 0: EOF <0: error. */ if ( n < 0 ) M_err( "io_cb", "read returns %d", n ); fl_remove_io_callback( fd, FL_READ, io_cb ); close( fd ); } #else ReadFile( ( HANDLE ) fd, buf, sizeof buf - 1, &n, NULL ); if ( n > 0 ) { buf[ n ] = '\0'; fl_addto_browser_chars( logger->browser, buf ); } else if ( n <= 0 ) { /* 0: EOF <0: error. */ if ( n < 0 ) M_err( "io_cb", "read returns %d", n ); fl_remove_io_callback( fd, FL_READ, io_cb ); CloseHandle( ( HANDLE ) fd ); } #endif } /*************************************** ***************************************/ static void check_for_activity( PIDList * cur ) { XEvent xev; /* we must read until the pipe is closed otherwise waitpid will hang */ do { if ( fl_check_forms( ) == FL_EVENT ) fl_XNextEvent( &xev ); } while ( fli_is_watched_io( cur->fd_out ) || fli_is_watched_io( cur->fd_err ) ); fl_update_display( 1 ); } /*************************************** ***************************************/ void fl_cmdbr_close_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_hide_form( ( ( FD_cmd * ) ob->form->fdui )->cmd ); } /*************************************** ***************************************/ void fl_cmdbr_clear_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_clear_browser( ( ( FD_cmd * ) ob->form->fdui )->browser ); } /*************************************** ***************************************/ static int atclose( FL_FORM * form FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { return FL_OK; } /*************************************** ***************************************/ static void create_logger( void ) { if ( ! logger ) { int oldy = fli_inverted_y; int oldu = fl_get_coordunit( ); fli_inverted_y = 0; fl_set_coordunit( FL_COORD_PIXEL ); logger = create_form_cmd( ); fl_set_object_bw( logger->backface, 2 ); fl_set_form_minsize( logger->cmd, 250, 100 ); fl_set_form_atclose( logger->cmd, atclose, 0 ); fl_set_form_position( logger->cmd, -logger->cmd->w - 5, 3 ); fli_inverted_y = oldy; fl_set_coordunit( oldu ); } } /*************************************** ***************************************/ void fl_addto_command_log( const char * s ) { create_logger( ); fl_addto_browser_chars( logger->browser, s ); } /*************************************** ***************************************/ void fl_clear_command_log( void ) { create_logger( ); fl_clear_browser( logger->browser ); } /*************************************** ***************************************/ void fl_show_command_log( int border ) { create_logger( ); fl_fit_object_label( logger->close_br, 2, 1 ); fl_fit_object_label( logger->clear_br, 2, 1 ); fl_show_form( logger->cmd, FL_PLACE_POSITION, border, "MessageLog" ); } /*************************************** ***************************************/ void fl_hide_command_log( void ) { create_logger( ); if ( logger->cmd->visible ) fl_hide_form( logger->cmd ); } /* * VMS support is from the patch by * David Mathog (mathog@seqaxp.bio.caltech.edu) */ /* OpenVMS < 7.0 is missing some key pieces here, notably waitpid, so it uses wait instead. Also, vfork instead of fork (see local.h). */ #ifdef __VMS #include /* for wait(),vfork() */ /*************************************** ***************************************/ static void fl_execl( const char * path, const char * arg0, const char * arg1, const char * arg2, const char * arg3 ) { char cmd_tmp[ 1024 ]; char *cmd_token[ 16 ]; int i; /* VMS needs the tokens as tokens, not in one big command line. The following code is really simple minded, and will screw up if one of the command line arguments includes double quotes around spaces. A maximum of 16 tokens can exist in the command line. */ for ( i = 0; i < 16; i++ ) cmd_token[ i ] = NULL; strncpy( cmd_tmp, arg2, 1024 ); cmd_token[ 0 ] = strtok( cmd_tmp, " " ); cmd_token[ 15 ] = NULL; for ( i = 1; i < 15, ( cmd_token[ i - 1 ] != NULL ); i++ ) cmd_token[ i ] = strtok( NULL, " " ); execl( cmd_token[ 0 ], cmd_token[ 0 ], cmd_token[ 1 ], cmd_token[ 2 ], cmd_token[ 3 ], cmd_token[ 4 ], cmd_token[ 5 ], cmd_token[ 6 ], cmd_token[ 7 ], cmd_token[ 8 ], cmd_token[ 9 ], cmd_token[ 10 ], cmd_token[ 11 ], cmd_token[ 12 ], cmd_token[ 13 ], cmd_token[ 14 ], cmd_token[ 15 ], ( char * ) 0); } /*************************************** ***************************************/ #if __VMS_VER < 70000000 pid_t waitpid( pid_t pid, int * status, int options ) { return wait( status ); } #endif /* VMS_VER < 7.0 */ #else /* on all other platforms use native execl */ #define fl_execl execl #endif /* VMS */ #ifndef FL_WIN32 FL_PID_T fl_exe_command( const char * cmd, int block ) { pid_t pid; static int p_err[ 2 ] = { -1, -1 }, p_inout[ 2 ]; char buf[ 256 ]; create_logger( ); if ( pipe( p_err ) < 0 || pipe( p_inout ) < 0 ) { fl_snprintf( buf, sizeof buf, "Can't create pipe - %s", fli_get_syserror_msg( ) ); fprintf(stderr, "%s\n", buf); fl_addto_browser( logger->browser, buf ); if ( p_err[ 0 ] > 0 ) { close( p_err[ 0 ] ); close( p_err[ 1 ] ); } return -1; } if ( ( pid = fork( ) ) < 0 ) { fl_snprintf( buf, sizeof buf, "fork failed: %s", fli_get_syserror_msg( ) ); fl_addto_browser( logger->browser, buf ); perror( "fork" ); close( p_inout[ 0 ] ); close( p_inout[ 1 ] ); close( p_err[ 0 ] ); close( p_err[ 1 ] ); return -1; } if ( pid == 0 ) { dup2( p_inout[ 1 ], fileno( stdout ) ); close( p_inout[ 1 ] ); close( p_inout[ 0 ] ); dup2( p_err[ 1 ], fileno( stderr ) ); close( p_err[ 1 ] ); close( p_err[ 0 ] ); fl_execl( "/bin/sh", "sh", "-c", cmd, ( char * ) 0 ); perror( "execle" ); _exit( 127 ); } else { PIDList *cur = fl_malloc( sizeof *cur ); cur->next = pidlist; cur->pid = pid; cur->fd_user = -1; pidlist = cur; /* close write end of the pipe, only child process uses them */ close( p_inout[ 1 ] ); close( p_err[ 1 ] ); cur->fd_out = p_inout[ 0 ]; cur->fd_err = p_err[ 0 ]; /* add_io prepends. handle stdout first when data is present */ fl_add_io_callback( cur->fd_err, FL_READ, io_cb, ( void * ) ( long ) cur->pid ); fl_add_io_callback( cur->fd_out, FL_READ, io_cb, ( void * ) ( long ) cur->pid ); } return block ? ( FL_PID_T ) fl_end_command( pid ) : pid; } #else /* Win/NT platform */ FL_PID_T fl_exe_command( const char * cmd, int block ) { SECURITY_ATTRIBUTES sa = { 0 }; STARTUPINFO si = { 0 }; PROCESS_INFORMATION pi = { 0 }; HANDLE hPipeWrite = NULL; HANDLE hPipeRead = NULL; char buf[ 512 ]; PIDList *cur; create_logger( ); sa.nLength = sizeof sa; sa.bInheritHandle = FL_TRUE; sa.lpSecurityDescriptor = NULL; if ( ! CreatePipe( &hPipeRead, &hPipeWrite, &sa, 255 ) ) { fl_snprintf( buf, sizeof buf, "Can't create pipe - %s", fli_get_syserror_msg( ) ); fprintf( stderr, "%s\n", buf ); fl_addto_browser( logger->browser, buf ); return ( FL_PID_T ) - 1; } /* Make child process use p_inout as standard out, and make sure it does not show on screen. */ si.cb = sizeof si; si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; si.wShowWindow = SW_HIDE; si.hStdInput = GetStdHandle( STD_INPUT_HANDLE ); si.hStdOutput = hPipeWrite; si.hStdError = hPipeWrite; if ( CreateProcess( NULL, ( LPTSTR ) cmd, NULL, NULL, FL_TRUE, 0, NULL, NULL, &si, &pi ) ) { /* close write end of the pipe, only child process uses them */ CloseHandle( hPipeWrite ); CloseHandle( pi.hThread ); /* close the primay thread handle */ cur = fl_malloc( sizeof *cur ); cur->next = pidlist; cur->pid = pi.hProcess; cur->fd_out = hPipeRead; cur->fd_err = 0; cur->fd_user = 0; pidlist = cur; /* add_io prepends. handle stdout first when data is present */ fl_add_io_callback( ( int ) cur->fd_out, FL_READ, io_cb, ( void * ) cur->pid ); } else { fl_snprintf( buf,sizeof buf, "spawn failed: %s", fli_get_syserror_msg( ) ); fl_addto_browser( logger->browser, buf ); perror( "spawn" ); /* close the pipes */ CloseHandle( hPipeRead ); CloseHandle( hPipeWrite ); return ( FL_PID_T ) - 1; } return block ? ( FL_PID_T ) fl_end_command( cur->pid ) : cur->pid; } #endif /*************************************** * essentially a bi-directional pipe ***************************************/ FILE * fl_popen( const char * cmd, const char * type ) { pid_t pid; static int p_err[ 2 ] = { -1, -1 }, p_p2c[ 2 ] = { -1, -1 }, p_c2p[ 2 ] = { -1, -1 }; char buf[ 512 ]; int iswrite, i; FILE *fp = 0; if ( ! cmd || ! *cmd || ! type || ! *type || ( *type != 'r' && *type != 'w' ) ) return 0; iswrite = *type == 'w'; create_logger( ); if ( pipe( p_err ) < 0 || pipe( p_p2c ) < 0 || pipe( p_c2p ) < 0 ) { fl_snprintf( buf, sizeof buf, "Can't create pipe - %s", fli_get_syserror_msg( ) ); fprintf( stderr, "%s\n", buf ); fl_addto_browser(logger->browser, buf ); for ( i = 0; i < 2; i++ ) { if ( p_err[ i ] >= 0 ) close( p_err[ i ] ); if (p_p2c[ i ] >= 0 ) close( p_p2c[ i ] ); } return NULL; } if ( ( pid = fork( ) ) < 0 ) { fl_snprintf( buf,sizeof buf, "fork failed: %s", fli_get_syserror_msg( ) ); fl_addto_browser( logger->browser, buf ); perror( "fork" ); for ( i = 0; i < 2; i++ ) { close( p_err[ i ] ); close( p_p2c[ i ] ); close( p_c2p[ i ] ); } return NULL; } if ( pid == 0 ) { dup2( p_p2c[ 0 ], fileno( stdin ) ); dup2( p_c2p[ 1 ], fileno( stdout ) ); dup2( p_err[ 1 ], fileno( stderr ) ); close( p_p2c[ 0 ] ); close( p_p2c[ 1 ] ); close( p_c2p[ 0 ] ); close( p_c2p[ 1 ] ); close( p_err[ 0 ] ); close( p_err[ 1 ] ); fl_execl( "/bin/sh", "sh", "-c", cmd, ( char * ) 0 ); perror( "execle" ); _exit( 127 ); } else { /* the parent process */ PIDList *cur = fl_malloc( sizeof *cur ); cur->next = pidlist; cur->pid = pid; pidlist = cur; close( p_p2c[ 0 ] ); close( p_c2p[ 1 ] ); close( p_err[ 1 ] ); cur->fd_err = p_err[ 0 ]; cur->fd_out = p_c2p[ 0 ]; fl_add_io_callback( cur->fd_err, FL_READ, io_cb, ( void * ) ( long ) pid ); if ( iswrite ) { cur->fd_user = p_p2c[1]; fl_add_io_callback( cur->fd_out, FL_READ, io_cb, ( void * ) ( long ) pid ); } else cur->fd_user = p_c2p[ 0 ]; fp = fdopen( cur->fd_user, type ); } return fp; } /*************************************** * close pipe ***************************************/ int fl_pclose( FILE * stream ) { PIDList *cur, *last; int fd; if ( ! stream || ( fd = fileno( stream ) ) < 0 ) return -1; fclose( stream ); for ( last = 0, cur = pidlist; cur && cur->fd_user != fd; last = cur, cur = last->next ) /* empty */ ; if ( ! cur ) return -1; check_for_activity( cur ); return fl_end_command( cur->pid ); } /*************************************** ***************************************/ int fl_end_command( FL_PID_T pid ) { PIDList *cur, *last; int pstat; for ( last = 0, cur = pidlist; cur && cur->pid != pid; last = cur, cur = last->next ) /* empty */ ; if ( ! cur ) return -1; do { check_for_activity( cur ); pid = waitpid( cur->pid, &pstat, 0 ); } while ( pid == -1 && errno == EINTR ); if ( last ) last->next = cur->next; else pidlist = cur->next; fl_free( cur ); return pid == -1 ? -1 : pstat; } /*************************************** * check if PID exists or not. Return 0 if it does not, 1 if still * running, any other value indicates an error ***************************************/ int fl_check_command( FL_PID_T pid ) { #ifndef FL_WIN32 if ( kill( pid, 0 ) == 0 ) { waitpid( pid, 0, WNOHANG ); return 1; } return errno == ESRCH ? 0 : -1; #else DWORD ExitCode = 0; GetExitCodeProcess( pid, &ExitCode ); if ( ExitCode == STILL_ACTIVE ) return 1; return ( GetLastError( ) == ERROR_INVALID_HANDLE ) ? 0 : -1; #endif } /*************************************** * clean up all child processes ***************************************/ int fl_end_all_command( void ) { PIDList *cur, *next; int pstat = 0; pid_t pid = 0; for ( cur = pidlist; cur; cur = next ) { next = cur->next; check_for_activity( cur ); pid = waitpid( cur->pid, &pstat, 0 ); fl_free( cur ); } pidlist = NULL; return pid == -1 ? pid : pstat; } /*************************************** ***************************************/ FD_CMDLOG * fl_get_command_log_fdstruct( void ) { static FD_CMDLOG ret; create_logger( ); ret.form = logger->cmd; ret.browser = logger->browser; ret.close_browser = logger->close_br; ret.clear_browser = logger->clear_br; return &ret; } /*************************************** ***************************************/ void fl_set_command_log_position( int x, int y ) { create_logger( ); fl_set_form_position( logger->cmd, x, y ); } #include "fd/cmdbr.c" /* from directory fd */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/signal.c0000644000175000017500000001311311322130603014403 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file signal.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Simple minded quick&dirty signal handling. * * Only permit a specific signal to have one handler */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include void ( * fli_handle_signal )( void ) = NULL; /* also needed in forms.c */ /*************************************** ***************************************/ static void handle_signal( void ) { FLI_SIGNAL_REC *rec = fli_context->signal_rec; for ( ; rec; rec = rec->next ) while ( rec->caught ) { rec->caught--; rec->callback( rec->signum, rec->data ); } } #ifndef FL_WIN32 #define IsDangerous( s ) ( ( s ) == SIGBUS \ || ( s ) == SIGSEGV \ || ( s ) == SIGILL \ || ( s ) == SIGFPE ) #else #define IsDangerous( s ) 0 #endif static int sig_direct; /*************************************** ***************************************/ static RETSIGTYPE default_signal_handler( int sig ) { fl_signal_caught( sig ); /* if the signal is one of those that can cause infinite loops, handle it and then exit */ if ( IsDangerous( sig ) ) { handle_signal( ); fprintf( stderr, "Can't continue upon receiving signal %d\n", sig ); exit( sig ); } #ifndef RETSIGTYPE_IS_VOID return 0; #endif } /*************************************** ***************************************/ void fl_add_signal_callback( int s, FL_SIGNAL_HANDLER cb, void * data ) { FLI_SIGNAL_REC *sig_rec, *rec = fli_context->signal_rec; if ( ! fli_handle_signal ) fli_handle_signal = handle_signal; while ( rec && rec->signum != s ) rec = rec->next; if ( rec ) { rec->callback = cb; rec->data = data; } else { sig_rec = fl_malloc( sizeof *sig_rec ); sig_rec->next = NULL; sig_rec->data = data; sig_rec->callback = cb; sig_rec->signum = s; sig_rec->caught = 0; if ( ! sig_direct ) { #if defined HAVE_SIGACTION struct sigaction sact; sact.sa_handler = default_signal_handler; sigemptyset( &sact.sa_mask ); sact.sa_flags = 0; if ( sigaction( s, &sact, &sig_rec->old_sigact ) < 0 ) #else errno = 0; sig_rec->ocallback = signal( s, default_signal_handler ); if ( sig_rec->ocallback == ( FLI_OSSIG_HANDLER ) - 1L || errno ) #endif { M_err( "fl_add_signal_callback", "Can't add handler for " "signal %d", s ); fl_free( sig_rec ); return; } } if ( fli_context->signal_rec ) sig_rec->next = fli_context->signal_rec; fli_context->signal_rec = sig_rec; } } /*************************************** ***************************************/ void fl_remove_signal_callback( int s ) { FLI_SIGNAL_REC *last, *rec = fli_context->signal_rec; for ( last = rec; rec && rec->signum != s; last = rec, rec = rec->next ) /* empty */ ; if ( ! rec ) { M_err( "fl_remove_signal_callback", "No handler exists for signal %d", s ); return; } if ( rec == fli_context->signal_rec ) fli_context->signal_rec = rec->next; else last->next = rec->next; if ( ! sig_direct ) { #if defined HAVE_SIGACTION sigaction( s, &rec->old_sigact, NULL ); #else signal( s, rec->ocallback ); #endif } fl_safe_free( rec ); } /*************************************** ***************************************/ void fl_signal_caught( int s ) { FLI_SIGNAL_REC *rec = fli_context->signal_rec; while ( rec && rec->signum != s ) rec = rec->next; if ( ! rec ) { M_err( "fl_signal_caught", "Caught bogus signal %d", s ); return; } rec->caught++; #if ! defined HAVE_SIGACTION if ( ! sig_direct && ! IsDangerous( s ) ) signal( s, default_signal_handler ); #endif } /*************************************** ***************************************/ void fl_app_signal_direct( int y ) { if ( ! fli_handle_signal ) fli_handle_signal = handle_signal; sig_direct = y; } /*************************************** ***************************************/ void fl_remove_all_signal_callbacks( void ) { while ( fli_context->signal_rec ) fl_remove_signal_callback( fli_context->signal_rec->signum ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/Change0000644000175000017500000002367511171560225014121 0ustar jensjensV1.0RC3 o. Fixed condition in forms.c preventing use of cursor keys. V0.9999 o. fixed a fl_refresh_fselector() bug where obj is null o. fixed potential buffer overrun problem with sprintf(). (01/20/01) o. fixed a clientMessage got eaten problem with canvas. (12/01/00) It can happen if the form the canvas is on is disabled. o. fixed a browser arrow key affecting xoffset problem (10/23/00) o. put back some removed undocumented variables (fl_fheight) etc (10/22/00) o. fixed a fill_slider label centering problem. (10/21/00) o. fixed a multi-image write problem(gif): fpout was duplicated but never reset. (10/21/00). Also better handling of image close in error conditions. o. fixed a tablfolder() problem where when tabs are more than that can be show, it cores sometime. (10/15/00) o. fl_add_timer() now adds a disabled timer, and is enabled only if fl_set_timer() is called. Fixed interferance to other timers. (10/15/00) o. Modified the porters_readme a bit. Added new unixware.flag (10/14/00) linker with unresolved symbols (convert_type). o. fixed most double->float, float->int conversion warnings from VC++ under NT 4.0 (8/12/00) o. fixed all demos so they can be compiled by C++ compilers. o. corrected a rgb2gray weighting problem. o. corrected an orphan object problem that can happen with fdesign (need to check obj->form before dispatching) o. initialize flx even if ther is no connection. This avoids fdesign -convert problems as reported by spl. V0.89.6 o. purified the code and fixed misc. tiny leaks, including file descriptor leaks if image_open() ok but image_read() failed. V0.89.5 o. fixed an input field problem where slen and maxchar check was wrong (delete_piece() happened after slen calculation). o. fixed a shadow box drawing problem (clipping was set to (0,0)(0,0)!) o. added fl_show_alert() for fselect. Also fixed a minor bug where a bad directory may be returned. o. added fl_set_browser_[hv]scroll_callback() to facilitate the implementation of synchronized browsers (5/19/2000) o. added fl_iconify() and tested. o. fixed a fl_set_pixmap_file() from spl: fdesign -convert may leave flx uninitialized. o. added get_formbrowser_[x|y]offset functions. (5/12/00) o. changed image io_filter tmpfile generation for better security o. added shift+tab to navigate input field backwards o. added input method support for latin-x. may still have problem with focus window. (5/7/00) o. fixed a potential image_dup() problem: win not reset (4/25/00) o. improved xpm file reading robustness a bit (better comments handling) o. fixed a navigaton problem using cursor key in fselector. o. added annotation field in image capability field o. fixed a problem with event handling delay for canvas: watch_io() may timeout if the XEvent has already being queued. (forms.c). (04/21/00) o. fixed fl_get_folder_area() for empty folders. o. fixed a fl_popen/fl_pclose problem where fl_pclose() does not properly terminate (04/04/00) o. exported flimage_[to|from]_pixmap(), flimage_dup(). (04/11/00) o. fixed a boxtype problem for formbrowser: need FL_ATTRIB event in set_object_boxtype (04/03/00) o. changed default col2 of formbrowser to black (the decoration color of the canvas) o. removed "bad window" message. Can show up while hiding a form containing canvas (04/03/00) o. added fl_set_dirlist_filterdir() function so the filter can filter directory names. o. fixed a hold browser keyboard selection bug (@N) (2-8-00) o. fixed an empty choice problem (1-28-00) o. fixed a tiff problem for small files (12/20/99) o. fixed a bmp write problem with 8bit grayscale. (12/20/99) o. chnaged fselector so multiple fselector() can be active simultaneously(11/14) o. patched in the fixes from lyx team (mostly input focus problem) o. fixed some normalization problem with xwd support when rgb_bits != 8 o. seperated out annotation stuff from image proper.(10/18/1999) o. misc. multi-page postscript support fixes. (10/17/1999) o. fixed a file selector problem where highlight of the default file was wrong (10/17/1999) o. added hide_form() in addto_tabfolder() (10/14/99) o. changed form->visible to mean visible/invisible/being_hidden to avoid possible recursive hide_forms. (10/13/99) o. added postscript read/write (09/10/99) o. fixed tabfolder deletion bugs. (06/10/99) o. documented image_convolve better. Fixed a make_matrix() bug o. the fix broke 32bpp display. fixed and tested. sept 27 o. fixed a non-8 bit components 2nd time display problem. sept. 26 o. fixed an imageload problem where flimage_io can be uninitialized. o. added a workaround (untested) for depth=32 servers (which actually was 24bits); sept. 20, 1999 o. modified file permission for distribution o. fixed an fl_mapcolor() on label problem where the label color cache was not refreshed properly. o. add permission settings for the distribution so it's world readable o. changed ifdef HAVE_JPEG to ifndef NO_JPEG in demos o. xpm.c. Expected a space that might not be there in color spec (09/17/99) o. fixed fl_lookup_RGBcolor(). It now understands rgb:rr/gg/bb (07/25/99) -v0.89 o. fixed a choice bug: numb==2 can return 3 o. fixed a fl_check_command() bug (never wait()ed for the child process) o. Added windowlevellng lut o. changed FTIS gray image from 16 to 15 bits. o. changed im->infile from infile[] to *infile o. redraw pixmap object only if fl_set_pixmap_file() succeeds o. changed draw_pixmap() so only "p" is drawn instead of "pixmap" to avoid overflowing the area. o. fixed a clipboard() bug if there is no selection owner o. added IsDangerous() check before re-enabling signal(). o. finally fixed the hide_form and input handling o. FL_PUSH now always sends the focus object FL_UNFOCUS o. re-worked fl_set_button a bit o. added a group_id entry to FL_OBJECT to handle mixed group radio correctly o. fixed an input validation scroll problem (xoffset was not restored) o. switched to xpm-3.4k --- 88.9 o. fixed a bug with popups (mcb and enter|leave_cb not reset) o. added tooltips and documented it. (05/01/99) o. added formbrowser programatic scroll o. added fl_set_input_fieldchar() o. placed fldatabase on display (XrmSetDatabase). o. fixed a typo in image_jpeg.c (amazing it can survive this long) o. fixed a typo in image.c where gray16->jpeg generates coredumps o. added tiff reader/writer 04/07/99 o. some portability changes: casts, and sign and unsigned long stuff o. fixed a bug in fl_create_colormap(): asking for too many colors. (03/20/99) o. fixed a small bug with fl_set_browser_xoffset(). o. added get_xyplot_data_pointer(). o. added fl_update_display(1) after one liner. o. added XWD image format support. o. enabled fl_popen()/fl_pclose(). o. fixed a #000 color lookup problem (03/07/99) o. patched-in cygwin stuff o. fixed a fprintf(sterr,..) bug in xpopup.c o. multi-image stuff done. (2/7/99) o. changed perror() in async_io.c to M_err() so we can shut it up. o. added fl_insert_xyplot_data o. tested image support on 1bit and 4bit display. (1/16/99) o. added force_convert before writing image out o. fixed a small memory leak in listdir.c o. added FL_CASEALPHASORT, FL_RCASEALPHASORT to fselector. o. fixed a closest_color matching bug, at least a three yr-old bug! o. correct a typo (substitution) o. image text kind of works. (12/21/98) o. created display_type to hold temporary image (12/18/98) o. some image processing routine is in (12/17/98) o. fixed a counter spec problem (ldelta vs lstep ) o. added fl_get_tabfolder_folder_byxxxx() routines o. changed closest color match to linear distance. much better! (12/4/98) o. image support mostly works with spl's quantizer. o. more efficient color use (be_nice) for private colormap. o. better fl_create_colormap() (flash reduction) o. image support kind of works. (12/01/98) o. fixed a bug with autoscale via set_bounds() when no data in xyplot(11/28/98) o. better placement of key text. o. fixed a key plot problem with xyplot->postscript dump. (10/24/98) o. tabs in tabfolder now scrolls. o. added FL_KEYRELEASE event (10/10/98) o. documented the fl_set_font_name() and browser interaction (10/7/98) o. the tabs in tabfolder now (kind of) scrolls. (10/7/98) o. clamp yscreen coordinates in case y is zoomed. o. fixed an input set_cursor_pos bug (by spl) o. fixed a coredump problem when choice is empty. New bug. (10/05/98) o. added focus_pixmap stuff o. Snap 10/4/98 is bad o. added fl_set_xyplot_no_active_marking o. added fl_set_choice_notitle() (9/29/98) o. removed a couple of positioner redraw tricks that might behave incorrectly o. consolidated valuator a bit more. (27/9/98) o. enlarged popup entry to 128 and fixed a too many item coredump prob(24/9/98) o. moved fl_malloc initialization to header files (global.h) o. Added non-uniform major division via alphaxtics o. changed default folder tab corner to 3. Added a function fl_set_default_tabfolder_corner() to configure it. o. documentd fl_set_input_cursor_visible() o. changed fl_malloc/fl_free etc so they're now function pointers o. might've fixed tabfolder scaling problem o. made counter buttons slighly larger o. fixed a set_pup_entry() problem where mod and shortcut are not set submenus o. fixed a popup item shortcut underline problem with separator o. documented fl_set_default_browser_maxlinelength() o. lifted line length limit for browser (configurable). o. fixed a bug with delete_menu_item where cur_val gets confused. o. added get_chart_bounds() o. changed count precision to double o. fixed a visual problem under VNC where single truecolor with 8bit o. fixed a valslider problem at 0.5 o. fixed input scroll/deletion problem (invisible cursor) o. hacked in wheel mouse support in browser and input o. force parsing labels for goodie question o. added fl_set_xyplot_grid_linestyle() o. fixed a fl_freepup leaking pupID problem o. fl_lines() will automatically break the request into smaller chunks so each chunk is within the maximum protocol size. o. Added code to remove menu title for PULLDOWN_MENU (fl_menu_entries) o. fixed a missing menu title bug with fl_menu_entries o. added slider_precision check xforms-1.0.93sp1/lib/util.c0000644000175000017500000002027211316217017014117 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file util.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * X independent utilities */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include #include /*************************************** * Returns if two objects are the same - not of any use normally, * but seems to help with the Python port (so don't use it for * anything else, it might be gone if it should not needed for * the Python port anymore) ***************************************/ int fl_is_same_object( FL_OBJECT * obj1, FL_OBJECT * obj2 ) { return obj1 == obj2; } /*************************************** * Sets the form window ***************************************/ void fli_set_form_window( FL_FORM * form ) { if ( form && form->window != None ) flx->win = form->window; } /*************************************** * Function is kept at the moment only for backward compatibility ***************************************/ void fl_show_errors( int y FL_UNUSED_ARG ) { } /*************************************** * Convenience replacement for XFlush() ***************************************/ void fl_XFlush( void ) { XFlush( fl_display ); } /*************************************** * For debugging ***************************************/ #define VN( v ) { v, #v } static FLI_VN_PAIR flevent[ ] = { VN( FL_ENTER ), VN( FL_LEAVE ), VN( FL_PUSH ), VN( FL_RELEASE ), VN( FL_STEP ), VN( FL_SHORTCUT ), VN( FL_UPDATE ), VN( FL_MOTION ), VN( FL_KEYPRESS ), VN( FL_DRAW ), VN( FL_FOCUS ), VN( FL_UNFOCUS ), VN( FL_FREEMEM ), VN( FL_DRAWLABEL ), VN( FL_DBLCLICK ), VN( FL_OTHER ), VN( FL_ATTRIB ), { -1, NULL } }; /*************************************** ***************************************/ const char * fli_event_name( int ev ) { return fli_get_vn_name( flevent, ev ); } static FLI_VN_PAIR flclass[ ] = { VN( FL_BUTTON ), VN( FL_LIGHTBUTTON ), VN( FL_ROUNDBUTTON ), VN( FL_ROUND3DBUTTON ), VN( FL_CHECKBUTTON ), VN( FL_BITMAPBUTTON ), VN( FL_PIXMAPBUTTON ), VN( FL_BITMAP ), VN( FL_PIXMAP ), VN( FL_BOX ), VN( FL_TEXT ), VN( FL_MENU ), VN( FL_CHART ), VN( FL_CHOICE ), VN( FL_COUNTER ), VN( FL_SLIDER ), VN( FL_VALSLIDER ), VN( FL_INPUT ), VN( FL_BROWSER ), VN( FL_DIAL ), VN( FL_TIMER ), VN( FL_CLOCK ), VN( FL_POSITIONER ), VN( FL_FREE ), VN( FL_XYPLOT ), VN( FL_FRAME ), VN( FL_LABELFRAME ), VN( FL_CANVAS ), VN( FL_GLCANVAS ), VN( FL_TABFOLDER ), VN( FL_SCROLLBAR ), VN( FL_SCROLLBUTTON ), VN( FL_MENUBAR ), VN( FL_IMAGECANVAS ), VN( FL_TEXTBOX ), VN( FL_SPINNER ), { -1, NULL } }; /*************************************** ***************************************/ const char * fli_object_class_name( FL_OBJECT * ob ) { if ( ! ob ) return "null"; else if ( ob == FL_EVENT ) return "FL_EVENT"; return fli_get_vn_name( flclass, ob->objclass ); } /*************************************** * This function is a poor mans asprintf() and expects a format * string as printf() and arguments which must correspond to the * given format string and returns a string of the right length * into which the arguments are written. The caller of the function * is responsible for fl_free()-ing the string. * -> 1. printf()-type format string * 2. As many arguments as there are conversion specifiers etc. * in the format string. * <- Pointer to character array of exactly the right length into * which the string characterized by the format string has been * written. On failure, i.e. if there is not enough space, the * function emits an error message and returns NULL. ***************************************/ #define STRING_TRY_LENGTH 128 char * fli_print_to_string( const char * fmt, ... ) { char *c = NULL; char *old_c; size_t len = STRING_TRY_LENGTH; va_list ap; int wr; while ( 1 ) { old_c = c; if ( ( c = fl_realloc( c, len ) ) == NULL ) { fl_safe_free( old_c ); M_err( "fli_print_to_string", "Running out of memory\n" ); return NULL; } va_start( ap, fmt ); wr = vsnprintf( c, len, fmt, ap ); va_end( ap ); if ( wr < 0 ) /* indicates not enough space with older glibs */ { len *= 2; continue; } if ( ( size_t ) wr + 1 > len ) /* newer glibs return the number of */ { /* chars needed, not counting the */ len = wr + 1; /* trailing '\0' */ continue; } break; } /* Trim the string down to the number of required characters */ if ( ( size_t ) wr + 1 < len ) { old_c = c; if ( ( c = fl_realloc( c, ( size_t ) wr + 1 ) ) == NULL ) return old_c; } return c; } /*************************************** * Function tries to read a line (of arbirary length) from a file * On failure (either due to read error or missing memory) NULL is * returned, otherwise a pointer to an allocated buffer that must * be freed by the caller. ***************************************/ char * fli_read_line( FILE *fp ) { char *line = NULL; char *old_line = NULL; size_t len = STRING_TRY_LENGTH; size_t old_len = 0; while ( 1 ) { if ( ( line = fl_realloc( line, len ) ) == NULL ) { fl_safe_free( old_line ); M_err( "fli_read_line", "Running out of memory\n" ); return NULL; } if ( ! fgets( line + old_len, len - old_len, fp ) ) { if ( ferror( fp ) ) { M_err( "fli_read_line", "Failed to read from file" ); fl_free( line ); return NULL; } if ( old_len == 0 ) { fl_free( line ); return NULL; } M_warn( "fli_read_line", "Missing newline at end of line" ); break; } if ( strchr( line + old_len, '\n' ) ) break; old_line = line; old_len = len - 1; len *= 2; } old_line = line; if ( ( line = fl_realloc( line, strlen( line ) + 1 ) ) == NULL ) return old_line; return line; } /******************************************* * Secure string copy: a maximum of (n-1) bytes will be copied, the * destination string is always ends in a '\0'. * Returns: dest or NULL if dest is NULL or n is 0 *******************************************/ char * fli_sstrcpy( char * dest, const char * src, size_t n ) { size_t l = src ? strlen( src ) : 0; if ( ! dest || n == 0 ) return NULL; if ( l < n ) memcpy( dest, src, l + 1 ); else { memcpy( dest, src, n - 1 ); dest[ n - 1 ] = '\0'; } return dest; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/config.h.in0000644000175000017500000001222411376553453015034 0ustar jensjens/* lib/config.h.in. Generated from configure.ac by autoheader. */ /* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with XForms; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* \file config.h * * This is the compilation configuration file for xforms. * It was generated by autoconfs configure. * You might want to change some of the defaults if something goes wrong * during the compilation. */ #ifndef CONFIG_H #define CONFIG_H /* Define if you are building a development version of xforms */ #undef DEVEL_VERSION /* Define if you have the prototype for function `sigaction' */ #undef HAVE_DECL_SIGACTION /* Define if you have the prototype for function `snprintf' */ #undef HAVE_DECL_SNPRINTF /* Define if you have the prototype for function `vsnprintf' */ #undef HAVE_DECL_VSNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `c' library (-lc). */ #undef HAVE_LIBC /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_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 the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `usleep' function. */ #undef HAVE_USLEEP /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* 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 home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define if the return type of signal handlers is void */ #undef RETSIGTYPE_IS_VOID /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Define this if you want to see the warning directives put here and there by the developpers to get attention */ #undef WITH_WARNINGS /* define this to the location of xpm.h to be used with #include, e.g. */ #undef XPM_H_LOCATION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t #endif /* NOT CONFIG_H */ xforms-1.0.93sp1/lib/dirent_vms.h0000644000175000017500000000376611247055071015335 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* ** Header file for VMS readdir() routines. ** Written by Rich Salz, in August, 1990. ** This code has no copyright. ** ** Feb'95 -- eliminate reliance on ; safeguard multiple ** inclusion; fully prototype the routines provided. [pr] */ #ifndef DIRENT_H #define DIRENT_H /* Data structure returned by READDIR(). */ struct dirent { char d_name[100]; /* File name */ int vms_verscount; /* Number of versions */ short vms_versions[64]; /* Version numbers */ }; /* Handle returned by opendir(), used by the other routines. You * are not supposed to care what's inside this structure. */ typedef struct _dirdesc { unsigned long context; int count; int vms_wantversions; char *pattern; struct dirent entry; /* pattern string descriptor */ struct { unsigned short len, mbz; char *adr; } pat; } DIR; #define rewinddir(dirp) seekdir((dirp), 0L) extern DIR *opendir(const char *); extern struct dirent *readdir(DIR *); extern long telldir(DIR *); extern void seekdir(DIR *,long); extern void closedir(DIR *); extern int vmsreaddirversions(DIR *,int); #endif /* DIRENT_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/goodie_sinput.c0000644000175000017500000000663411247055071016023 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file goodie_sinput.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*********** Simple input ********************{*******/ typedef struct { FL_FORM * form; FL_OBJECT * str1; FL_OBJECT * input; FL_OBJECT * but; } FD_input; /*************************************** ***************************************/ static FD_input * create_input( const char * str1, const char * defstr ) { FD_input *fdui = fl_calloc( 1, sizeof *fdui ); int oldy = fli_inverted_y; int oldu = fl_get_coordunit( ); fli_inverted_y = 0; fl_set_coordunit( FL_COORD_PIXEL ); fdui->form = fl_bgn_form( FL_UP_BOX, 460, 130 ); fdui->str1 = fl_add_box( FL_NO_BOX, 20, 15, 420, 20, "" ); fdui->input = fl_add_input( FL_NORMAL_INPUT, 30, 50, 400, 30, str1 ); fl_set_input( fdui->input, defstr ); fdui->but = fl_add_button( FL_RETURN_BUTTON, 185, 94, 90, 27, "OK" ); fli_parse_goodies_label( fdui->but, FLOKLabel ); fl_set_form_hotobject( fdui->form, fdui->but ); fl_end_form( ); fli_handle_goodie_font( fdui->but, fdui->input ); fl_register_raw_callback( fdui->form, FL_ALL_EVENT, fli_goodies_preemptive ); fl_set_form_atclose( fdui->form, fl_goodies_atclose, fdui->but ); fli_inverted_y = oldy; fl_set_coordunit( oldu ); return fdui; } static FD_input *fd_input = NULL; static char *ret_str = NULL; /*************************************** * Asks the user for textual input ***************************************/ const char * fl_show_simple_input( const char * str1, const char * defstr ) { if ( fd_input ) { fl_hide_form( fd_input->form ); fl_free_form( fd_input->form ); fl_safe_free( fd_input ); } else fl_deactivate_all_forms( ); fl_safe_free( ret_str ); fd_input = create_input( str1, defstr ); fl_show_form( fd_input->form, FL_PLACE_HOTSPOT, FL_TRANSIENT, "Input" ); fl_update_display( 0 ); while ( fl_do_only_forms( ) != fd_input->but ) /* empty */ ; ret_str = fl_strdup( fl_get_input( fd_input->input ) ); fl_hide_form( fd_input->form ); fl_free_form( fd_input->form ); fl_safe_free( fd_input ); fl_activate_all_forms( ); return ret_str; } /*************************************** ***************************************/ void fli_sinput_cleanup( void ) { fl_safe_free( fd_input ); fl_safe_free( ret_str ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/vms_readdir.c0000644000175000017500000002212311247055071015441 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* ** VMS readdir() routines. ** Written by Rich $alz, in August, 1990. ** This code has no copyright. ** ** Feb'95 -- reliance on eliminated, here and in dirent.h; ** support for Unix-style directory specifications implemented; ** vmsreaddirversions() modified to return prior flag setting; ** use ANSI headers and plus VMS headers ** and ; minor lint cleanup. [pr] ** ** Known problems: ** garbage directory specifications aren't always diagnosed. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include /* $FILESCAN arguments */ #include /* Protect against TEST being defined by some other module */ #undef TEST /* Uncomment the next line to get a test routine. */ /* #define TEST */ /* Number of elements in vms_versions array */ #define VERSIZE(e) (sizeof e->vms_versions / sizeof e->vms_versions[0]) /* Simplified string descriptor */ struct dsc { unsigned short len, mbz; char *adr; }; /* Parts of file specification used to specify a directory. */ #define FSCN_DIR (FSCN$M_NODE | FSCN$M_DEVICE | FSCN$M_ROOT | FSCN$M_DIRECTORY) extern unsigned long sys$filescan(); /* Filename syntax conversion routine */ #ifdef __DECC /* (really depends on run-time library, not compiler) */ #define cvt__to_vms decc$to_vms #else #define cvt__to_vms shell$to_vms #endif extern int cvt__to_vms(char *, int (*)(char *, int), int, int); static int cvt_action(char *, int); /* Callback routine uses non re-entrant communication w/ caller. */ static char nambuf[255 + 1]; /* ** XXX$to_vms callback routine. Note: old versions of shell$to_vms ** didn't document the second argument, which indicates whether a ** directory of foo/bar was converted into "[.foo]bar.dir" rather ** than "[.foo.bar]" (such conversion is requested by passing non-zero ** as XXX$to_vms's 4th argument; also undocumented in old versions). */ static int cvt_action(char *name, int dir_flag___unused) { nambuf[sizeof nambuf - 1] = '\0'; (void) strncpy(nambuf, name, sizeof nambuf - 1); /* An even value tells xxx$to_vms that conversion should stop; that point is moot here since wildcard processing is disabled. */ return 0; } /* ** Open a directory, return a handle for later use. */ DIR * opendir(name) const char *name; { DIR *dd; struct dsc name_dsc; int len, retry = 0; unsigned long flags; /* Validate the directory name argument. ("[...]" is allowed!) */ if (!name || !*name || strchr(name, '*') != 0 || strchr(name, '%') != 0 || strchr(name, '?') != 0) { /* Name is required; wildcards are not allowed. */ errno = ENOTDIR; return NULL; } nambuf[sizeof nambuf - 1] = '\0'; /* (strncpy doesn't guarantee it) */ name_dsc.adr = strncpy(nambuf, name, sizeof nambuf - 1); name_dsc.mbz = 0; do { name_dsc.len = len = strlen(nambuf); /* Check which components of file specification seem to be present. */ flags = ~0; /* (init so that we can ignore return status) */ (void) sys$filescan(&name_dsc, (void *) 0, &flags); if ((flags & ~FSCN_DIR) != 0 || strchr(nambuf, '/') != 0) { /* Didn't supply nice directory name; check for Unix-style one. */ /* (stupid shell$to_vms doesn't like trailing slash) */ if (len > 1 && nambuf[len - 1] == '/') nambuf[len - 1] = '\0'; if (++retry > 1 || cvt__to_vms(nambuf, cvt_action, 0, 0) != 1) { errno = ENOTDIR; return NULL; } /* else: cvt_action() has updated `nambuf'; `retry' is now 1 */ } else retry = 0; /* have something, possibly after retrying once */ } while (retry); /* Get memory for the handle, and the pattern. */ if ((dd = fl_malloc( sizeof *dd ) ) == NULL ) { errno = ENOMEM; return NULL; } dd->pattern = fl_malloc( strlen( nambuf ) + sizeof "*.*" ); if (dd->pattern == NULL) { fl_free( dd ); errno = ENOMEM; return NULL; } /* Fill in the fields. */ strcat(strcpy(dd->pattern, nambuf), "*.*"); dd->context = 0; dd->count = 0; dd->vms_wantversions = 0; dd->pat.adr = dd->pattern; dd->pat.len = strlen(dd->pattern); dd->pat.mbz = 0; memset(&dd->entry, 0, sizeof dd->entry); return dd; } /* ** Set the flag to indicate we want versions or not. Return old setting. */ int vmsreaddirversions(dd, flag) DIR *dd; int flag; { int old_flag = dd->vms_wantversions; dd->vms_wantversions = flag; return old_flag; } /* ** Free up an opened directory. */ void closedir(dd) DIR *dd; { if (dd) { (void) lib$find_file_end(&dd->context); fl_free(dd->pattern); fl_free((void *) dd); } } /* ** Collect all the version numbers for the current file. */ static void collectversions(dd) DIR *dd; { struct dsc pat; struct dsc res; struct dirent *e; char *p; char buff[sizeof dd->entry.d_name]; int i; char *text; long context; /* Convenient shorthand. */ e = &dd->entry; /* Add the name plus version wildcard, replacing the "*.*" put on before */ i = strlen(dd->pattern); /* assert( i > 3 ); */ i = FL_max( i, 4 ); text = fl_malloc( (i - 3) + strlen(e->d_name) + sizeof ";*"); if (text == NULL) return; strcpy(text, dd->pattern); strcat(strcpy(&text[i - 3], e->d_name), ";*"); /* Set up the pattern and result descriptors. */ pat.adr = text; pat.len = strlen(text); res.adr = buff; res.len = sizeof buff - 1; pat.mbz = res.mbz = 0; /* Read files, collecting versions. */ for (context = 0; e->vms_verscount < VERSIZE(e); e->vms_verscount++) { if (lib$find_file(&pat, &res, &context) == RMS$_NMF || context == 0) break; buff[sizeof buff - 1] = '\0'; if (p = strchr(buff, ';')) e->vms_versions[e->vms_verscount] = atoi(p + 1); else e->vms_versions[e->vms_verscount] = -1; } if (e->vms_verscount < VERSIZE(e)) e->vms_versions[e->vms_verscount] = -1; (void) lib$find_file_end(&context); fl_free(text); } /* ** Read the next entry from the directory. */ struct dirent * readdir(dd) DIR *dd; { struct dsc res; char *p, *q; int i; /* Set up result descriptor, and get next file. */ res.adr = nambuf; res.len = sizeof nambuf - 1; res.mbz = 0; dd->count++; /* (ought to check for generic success/failure, not a specific value) */ if (lib$find_file(&dd->pat, &res, &dd->context) == RMS$_NMF || dd->context == 0L) /* None left... */ return NULL; /* Strip trailing blanks. */ nambuf[sizeof nambuf - 1] = '\0'; for (p = &nambuf[sizeof nambuf - 1]; p > nambuf && *--p == ' ';) *p = '\0'; /* Skip any directory component and just copy the name. */ p = nambuf; while ((q = strchr(p, ']')) != 0 || (q = strchr(p, '>')) != 0) p = q + 1; (void) strncpy(dd->entry.d_name, p, sizeof dd->entry.d_name - 1); dd->entry.d_name[sizeof dd->entry.d_name - 1] = '\0'; /* Clobber the version. */ if ((p = strchr(dd->entry.d_name, ';')) != 0) *p = '\0'; dd->entry.vms_verscount = 0; dd->entry.vms_versions[0] = 0; if (dd->vms_wantversions) collectversions(dd); return &dd->entry; } /* ** Return something that can be used in a seekdir later. */ long telldir(dd) DIR *dd; { return dd->count; } /* ** Return to a spot where we used to be. Brute force. */ void seekdir(dd, count) DIR *dd; long count; { int vms_wantversions; /* If we haven't done anything yet... */ if (dd->count == 0) return; /* Remember some state, and clear it. */ vms_wantversions = dd->vms_wantversions; dd->vms_wantversions = 0; (void) lib$find_file_end(&dd->context); dd->context = 0; /* The increment is in readdir(). */ for (dd->count = 0; dd->count < count;) (void) readdir(dd); dd->vms_wantversions = vms_wantversions; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/browser.c0000644000175000017500000010155511376175115014641 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file browser.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Browser composite. * scrollbar redrawing can be further optimized. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pbrowser.h" /*************************************** ***************************************/ static void attrib_change( FL_OBJECT * ob ) { FLI_BROWSER_SPEC *sp = ob->spec; /* Text box stuff */ sp->tb->x = ob->x; sp->tb->y = ob->y; fli_set_object_visibility( sp->tb, FL_VISIBLE ); sp->tb->input = ob->input; sp->tb->type = ob->type; sp->tb->boxtype = ob->boxtype; sp->tb->lcol = ob->lcol; sp->tb->col1 = ob->col1; sp->tb->col2 = ob->col2; sp->tb->bw = ob->bw; fl_notify_object( sp->tb, FL_RESIZED ); /* Scrollbars */ if ( ob->boxtype == FL_DOWN_BOX && sp->hsl->type == FL_HOR_NICE_SCROLLBAR ) { sp->hsl->boxtype = FL_FRAME_BOX; sp->vsl->boxtype = FL_FRAME_BOX; } else if ( ob->boxtype == FL_DOWN_BOX && sp->hsl->type == FL_HOR_SCROLLBAR ) { sp->hsl->boxtype = FL_UP_BOX; sp->vsl->boxtype = FL_UP_BOX; } else { sp->hsl->boxtype = ob->boxtype; sp->vsl->boxtype = ob->boxtype; } sp->hsl->bw = sp->vsl->bw = ob->bw; if ( ! sp->user_set && ob->boxtype != FL_DOWN_BOX ) sp->vw = sp->vw_def = sp->hh = sp->hh_def = fli_get_default_scrollbarsize( ob ); } /*************************************** ***************************************/ static void get_geometry( FL_OBJECT * obj ) { FLI_BROWSER_SPEC *comp = obj->spec; FL_OBJECT *tb = comp->tb; FLI_TBOX_SPEC *sp = comp->tb->spec; int h_on = comp->h_on, v_on = comp->v_on; double old_xrel = fli_tbox_get_rel_xoffset( tb ); double old_yrel = fli_tbox_get_rel_yoffset( tb ); comp->hh = comp->vw = 0; comp->h_on = comp->v_on = 0; tb->w = obj->w; tb->h = obj->h; fli_tbox_recalc_area( tb ); /* Check if we need a vertical slider */ if ( ( sp->max_height > sp->h && comp->v_pref != FL_OFF ) || comp->v_pref == FL_ON ) { comp->v_on = 1; comp->vw = comp->vw_def; tb->w -= comp->vw; fli_tbox_recalc_area( tb ); } /* Check if we need a horizontal slider */ if ( ( sp->max_width > sp->w && comp->h_pref != FL_OFF ) || comp->h_pref == FL_ON ) { comp->h_on = 1; comp->hh = comp->hh_def; tb->h -= comp->hh; fli_tbox_recalc_area( tb ); } /* Due to the addition of a horizontal slider also a vertical slider may now be needed, so recheck for this possibility */ if ( ! comp->v_on && sp->max_height > sp->h && comp->v_pref != FL_OFF ) { comp->v_on = 1; comp->vw = comp->vw_def; tb->w -= comp->vw; fli_tbox_recalc_area( tb ); } if ( comp->v_on ) { comp->vsl->x = obj->x + obj->w - comp->vw; comp->vsl->y = obj->y; comp->vsl->w = comp->vw; comp->vsl->h = obj->h - comp->hh; fl_notify_object( comp->vsl, FL_RESIZED ); comp->vval = old_yrel; comp->vsize = comp->vinc1 = ( double ) sp->h / sp->max_height; comp->vinc2 = ( double ) sp->def_height / sp->max_height; } else { comp->vsize = 1.0; comp->vval = 0.0; } if ( comp->h_on ) { comp->hsl->x = obj->x; comp->hsl->y = obj->y + obj->h - comp->hh; comp->hsl->w = obj->w - comp->vw; comp->hsl->h = comp->hh; fl_notify_object( comp->hsl, FL_RESIZED ); comp->hval = old_xrel; comp->hsize = ( double ) sp->w / sp->max_width; comp->hinc1 = ( 8.0 * sp->def_height ) / sp->max_width; comp->hinc2 = ( sp->def_height - 2.0 ) / sp->max_width; } else { comp->hsize = 1.0; comp->hval = 1.0; } comp->dead_area = comp->h_on && comp->v_on; fli_set_object_visibility( comp->hsl, comp->h_on ); fli_set_object_visibility( comp->vsl, comp->v_on ); comp->attrib = 1; sp->no_redraw = 1; if ( comp->v_on ) { comp->vval = fli_tbox_set_rel_yoffset( tb, comp->vval ); fl_set_scrollbar_value( comp->vsl, comp->vval ); fl_set_scrollbar_size( comp->vsl, comp->vsize ); } if ( comp->h_on ) { comp->hval = fli_tbox_set_rel_xoffset( tb, comp->hval ); fl_set_scrollbar_value( comp->hsl, comp->hval ); fl_set_scrollbar_size( comp->hsl, comp->hsize ); } sp->no_redraw = 0; if ( h_on != comp->h_on || v_on != comp->v_on ) fl_notify_object( tb, FL_RESIZED ); } /*************************************** * The "dead area" is the small square in the lower right hand corner * of the browser (beside the horizontal slider and below the vertical * one) that shows up when both sliders are displayed. ***************************************/ static void draw_dead_area( FL_OBJECT * obj ) { FLI_BROWSER_SPEC *sp = obj->spec; if ( FL_ObjWin( sp->tb ) ) { fl_winset( FL_ObjWin( sp->tb ) ); fl_drw_box( FL_FLAT_BOX, obj->x + obj->w - sp->vw, obj->y + obj->h - sp->hh, sp->vw, sp->hh, sp->vsl->col1, 1 ); } } /*************************************** * Called for events concerning the browser ***************************************/ static int handle_browser( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_BROWSER_SPEC *sp = obj->spec; switch ( event ) { case FL_RESIZED : case FL_ATTRIB : sp->attrib = 1; break; case FL_DRAW: if ( sp->attrib ) { attrib_change( obj ); get_geometry( obj ); sp->attrib = 0; } draw_dead_area( obj ); /* fall through */ case FL_DRAWLABEL: fl_draw_object_label( obj ); break; case FL_FREEMEM: fl_free( sp ); break; } return FL_RETURN_NONE; } /*************************************** ***************************************/ static void redraw_scrollbar( FL_OBJECT * ob ) { FLI_BROWSER_SPEC *comp = ob->spec; attrib_change( ob ); get_geometry( ob ); fl_freeze_form( ob->form ); if ( comp->v_on ) { fl_set_scrollbar_size( comp->vsl, comp->vsize ); fl_set_scrollbar_value( comp->vsl, comp->vval ); if ( comp->vsize != 1.0 ) fl_set_scrollbar_increment( comp->vsl, comp->vinc1, comp->vinc2 ); } if ( comp->h_on ) { fl_set_scrollbar_size( comp->hsl, comp->hsize ); fl_set_scrollbar_value( comp->hsl, comp->hval ); if ( comp->hsize != 1.0 ) fl_set_scrollbar_increment( comp->hsl, comp->hinc1, comp->hinc2 ); } if ( comp->attrib ) { if ( comp->v_on ) fl_redraw_object( comp->vsl ); if ( comp->h_on ) fl_redraw_object( comp->hsl ); fl_redraw_object( comp->tb ); comp->attrib = 0; } draw_dead_area( ob ); fl_unfreeze_form( ob->form ); } /*************************************** ***************************************/ static void hcb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_BROWSER_SPEC *comp = obj->parent->spec; double hp = fli_tbox_set_rel_xoffset( comp->tb, fl_get_scrollbar_value( comp->hsl ) ); if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; if ( hp != comp->old_hp ) obj->parent->returned |= FL_RETURN_CHANGED; if ( obj->parent->how_return & FL_RETURN_END_CHANGED && ! ( obj->parent->returned & FL_RETURN_CHANGED && obj->parent->returned & FL_RETURN_END ) ) obj->parent->returned = FL_RETURN_NONE; if ( obj->parent->returned & FL_RETURN_END ) comp->old_hp = hp; if ( obj->returned & FL_RETURN_CHANGED && comp->hcb ) comp->hcb( obj->parent, fli_tbox_get_topline( comp->tb ) + 1, comp->hcb_data ); } /*************************************** ***************************************/ static void vcb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_BROWSER_SPEC *comp = obj->parent->spec; double vp = fli_tbox_set_rel_yoffset( comp->tb, fl_get_scrollbar_value( comp->vsl ) ); if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; if ( vp != comp->old_vp ) obj->parent->returned |= FL_RETURN_CHANGED; if ( obj->parent->how_return & FL_RETURN_END_CHANGED && ! ( obj->parent->returned & FL_RETURN_CHANGED && obj->parent->returned & FL_RETURN_END ) ) obj->parent->returned = FL_RETURN_NONE; if ( obj->parent->returned & FL_RETURN_END ) comp->old_vp = vp; if ( obj->returned & FL_RETURN_CHANGED && comp->vcb ) comp->vcb( obj->parent, fli_tbox_get_topline( comp->tb ) + 1, comp->vcb_data ); } /*************************************** * Textbox callback routine, we simply pass the return value of the * textbox on as the parents new return value after a readjustment of * the scollbars. ***************************************/ static void tbcb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_BROWSER_SPEC *psp = obj->parent->spec; double vp = fli_tbox_get_rel_yoffset( obj ); double hp = fli_tbox_get_rel_xoffset( obj ); if ( obj->returned & FL_RETURN_CHANGED ) { if ( hp != psp->old_hp ) { fl_set_scrollbar_value( psp->hsl, psp->old_hp = hp ); if ( psp->hcb ) psp->hcb( obj->parent, fli_tbox_get_topline( psp->tb ) + 1, psp->hcb_data ); } if ( vp != psp->old_vp ) { fl_set_scrollbar_value( psp->vsl, psp->old_vp = vp ); if ( psp->vcb ) psp->vcb( obj->parent, fli_tbox_get_topline( psp->tb ) + 1, psp->vcb_data ); } } obj->parent->returned = obj->returned; } /*************************************** * Textbox dblclick callback ***************************************/ static void tb_dblcallback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FLI_BROWSER_SPEC *sp = ob->parent->spec; if ( sp->callback ) sp->callback( ob->parent, sp->callback_data ); } /*************************************** ***************************************/ static int tbpost( FL_OBJECT * ob, int ev, FL_Coord mx, FL_Coord my, int key, void * xev ) { FL_OBJECT *br = ob->parent; return br->posthandle ? br->posthandle( br, ev, mx, my, key, xev ) : 0; } /*************************************** ***************************************/ static int tbpre( FL_OBJECT * ob, int ev, FL_Coord mx, FL_Coord my, int key, void * xev ) { FL_OBJECT *br = ob->parent; return br->prehandle ? br->prehandle( br, ev, mx, my, key, xev ) : 0; } /*************************************** ***************************************/ int fli_get_default_scrollbarsize( FL_OBJECT * ob ) { int delta = ( FL_abs( ob->bw ) + 3 * ( ob->bw > 0 ) ); int flat = IS_FLATBOX( ob->boxtype ) ? 2 : 0; if ( ob->w > 250 && ob->h > 250 ) return 15 + delta - flat; else if ( ob->w < 150 || ob->h < 150 ) return 13 + delta - flat; else return 14 + delta - flat; } /*************************************** * Creates a new browser object to be added to a form ***************************************/ FL_OBJECT * fl_create_browser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_BROWSER_SPEC *sp; int D; ob = fl_make_object( FL_BROWSER, type, x, y, w, h, label, handle_browser ); sp = ob->spec = fl_calloc( 1, sizeof *sp ); sp->tb = fli_create_tbox( type, x, y, w, h, NULL ); sp->callback = NULL; sp->hsize = sp->vsize = sp->hval = sp->vval = sp->hinc1 = sp->hinc2 = sp->vinc1 = sp->vinc2 = 0.0; sp->hcb = sp->vcb = NULL; sp->hcb_data = sp->vcb_data = NULL; sp->old_hp = sp->old_vp = 0.0; sp->attrib = 1; /* Copy browser attributes from textbox */ ob->boxtype = sp->tb->boxtype; ob->lcol = sp->tb->lcol; ob->col1 = sp->tb->col1; ob->col2 = sp->tb->col2; ob->align = sp->tb->align; /* Textbox handlers */ fl_set_object_callback( sp->tb, tbcb, 0 ); fli_tbox_set_dblclick_callback( sp->tb, tb_dblcallback, 0 ); fl_set_object_posthandler( sp->tb, tbpost ); fl_set_object_prehandler( sp->tb, tbpre ); /* Scrollbars */ D = sp->vw_def = sp->hh_def = fli_get_default_scrollbarsize( ob ); sp->v_pref = sp->h_pref = FL_AUTO; sp->hsl = fl_create_scrollbar( fli_context->hscb, x, y + h - D, w - D, D, NULL ); fli_set_object_visibility( sp->hsl, sp->h_pref == FL_ON ); fl_set_object_callback( sp->hsl, hcb, 0 ); fl_set_scrollbar_value( sp->hsl, 0.0 ); fl_set_scrollbar_bounds( sp->hsl, 0.0, 1.0 ); sp->hsl->resize = FL_RESIZE_NONE; sp->vsl = fl_create_scrollbar( fli_context->vscb, x + w - D, y, D, h - D, NULL ); fli_set_object_visibility( sp->vsl, sp->v_pref == FL_ON ); fl_set_object_callback( sp->vsl, vcb, 0 ); fl_set_scrollbar_value( sp->vsl, 0.0 ); fl_set_scrollbar_bounds( sp->hsl, 0.0, 1.0 ); sp->vsl->resize = FL_RESIZE_NONE; fl_add_child( ob, sp->tb ); fl_add_child( ob, sp->hsl ); fl_add_child( ob, sp->vsl ); /* In older versions scrollbars and browsers weren't returned to e.g. fl_do_forms() but still a callback associated with the object got called. To emulate the old behaviour we have to set the return policy to default to FL_RETURN_NONE and only change that to FL_RETURN_CHANGED when a callback is installed (which is done in fl_set_object_callback()) */ #if ! USE_BWC_BS_HACK fl_set_object_return( ob, FL_RETURN_SELECTION | FL_RETURN_DESELECTION ); #else fl_set_object_return( ob, FL_RETURN_NONE ); #endif fl_set_object_return( sp->hsl, FL_RETURN_ALWAYS ); fl_set_object_return( sp->vsl, FL_RETURN_ALWAYS ); fl_set_object_return( sp->tb, FL_RETURN_ALWAYS ); return ob; } /*************************************** * Adds a new browser object to the current form ***************************************/ FL_OBJECT * fl_add_browser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_browser( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** * Switches the vertical scrollbar of the browser on or off ***************************************/ void fl_set_browser_vscrollbar( FL_OBJECT * obj, int on ) { FLI_BROWSER_SPEC *comp = obj->spec; if ( comp->v_pref != on ) { comp->v_pref = on; redraw_scrollbar( obj ); fli_tbox_react_to_vert( comp->tb, on != FL_OFF ); get_geometry( obj ); fl_redraw_object( obj ); } } /*************************************** * Switches the horizontal scrollbar of the browser on or off ***************************************/ void fl_set_browser_hscrollbar( FL_OBJECT * obj, int on ) { FLI_BROWSER_SPEC *comp = obj->spec; if ( comp->h_pref != on ) { comp->h_pref = on; redraw_scrollbar( obj ); fli_tbox_react_to_hori( comp->tb, on != FL_OFF ); get_geometry( obj ); fl_redraw_object( obj ); } } /*************************************** * Sets the callback for the horizontal scrollbar of the browser ***************************************/ void fl_set_browser_hscroll_callback( FL_OBJECT * ob, FL_BROWSER_SCROLL_CALLBACK cb, void * data ) { FLI_BROWSER_SPEC *comp = ob->spec; comp->hcb = cb; comp->hcb_data = data; } /*************************************** * Returns the callback for the horizontal scrollbar of the browser ***************************************/ FL_BROWSER_SCROLL_CALLBACK fl_get_browser_hscroll_callback( FL_OBJECT * ob ) { return ( ( FLI_BROWSER_SPEC * ) ob->spec )->hcb; } /*************************************** * Sets the callback for the vertical scrollbar of the browser ***************************************/ void fl_set_browser_vscroll_callback( FL_OBJECT * ob, FL_BROWSER_SCROLL_CALLBACK cb, void * data ) { FLI_BROWSER_SPEC *comp = ob->spec; comp->vcb = cb; comp->vcb_data = data; } /*************************************** * Returns the callback for the vertical scrollbar of the browser ***************************************/ FL_BROWSER_SCROLL_CALLBACK fl_get_browser_vscroll_callback( FL_OBJECT * ob ) { return ( ( FLI_BROWSER_SPEC * ) ob->spec )->vcb; } /*************************************** * Meant for the textbox to handle scroll callback properly ***************************************/ void fli_adjust_browser_scrollbar( FL_OBJECT * ob ) { FLI_BROWSER_SPEC *comp = ob->spec; fl_call_object_callback( comp->hsl ); fl_call_object_callback( comp->vsl ); } /*************************************** * Removes all text from the browser ***************************************/ void fl_clear_browser( FL_OBJECT * ob ) { FLI_BROWSER_SPEC *comp = ob->spec; fl_freeze_form( ob->form ); fli_tbox_clear( comp->tb ); fl_set_scrollbar_value( comp->hsl, 0.0 ); fl_set_scrollbar_size( comp->hsl, 1.0 ); fl_set_scrollbar_value( comp->vsl, 0.0 ); fl_set_scrollbar_size( comp->vsl, 1.0 ); redraw_scrollbar( ob ); fl_unfreeze_form( ob->form ); } /*************************************** * Returns the x-offset of the text shown in the browser as * the number of pixels ***************************************/ FL_Coord fl_get_browser_xoffset( FL_OBJECT * obj ) { FLI_BROWSER_SPEC *sp = obj->spec; return fli_tbox_get_xoffset( sp->tb ); } /*************************************** * Returns the x-offset of the text shown in the browser as a * number between 0 (starts of lines are shown) and 1 (end of * longest line is shown) ***************************************/ double fl_get_browser_rel_xoffset( FL_OBJECT * obj ) { FLI_BROWSER_SPEC *sp = obj->spec; return fli_tbox_get_rel_xoffset( sp->tb ); } /*************************************** * Sets the x-offset of the text shown in the browser as given * by the number of pixels ***************************************/ void fl_set_browser_xoffset( FL_OBJECT * ob, FL_Coord npixels ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_set_xoffset( sp->tb, npixels ); redraw_scrollbar( ob ); } /*************************************** * Sets the x-offset of the text shown in the browser as given * by a value between 0 (show start of lines) and 1 (show end * of longest line) ***************************************/ void fl_set_browser_rel_xoffset( FL_OBJECT * ob, double val ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_set_rel_xoffset( sp->tb, val ); redraw_scrollbar( ob ); } /*************************************** * Returns the y-offset of the text shown in the browser as * the number of pixels ***************************************/ FL_Coord fl_get_browser_yoffset( FL_OBJECT * obj ) { FLI_BROWSER_SPEC *sp = obj->spec; return fli_tbox_get_yoffset( sp->tb ); } /*************************************** * Returns the y-offset of the text shown in the browser as a * number between 0 (start of text is shown) and 1 (end of * text is shown) ***************************************/ double fl_get_browser_rel_yoffset( FL_OBJECT * obj ) { FLI_BROWSER_SPEC *sp = obj->spec; return fli_tbox_get_rel_yoffset( sp->tb ); } /*************************************** * Sets the y-offset of the text shown in the browser as given * by the number of pixels ***************************************/ void fl_set_browser_yoffset( FL_OBJECT * ob, FL_Coord npixels ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_set_yoffset( sp->tb, npixels ); redraw_scrollbar( ob ); } /*************************************** * Sets the y-offset of the text shown in the browser as given * by a value between 0 (show start of text) and 1 (show end of * text) ***************************************/ void fl_set_browser_rel_yoffset( FL_OBJECT * ob, double val ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_set_rel_yoffset( sp->tb, val ); redraw_scrollbar( ob ); } /*************************************** * Returns the y-offset for a line (or -1 if the line does not exist). ***************************************/ int fl_get_browser_line_yoffset( FL_OBJECT * obj, int line ) { FLI_BROWSER_SPEC *sp = obj->spec; return fli_tbox_get_line_yoffset( sp->tb, line + 1 ); } /*************************************** * Move a line to the top of the browser ***************************************/ void fl_set_browser_topline( FL_OBJECT * ob, int line ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_set_topline( sp->tb, line - 1 ); redraw_scrollbar( ob ); } /*************************************** * Move a line to the bottom of the browser ***************************************/ void fl_set_browser_bottomline( FL_OBJECT * ob, int line ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_set_bottomline( sp->tb, line - 1 ); redraw_scrollbar( ob ); } /*************************************** * Marks a line of the browser as selected ***************************************/ void fl_select_browser_line( FL_OBJECT * ob, int line ) { fli_tbox_select_line( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb, line - 1 ); } /*************************************** * Adds a line to the (end of the) browser and shifts the dos[alyed * area so that the line is visible ***************************************/ void fl_addto_browser( FL_OBJECT * ob, const char * text ) { fli_tbox_add_line( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb, text, 1 ); redraw_scrollbar( ob ); } /*************************************** * Inserts a line into the browser before the line currently * having the number 'linenumb' ***************************************/ void fl_insert_browser_line( FL_OBJECT * ob, int linenumb, const char * newtext ) { FLI_BROWSER_SPEC *sp = ob->spec; FLI_TBOX_SPEC *tbsp = sp->tb->spec; /* When inserting into an empty browser or appending at then end it's treated exactly the same way as for fl_add_browser_line() (including interpretation of newline characters). */ if ( tbsp->num_lines == 0 || linenumb > tbsp->num_lines ) fli_tbox_insert_lines( sp->tb, linenumb - 1, newtext ); else fli_tbox_insert_line( sp->tb, linenumb - 1, newtext ); redraw_scrollbar( ob ); } /*************************************** * Deletes the line at line number 'linenumb' from the browser ***************************************/ void fl_delete_browser_line( FL_OBJECT * ob, int linenumb ) { fli_tbox_delete_line( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb, linenumb - 1 ); redraw_scrollbar( ob ); } /*************************************** * Replaces the browser line at line number 'linenumb' with a new one ***************************************/ void fl_replace_browser_line( FL_OBJECT * ob, int linenumb, const char * newtext ) { fli_tbox_replace_line( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb, linenumb - 1, newtext ); redraw_scrollbar( ob ); } /*************************************** * Returns the text of the browser's line at line number 'linenum'. * Returned text may not be modified (and not free'ed!) ***************************************/ const char * fl_get_browser_line( FL_OBJECT * ob, int linenumb ) { return fli_tbox_get_line( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb, linenumb - 1 ); } /*************************************** * Returns the number of the last line of the browser ***************************************/ int fl_get_browser_maxline( FL_OBJECT * obj ) { FLI_BROWSER_SPEC *sp = obj->spec; return fli_tbox_get_num_lines( sp->tb ); } /*************************************** * Unselects a line in the browser ***************************************/ void fl_deselect_browser_line( FL_OBJECT * ob, int line ) { fli_tbox_deselect_line( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb, line - 1 ); } /*************************************** * De-selects all lines of the browser ***************************************/ void fl_deselect_browser( FL_OBJECT * ob ) { fli_tbox_deselect( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb ); } /*************************************** * Tests if a certain line of the browser is selected ***************************************/ int fl_isselected_browser_line( FL_OBJECT * ob, int line ) { return fli_tbox_is_line_selected( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb, line - 1 ); } /*************************************** * Returns the line last selected (or deselected) by the user ***************************************/ int fl_get_browser( FL_OBJECT * ob ) { return fli_tbox_get_selection( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb ); } /*************************************** * Sets the font size to be used per default ***************************************/ void fl_set_browser_fontsize( FL_OBJECT * ob, int size ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_set_fontsize( sp->tb, size ); redraw_scrollbar( ob ); fl_redraw_object( ob ); } /*************************************** * Sets the font style to be used per default ***************************************/ void fl_set_browser_fontstyle( FL_OBJECT * ob, int style ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_set_fontstyle( sp->tb, style ); redraw_scrollbar( ob ); fl_redraw_object( ob ); } /*************************************** * Returns the number of the topmost line that is completely visible ***************************************/ int fl_get_browser_topline( FL_OBJECT * obj ) { FLI_BROWSER_SPEC *sp = obj->spec; return fli_tbox_get_topline( sp->tb ) + 1; } /*************************************** * Loads a browser with text from a file ***************************************/ int fl_load_browser( FL_OBJECT * obj, const char * f ) { FLI_BROWSER_SPEC *sp = obj->spec; int status; fl_clear_browser( obj ); status = fli_tbox_load( sp->tb, f ); redraw_scrollbar( obj ); return status; } /*************************************** * Adds a line to the (end of the) browser (does not make the line * visible) ***************************************/ void fl_add_browser_line( FL_OBJECT * ob, const char * newtext ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_add_line( sp->tb, newtext, 0 ); redraw_scrollbar( ob ); } /*************************************** * Sets a callback for double clicks in the browser ***************************************/ void fl_set_browser_dblclick_callback( FL_OBJECT * ob, FL_CALLBACKPTR cb, long a ) { FLI_BROWSER_SPEC *comp = ob->spec; comp->callback = cb; comp->callback_data = a; } /*************************************** * Sets the height of the vertical and the width of the horzontal * scrollbar ***************************************/ void fl_set_browser_scrollbarsize( FL_OBJECT * ob, int hh, int vw ) { FLI_BROWSER_SPEC *comp = ob->spec; int redraw = 0; if ( hh > 0 && hh != comp->hsl->h ) { comp->hsl->h = comp->hh_def = hh; redraw = 1; } if ( vw > 0 && vw != comp->vsl->w ) { comp->vsl->w = comp->vw_def = vw; redraw = 1; } if ( redraw ) { comp->user_set = 1; fl_redraw_object( ob ); fl_redraw_object( comp->tb ); fl_redraw_object( comp->hsl ); fl_redraw_object( comp->vsl ); } } /*************************************** * Returns the position and width and height of the browsers text area ***************************************/ void fl_get_browser_dimension( FL_OBJECT * obj, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ) { FLI_TBOX_SPEC *sp = ( ( FLI_BROWSER_SPEC * ) obj->spec )->tb->spec; *x = obj->x + sp->x; *y = obj->y + sp->y; *w = sp->w; *h = sp->h; } /*************************************** * Makes a browser line selectable or unselectable ***************************************/ void fl_set_browser_line_selectable( FL_OBJECT * ob, int line, int flag ) { fli_tbox_make_line_selectable( ob, line - 1, flag ); } /*************************************** * Appends characters to the end of the last line in the browser ***************************************/ void fl_addto_browser_chars( FL_OBJECT * ob, const char * str ) { FLI_BROWSER_SPEC *sp = ob->spec; fli_tbox_add_chars( sp->tb, str ); redraw_scrollbar( ob ); } /*************************************** * Returns an approximation of the number of lines shown in the browser ***************************************/ int fl_get_browser_screenlines( FL_OBJECT * ob ) { FLI_BROWSER_SPEC *sp = ob->spec; int t = fli_tbox_get_topline( sp->tb ); int b = fli_tbox_get_bottomline( sp->tb ); if ( t < 0 || b < 0 ) return 0; return b - t + 1; } /*************************************** * Sets the escape key used in the text ***************************************/ void fl_set_browser_specialkey( FL_OBJECT * ob, int specialkey ) { FLI_TBOX_SPEC *sp = ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb->spec; sp->specialkey = specialkey; } /*************************************** * Brings a line into view ***************************************/ void fl_show_browser_line( FL_OBJECT * ob, int line ) { fli_tbox_set_centerline( ( ( FLI_BROWSER_SPEC * ) ob->spec )->tb, line ); redraw_scrollbar( ob ); } /*************************************** * Deprecated function, only left in for backward compatibility ***************************************/ int fl_set_default_browser_maxlinelength( int n FL_UNUSED_ARG ) { return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/text.c0000644000175000017500000000565111253416662014141 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file text.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Text object */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ static int handle_text( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { switch ( event ) { case FL_DRAW: ob->align |= FL_ALIGN_INSIDE; fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); /* fall through */ case FL_DRAWLABEL: fl_set_text_clipping( ob->x + FL_abs( ob->bw ), ob->y + 2, ob->w - 2 * FL_abs( ob->bw ), ob->h - 4 ); fl_draw_object_label( ob ); fl_unset_text_clipping( ); break; } return FL_RETURN_NONE; } /*************************************** ***************************************/ FL_OBJECT * fl_create_text( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; obj = fl_make_object( FL_TEXT, type, x, y, w, h, label, handle_text ); obj->boxtype = FL_TEXT_BOXTYPE; obj->col1 = FL_TEXT_COL1; obj->col2 = FL_TEXT_COL2; obj->lcol = FL_TEXT_LCOL; obj->align = FL_TEXT_ALIGN | FL_ALIGN_INSIDE; obj->active = 0; return obj; } /*************************************** ***************************************/ FL_OBJECT * fl_add_text( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label) { FL_OBJECT *obj = fl_create_text( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/bitmaps/0000755000175000017500000000000011377311602014434 5ustar jensjensxforms-1.0.93sp1/lib/bitmaps/q.xbm0000644000175000017500000000034411171560225015404 0ustar jensjens#define q_width 12 #define q_height 12 static unsigned char q_bits[] = { 0xf8, 0x01, 0xfc, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x84, 0x03, 0xf0, 0x01, 0xf0, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00 }; xforms-1.0.93sp1/lib/bitmaps/warn.xbm0000644000175000017500000000043511171560225016114 0ustar jensjens#define warn_width 16 #define warn_height 16 static unsigned char warn_bits[] = { 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03 }; xforms-1.0.93sp1/lib/bitmaps/plaid.xpm0000644000175000017500000000247511171560225016262 0ustar jensjens/* XPM */ static char * plaid[] = { /* plaid pixmap * width height ncolors chars_per_pixel */ "22 22 4 2 ", /* colors */ " c red m white s light_color ", "Y c green m black s lines_in_mix ", "+ c yellow m white s lines_in_dark ", "x m black s dark_color ", /* pixels */ "x x x x x x x x x x x x + x x x x x ", " x x x x x x x x x x x x x x x x ", "x x x x x x x x x x x x + x x x x x ", " x x x x x x x x x x x x x x x x ", "x x x x x x x x x x x x + x x x x x ", "Y Y Y Y Y x Y Y Y Y Y + x + x + x + x + x + ", "x x x x x x x x x x x x + x x x x x ", " x x x x x x x x x x x x x x x x ", "x x x x x x x x x x x x + x x x x x ", " x x x x x x x x x x x x x x x x ", "x x x x x x x x x x x x + x x x x x ", " x x x x Y x x x ", " x x x Y x x ", " x x x x Y x x x ", " x x x Y x x ", " x x x x Y x x x ", "x x x x x x x x x x x x x x x x x x x x x x ", " x x x x Y x x x ", " x x x Y x x ", " x x x x Y x x x ", " x x x Y x x ", " x x x x Y x x x " } ; xforms-1.0.93sp1/lib/bitmaps/Makefile.am0000644000175000017500000000011611171560225016465 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = plaid.xpm q.xbm warn.xbm xforms-1.0.93sp1/lib/bitmaps/.cvsignore0000644000175000017500000000002511171560225016430 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/lib/bitmaps/Makefile.in0000644000175000017500000002402511377311602016504 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = lib/bitmaps ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = plaid.xpm q.xbm warn.xbm all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/bitmaps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign lib/bitmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/lib/clock.c0000644000175000017500000002256511253413716014250 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file clock.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * clocks */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include #ifndef M_PI #define M_PI 3.14159265359 #endif typedef struct { time_t sec; long offset; int nstep; int am_pm; /* 12hr clock */ } SPEC; static double hourhand[ 4 ][ 2 ] = { { -0.6, 0.0 }, { 0.0, -1.6 }, { 0.6, 0.0 }, { 0.0, 7.0 } }; static double minhand[ 4 ][ 2 ] = { { -0.6, 0.0 }, { 0.0, -1.6 }, { 0.6, 0.0 }, { 0.0, 11.6 } }; static double sechand[ 4 ][ 2 ] = { { -0.3, 0.0 }, { 0.0, -2.0 }, { 0.3, 0.0 }, { 0.0, 11.6 } }; #define ROTxy( xx, yy, x, y, a ) \ do \ { \ double s = sin( a ); \ double c = cos( a ); \ xx = FL_crnd( xc + ( ( x ) - xc ) * c + ( ( y ) - yc ) * s ); \ yy = FL_crnd( yc - ( ( x ) - xc ) * s + ( ( y ) - yc ) * c ); \ } while ( 0 ) /*************************************** ***************************************/ static void draw_hand( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, double a[ ][ 2 ], double ra, FL_COLOR fc, FL_COLOR bc ) { int i; double ccp[ 4 ][ 2 ]; double xc = x + 0.5 * w, yc = y + 0.5 * h; FL_POINT xp[ 5 ]; /* Needs one extra point! */ for ( i = 0; i < 4; i++ ) { ccp[ i ][ 0 ] = xc + a[ i ][ 0 ] * w / 28.0; ccp[ i ][ 1 ] = yc + a[ i ][ 1 ] * h / 28.0; ROTxy( xp[ i ].x, xp[ i ].y, ccp[ i ][ 0 ], ccp[ i ][ 1 ], ra ); } fl_polyf( xp, 4, fc ); fl_polyl( xp, 4, bc ); } static int hours, minutes, seconds; static int updating; /*************************************** ***************************************/ static void show_hands( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR fcolor, FL_COLOR bcolor ) { double ra; double fact = - M_PI / 180.0; ra = fact * ( 180 + 30 * hours + 0.5 * minutes ); draw_hand( x, y, w, h, hourhand, ra, fcolor, bcolor ); ra = fact * ( 180 + 6 * minutes + seconds / 10 ); draw_hand( x, y, w, h, minhand, ra, fcolor, bcolor ); ra = fact * ( 180 + 6 * seconds ); draw_hand( x, y, w, h, sechand, ra, fcolor, bcolor ); } /*************************************** ***************************************/ static void draw_clock( int type FL_UNUSED_ARG, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col1 FL_UNUSED_ARG, FL_COLOR col2 ) { double xc = x + 0.5 * w, yc = y + 0.5 * h; int i; double ra; FL_POINT xp[ 5 ]; /* need one extra for closing of polygon! */ double f1, f2, f3; #if FL_DEBUG >= ML_DEBUG M_info( "draw_clock", "entering" ); #endif w -= 4; h -= 4; /* draw hour ticks */ f2 = 0.40 * h; f3 = 0.44 * h; for ( ra = 0.0, i = 0; i < 12; i++, ra += M_PI / 6 ) { f1 = ( i % 3 ? 0.01 : 0.02 ) * w; ROTxy( xp[ 0 ].x, xp[ 0 ].y, xc - f1, yc + f2, ra ); ROTxy( xp[ 1 ].x, xp[ 1 ].y, xc + f1, yc + f2, ra ); ROTxy( xp[ 2 ].x, xp[ 2 ].y, xc + f1, yc + f3, ra ); ROTxy( xp[ 3 ].x, xp[ 3 ].y, xc - f1, yc + f3, ra ); fl_polyf( xp, 4, FL_LEFT_BCOL ); } show_hands( x + 2 + 0.02 * w, y + 2 + 0.02 * h, w, h, FL_RIGHT_BCOL, FL_RIGHT_BCOL ); show_hands( x, y, w, h, col2, FL_LEFT_BCOL ); #if FL_DEBUG >= ML_DEBUG M_info( "draw_clock", "done" ); #endif } /*************************************** ***************************************/ static void draw_digitalclock( FL_OBJECT * ob ) { char buf[ 12 ]; SPEC *sp = ob->spec; if ( sp->am_pm ) sprintf( buf, "%d:%02d:%02d %s", hours > 12 ? hours - 12 : hours, minutes, seconds, hours > 12 ? "pm" : "am" ); else sprintf( buf, "%d:%02d:%02d", hours, minutes, seconds ); fl_drw_text( FL_ALIGN_CENTER, ob->x, ob->y, ob->w, ob->h, ob->col2, ob->lstyle, ob->lsize, buf ); } /*************************************** ***************************************/ static int handle_clock( FL_OBJECT * ob, int event, FL_Coord x FL_UNUSED_ARG, FL_Coord y FL_UNUSED_ARG, int k FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { time_t ticks; struct tm *timeofday; SPEC *sp = ob->spec; switch ( event ) { case FL_DRAW : fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); if ( ob->type == FL_DIGITAL_CLOCK ) draw_digitalclock( ob ); else draw_clock( ob->type, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->col2 ); /* fall through */ case FL_DRAWLABEL : if ( ! updating ) fl_drw_text_beside( ob->align & ~ FL_ALIGN_INSIDE, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); updating = 0; break; case FL_STEP: /* Clock has a resolution of about 1 sec. FL_STEP is sent about every 0.05 sec. If there are more than 10 clocks, we might run into trouble */ if ( ++sp->nstep & 1 ) break; sp->nstep = 0; ticks = time( 0 ) + sp->offset; if ( ticks != sp->sec ) { updating = 1; sp->sec = ticks; timeofday = localtime( &ticks ); seconds = timeofday->tm_sec; hours = timeofday->tm_hour; minutes = timeofday->tm_min; fl_redraw_object( ob ); } break; case FL_FREEMEM: fl_free( ob->spec ); break; } return FL_RETURN_NONE; } /*************************************** ***************************************/ FL_OBJECT * fl_create_clock( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * s ) { FL_OBJECT *obj; obj = fl_make_object( FL_CLOCK, type, x, y, w, h, s, handle_clock ); obj->boxtype = FL_CLOCK_BOXTYPE; obj->col1 = FL_CLOCK_COL1; obj->col2 = FL_CLOCK_COL2; obj->lcol = FL_CLOCK_LCOL; obj->align = FL_CLOCK_ALIGN; obj->automatic = obj->active = 1; obj->spec = fl_calloc( 1, sizeof *obj->spec ); return obj; } /*************************************** ***************************************/ FL_OBJECT * fl_add_clock( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * s ) { FL_OBJECT *ob = fl_create_clock( type, x, y, w, h, s ); fl_add_object( fl_current_form, ob ); fl_set_object_dblbuffer( ob, 1 ); return ob; } /*************************************** ***************************************/ long fl_set_clock_adjustment( FL_OBJECT * ob, long offset ) { SPEC *sp = ob->spec; long old = sp->offset; sp->offset = offset; return old; } /*************************************** ***************************************/ void fl_get_clock( FL_OBJECT * ob, int * h, int * m, int * s ) { SPEC *sp = ob->spec; time_t ticks; struct tm *tm; ticks = time( 0 ) + sp->offset; tm = localtime( &ticks ); *h = tm->tm_hour; *m = tm->tm_min; *s = tm->tm_sec; } /*************************************** ***************************************/ void fl_set_clock_ampm( FL_OBJECT * ob, int y ) { SPEC *sp = ob->spec; if ( sp->am_pm != y ) { sp->am_pm = y; fl_redraw_object( ob ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/thumbwheel.c0000644000175000017500000003324211316735674015325 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file thumbwheel.c * * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * The thumbwheel * * TODO: cursor keys * home key * do we need increments a la slider? */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include "private/ptwheel.h" #ifndef M_PI #define M_PI 3.14159265359 #endif static const double arc = ( M_PI * 0.48 ); /* about 90 degrees */ #define GRID 0.190 /* angular grid for ridges */ #define NEAR 600.0 /* near plane distance */ #define DEFSTEP 0.005 /*************************************** ***************************************/ static void draw( FL_OBJECT * ob ) { int h2 = ob->h / 2, w2 = ob->w / 2; int absbw = FL_abs( ob->bw ); double delta = GRID - ( ( h2 + w2 ) > 300 ? 0.02 : 0.0 ); FLI_THUMBWHEEL_SPEC *sp = ob->spec; double yo = ob->y + h2; double x0 = ob->x + w2; int x, y, w, h; double theta; double dx, dy; double offset = sp->val / ( sp->step == 0.0 ? DEFSTEP : sp->step ); double junk; FL_COLOR c1, c2; if ( sp->draw_type == COMPLETE_DRAW ) fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); x = ob->x + absbw; y = ob->y + absbw; w = ob->w - 2 * absbw; h = ob->h - 2 * absbw; if ( ob->type == FL_VERT_THUMBWHEEL ) { double extra = h2 * ( NEAR / ( NEAR - h2 ) - 0.96 ); /* (Fake) depth-cue */ fl_rectf( x, y + 1, w, h - 2, FL_DARKER_COL1 ); fl_rectf( x, yo - ob->h / 4, w, ob->h / 2, FL_COL1 ); fl_rectf( x, yo - ob->h / 10, w, ob->h / 5, FL_LIGHTER_COL1 ); for ( theta = arc - modf( offset / delta, &junk ); theta > -arc; theta -= delta ) { dy = ( h2 + extra ) * sin( theta ); dx = ob->h - ( h2 + extra ) * cos( theta ); y = yo + FL_nint( dy * NEAR / ( NEAR + dx ) ); if ( y > ob->y + 3 && y < ob->y + ob->h - 3 ) { int d = 1; if ( y < yo + h2 / 4 && y > yo - h2 / 4 ) { c1 = FL_LEFT_BCOL; c2 = FL_RIGHT_BCOL; } else if ( y < ob->y + h2 / 5 || y > yo + h2 - h2 / 5 ) { c1 = FL_LIGHTER_COL1; c2 = FL_BOTTOM_BCOL; d = 0; } else { c1 = FL_MCOL; c2 = FL_BOTTOM_BCOL; } fl_line( x + 1, y - 1, x + w - 2, y - 1, c1 ); fl_line( x + 1, y + d, x + w - 2, y + d, c2 ); } } /* Bottom */ y = ob->y + absbw; fl_rectf( x - 1, ob->y + ob->h - 6, w, 3, FL_RIGHT_BCOL ); /* Top */ fl_rectf( x - 1, y, w, 3, FL_RIGHT_BCOL ); /* Left */ fl_line( x - 1, y, x - 1, y + h - 1, FL_BLACK ); /* right */ fl_rectf( x + w - 1, y, 2, h, FL_RIGHT_BCOL ); /* Highlight */ fl_line( x + 1, yo - h2 + 10, x + 1, yo + h2 - 10, FL_LEFT_BCOL ); } else { double extra = w2 * ( NEAR / ( NEAR - w2 ) - 0.96 ); fl_rectf( x, y, w, h, FL_DARKER_COL1 ); fl_rectf( x0 - w / 4, y, w / 2, h, FL_COL1 ); dx = ob->w / 10; fl_rectf( x0 - dx, y, 2 * dx, h, FL_LIGHTER_COL1 ); for ( theta = arc + modf( offset / delta, &junk ); theta > -arc; theta -= delta ) { dx = ( w2 + extra ) * sin( theta ); dy = ob->w - ( w2 + extra ) * cos( theta ); x = x0 + FL_nint( dx * NEAR / ( NEAR + dy ) ); if ( x > ob->x + absbw + 1 && x < x0 + w2 - absbw - 2 ) { int d = 1; if ( x < x0 + w2 / 4 && x > x0 - w2 / 4 ) { c1 = FL_LEFT_BCOL; c2 = FL_RIGHT_BCOL; } else if ( x < ob->x + ( w2 / 4 ) || x > x0 + w2 - ( w2 / 4 ) ) { c1 = FL_LIGHTER_COL1; c2 = FL_BOTTOM_BCOL; } else { c1 = FL_MCOL; c2 = FL_BOTTOM_BCOL; } fl_line( x - 1, y + 2, x - 1, yo + h2 - 2 * absbw, c1 ); fl_line( x + d, y + 2, x + d, yo + h2 - 2 * absbw, c2 ); } x = ob->x + absbw; y = ob->y + absbw; w = ob->w - 2 * absbw; h = ob->h - 2 * absbw; /* Top shadow */ fl_line( x, y - 1, x + w - 2, y - 1, FL_BLACK ); fl_line( x, y, x + w - 4, y, FL_BLACK ); /* Bottom shadow */ fl_line( x + 5, y + h - 2, x + w - 4, y + h - 2, FL_BLACK ); fl_line( x, y + h - 1, x + w - 2, y + h - 1, FL_BLACK ); fl_line( x, y + h, x + w - 2, y + h, FL_BLACK ); /* Left & right */ fl_rectf( x, y - 1, 3, h + 1, FL_RIGHT_BCOL ); fl_rectf( x + w - 4, y - 1, 3, h + 1, FL_RIGHT_BCOL ); /* High light */ fl_line( x0 - w2 + 11, y + 1, x0 + w2 - 11, y + 1, FL_TOP_BCOL ); } } if ( sp->draw_type == COMPLETE_DRAW ) fl_draw_object_label_outside( ob ); } /*************************************** ***************************************/ static int handle_thumbwheel( FL_OBJECT * ob, int ev, int mx, int my, int key, void * xev FL_UNUSED_ARG ) { FLI_THUMBWHEEL_SPEC *sp = ob->spec; int cur_pos, old_pos; double value; double step = sp->step != 0.0 ? sp->step : DEFSTEP; int ret = FL_RETURN_NONE; switch ( ev ) { case FL_DRAW: draw( ob ); sp->draw_type = COMPLETE_DRAW; break; case FL_DRAWLABEL: if ( sp->draw_type == COMPLETE_DRAW ) fl_draw_object_label_outside( ob ); break; case FL_PUSH: if ( key != FL_MBUTTON1 ) break; sp->old_mx = mx; sp->old_my = my; sp->start_val = sp->val; /* fall through */ case FL_MOTION: if ( key != FL_MBUTTON1 ) break; cur_pos = ob->type == FL_VERT_THUMBWHEEL ? sp->old_my : mx; old_pos = ob->type == FL_VERT_THUMBWHEEL ? my : sp->old_mx; value = sp->val + step * ( cur_pos - old_pos ); sp->old_mx = mx; sp->old_my = my; ret |= fli_valuator_handle_drag( ob, value ); break; case FL_KEYPRESS: value = sp->val; if ( IsHome( key ) ) value = 0.5 * ( sp->min + sp->max ); else if ( IsUp( key ) && ob->type == FL_VERT_THUMBWHEEL ) value = sp->val + step; else if ( IsDown( key ) && ob->type == FL_VERT_THUMBWHEEL ) value = sp->val - step; else if ( IsRight( key ) && ob->type == FL_HOR_THUMBWHEEL ) value = sp->val + step; else if ( IsLeft( key ) && ob->type == FL_HOR_THUMBWHEEL ) value = sp->val - step; ret |= fli_valuator_handle_release( ob, value ); break; case FL_RELEASE: if ( ! ( key == FL_MBUTTON1 || ( ob->type == FL_VERT_THUMBWHEEL && ( key == FL_MBUTTON4 || key == FL_MBUTTON5 ) ) ) ) break; if ( ob->type == FL_VERT_THUMBWHEEL && ( key == FL_MBUTTON4 || key == FL_MBUTTON5 ) ) value = sp->val + ( key == FL_MBUTTON4 ? step : -step ); else value = sp->val; ret |= fli_valuator_handle_release( ob, value ); break; } return ret; } /*************************************** ***************************************/ double fl_get_thumbwheel_value( FL_OBJECT * ob ) { #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_THUMBWHEEL ) ) { M_err( "fl_get_thumbwheel_value", "%s is not a thumbwheel", ob ? ob->label : "null" ); return 1.0; } #endif return ( ( FLI_THUMBWHEEL_SPEC * ) ob->spec )->val; } /*************************************** ***************************************/ double fl_set_thumbwheel_value( FL_OBJECT * ob, double value ) { FLI_THUMBWHEEL_SPEC *sp; double oldval; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_THUMBWHEEL ) ) { M_err( "fl_set_thumbwheel_value", "%s is not a thumbwheel", ob ? ob->label : "null" ); return 1.0; } #endif sp = ob->spec; oldval = sp->val; value = FL_clamp( value, sp->min, sp->max ); if ( sp->val != value ) { sp->val = sp->start_val = value; fl_redraw_object( ob ); } return oldval; } /*************************************** ***************************************/ void fl_set_thumbwheel_bounds( FL_OBJECT * ob, double min, double max ) { FLI_THUMBWHEEL_SPEC *sp; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_THUMBWHEEL ) ) { M_err( "fl_set_thumbwheel_bounds", "%s is not a thumbwheel", ob ? ob->label : "null" ); return; } #endif sp = ob->spec; if ( sp->min != min || sp->max != max ) { sp->min = min; sp->max = max; sp->val = FL_clamp( sp->val, min, max ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_get_thumbwheel_bounds( FL_OBJECT * ob, double * min, double * max ) { FLI_THUMBWHEEL_SPEC *sp = ob->spec; *min = sp->min; *max = sp->max; } /*************************************** ***************************************/ double fl_get_thumbwheel_step( FL_OBJECT * ob ) { return ( ( FLI_THUMBWHEEL_SPEC * ) ob->spec )->step; } /*************************************** ***************************************/ double fl_set_thumbwheel_step( FL_OBJECT * ob, double step ) { FLI_THUMBWHEEL_SPEC *sp = ob->spec; double old = sp->step; if ( sp->step != step ) sp->step = step; return old; } /*************************************** * Unused, undocumented function JTT ***************************************/ int fl_set_thumbwheel_crossover( FL_OBJECT * ob, int flag ) { FLI_THUMBWHEEL_SPEC *sp; int old; if ( ! ob || ! ( ob->objclass != FL_THUMBWHEEL ) ) return -1; sp = ob->spec; old = sp->cross_over; sp->cross_over = flag; return old; } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function should be regarded as deprecated and * fl_set_object_return() should be used instead. ***************************************/ int fl_set_thumbwheel_return( FL_OBJECT * obj, unsigned int when ) { return fl_set_object_return( obj, when ); } /*************************************** * Creates a thumbwheel object * ***************************************/ FL_OBJECT * fl_create_thumbwheel( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_THUMBWHEEL_SPEC *sp; obj = fl_make_object( FL_THUMBWHEEL, type, x, y, w, h, label, handle_thumbwheel ); obj->col1 = FL_THUMBWHEEL_COL1; obj->col2 = FL_THUMBWHEEL_COL2; obj->lcol = FL_THUMBWHEEL_LCOL; obj->align = FL_THUMBWHEEL_ALIGN; obj->boxtype = FL_THUMBWHEEL_BOXTYPE; obj->wantkey = FL_KEY_SPECIAL; obj->spec = NULL; sp = fli_init_valuator( obj ); sp->step = DEFSTEP; fl_set_object_return( obj, FL_RETURN_CHANGED ); return obj; } /*************************************** * Adds a thumbwheel object ***************************************/ FL_OBJECT * fl_add_thumbwheel( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_thumbwheel( type, x, y, w, h, label ); /* Set default return policy for the object */ fl_set_object_return( obj, FL_RETURN_CHANGED ); fl_add_object( fl_current_form, obj ); fl_set_object_dblbuffer( obj, 1 ); return obj; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/goodie_yesno.c0000644000175000017500000001237311247055071015633 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file goodie_yesno.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include /************* Ask yes/no question **********************{****/ typedef struct { FL_FORM * form; FL_OBJECT * str; FL_OBJECT * yes; FL_OBJECT * no; } FD_yesno; /*************************************** ***************************************/ static FD_yesno * create_yesno( void ) { FD_yesno *fdui = malloc( sizeof *fdui ); int oldy = fli_inverted_y; int oldu = fl_get_coordunit( ); fli_inverted_y = 0; fl_set_coordunit( FL_COORD_PIXEL ); fdui->form = fl_bgn_form( FL_UP_BOX, 460, 130 ); fl_set_form_title( fdui->form, "Question" ); fdui->str = fl_add_box( FL_FLAT_BOX, 20, 15, 420, 65, "" ); fdui->yes = fl_add_button( FL_NORMAL_BUTTON, 85, 90, 80, 27, "Yes" ); fl_set_button_shortcut( fdui->yes, "Yy", 1 ); fdui->no = fl_add_button( FL_NORMAL_BUTTON, 295, 90, 80, 27, "No" ); fl_set_button_shortcut( fdui->no, "Nn", 1 ); fli_add_q_icon( 10, 20, 33, 33 ); fl_end_form( ); fl_register_raw_callback( fdui->form, FL_ALL_EVENT, fli_goodies_preemptive ); fl_set_form_atclose( fdui->form, fl_goodies_atclose, fdui->no ); if ( fli_cntl.buttonFontSize != FL_DEFAULT_SIZE ) fl_fit_object_label( fdui->no, 22, 2 ); fli_inverted_y = oldy; fl_set_coordunit( oldu ); return fdui; } static FD_yesno *fd_yesno = NULL; static int default_ans; /*************************************** * Shows a question with two buttons, yes and no ***************************************/ int fl_show_question( const char * str, int ans ) { FL_OBJECT *retobj; char shortcut[ 4 ]; int k = 0; if ( fd_yesno ) { fl_hide_form( fd_yesno->form ); fl_free_form( fd_yesno->form ); fl_free( fd_yesno ); } else fl_deactivate_all_forms( ); fd_yesno = create_yesno( ); default_ans = ans; fli_parse_goodies_label( fd_yesno->yes, FLQuestionYesLabel ); fli_parse_goodies_label( fd_yesno->no, FLQuestionNoLabel ); /* We don't set a shortcut if the first letter of the "yes" label is identical to all letters in the "no" label */ while ( fd_yesno->no->label[ k ] && tolower( ( int ) fd_yesno->yes->label[ 0 ] ) == tolower( ( int ) fd_yesno->yes->label[ k ] ) ) k++; if ( fd_yesno->no->label[ k ] ) { shortcut[ 0 ] = fd_yesno->yes->label[ 0 ]; shortcut[ 1 ] = tolower( ( int ) fd_yesno->yes->label[ 0 ] ); shortcut[ 2 ] = toupper( ( int ) fd_yesno->yes->label[ 0 ] ); shortcut[ 3 ] = '\0'; fl_set_button_shortcut( fd_yesno->yes, shortcut, 1 ); shortcut[ 0 ] = fd_yesno->no->label[ k ]; shortcut[ 1 ] = toupper( ( int ) fd_yesno->no->label[ k ] ); shortcut[ 2 ] = tolower( ( int ) fd_yesno->no->label[ k ] ); fl_set_button_shortcut( fd_yesno->no, shortcut, 1 ); } fli_get_goodie_title( fd_yesno->form, FLQuestionTitle ); fli_handle_goodie_font( fd_yesno->yes, fd_yesno->str ); fli_handle_goodie_font( fd_yesno->no, NULL ); fl_set_object_label( fd_yesno->str, str ); if ( ans == 1 ) fl_set_form_hotobject( fd_yesno->form, fd_yesno->yes ); else if ( ans == 0 ) fl_set_form_hotobject( fd_yesno->form, fd_yesno->no ); else fl_set_form_hotspot( fd_yesno->form, -1, -1 ); fl_show_form( fd_yesno->form, FL_PLACE_HOTSPOT, FL_TRANSIENT, fd_yesno->form->label ); fl_update_display( 0 ); while ( ( retobj = fl_do_only_forms( ) ) != fd_yesno->yes && retobj != fd_yesno->no ) /* empty */; k = retobj == fd_yesno->yes; fl_hide_form( fd_yesno->form ); fl_free_form( fd_yesno->form ); fl_safe_free( fd_yesno ); fl_activate_all_forms( ); return k; } /*************************************** ***************************************/ void fl_hide_question( void ) { if ( fd_yesno ) fl_trigger_object( default_ans == 1 ? fd_yesno->yes : fd_yesno->no ); else M_warn( "fl_hide_question", "No question box is shown" ); } /*************************************** ***************************************/ void fli_question_cleanup( void ) { fl_safe_free( fd_yesno ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/read4lsb.c0000644000175000017500000000265611247055071014653 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" #include "ulib.h" /*************************************** ***************************************/ int fli_fget4LSBF( FILE * fp ) { int ret = getc(fp); ret |= getc(fp) << 8; ret |= getc(fp) << 16; ret |= getc(fp) << 24; return ret; } /*************************************** ***************************************/ int fli_fput4LSBF( int code, FILE * fp ) { putc(code & 0xff, fp); putc((code >> 8) & 0xff, fp); putc((code >> 16) & 0xff, fp); return putc((code >> 24) & 0xff, fp); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/events.c0000644000175000017500000007657511374171312014470 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file events.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Events handlers for the application window */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" static void fli_handle_input_object( FL_OBJECT * obj ); /*** Global event handlers for all windows ******/ static FL_APPEVENT_CB fli_event_callback; static void *fli_user_data; FL_OBJECT *fli_handled_obj = NULL; FL_OBJECT *fli_handled_parent = NULL; /*************************************** * Function returns 1 if the event is consumed so it will never * reach the application window event queue ***************************************/ int fli_handle_event_callbacks( XEvent * xev ) { Window win = ( ( XAnyEvent * ) xev )->window; FLI_WIN *fwin = fli_app_win; while ( fwin && fwin->win != win ) fwin = fwin->next; if ( ! fwin ) { /* If there's a callback for events for independendly created user windows that returns 0 the event has been handled, otherwise ignore it */ if ( fli_event_callback && ! fli_event_callback( xev, fli_user_data ) ) return 1; M_warn( "fli_handle_event_callbacks", "Unknown window = %ld", xev->xany.window ); fli_xevent_name( "Ignored", xev ); return 1; } if ( fwin->pre_emptive && fwin->pre_emptive( xev, fwin->pre_emptive_data ) == FL_PREEMPT ) return 1; if ( fwin->callback[ xev->type ] ) { fwin->callback[ xev->type ]( xev, fwin->user_data[ xev->type ] ); return 1; } return 0; } /*************************************** * Sets the callback routine for the events ***************************************/ FL_APPEVENT_CB fl_set_event_callback( FL_APPEVENT_CB callback, void * user_data ) { FL_APPEVENT_CB old = fli_event_callback; fli_event_callback = callback; fli_user_data = user_data; return old; } /********* End of Application Window management ***********}*****/ /*************** THE OBJECT EVENTS *************{******/ /*************** CALL-BACK ROUTINE HANDLING ***********/ /* Normally, the object queue doesn't have to be large and a default size is sufficient. In the case that more objects need to be stored the queue isn't increased by just another element but instead by the same number of objects we started with, reducing the number of calls of malloc() a bit */ #define FLI_QSIZE 64 /* chunk size of object queue */ typedef struct FLI_OBJECT_QUEUE_ENTRY_ { FL_OBJECT * obj; int ret; struct FLI_OBJECT_QUEUE_ENTRY_ * next; } FLI_OBJECT_QUEUE_ENTRY; typedef struct FLI_OBJECT_QUEUE_ { FLI_OBJECT_QUEUE_ENTRY * head; /* here objects get added to */ FLI_OBJECT_QUEUE_ENTRY * tail; /* and here they get removed from */ FLI_OBJECT_QUEUE_ENTRY * empty; /* linked list of empty entries */ FLI_OBJECT_QUEUE_ENTRY * blocks; /* pointer to linked list of blocks */ } FLI_OBJECT_QUEUE; static FLI_OBJECT_QUEUE obj_queue = { NULL, NULL, NULL, NULL }; /*************************************************** * Function for creating/extending the object queue * (gets called automatically the first time an * object gets pushed on the queue, so no previous * call, e.g. from fl_initialize(), is necessary) ***************************************************/ static void fli_extend_obj_queue( void ) { FLI_OBJECT_QUEUE_ENTRY *p = fl_malloc( ( FLI_QSIZE + 1 ) * sizeof *p ); size_t i; /* The first element of the (new) area is used for book-keeping purposes */ p->next = obj_queue.blocks; obj_queue.blocks = p++; /* The rest gets added to (or makes up) the empty list */ obj_queue.empty = p; for ( i = 0; i < FLI_QSIZE - 1; p++, i++ ) p->next = p + 1; p->next = NULL; } /****************************************************** * Fuction for removing the object queue, should be * called when all forms and application windows have * been closed to get rid of allocated memory. ******************************************************/ void fli_obj_queue_delete( void ) { FLI_OBJECT_QUEUE_ENTRY *b; while ( ( b = obj_queue.blocks ) != NULL ) { obj_queue.blocks = b->next; fl_free( b ); } obj_queue.tail = obj_queue.head = obj_queue.empty = NULL; } /*********************************************************** * Function for appending a new element to the object queue ***********************************************************/ static void fli_add_to_obj_queue( FL_OBJECT * obj ) { if ( obj == NULL ) return; if ( obj_queue.empty == NULL ) fli_extend_obj_queue( ); if ( obj_queue.head ) obj_queue.head = obj_queue.head->next = obj_queue.empty; else obj_queue.tail = obj_queue.head = obj_queue.empty; obj_queue.empty = obj_queue.empty->next; obj_queue.head->next = NULL; obj_queue.head->obj = obj; if ( obj != FL_EVENT ) obj_queue.head->ret = obj->returned; } /***************************************************************** * Function for fetching the oldest element form the object queue *****************************************************************/ static FL_OBJECT * fli_get_from_obj_queue( void ) { FLI_OBJECT_QUEUE_ENTRY *t = obj_queue.tail; if ( t == NULL ) return NULL; if ( t->next == NULL ) obj_queue.tail = obj_queue.head = NULL; else obj_queue.tail = t->next; t->next = obj_queue.empty; obj_queue.empty = t; if ( t->obj != FL_EVENT ) t->obj->returned = t->ret; return t->obj; } /************************************************************************* * Function for removing all entries for a certain object from the queue. * This routine is called as part of hiding and deletion of an object. *************************************************************************/ void fli_object_qflush_object( FL_OBJECT * obj ) { FLI_OBJECT_QUEUE_ENTRY *c, *p; while ( obj_queue.tail && obj_queue.tail->obj == obj ) fli_get_from_obj_queue( ); if ( ! obj_queue.tail ) return; p = obj_queue.tail; c = p->next; while ( c ) { if ( c->obj == obj ) { p->next = c->next; c->next = obj_queue.empty; obj_queue.empty = c; } else p = c; c = p->next; } } /********************************************************************** * Function for removing all entries for a certain form from the queue * - here the object handler must be executed for FL_INPUT objects. * This should be called as part of free_form process. **********************************************************************/ void fli_object_qflush( FL_FORM * form ) { FLI_OBJECT_QUEUE_ENTRY *c, *p; while ( obj_queue.tail && obj_queue.tail->obj != FL_EVENT && obj_queue.tail->obj->form == form ) { if ( obj_queue.tail->obj->objclass == FL_INPUT ) fli_handle_input_object( obj_queue.tail->obj ); fli_get_from_obj_queue( ); } if ( ! obj_queue.tail ) return; for ( p = obj_queue.tail, c = p->next; c != NULL; c = p->next ) if ( c->obj != FL_EVENT && c->obj->form == form ) { if ( c->obj->objclass == FL_INPUT ) fli_handle_input_object( c->obj ); p->next = c->next; c->next = obj_queue.empty; obj_queue.empty = c; } else p = c; } /*************************************** * Adds an object to the queue ***************************************/ void fli_object_qenter( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fli_object_qenter", "NULL object" ); return; } #ifndef DELAYED_ACTION if ( obj != FL_EVENT && ( ! obj->form || ! obj->visible || obj->active <= 0 ) ) { #if FL_DEBUG >= ML_DEBUG M_err( "fli_object_qenter", "Bad object" ); #endif return; } /* Please note: if 'DELAYED_ACTION' should ever be switched on don't forget to deal correctly with also handling callbacks of parent objects (if the object entered is a child object) */ if ( obj != FL_EVENT ) { if ( obj->object_callback ) { XFlush( flx->display ); obj->object_callback( obj, obj->argument ); return; } else if ( obj->form->form_callback ) { XFlush( flx->display ); obj->form->form_callback( obj, obj->form->form_cb_data ); return; } } #endif /* ! DELAYED_ACTION */ fli_add_to_obj_queue( obj ); } /*************************************** * Returns a pointer to the oldest element in the object queue ***************************************/ FL_OBJECT * fli_object_qtest( void ) { return obj_queue.tail ? obj_queue.tail->obj : NULL; } /*************************************** * Filter out result bits that don't fit what the object is set up to * return, and make sure the FL_RETURN_END_CHANGED bit is set correctly, * which requires that both FL_RETURN_CHANGED and FL_RETURN_END are set ***************************************/ void fli_filter_returns( FL_OBJECT * obj ) { if ( obj->how_return & FL_RETURN_END_CHANGED && obj->returned & FL_RETURN_CHANGED && obj->returned & FL_RETURN_END ) { obj->returned |= FL_RETURN_END_CHANGED; obj->returned &= ~ ( FL_RETURN_CHANGED | FL_RETURN_END ); } if ( obj->how_return != FL_RETURN_NONE ) obj->returned &= obj->how_return | FL_RETURN_TRIGGERED; else obj->returned = FL_RETURN_NONE; } /*************************************** * Reads an object from the queue, calls callbacks for the object if * they exist or passes it on to the user (via fl_do_forms() etc.) ***************************************/ FL_OBJECT * fli_object_qread( void ) { FL_OBJECT *obj = fli_get_from_obj_queue( ); if ( ! obj || obj == FL_EVENT ) return obj; if ( ! obj->form ) return NULL; /* If the object has a callback execute it and return NULL unless the object is a child object (in that case we're supposed to also check the for callbacks for the parent etc.). It's also important to make sure the object didn't get deleted within its callback - if that's the case it would be catastrophic to check for the parent... */ if ( obj->object_callback ) { fli_handled_obj = obj; obj->object_callback( obj, obj->argument ); if ( fli_handled_obj ) obj->returned = FL_RETURN_NONE; if ( ! fli_handled_obj || ! obj->parent ) return NULL; } /* If the object is a child object check if there is a callback for the parent and execute that (and return NULL in that case). In between also check if there are further events for other childs of the same parent in the queue and also execute their callbacks. And keep in mind that execution of one of these callbacks may delete the object and its parent... */ if ( obj->parent ) { obj = obj->parent; fli_filter_returns( obj ); while ( obj->parent ) { if ( ! obj->returned ) return NULL; if ( obj->object_callback ) { fli_handled_obj = obj; obj->object_callback( obj, obj->argument ); if ( fli_handled_obj ) obj->returned = FL_RETURN_NONE; else return NULL; } obj = obj->parent; fli_filter_returns( obj ); } fli_handled_parent = obj; while ( fli_handled_parent ) { FL_OBJECT *n, *p; if ( ! ( n = fli_object_qtest( ) ) || n == FL_EVENT || ! n->parent ) break; p = n->parent; while ( p->parent ) p = p->parent; if ( p != obj ) break; n = fli_get_from_obj_queue( ); do { fli_filter_returns( n ); if ( ! n->returned ) break; if ( n->object_callback ) { fli_handled_obj = n; n->object_callback( n, n->argument ); if ( fli_handled_obj ) n->returned = FL_RETURN_NONE; else break; } } while ( fli_handled_parent && ( n = n->parent ) != obj ); fli_filter_returns( obj ); } if ( ! fli_handled_parent ) return NULL; } /* If we arrive here the original object either was a child object or it had no callback. Run either the parent callback or the forms callback (if there's one). */ if ( ! obj->returned ) return NULL; else if ( obj->object_callback ) { fli_handled_obj = obj; obj->object_callback( obj, obj->argument ); if ( fli_handled_obj ) obj->returned = FL_RETURN_NONE; return NULL; } else if ( obj->form->form_callback ) { fli_handled_obj = obj; obj->form->form_callback( obj, obj->form->form_cb_data ); if ( fli_handled_obj ) obj->returned = FL_RETURN_NONE; return NULL; } if ( obj->child && obj->returned == FL_RETURN_NONE) return NULL; return obj; } /*************************************** * This is mainly used to handle the input correctly when a form * is being hidden ***************************************/ static void fli_handle_input_object( FL_OBJECT * obj ) { if ( obj != FL_EVENT || ! obj->form ) return; if ( obj->object_callback ) obj->object_callback( obj, obj->argument ); else if ( obj->form->form_callback ) obj->form->form_callback( obj, obj->form->form_cb_data ); } /***************** End of object queue handling *****************/ /**************** Normal Events ********************/ typedef struct FL_EVENT_QUEUE_ENTRY_ { XEvent xev; struct FL_EVENT_QUEUE_ENTRY_ * next; } FL_EVENT_QUEUE_ENTRY; typedef struct FL_EVENT_QUEUE_ { FL_EVENT_QUEUE_ENTRY * head; /* here events get added to */ FL_EVENT_QUEUE_ENTRY * tail; /* and here they get removed from */ FL_EVENT_QUEUE_ENTRY * empty; /* linked list of empty entries */ FL_EVENT_QUEUE_ENTRY * blocks; /* pointer to linked list of blocks */ unsigned long count; } FL_EVENT_QUEUE; static FL_EVENT_QUEUE event_queue = { NULL, NULL, NULL, NULL, 0 }; /*************************************************** * Function for creating/extending the event queue * (gets called automatically the first time an * event gets pushed onto the queue, so no initia- * lization, e.g. from fl_initialize(), is needed) ***************************************************/ static void fli_extend_event_queue( void ) { FL_EVENT_QUEUE_ENTRY *p = fl_malloc( ( FLI_QSIZE + 1 ) * sizeof *p ); size_t i; /* The first element of the area gets used for book-keeping purposes */ p->next = event_queue.blocks; event_queue.blocks = p++; /* The rest gets added to (or makes up) the empty list */ event_queue.empty = p; for ( i = 0; i < FLI_QSIZE - 1; p++, i++ ) p->next = p + 1; p->next = NULL; } /****************************************************** * Fuction for removing the event queue, should be * called when all forms and application windows have * been closed to get rid of allocated memory. ******************************************************/ void fli_event_queue_delete( void ) { FL_EVENT_QUEUE_ENTRY *b; while ( ( b = event_queue.blocks ) != NULL ) { event_queue.blocks = b->next; fl_free( b ); } event_queue.tail = event_queue.head = event_queue.empty = NULL; } /*********************************************************** * Function for appending a new element to the event queue ***********************************************************/ static void fli_add_to_event_queue( XEvent *xev ) { if ( event_queue.empty == NULL ) fli_extend_event_queue( ); if ( event_queue.head ) event_queue.head = event_queue.head->next = event_queue.empty; else event_queue.tail = event_queue.head = event_queue.empty; event_queue.empty = event_queue.empty->next; event_queue.head->next = NULL; event_queue.head->xev = *xev; event_queue.count++; } /**************************************************************** * Function for removing the oldest element form the event queue ****************************************************************/ static XEvent fli_get_from_event_queue( void ) { FL_EVENT_QUEUE_ENTRY *t = event_queue.tail; if ( t->next == NULL ) event_queue.tail = event_queue.head = NULL; else event_queue.tail = t->next; t->next = event_queue.empty; event_queue.empty = t; return t->xev; } /*************************************** * Replacement for the Xlib XPutBackEvent() function: * allows to push back an event onto the queue ***************************************/ void fl_XPutBackEvent( XEvent * xev ) { static int mm; if ( fli_handle_event_callbacks( xev ) ) return; /* These must have come from simulating double buffering, throw them away */ if ( xev->type == NoExpose ) { if ( ++mm % 20 == 0 ) M_warn( "fl_XPutbackEvent", "20 NoExpose discarded" ); return; } fli_xevent_name( "fl_XPutBackEvent", xev ); fli_add_to_event_queue( xev ); } /*************************************** * Replacement for the Xlib XEventsQueued() function: returns * if there are any events in the event queue. ***************************************/ int fl_XEventsQueued( int mode FL_UNUSED_ARG ) { if ( event_queue.tail == NULL ) { fli_treat_interaction_events( 0 ); fli_treat_user_events( ); } return event_queue.tail != NULL; } /*************************************** * Replacement for the Xlib XNextEvent() function: copies the oldest * event into the XEvent structure and removes it from the queue. If * the queue is empty it blocks until an event has been received. ***************************************/ int fl_XNextEvent( XEvent * xev ) { while ( event_queue.tail == NULL ) { fli_treat_interaction_events( 1 ); fli_treat_user_events( ); } *xev = fli_get_from_event_queue( ); return 1; } /*************************************** * Replacement for the Xlib XPeekEvent() function: returns a copy * of the first event avaialable but does not remove it. Blocks * if there is no event until a new one has arrived. ***************************************/ int fl_XPeekEvent( XEvent * xev ) { while ( event_queue.tail == NULL ) { fli_treat_interaction_events( 1 ); fli_treat_user_events( ); } *xev = event_queue.tail->xev; return 1; } /*************************************** * Get all user events and treat them: either "consume" them by * calling the callback routine or put them onto the internal * object queue for later retrival ***************************************/ void fli_treat_user_events( void ) { XEvent xev; while ( event_queue.count ) { if ( fli_event_callback ) { fl_XNextEvent( &xev ); fli_event_callback( &xev, fli_user_data ); } else fli_object_qenter( FL_EVENT ); event_queue.count--; } } /******************** DEBUG use only *****************/ #define NV( a ) { #a, a } typedef struct { const char * name; int type; } ev_name; static ev_name evname[ ] = { NV( 0 ), NV( 1 ), NV( KeyPress ), NV( KeyRelease ), NV( ButtonPress ), NV( ButtonRelease ), NV( MotionNotify ), NV( EnterNotify ), NV( LeaveNotify ), NV( FocusIn ), NV( FocusOut ), NV( KeymapNotify ), NV( Expose ), NV( GraphicsExpose ), NV( NoExpose ), NV( VisibilityNotify ), NV( CreateNotify ), NV( DestroyNotify ), NV( UnmapNotify ), NV( MapNotify ), NV( MapRequest ), NV( ReparentNotify ), NV( ConfigureNotify ), NV( ConfigureRequest ), NV( GravityNotify ), NV( ResizeRequest ), NV( CirculateNotify ), NV( CirculateRequest ), NV( PropertyNotify ), NV( SelectionClear ), NV( SelectionRequest ), NV( SelectionNotify ), NV( ColormapNotify ), NV( ClientMessage ), NV( MappingNotify ) }; /*************************************** ***************************************/ const char * fli_get_xevent_name( const XEvent *xev ) { size_t i; static char buf[ 128 ]; for ( i = KeyPress; i < LASTEvent; i++ ) { if ( evname[ i ].type == xev->type ) { fl_snprintf( buf, sizeof buf, "%s(0x%x)", evname[ i ].name, xev->type ); return buf; } } return "unknown event"; } /*************************************** ***************************************/ XEvent * fl_print_xevent_name( const char * where, const XEvent * xev ) { size_t i, known; Window win = ( ( XAnyEvent * ) xev )->window; for ( i = KeyPress, known = 0; ! known && i < LASTEvent; i++ ) if ( evname[ i ].type == xev->type ) { fprintf( stderr, "%s Event (%d, win = %ld serial = %ld) %s ", where ? where : "", xev->type, win, ( ( XAnyEvent * ) xev)->serial, evname[ i ].name ); if ( xev->type == Expose ) fprintf( stderr, "count = %d serial = %ld\n", xev->xexpose.count, xev->xexpose.serial ); else if ( xev->type == LeaveNotify || xev->type == EnterNotify ) fprintf(stderr, "Mode %s\n", xev->xcrossing.mode == NotifyGrab ? "Grab" : ( xev->xcrossing.mode == NotifyNormal ? "Normal" : "UnGrab" ) ); else if ( xev->type == MotionNotify ) fprintf(stderr, "Mode %s\n", xev->xmotion.is_hint ? "Hint" : "Normal" ); else if ( xev->type == ConfigureNotify ) fprintf( stderr, "(x = %d y = %d w = %d h = %d) %s\n", xev->xconfigure.x, xev->xconfigure.y, xev->xconfigure.width, xev->xconfigure.height, xev->xconfigure.send_event ? "Syn" : "Non-Syn" ); else if ( xev->type == ButtonPress ) fprintf( stderr, "button: %d\n", xev->xbutton.button ); else if ( xev->type == ButtonRelease ) fprintf( stderr, "button: %d\n", xev->xbutton.button ); else fputc( '\n', stderr ); known = 1; } if ( ! known ) fprintf( stderr, "Unknown event %d, win = %ld\n", xev->type, win ); return ( XEvent * ) xev; } /*************************************** ***************************************/ XEvent * fli_xevent_name( const char * where, const XEvent * xev ) { if ( fli_cntl.debug >= 2 ) fl_print_xevent_name( where, xev ); return ( XEvent * ) xev; } /*************************************** ***************************************/ static int fli_badwin_handler( Display * dpy FL_UNUSED_ARG, XErrorEvent * xev ) { if ( xev->type != BadWindow && xev->type != BadDrawable ) M_err( "fli_badwin_handler", "X error happened when expecting only BadWindow/Drawable\n" ); return 0; } /*********************************************************************** * Received an Expose event ev, see if next event is the same as the * the current one, drop it if it is, but we need consolidate all the * dirty rectangles into one. * * Must not block. ************************************************************************/ static void fli_compress_redraw( XEvent * ev ) { XEvent expose_ev; Window win = ev->xexpose.window; Region reg = XCreateRegion( ); XRectangle rec; /* Original comment: this is theoretically not correct as we can't peek ahead and ignore the events in between, but it works in XForms as we always update the form size and position when dealing with Expose event. This has been changed a bit since 1.0.90: There was a problem with e.g. KDE or Gnome when they were set up to redraw also during resizing and the mouse was moved around rather fast. We collect now not only Expose events, compressing them to a single one, covering the combined area of all of them, but also ConfigureNotify events. If there was one or more ConfigureNotify events we put back the "consolidated" Expose event onto the event queue and return the last ConfigureNotify event instead of the original Expose event we got started with. This hope- fully is not only a solution that covers all cases but also keeps the numbers of redraws to a minimum. The only drawback is that in the do_interaction_step() function, handling the Expose event, one has to check if the area specified by the event isn't larger than the (new) size of the window and prune it if necessary. JTT */ /* Collect all Expose events, combining their areas */ do { rec.x = ev->xexpose.x; rec.y = ev->xexpose.y; rec.width = ev->xexpose.width; rec.height = ev->xexpose.height; XUnionRectWithRegion( &rec, reg, reg ); } while ( XCheckTypedWindowEvent( flx->display, win, Expose, ev ) ); /* Set the area of the last events to that of the "consolidated" event and make a backup copy */ XClipBox( reg, &rec ); ev->xexpose.x = rec.x; ev->xexpose.y = rec.y; ev->xexpose.width = rec.width; ev->xexpose.height = rec.height; expose_ev = *ev; XDestroyRegion( reg ); /* Now get all ConfigureNotify events */ while ( XCheckTypedWindowEvent( flx->display, win, ConfigureNotify, ev ) ) /*empty */ ; /* If there was at least one ConfigureNotify event put the "consolidated" Expose event back onto the event queue and return the last ConfigureNotify event we got, otherwise the Expose event itself. Since e.g. KDE and Gnome can send the ConfigureNotify event artificially to achieve an update of the display while resizing is still going on, the 'send_event' member of the XEvent structure might be set. On the other hand, in do_interaction_step(), where the events are handled, this member is checked for to get around a bug in mwm. So we got to reset it here to avoid the event getting flagged as spurious. This hopefully won't interfere with the mwm bug detection since it's for cases were a ConfigureNotify gets send, but no corresponding Expose events, and in this case we wouldn't have ended up here... */ if ( ev->type == ConfigureNotify ) { XPutBackEvent( flx->display, &expose_ev ); ev->xconfigure.send_event = 0; } } /*************************************** ***************************************/ static void fli_compress_motion( XEvent * xme ) { Window win = xme->xmotion.window; unsigned long evm = PointerMotionMask | ButtonMotionMask; if ( xme->type != MotionNotify ) return; do { #if FL_DEBUG >= ML_DEBUG M_info2( "fli_compress_motion", "win = %ld (%d, %d) %s", xme->xany.window, xme->xmotion.x, xme->xmotion.y, xme->xmotion.is_hint ? "hint" : "" ) #endif /* empty */ ; } while ( XCheckWindowEvent( flx->display, win, evm, xme ) ); if ( xme->xmotion.is_hint ) { int ( *old )( Display *, XErrorEvent * ); /* We must protect against BadWindow here, because we have only looked for Motion events, and there could be a Destroy event which makes the XQueryPointer fail as the window is deleted. */ old = XSetErrorHandler( fli_badwin_handler ); fl_get_win_mouse( xme->xmotion.window, &xme->xmotion.x, &xme->xmotion.y, &xme->xmotion.state ); XSetErrorHandler( old ); xme->xmotion.is_hint = 0; } } /*************************************** ***************************************/ void fli_compress_event( XEvent * xev, unsigned long mask ) { if ( xev->type == Expose && mask & ExposureMask ) fli_compress_redraw( xev ); else if ( xev->type == MotionNotify && mask & ( PointerMotionMask | ButtonMotionMask ) ) fli_compress_motion( xev ); } /*************************************** ***************************************/ int fl_keysym_pressed( KeySym k ) { char kvec[ 32 ]; KeyCode code; if ( ( code = XKeysymToKeycode( flx->display, k ) ) == NoSymbol ) { M_warn( "fl_keysym_pressed", "Bad KeySym %d", ( int ) k ); return 0; } XQueryKeymap( flx->display, kvec ); return 1 & ( kvec[ code / 8 ] >> ( code & 7 ) ); } /*************************************** * Add an event ***************************************/ long fl_addto_selected_xevent( Window win, long mask ) { XWindowAttributes xwa; XGetWindowAttributes( flx->display, win, &xwa ); xwa.your_event_mask |= mask; /* On some SGI machines, 'your_event_mask' has bogus value 0x80??????, causing an X protocol error. Fix this here */ xwa.your_event_mask &= AllEventsMask; XSelectInput( flx->display, win, xwa.your_event_mask ); return xwa.your_event_mask; } /*************************************** ***************************************/ long fl_remove_selected_xevent( Window win, long mask ) { XWindowAttributes xwa; XGetWindowAttributes( flx->display, win, &xwa ); xwa.your_event_mask &= ~mask; /* On some SGI machines 'your_event_mask' has bogus value of 0x80??????, causing an X protocol error. Fix this here */ xwa.your_event_mask &= AllEventsMask; XSelectInput( flx->display, win, xwa.your_event_mask ); return xwa.your_event_mask; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/objects.c0000644000175000017500000025545311376204456014617 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file objects.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ /************************************************** The handling of redrawing objects could do with a lot of improvements. It should be a high priority that only that objects get redrawn that rally need redrawing. The main problem at the moment is handling of redraws for objects with a label outside of the object (and of objects with the label inside, but extending beyond the borders of the object). That's all still a mess (and too slow ) and needs quite a bit of cleaning up! ***************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #define TRANY( obj, form ) ( form->h - obj->h - obj->y ) #define LInside( a ) \ ( ( ( a ) == FL_ALIGN_CENTER ) || ( ( a ) & FL_ALIGN_INSIDE ) ) extern int fli_fast_free_object; /* defined in forms.c */ static void lose_focus( FL_OBJECT * ); static void get_object_bbox_rect( FL_OBJECT *, XRectangle * ); static int objects_intersect( FL_OBJECT *, FL_OBJECT * ); static int object_is_under( FL_OBJECT * ); static void checked_hide_tooltip( FL_OBJECT *, XEvent * ); static FL_OBJECT *refocus; #define IS_BUTTON_CLASS( i ) ( i == FL_BUTTON \ || i == FL_ROUNDBUTTON \ || i == FL_ROUND3DBUTTON \ || i == FL_LIGHTBUTTON \ || i == FL_CHECKBUTTON \ || i == FL_BITMAPBUTTON \ || i == FL_PIXMAPBUTTON ) /*************************************** * Creates an object, NOT FOR USER. ***************************************/ FL_OBJECT * fl_make_object( int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label, FL_HANDLEPTR handle ) { FL_OBJECT *obj; #ifdef FL_WIN32 int def = -2; #else int def = FL_BOUND_WIDTH; #endif obj = fl_calloc( 1, sizeof *obj ); obj->objclass = objclass; obj->type = type; obj->resize = FL_RESIZE_ALL; obj->nwgravity = obj->segravity = FL_NoGravity; obj->boxtype = FL_NO_BOX; obj->bw = ( fli_cntl.borderWidth && FL_abs( fli_cntl.borderWidth ) <= FL_MAX_BW ) ? fli_cntl.borderWidth : def; obj->x = x; obj->y = y; obj->w = w; obj->h = h; switch ( fli_cntl.coordUnit ) { case FL_COORD_PIXEL : break; case FL_COORD_MM : fl_scale_object( obj, fli_dpi / 25.4, fli_dpi / 25.4 ); break; case FL_COORD_POINT : fl_scale_object( obj, fli_dpi / 72.0, fli_dpi / 72.0 ); break; case FL_COORD_centiPOINT : fl_scale_object( obj, fli_dpi / 7200.0, fli_dpi / 7200.0 ); break; case FL_COORD_centiMM : fl_scale_object( obj, fli_dpi / 2540.0, fli_dpi / 2540.0 ); break; default: M_err( "fl_make_object", "Unknown unit: %d. Reset", fli_cntl.coordUnit ); fli_cntl.coordUnit = FL_COORD_PIXEL; } obj->wantkey = FL_KEY_NORMAL; obj->flpixmap = NULL; obj->label = fl_strdup( label ? label : "" ); obj->handle = handle; obj->align = FL_ALIGN_CENTER; obj->lcol = FL_BLACK; obj->col1 = FL_COL1; obj->col2 = FL_MCOL; if ( IS_BUTTON_CLASS( objclass ) && fli_cntl.buttonFontSize ) obj->lsize = fli_cntl.buttonFontSize; else if ( objclass == FL_MENU && fli_cntl.menuFontSize ) obj->lsize = fli_cntl.menuFontSize; else if ( ( objclass == FL_CHOICE || objclass == FL_SELECT ) && fli_cntl.choiceFontSize ) obj->lsize = fli_cntl.choiceFontSize; else if ( objclass == FL_INPUT && fli_cntl.inputFontSize ) obj->lsize = fli_cntl.inputFontSize; else if ( objclass == FL_SLIDER && fli_cntl.sliderFontSize ) obj->lsize = fli_cntl.sliderFontSize; #if 0 else if ( objclass == FL_BROWSER && fli_cntl.browserFontSize ) obj->lsize = fli_cntl.browserFontSize; #endif else if ( fli_cntl.labelFontSize ) obj->lsize = fli_cntl.labelFontSize; else obj->lsize = FL_DEFAULT_SIZE; obj->lstyle = FL_NORMAL_STYLE; obj->shortcut = fl_calloc( 1, sizeof( long ) ); *obj->shortcut = 0; obj->active = 1; obj->visible = FL_VISIBLE; obj->object_callback = NULL; obj->spec = NULL; obj->next = obj->prev = NULL; obj->form = NULL; obj->dbl_background = FL_COL1; obj->parent = NULL; obj->child = NULL; obj->nc = NULL; obj->group_id = 0; obj->set_return = NULL; obj->how_return = FL_RETURN_ALWAYS; obj->returned = 0; return obj; } /*************************************** * Adds an object to the form. ***************************************/ void fl_add_object( FL_FORM * form, FL_OBJECT * obj ) { FL_OBJECT *o; /* Checking for correct arguments. */ if ( ! obj ) { M_err( "fl_add_object", "NULL object" ); return; } if ( ! form ) { M_err( "fl_add_object", "NULL form for %s", fli_object_class_name( obj ) ); return; } if ( obj->form ) { M_err( "fl_add_object", "Object already belongs to a form" ); return; } if ( obj->objclass == FL_BEGIN_GROUP || obj->objclass == FL_END_GROUP ) { M_err( "fl_add_object", "Can't add an pseudo-object that marks the " "start or end of a group" ); return; } if ( obj->automatic ) { form->num_auto_objects++; fli_recount_auto_objects( ); } obj->prev = obj->next = NULL; obj->form = form; if ( fli_inverted_y ) obj->y = TRANY( obj, form ); obj->fl1 = obj->x; obj->fr1 = form->w_hr - obj->fl1; obj->ft1 = obj->y; obj->fb1 = form->h_hr - obj->ft1; obj->fl2 = obj->x + obj->w; obj->fr2 = form->w - obj->fl2; obj->ft2 = obj->y + obj->h; obj->fb2 = form->h - obj->ft2; /* If adding to a group, set objects group ID, then find the end of the group or the end of the object list on this form */ if ( fli_current_group ) { FL_OBJECT *end = fli_current_group; obj->group_id = fli_current_group->group_id; while ( end && end->objclass != FL_END_GROUP ) end = end->next; /* If 'end' exists must've opened the group with fl_addto_group */ if ( end ) { end->prev->next = obj; obj->prev = end->prev; obj->next = end; end->prev = obj; fl_redraw_object( obj ); return; } } if ( ! form->first ) form->first = form->last = obj; else { obj->prev = form->last; form->last->next = obj; form->last = obj; } if ( obj->input && obj->active && ! form->focusobj ) fl_set_focus_object( form, obj ); /* If the object has child objects also add them to the form, otherwise check if the object partialy or completely hiddes any objects before it in the list of objects of the form. */ if ( obj->child ) fli_add_composite( obj ); for ( o = form->first; o != obj; o = o->next ) { if ( o->is_under || o->objclass == FL_BEGIN_GROUP || o->objclass == FL_END_GROUP ) continue; if ( objects_intersect( o, obj ) ) o->is_under = 1; } fl_redraw_object( obj ); } /*************************************** * Inserts object 'obj' in front of the object 'before'. ***************************************/ void fli_insert_object( FL_OBJECT * obj, FL_OBJECT * before ) { FL_FORM *form; /* Checking for correct arguments */ if ( ! obj || ! before ) { M_err( "fli_insert_object", "NULL object" ); return; } if ( ! before->form ) { M_err( "fli_insert_object", "Trying to insert object into NULL form" ); return; } form = before->form; obj->next = before; obj->group_id = before->group_id; if ( before == form->first ) { form->first = obj; obj->prev = NULL; } else { obj->prev = before->prev; obj->prev->next = obj; } if ( fli_inverted_y ) obj->y = TRANY( obj, form ); obj->fl1 = obj->x; obj->fr1 = form->w_hr - obj->fl1; obj->ft1 = obj->y; obj->fb1 = form->h_hr - obj->ft1; obj->fl2 = obj->x + obj->w; obj->fr2 = form->w - obj->fl2; obj->ft2 = obj->y + obj->h; obj->fb2 = form->h - obj->ft2; before->prev = obj; obj->form = form; if ( obj->input && obj->active && ! form->focusobj ) fl_set_focus_object( form, obj ); /* If the object has child objects also insert them into the form */ if ( obj->child ) fli_insert_composite( obj, before ); if ( ! obj->parent ) fli_redraw_form_using_xevent( form, 0, NULL ); } /*************************************** * Unlinks an object from its form ***************************************/ void fl_delete_object( FL_OBJECT * obj ) { FL_FORM *form; if ( ! obj ) { M_err( "fl_delete_object", "NULL object" ); return; } if ( ! obj->form ) { M_err( "fl_delete_object", "Delete %s from NULL form", ( obj->label && *obj->label ) ? obj->label : "object" ); return; } checked_hide_tooltip( obj, NULL ); /* If object is the pseudo-object starting a group delete the complete group */ if ( obj->objclass == FL_BEGIN_GROUP ) { FL_OBJECT *o; for ( o = obj->next; o; o = o->next ) { fl_delete_object( o ); if ( o->objclass == FL_END_GROUP ) break; } } /* Avoid deleting an object that represents the end of a group if the group isn't empty */ if ( obj->objclass == FL_END_GROUP ) { FL_OBJECT *o; for ( o = obj->form->first; o && o != obj; o = o->next ) if ( o->group_id == obj->group_id && o->objclass != FL_BEGIN_GROUP ) break; if ( o != obj ) { M_err( "fl_delete_object", "Can't delete end of group object " "while the group still has members" ); return; } } /* If this object has childs also unlink them */ if ( obj->child ) fli_delete_composite( obj ); form = obj->form; if ( obj->automatic ) { form->num_auto_objects--; fli_recount_auto_objects( ); } lose_focus( obj ); if ( obj == fli_int.pushobj ) fli_int.pushobj = NULL; if ( obj == fli_int.mouseobj ) fli_int.mouseobj = NULL; #ifdef DELAYED_ACTION fli_object_qflush_object( obj ); #endif /* Object also loses its group membership */ if ( obj->objclass != FL_BEGIN_GROUP && obj->objclass != FL_END_GROUP ) obj->group_id = 0; obj->form = NULL; if ( obj->prev ) obj->prev->next = obj->next; else form->first = obj->next; if ( obj->next ) obj->next->prev = obj->prev; else form->last = obj->prev; /* Unless the whole form is getting free'd recalculate the intersections of the other objects */ if ( ! fli_fast_free_object ) fli_recalc_intersections( form ); if ( obj->visible && form && form->visible == FL_VISIBLE ) fli_redraw_form_using_xevent( form, 0, NULL ); } /*************************************** * Frees the memory used by an object ***************************************/ void fl_free_object( FL_OBJECT * obj ) { /* Check whether it's ok to free it */ if ( ! obj ) { M_err( "fl_free_object", "NULL object" ); return; } /* If the object is the pseudo-object starting a group free the complete group */ if ( obj->objclass == FL_BEGIN_GROUP ) { FL_OBJECT *o, *on; for ( o = obj->next; o && o->objclass != FL_END_GROUP; o = on ) { on = o->next; /* Skip child objects, they get removed automatically when the parent gets deleted */ while ( on->parent ) on = on->next; fl_free_object( o ); } if ( o ) fl_free_object( o ); } /* Avoid deleting an object that represents the end of a group if the group isn't empty */ if ( obj->objclass == FL_END_GROUP ) { FL_OBJECT *o; for ( o = obj->form->first; o && o != obj; o = o->next ) if ( o->group_id == obj->group_id && o->objclass != FL_BEGIN_GROUP ) break; if ( o != obj ) { M_err( "fl_free_object", "Can't free end of group object " "while the group still has members" ); return; } } /* If the object hasn't yet been unlinked from its form do it know */ if ( obj->form ) fl_delete_object( obj ); /* If this is a parent object free the children first */ if ( obj->child ) fli_free_composite( obj ); /* If it's a child object remove it from the linked list of childs of the parent object */ if ( obj->parent ) { FL_OBJECT *o = obj->parent->child; if ( o == obj ) obj->parent->child = obj->nc; else { while ( o->nc != obj ) o = o->nc; o->nc = obj->nc; } } /* Make the object release all memory it may have allocated */ fli_handle_object( obj, FL_FREEMEM, 0, 0, 0, NULL, 0 ); /* Finally free all other memory we allocated for the object */ fl_safe_free( obj->label ); fl_safe_free( obj->tooltip ); fl_safe_free( obj->shortcut ); if ( obj->flpixmap ) { fli_free_flpixmap( obj->flpixmap ) ; fl_safe_free( obj->flpixmap ); } fl_free( obj ); /* We might have arrived here due to a callback for the object we just deleted (or one of it's child objects). The following tests allow the routine that invoked the callback to check if that is the case and avoid further uses of the object/parent. */ if ( obj == fli_handled_obj ) fli_handled_obj = NULL; if ( obj == fli_handled_parent ) fli_handled_parent = NULL; } /*----------------------------------------------------------------------- Setting/getting attributes. -----------------------------------------------------------------------*/ /*************************************** * Returns the object class of the object ***************************************/ int fl_get_object_objclass( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_objclass", "NULL object" ); return -1; } return obj->objclass; } /*************************************** * Returns the type of the object ***************************************/ int fl_get_object_type( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_type", "NULL object" ); return -1; } return obj->type; } /*************************************** * Sets the boxtype of the object ***************************************/ void fl_set_object_boxtype( FL_OBJECT * obj, int boxtype ) { if ( ! obj ) { M_err( "fl_set_object_boxtype", "NULL object" ); return; } if ( obj->boxtype != boxtype ) { obj->boxtype = boxtype; fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); fl_redraw_object( obj ); } } /*************************************** * Returns the boxtype of the object ***************************************/ int fl_get_object_boxtype( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_boxtype", "NULL object" ); return -1; } return obj->boxtype; } /*************************************** * Sets the resize property of an object ***************************************/ void fl_set_object_resize( FL_OBJECT * obj, unsigned int what ) { if ( ! obj ) { M_err( "fl_set_object_resize", "NULL object" ); return; } obj->resize = what; /* Check if object has childs, if so also change all of them */ if ( obj->child ) fli_set_composite_resize( obj, what ); /* Check if object is a group, if so also change all members */ if ( obj->objclass == FL_BEGIN_GROUP ) for ( ; obj && obj->objclass != FL_END_GROUP; obj = obj->next ) { obj->resize = what; fli_set_composite_resize( obj, what ); } } /*************************************** * Returns the resize setting of an object ***************************************/ void fl_get_object_resize( FL_OBJECT * obj, unsigned int * resize ) { if ( ! obj ) { M_err( "fl_get_object_resize", "NULL object" ); return; } if ( resize ) *resize = obj->resize; } /*************************************** * Sets the gravity properties of an object ***************************************/ void fl_set_object_gravity( FL_OBJECT * obj, unsigned int nw, unsigned int se ) { if ( ! obj ) { M_err( "fl_set_object_gravity", "NULL object" ); return; } obj->nwgravity = nw; obj->segravity = se; /* Check if object has childs, if so also change all of them */ if ( obj->child ) fli_set_composite_gravity( obj, nw, se ); /* Check if object is a group, if so change also all members */ if ( obj->objclass == FL_BEGIN_GROUP ) for ( ; obj && obj->objclass != FL_END_GROUP; obj = obj->next ) { obj->nwgravity = nw; obj->segravity = se; fli_set_composite_gravity( obj, nw, se ); } } /*************************************** * Returns the gravity settings for an object ***************************************/ void fl_get_object_gravity( FL_OBJECT * obj, unsigned int * nw, unsigned int * se ) { if ( ! obj ) { M_err( "fl_get_object_gravity", "NULL object" ); return; } if ( nw ) *nw = obj->nwgravity; if ( se ) *se = obj->segravity; } /*************************************** * Sets the color of the object ***************************************/ void fl_set_object_color( FL_OBJECT * obj, FL_COLOR col1, FL_COLOR col2 ) { if ( ! obj ) { M_err( "fl_set_object_color", "NULL object" ); return; } if ( col1 >= FL_MAX_COLORS || col2 >= FL_MAX_COLORS ) { M_err( "fl_set_object_color", "Invalid color" ); return; } if ( obj->col1 != col1 || obj->col2 != col2 ) { obj->col1 = col1; obj->col2 = col2; fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); fl_redraw_object( obj ); } } /*************************************** * Returns the colors of the object ***************************************/ void fl_get_object_color( FL_OBJECT * obj, FL_COLOR * col1, FL_COLOR * col2 ) { if ( ! obj ) { M_err( "fl_get_object_color", "NULL object" ); return; } if ( col1 ) *col1 = obj->col1; if ( col2 ) *col2 = obj->col2; } /*************************************** * If called with a non-zero value for 'timeout' the object will * receive FL_DBLCLICK events if the mouse is clicked twice within * 'timeout' milliseconds, if called with 0 no FL_DBLCLICK events * are received. ***************************************/ void fl_set_object_dblclick( FL_OBJECT * obj, unsigned long timeout ) { if ( ! obj ) { M_err( "fl_set_object_dblclick", "NULL object" ); return; } obj->click_timeout = timeout; } /*************************************** * Returns the double click timeout for the object ***************************************/ unsigned long fl_get_object_dblclick( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_dblclick", "NULL object" ); return ULONG_MAX; } return obj->click_timeout; } /*************************************** ***************************************/ void fl_set_object_dblbuffer( FL_OBJECT * obj, int y ) { FL_COLOR bkcol; if ( ! obj ) { M_err( "fl_set_object_dblbuffer", "NULL object" ); return; } /* Never bother with composite object */ if ( obj->child || obj->parent ) return; if ( obj->use_pixmap == y ) return; if ( ( obj->use_pixmap = y ) && ! obj->flpixmap ) obj->flpixmap = fl_calloc( 1, sizeof( FL_pixmap ) ); /* Figure out the background color to be used */ if ( obj->form && obj->form->first ) { bkcol = obj->form->first->col1; if ( obj->form->first->boxtype == FL_NO_BOX && obj->form->first->next ) bkcol = obj->form->first->next->col1; obj->dbl_background = bkcol; } } /* Test if an object is really visible */ #define ObjIsVisible( obj ) ( ( obj )->visible \ && ( obj )->form \ && ( obj )->form->visible == FL_VISIBLE ) /*************************************** * Sets the label of an object ***************************************/ void fl_set_object_label( FL_OBJECT * obj, const char * label ) { if ( ! obj ) { M_err( "fl_set_object_label", "NULL object" ); return; } if ( ! label ) label = ""; if ( ! strcmp( obj->label, label ) ) return; obj->label = fl_realloc( obj->label, strlen( label ) + 1 ); strcpy( obj->label, label ); if ( ObjIsVisible( obj ) ) { if ( obj->align & FL_ALIGN_INSIDE ) fl_redraw_object( obj ); else { if ( ! obj->parent ) fli_recalc_intersections( obj->form ); fli_redraw_form_using_xevent( obj->form, 0, NULL ); } } } /*************************************** * Returns the objects label string ***************************************/ const char * fl_get_object_label( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_label", "NULL object" ); return NULL; } return obj->label; } /*************************************** * Sets the label color of an object ***************************************/ void fl_set_object_lcol( FL_OBJECT * obj, FL_COLOR lcol ) { if ( ! obj ) { M_err( "fl_set_object_lcol", "NULL object" ); return; } if ( obj->objclass == FL_BEGIN_GROUP ) { FL_OBJECT *o = obj->next;; fl_freeze_form( obj->form ); for ( ; o && o->objclass != FL_END_GROUP; o = o->next ) { if ( o->lcol != lcol ) { o->lcol = lcol; fli_handle_object( o, FL_ATTRIB, 0, 0, 0, NULL, 0 ); fl_redraw_object( o ); } } fl_unfreeze_form( obj->form ); } else if ( obj->lcol != lcol ) { obj->lcol = lcol; fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); fl_redraw_object( obj ); } } /*************************************** * Returns the label color of an object ***************************************/ FL_COLOR fl_get_object_lcol( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_lcol", "NULL object" ); return FL_NOCOLOR; } return obj->lcol; } /*************************************** * Sets the label size of an object ***************************************/ void fl_set_object_lsize( FL_OBJECT * obj, int lsize ) { if ( ! obj ) { M_err( "fl_set_object_lsize", "NULL object" ); return; } /* Nested groups aren't allowed */ if ( obj->objclass == FL_BEGIN_GROUP ) { obj->lsize = lsize; for ( obj = obj->next; obj && obj->objclass != FL_END_GROUP; obj = obj->next ) fl_set_object_lsize( obj, lsize ); } else if ( obj->lsize != lsize ) { if ( LInside( obj->align ) ) { obj->lsize = lsize; fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); fl_redraw_object( obj ); } else { int visible = ObjIsVisible( obj ); if ( visible ) fl_hide_object( obj ); obj->lsize = lsize; fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); if ( ! obj->parent ) fli_recalc_intersections( obj->form ); if ( visible ) fl_show_object( obj ); } } } /*************************************** * Returns the label size of an object ***************************************/ int fl_get_object_lsize( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_lsize", "NULL object" ); return -1; } return obj->lsize; } /*************************************** * Sets the label style of an object ***************************************/ void fl_set_object_lstyle( FL_OBJECT * obj, int lstyle ) { if ( ! obj ) { M_err( "fl_set_object_lstyle", "NULL object" ); return; } if ( obj->objclass == FL_BEGIN_GROUP ) { obj->lstyle = lstyle; for ( obj = obj->next; obj && obj->objclass != FL_END_GROUP; obj = obj->next ) fl_set_object_lstyle( obj, lstyle ); } else if ( obj->lstyle != lstyle ) { if ( LInside( obj->align ) ) { obj->lstyle = lstyle; fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); fl_redraw_object( obj ); } else { int visible = ObjIsVisible( obj ); if ( visible ) fl_hide_object( obj ); obj->lstyle = lstyle; fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); if ( visible ) fl_show_object( obj ); } } } /*************************************** * Returns the label style of an object ***************************************/ int fl_get_object_lstyle( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_lstyle", "NULL object" ); return -1; } return obj->lstyle; } /*************************************** * Sets the label alignment of an object ***************************************/ void fl_set_object_lalign( FL_OBJECT * obj, int align ) { int visible; int need_overlap_check = ( obj->align ^ align ) & FL_ALIGN_INSIDE; if ( ! obj ) { M_err( "fl_set_object_lalign", "NULL object" ); return; } if ( obj->align == align ) return; visible = ObjIsVisible( obj ); if ( LInside( obj->align ) && LInside( align ) ) { obj->align = align; fl_redraw_object( obj ); } else { if ( visible ) fl_hide_object( obj ); obj->align = align; if ( need_overlap_check ) fli_recalc_intersections( obj->form ); if ( visible ) fl_show_object( obj ); } } /*************************************** * Returns the label alignment of an object ***************************************/ int fl_get_object_lalign( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_get_object_lalign", "NULL object" ); return -1; } return obj->align; } /*************************************** * Makes an object active ***************************************/ static void activate_object( FL_OBJECT * obj ) { if ( obj->active ) return; obj->active = 1; if ( obj->input && obj->active && ! obj->form->focusobj ) fl_set_focus_object( obj->form, obj ); if ( obj->child ) fli_activate_composite( obj ); } /*************************************** * Public function for making an object active ***************************************/ void fl_activate_object( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_activate_object", "NULL object" ); return; } if ( obj->objclass == FL_BEGIN_GROUP ) { obj->active = 1; for ( obj = obj->next; obj && obj->objclass != FL_END_GROUP; obj = obj->next ) activate_object( obj ); } else activate_object( obj ); } /*************************************** * Deactivates an object ***************************************/ static void deactivate_object( FL_OBJECT * obj ) { if ( ! obj->active ) return; obj->active = 0; lose_focus( obj ); if ( obj->child ) fli_deactivate_composite( obj ); } /*************************************** * Public function for deactivating an object ***************************************/ void fl_deactivate_object( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_deactive_object", "NULL object" ); return; } if ( obj->objclass == FL_BEGIN_GROUP ) { obj->active = 0; for ( obj = obj->next; obj && obj->objclass != FL_END_GROUP; obj = obj->next ) deactivate_object( obj ); } else deactivate_object( obj ); } /*************************************** * Returns if an object is in active state, i.e. reacting to events ***************************************/ int fl_object_is_active( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_object_is_active", "NULL object" ); return 0; } return obj->active; } /*************************************** * Makes an object visible and sets the visible flag to 1 ***************************************/ void fli_show_object( FL_OBJECT * obj ) { if ( obj->visible ) return; obj->visible = 1; if ( obj->child ) { fli_show_composite( obj ); fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); } if ( obj->input && obj->active && ! obj->form->focusobj ) fl_set_focus_object( obj->form, obj ); } /*************************************** * Public function for making an object visible ***************************************/ void fl_show_object( FL_OBJECT * obj ) { FL_OBJECT *o = obj->next; if ( ! obj ) { M_err( "fl_show_object", "NULL object" ); return; } if ( obj->objclass == FL_BEGIN_GROUP ) for ( ; o && o->objclass != FL_END_GROUP; o = o->next ) fli_show_object( o ); else fli_show_object( obj ); fli_redraw_form_using_xevent( obj->form, 0, NULL ); } /*************************************** * Returns if an object is shown (gien that the form it * belongs to is visible!) ***************************************/ int fl_object_is_visible( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_object_is_visible", "NULL object" ); return 0; } return obj->visible; } /*************************************** * Sets an object up for being hidden and * adds the area it covers to a region ***************************************/ void fli_hide_and_get_region( FL_OBJECT * obj, Region * reg ) { FL_RECT xrect; int extra; #ifdef DELAYED_ACTION /* Remove all entries for the object from the object queue */ fli_object_qflush_object( obj ); #endif /* The object can't be the object anymore that has the focus or be the pushed object or the object the mouse is on */ lose_focus( obj ); if ( obj == fli_int.pushobj ) fli_int.pushobj = NULL; if ( obj == fli_int.mouseobj ) fli_int.mouseobj = NULL; /* Get the area the object covers and add that to the region passed to the function */ if ( obj->objclass == FL_CANVAS || obj->objclass == FL_GLCANVAS ) { fl_hide_canvas( obj ); extra = 3; xrect.x = obj->x - extra; xrect.y = obj->y - extra; xrect.width = obj->w + 2 * extra + 1; xrect.height = obj->h + 2 * extra + 1; } else { get_object_bbox_rect( obj, &xrect ); if ( obj->objclass == FL_FRAME ) { extra = FL_abs( obj->bw ); xrect.x -= extra; xrect.y -= extra; xrect.width += 2 * extra + 1; xrect.height += 2 * extra + 1; } } XUnionRectWithRegion( &xrect, *reg, *reg ); /* Mark it as invisible (must be last, fl_hide_canvas() tests for visibility and doesn't do anything if already marked as invisible) */ obj->visible = 0; } /*************************************** * Makes an object (and all its children) invisible ***************************************/ void fl_hide_object( FL_OBJECT * obj ) { FL_OBJECT *tmp; FL_RECT xrect; Region reg; if ( ! obj ) { M_err( "fl_hide_object", "NULL object" ); return; } if ( ! obj->visible ) { M_warn( "fl_hide_object", "%s already invisible", obj->label ? obj->label : "Object" ); return; } reg = XCreateRegion( ); /* If this is an object that marks the start of a group hide all objects that belong to the group */ if ( obj->objclass == FL_BEGIN_GROUP ) for ( tmp = obj->next; tmp && tmp->objclass != FL_END_GROUP; tmp = tmp->next ) { if ( tmp->child ) { fli_hide_composite( tmp, ® ); fli_handle_object( tmp, FL_ATTRIB, 0, 0, 0, NULL, 0 ); } fli_hide_and_get_region( tmp, ® ); } else { if ( obj->child ) { fli_hide_composite( obj, ® ); fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); } fli_hide_and_get_region( obj, ® ); } /* Determine the rectangle that covers the area of the object */ XClipBox( reg, &xrect ); XDestroyRegion( reg ); /* No redraw needed if the form isn't shown */ if ( obj->form->visible != FL_VISIBLE ) return; /* Redraw only the area covered by the object (take care with the order the different clipping types are set and unset, changing them has strange effects) */ fli_set_perm_clipping( xrect.x, xrect.y, xrect.width, xrect.height ); fl_set_clipping( xrect.x, xrect.y, xrect.width, xrect.height ); fl_set_text_clipping( xrect.x, xrect.y, xrect.width, xrect.height ); fli_redraw_form_using_xevent( obj->form, 0, NULL ); fli_unset_perm_clipping( ); fl_unset_clipping( ); fl_unset_text_clipping( ); } /*************************************** * Sets the list of shortcuts for the object. Shortcuts are specified * with a string with the following special sequences: * '^x' stands for Ctrl-x (for a-z case doesn't matter) * '#x' stands for Alt-x (case matters!) * '&n' with n = 1,...,34 stands for function key n * '&A', '&B', '&C' '&D' stand for up down, right and left cursor keys * '^[' stand for escape key * '^^ stand for '^' * '^#' stand for '#' * '^&' stand for '&' * Note: '&' followed by anything else than the above will be skipped, * e.g. '&E' or '&0'. If '&' is followed by a number larger than 34 * only the first digit of the number is used. * Not escapable are Crtl-^, Crtl-# and Ctrl-&. ***************************************/ #include int fli_convert_shortcut( const char * str, long * sc ) { int i = 0; long offset = 0; const char *c; for ( c = str; *c && i < MAX_SHORTCUTS; c++ ) { switch ( *c ) { case '^' : if ( offset & FL_CONTROL_MASK && c[ -1 ] == '^' ) { sc[ i++ ] = '^' + offset - FL_CONTROL_MASK; offset = 0; } else { if ( c[ 1 ] == '[' ) { sc[ i++ ] = 0x1b + offset - FL_CONTROL_MASK; c++; offset = 0; } else offset += FL_CONTROL_MASK; } break; case '#' : if ( offset & FL_CONTROL_MASK && c[ -1 ] == '^' ) { sc[ i++ ] = '#' + offset - FL_CONTROL_MASK; offset = 0; } else offset += FL_ALT_MASK; break; case '&' : if ( offset & FL_CONTROL_MASK && c[ -1 ] == '^' ) { sc[ i++ ] = '&' + offset - FL_CONTROL_MASK; offset = 0; break; } else if ( c[ 1 ] == 'A' ) sc[ i++ ] = XK_Up + offset; else if ( c[ 1 ] == 'B' ) sc[ i++ ] = XK_Down + offset; else if ( c[ 1 ] == 'C' ) sc[ i++ ] = XK_Right + offset; else if ( c[ 1 ] == 'D' ) sc[ i++ ] = XK_Left + offset; else if ( isdigit( ( int ) c[ 1 ] ) && c[ 1 ] > '0' ) { long j = c[ 1 ] - '0'; if ( isdigit( ( int ) c[ 2 ] ) && 10 * j + c[ 2 ] - '0' <= 35 ) { j = 10 * c[ 2 ] - '0'; c++; } sc[ i++ ] = offset + XK_F1 + j - 1; } offset = 0; c++; break; default : if ( offset & ( FL_CONTROL_MASK | FL_ALT_MASK ) ) { sc[ i ] = toupper( ( int ) *c ); if ( offset & FL_CONTROL_MASK ) sc[ i ] -= 'A' - 1; sc[ i++ ] += offset & ~ FL_CONTROL_MASK; } else sc[ i++ ] = *c + offset; offset = 0; break; } } sc[ i ] = 0; if ( *c ) { M_err( "fli_convert_shortcut", "Too many shortcuts (>%d)", MAX_SHORTCUTS ); } return i; } /*************************************** ***************************************/ int fli_get_underline_pos( const char * label, const char * sc ) { int c; const char *p; /* Find the first non-special char in the shortcut string */ for ( c = '\0', p = sc; ! c && *p; p++ ) { if ( isalnum( ( int ) *p ) ) { if ( p == sc ) c = *p; else if ( * ( p - 1 ) != '&' && ! isdigit( ( int ) * ( p - 1 ) ) ) c = *p; } } if ( ! c ) return -1; /* Find where the match occurs */ if ( c == *sc ) p = strchr( label, c ); else if ( ! ( p = strchr( label, c ) ) ) p = strchr( label, islower( c ) ? toupper( c ) : tolower( c ) ); if ( ! p ) return -1; return p - label + 1; } /*************************************** ***************************************/ void fl_set_object_shortcut( FL_OBJECT * obj, const char * sstr, int showit ) { int scsize, n; long sc[ MAX_SHORTCUTS + 1 ]; /* converted shortcuts - we need one more than max for trailing 0 */ if ( ! obj ) { M_err( "fl_set_object_shortcut", "NULL object" ); return; } if ( ! sstr || ! *sstr ) { *obj->shortcut = 0; return; } n = fli_convert_shortcut( sstr, sc ); scsize = ( n + 1 ) * sizeof *obj->shortcut; obj->shortcut = fl_realloc( obj->shortcut, scsize ); memcpy( obj->shortcut, sc, scsize ); if ( ! showit || ! obj->label || ! *obj->label || *obj->label == '@' ) return; /* Find out where to underline */ if ( ( n = fli_get_underline_pos( obj->label, sstr ) ) > 0 && ! strchr( obj->label, *fl_ul_magic_char ) ) { size_t len = strlen( obj->label ) + 1; obj->label = fl_realloc( obj->label, len + 1 ); memmove( obj->label + n + 1, obj->label + n, len - n ); obj->label[ n ] = *fl_ul_magic_char; } } /*************************************** * Set a shortcut with keysyms directly ***************************************/ void fl_set_object_shortcutkey( FL_OBJECT * obj, unsigned int keysym ) { size_t n; for ( n = 0; obj->shortcut[ n ]; n++ ) /* empty */; /* Always have a terminator, thus n + 2 */ obj->shortcut = fl_realloc( obj->shortcut, ( n + 2 ) * sizeof *obj->shortcut ); obj->shortcut[ n ] = keysym; obj->shortcut[ n + 1 ] = 0; } /*************************************** * Sets the object in the form that gets keyboard input. ***************************************/ void fl_set_focus_object( FL_FORM * form, FL_OBJECT * obj ) { if ( ! form ) { M_err( "fl_set_focus_object", "NULL form" ); return; } if ( obj == form->focusobj ) return; if ( form->focusobj ) fli_handle_object( form->focusobj, FL_UNFOCUS, 0, 0, 0, NULL, 0 ); fli_handle_object( obj, FL_FOCUS, 0, 0, 0, NULL, 0 ); } /*************************************** * Returns the object that has the focus (take care, 'focusobj' * may be set to an input object that's a child of the object * we need to return) ***************************************/ FL_OBJECT * fl_get_focus_object( FL_FORM * form ) { FL_OBJECT *fo = NULL;; if ( form && ( fo = form->focusobj ) ) while ( fo->parent ) fo = fo->parent; return fo; } /*----------------------------------------------------------------------- Searching in forms -----------------------------------------------------------------------*/ /*************************************** * Returns an object of type 'find' in a form, starting at 'obj'. * If find_object() does not return an object the event that * triggered the call will be eaten. This is how the deactived * and inactive objects reject events. * Modify with care! ***************************************/ FL_OBJECT * fli_find_object( FL_OBJECT * obj, int find, FL_Coord mx, FL_Coord my ) { while ( obj ) { if ( obj->objclass != FL_BEGIN_GROUP && obj->objclass != FL_END_GROUP && obj->visible && ( obj->active || ( obj->posthandle && ! obj->active ) || ( obj->tooltip && *obj->tooltip && ! obj->active ) ) ) { if ( find == FLI_FIND_INPUT && obj->input && obj->active ) return obj; if ( find == FLI_FIND_AUTOMATIC && obj->automatic ) return obj; if ( find == FLI_FIND_RETURN && obj->type == FL_RETURN_BUTTON ) return obj; if ( find == FLI_FIND_MOUSE && mx >= obj->x && mx <= obj->x + obj->w && my >= obj->y && my <= obj->y + obj->h ) return obj; if ( find == FLI_FIND_KEYSPECIAL && obj->wantkey & FL_KEY_SPECIAL ) return obj; } obj = obj->next; } return NULL; } /*************************************** * Same as above but going backwards through the linked list of objects. ***************************************/ FL_OBJECT * fli_find_object_backwards( FL_OBJECT * obj, int find, FL_Coord mx, FL_Coord my ) { for ( ; obj; obj = obj->prev ) if ( obj->objclass != FL_BEGIN_GROUP && obj->objclass != FL_END_GROUP && obj->visible && ( obj->active || ( obj->posthandle && ! obj->active ) || ( obj->tooltip && *obj->tooltip && ! obj->active ) ) ) { if ( find == FLI_FIND_INPUT && obj->input && obj->active ) return obj; if ( find == FLI_FIND_AUTOMATIC && obj->automatic ) return obj; if ( find == FLI_FIND_MOUSE && mx >= obj->x && mx <= obj->x + obj->w && my >= obj->y && my <= obj->y + obj->h ) return obj; if ( find == FLI_FIND_KEYSPECIAL && obj->wantkey & FL_KEY_SPECIAL ) return obj; } return NULL; } /*************************************** * Returns the first object of type find ***************************************/ FL_OBJECT * fli_find_first( FL_FORM * form, int find, FL_Coord mx, FL_Coord my ) { return fli_find_object( form->first, find, mx, my ); } /*************************************** * Returns the last object of the type find ***************************************/ FL_OBJECT * fli_find_last( FL_FORM * form, int find, FL_Coord mx, FL_Coord my ) { FL_OBJECT *last, *obj; last = obj = fli_find_first( form, find, mx, my ); while ( obj ) { last = obj; obj = fli_find_object( obj->next, find, mx, my ); } return last; } /*----------------------------------------------------------------------- Drawing Routines. -----------------------------------------------------------------------*/ /*************************************** ***************************************/ static int object_is_clipped( FL_OBJECT * obj ) { FL_RECT xr, *xc; int extra = 1; get_object_bbox_rect( obj, &xr ); xr.x -= extra; xr.y -= extra; xr.width += 2 * extra; xr.height += 2 * extra; xc = fli_union_rect( &xr, &fli_perm_xcr ); if ( ! xc ) return 1; fl_free( xc ); return 0; } /*************************************** * Marks an object for redraw ***************************************/ static void mark_object_for_redraw( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "mark_object_for_redraw", "Redrawing NULL object" ); return; } if ( ! obj->form || ! obj->visible || ( obj->parent && ! obj->parent->visible ) || obj->objclass == FL_BEGIN_GROUP || obj->objclass == FL_END_GROUP ) return; obj->redraw = 1; for ( obj = obj->child; obj; obj = obj->nc ) mark_object_for_redraw( obj ); } /*************************************** * Redraws all marked objects and removes the mark. It is important NOT to * set any clip masks inside this function (except for free objects) since * that would prevent the drawing function from drawing labels. That would * be wrong since fl_redraw_object() calls redraw_marked() directly. All * cliping must done prior to calling this routines ***************************************/ static void redraw_marked( FL_FORM * form, int key, XEvent * xev ) { FL_OBJECT *obj, *o; /* Beside the case that the form isn't visible or frozen we also need to consider the case that a redraw for an object is initiated while another (parent) object gets redrawn (an example would be a scrollbar that during its redraw calls a function for setting the value of its slider which in turn triggers the redraw of the slider). In that case the (child) object is not to be redrawn yet (it's already marked for redraw and will be redrawn later automatically since child object always come after their parent objects) because that would mess up the behind- the-scenes-switching of the window/pixmaps that drawing is done in. */ if ( form->visible != FL_VISIBLE || form->frozen ) return; /* Check if there are any objects that partially or fully hide one of the objects to be redrawn and mark those also for redrawing (and, of course, also those that are "above" these newly added objects etc.) */ for ( obj = form->first; obj; obj = obj->next ) if ( obj->visible && obj->redraw && obj->is_under && obj->objclass != FL_BEGIN_GROUP && obj->objclass != FL_END_GROUP ) break; if ( obj && obj->next ) { for ( ; obj && obj->next; obj = obj->next ) { if ( ! obj->visible || ! obj->redraw || ! obj->is_under || obj->objclass == FL_BEGIN_GROUP || obj->objclass == FL_END_GROUP ) continue; for ( o = obj->next; o; o = o->next ) { if ( ! o->visible || o->redraw || o->objclass == FL_BEGIN_GROUP || o->objclass == FL_END_GROUP ) continue; if ( objects_intersect( obj, o ) ) mark_object_for_redraw( o ); } } } /* Set the window (or drawable) to be drawn to (flx->win) */ fli_set_form_window( form ); /* Now redraw all marked objects */ for ( obj = form->first; obj; obj = obj->next ) { if ( ! obj->redraw ) continue; obj->redraw = 0; if ( ! obj->visible || ( fli_perm_clip && object_is_clipped( obj ) ) ) continue; fli_create_object_pixmap( obj ); /* Don't allow free objects to draw outside of their boxes. Check perm_clip so we don't have draw regions we don't have to (Expose etc.) */ if ( ( obj->objclass == FL_FREE || obj->clip ) && ! fli_perm_clip ) { fl_set_clipping( obj->x, obj->y, obj->w, obj->h ); fl_set_text_clipping( obj->x, obj->y, obj->w, obj->h ); } fli_handle_object( obj, FL_DRAW, 0, 0, key, xev, 0 ); if ( ( obj->objclass == FL_FREE || obj->clip ) && ! fli_perm_clip ) { fl_unset_clipping( ); fl_unset_text_clipping( ); } fli_show_object_pixmap( obj ); fli_handle_object( obj, FL_DRAWLABEL, 0, 0, 0, NULL, 0 ); } } /*************************************** * The actual drawing routine seen by the user ***************************************/ void fl_redraw_object( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_redraw_object", "NULL object" ); return; } if ( ! obj->form || ! obj->visible ) return; if ( obj->objclass == FL_BEGIN_GROUP ) { FL_OBJECT *o = obj->next; for ( ; o && o->objclass != FL_END_GROUP; o = o->next ) mark_object_for_redraw( o ); } else mark_object_for_redraw( obj ); redraw_marked( obj->form, 0, NULL ); } /*************************************** * Function to test if the areas of 'obj1' and 'obj2' intersect ***************************************/ static int objects_intersect( FL_OBJECT * obj1, FL_OBJECT * obj2 ) { FL_OBJECT *ob[ ] = { obj1, obj2 }; int i; FL_RECT xrect; Region reg[ 2 ]; int extra; for ( i = 0; i < 2; i++ ) { reg[ i ] = XCreateRegion( ); if ( ob[ i ]->objclass == FL_CANVAS || ob[ i ]->objclass == FL_GLCANVAS ) { extra = 3; xrect.x = ob[ i ]->x - extra; xrect.y = ob[ i ]->y - extra; xrect.width = ob[ i ]->w + 2 * extra + 1; xrect.height = ob[ i ]->h + 2 * extra + 1; } else { get_object_bbox_rect( ob[ i ], &xrect ); if ( ob[ i ]->objclass == FL_FRAME ) { extra = FL_abs( ob[ i ]->bw ); xrect.x -= extra; xrect.y -= extra; xrect.width += 2 * extra + 1; xrect.height += 2 * extra + 1; } } XUnionRectWithRegion( &xrect, reg[ i ], reg[ i ] ); } XIntersectRegion( reg[ 0 ], reg[ 1 ], reg[ 0 ] ); XClipBox( reg[ 0 ], &xrect ); XDestroyRegion( reg[ 1 ] ); XDestroyRegion( reg[ 0 ] ); return xrect.width > 0 && xrect.height > 0; } /*************************************** * Function to test if the areas of 'obj1' and 'obj2' intersect ***************************************/ static int object_is_under( FL_OBJECT * obj ) { FL_OBJECT *o; if ( obj->parent || obj->objclass == FL_BEGIN_GROUP || obj->objclass == FL_END_GROUP ) return 0; for ( o = obj->next; o; o = o->next ) { if ( o->parent || o->objclass == FL_BEGIN_GROUP || o->objclass == FL_END_GROUP ) continue; if ( objects_intersect( obj, o ) ) return 1; } return 0; } /*************************************** * Redraws a form ***************************************/ void fli_redraw_form_using_xevent( FL_FORM * form, int key, XEvent * xev ) { FL_OBJECT *obj; if ( ! form || form->visible != FL_VISIBLE || form->frozen > 0 ) return; /* Set the window (or drawable) to be drawn to (flx->win) */ fli_set_form_window( form ); fli_create_form_pixmap( form ); for ( obj = form->first; obj; obj = obj->next ) { obj->redraw = 0; if ( ! obj->visible || ( fli_perm_clip && object_is_clipped( obj ) ) ) continue; fli_create_object_pixmap( obj ); /* Don't allow free objects to draw outside of their boxes. Check perm_clip so we don't have draw regions we don't have to (Expose etc.) */ if ( ( obj->objclass == FL_FREE || obj->clip ) && ! fli_perm_clip ) { fl_set_clipping( obj->x, obj->y, obj->w, obj->h ); fl_set_text_clipping( obj->x, obj->y, obj->w, obj->h ); } fli_handle_object( obj, FL_DRAW, 0, 0, key, xev, 0 ); if ( ( obj->objclass == FL_FREE || obj->clip ) && ! fli_perm_clip ) { fl_unset_clipping( ); fl_unset_text_clipping( ); } fli_show_object_pixmap( obj ); fli_handle_object( obj, FL_DRAWLABEL, 0, 0, 0, NULL, 0 ); } fli_show_form_pixmap( form ); } /*************************************** * Exported function for drawing a form ***************************************/ void fl_redraw_form( FL_FORM * form ) { fli_redraw_form_using_xevent( form, 0, NULL ); } /*************************************** * Disables drawing of form ***************************************/ void fl_freeze_form( FL_FORM * form ) { if ( ! form ) { M_err( "fl_freeze_form", "NULL form" ); return; } form->frozen++; } /*************************************** * Enables drawing of form ***************************************/ void fl_unfreeze_form( FL_FORM * form ) { if ( ! form ) { M_err( "fl_unfreeze_form", "NULL form" ); return; } if ( form->frozen == 0 ) { M_err( "fl_unfreeze_form", "Unfreezing non-frozen form" ); return; } if ( --form->frozen == 0 && form->visible == FL_VISIBLE ) fli_redraw_form_using_xevent( form, 0, NULL ); } /*----------------------------------------------------------------------- Handling Routines. -----------------------------------------------------------------------*/ /*************************************** * should only be used as a response to FL_UNFOCOS ***************************************/ void fl_reset_focus_object( FL_OBJECT * obj ) { refocus = obj; } /*** handle tooltips ***/ /*************************************** ***************************************/ static FL_OBJECT * get_parent( FL_OBJECT * obj ) { if ( obj ) while ( obj->parent && obj->parent != obj ) obj = obj->parent; return obj; } /*************************************** ***************************************/ static void tooltip_handler( int ID FL_UNUSED_ARG, void * data ) { FL_OBJECT * const obj = get_parent( data ); if ( obj->tooltip && *obj->tooltip ) fli_show_tooltip( obj->tooltip, obj->form->x + obj->x, obj->form->y + obj->y + obj->h + 1 ); obj->tipID = 0; } /*************************************** ***************************************/ static void checked_hide_tooltip( FL_OBJECT * obj, XEvent * xev ) { FL_OBJECT * const parent = get_parent( obj ); char const * const tooltip = parent->tooltip; if ( ! tooltip || ! *tooltip ) return; /* If obj is part of a composite widget, it may well be that we're leaving a child widget but are still within the parent. If that is the case, we don't want to hide the tooltip at all. */ if ( parent != obj && xev && xev->xmotion.x >= parent->x && xev->xmotion.x <= parent->x + parent->w && xev->xmotion.y >= parent->y && xev->xmotion.y <= parent->y + parent->h ) return; fli_hide_tooltip( ); if ( parent->tipID ) { fl_remove_timeout( parent->tipID ); parent->tipID = 0; } } /*************************************** ***************************************/ static void unconditional_hide_tooltip( FL_OBJECT * obj ) { FL_OBJECT * const parent = get_parent( obj ); fli_hide_tooltip( ); if ( parent->tipID ) { fl_remove_timeout( parent->tipID ); parent->tipID = 0; } } /*************************************** * Handles an event for an object ***************************************/ static int handle_object( FL_OBJECT * obj, int event, FL_Coord mx, FL_Coord my, int key, XEvent * xev, int keep_ret ) { static unsigned long last_clicktime = 0; static int last_dblclick = 0, last_key = 0; static FL_Coord last_mx, last_my; int cur_event; FL_OBJECT *p; if ( ! obj ) return FL_RETURN_NONE; #if FL_DEBUG >= ML_WARN if ( ! obj->form && event != FL_FREEMEM && event != FL_ATTRIB && event != FL_RESIZED ) { M_err( "handle_object", "Bad object %s, event = %s", obj->label ? obj->label : "(no label)", fli_event_name( event ) ); return FL_RETURN_NONE; } #endif if ( obj->objclass == FL_BEGIN_GROUP || obj->objclass == FL_END_GROUP ) return FL_RETURN_NONE; if ( ! obj->handle ) return FL_RETURN_NONE; /* Make sure return states of parents, grandparents etc. of current object are all set to FL_NO_RETURN */ if ( ! keep_ret ) { p = obj; while ( ( p = p->parent ) ) p->returned = FL_RETURN_NONE; } switch ( event ) { case FL_ENTER: { /* We assign the timer to the parent widget in the case of a composite object as that's the thing that's actually got the tip. */ FL_OBJECT * const parent = get_parent( obj ); if ( ! parent->tipID ) { char const * const tooltip = parent->tooltip; if ( tooltip && *tooltip && ! parent->form->no_tooltip ) parent->tipID = fl_add_timeout( fli_context->tooltip_time, tooltip_handler, parent ); } obj->belowmouse = 1; break; } case FL_LEAVE: checked_hide_tooltip( obj, xev ); obj->belowmouse = 0; break; case FL_PUSH: unconditional_hide_tooltip( obj ); obj->pushed = 1; break; case FL_KEYPRESS: unconditional_hide_tooltip( obj ); break; case FL_RELEASE: if ( ! obj->radio ) obj->pushed = 0; /* Changed: before double and triple clicks weren't accepted for the middle mouse button (which didn't make too much sense IMHO), now they don't get flagged for the mouse wheel "buttons". JTT */ if ( key == last_key && ! ( key == FL_MBUTTON4 || key == FL_MBUTTON5 ) && ! ( FL_abs( last_mx - mx ) > 4 || FL_abs( last_my - my ) > 4 ) && xev && xev->xbutton.time - last_clicktime < obj->click_timeout ) event = last_dblclick ? FL_TRPLCLICK : FL_DBLCLICK; last_dblclick = event == FL_DBLCLICK; last_clicktime = xev ? xev->xbutton.time : 0; last_key = key; last_mx = mx; last_my = my; break; case FL_FOCUS: /* 'refocus' is set if on the last FL_UNFOCUS it was found that the text in the input field didn't validate. In that case the focus has to go back to that field instead to a different one */ if ( refocus && refocus->form ) { obj = refocus; refocus = NULL; } if ( obj->form ) { obj->form->focusobj = obj; obj->focus = 1; } break; case FL_UNFOCUS: obj->form->focusobj = NULL; obj->focus = 0; break; case FL_DRAW: if ( obj->objclass == FL_FREE ) { fl_set_clipping( obj->x, obj->y, obj->w, obj->h ); fl_set_text_clipping( obj->x, obj->y, obj->w, obj->h ); } break; } cur_event = event; if ( event == FL_DBLCLICK || event == FL_TRPLCLICK ) event = FL_RELEASE; recover: /* Call a pre-handler if it exists and return if it tells us the event has been handled completely */ if ( obj->prehandle && event != FL_FREEMEM && obj->prehandle( obj, event, mx, my, key, xev ) == FL_PREEMPT ) return FL_RETURN_NONE; /* Now finally call the real object handler and filter the status it returns (to limit the value to what it expects) */ if ( ! keep_ret ) { obj->returned = obj->handle( obj, event, mx, my, key, xev ); fli_filter_returns( obj ); } else obj->handle( obj, event, mx, my, key, xev ); /* Call post-handler if one exists */ if ( obj->posthandle && event != FL_FREEMEM ) obj->posthandle( obj, event, mx, my, key, xev ); if ( cur_event == FL_DBLCLICK || cur_event == FL_TRPLCLICK ) { event = cur_event; cur_event = 0; if ( ! keep_ret && obj->returned ) fli_object_qenter( obj ); goto recover; } if ( obj->objclass == FL_FREE && event == FL_DRAW ) { fl_unset_clipping( ); fl_unset_text_clipping( ); } return ( event == FL_DBLCLICK || event == FL_TRPLCLICK ) ? ( int ) FL_RETURN_NONE : obj->returned; } /*************************************** * Handle and store object in object queue if handler returns non-zero ***************************************/ void fli_handle_object( FL_OBJECT * obj, int event, FL_Coord mx, FL_Coord my, int key, XEvent * xev, int enter_it ) { int res; if ( ! obj ) return; /* If 'enter_it' is set the object is inserted into the object queue and it's 'returned' member is modified. If not, just the handler for the object is called, but it doesn't appear in the queue and the 'returned' member remains unmodified. Also don't enter the object into the queue if it's form doesn't exist or the forms window isn't mapped. */ if ( enter_it && obj->form && obj->form->window ) { if ( ( res = handle_object( obj, event, mx, my, key, xev, 0 ) ) ) fli_object_qenter( obj ); } else handle_object( obj, event, mx, my, key, xev, 1 ); } /*************************************** * Sets the callback routine for the object ***************************************/ FL_CALLBACKPTR fl_set_object_callback( FL_OBJECT * obj, FL_CALLBACKPTR callback, long argument ) { FL_CALLBACKPTR old; if ( ! obj ) { M_err( "fl_set_object_callback", "NULL object" ); return NULL; } old = obj->object_callback; obj->object_callback = callback; obj->argument = argument; /* In older versions scrollbars and browsers didn't return to the application on e.g. fl_do_forms() but still a callback associated with the object got called. To emulate the old behaviour we have to set the return policy to FL_RETURN_NEVER if the callback is removed and to (FL_RETURN_SELECTION|FL_RETURN_DESELECTION) or FL_RETURN_CHANGED when a callback is installed. */ #if defined USE_BWC_BS_HACK if ( obj->objclass == FL_BROWSER ) fl_set_object_return( obj, callback ? ( FL_RETURN_SELECTION | FL_RETURN_DESELECTION ) : FL_RETURN_NONE ); else if ( obj->objclass == FL_SCROLLBAR ) fl_set_object_return( obj, callback ? FL_RETURN_CHANGED : FL_RETURN_NONE); #endif return old; } /*************************************** * Sets the borderwidth of an object ***************************************/ void fl_set_object_bw( FL_OBJECT * obj, int bw ) { /* Clamp border width to a reasonable range */ if ( FL_abs( bw ) > FL_MAX_BW ) bw = bw > 0 ? FL_MAX_BW : - FL_MAX_BW; if ( bw == 0 ) bw = -1; if ( ! obj ) { M_err( "fl_set_object_bw", "NULL object" ); return; } /* Check if this object is a group, if so, change all members */ if ( obj->objclass == FL_BEGIN_GROUP ) { fl_freeze_form( obj->form ); for ( ; obj && obj->objclass != FL_END_GROUP; obj = obj->next ) { if ( obj->bw != bw ) { obj->bw = bw; if ( obj->objclass != FL_BEGIN_GROUP ) { fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); fl_redraw_object( obj ); } } } fl_unfreeze_form( obj->form ); } else if ( obj->bw != bw ) { obj->bw = bw; fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); fl_redraw_object( obj ); } } /*************************************** * Returns the borderwidth of an object ***************************************/ void fl_get_object_bw( FL_OBJECT * obj, int * bw ) { if ( ! obj ) { M_err( "fl_get_object_bw", "NULL object" ); return; } *bw = obj->bw; } /*************************************** ***************************************/ Window fl_get_real_object_window( FL_OBJECT * obj ) { FL_pixmap *objp = obj->flpixmap; FL_pixmap *formp = obj->form->flpixmap; if ( objp && objp->win ) return objp->win; else if ( ( obj->objclass == FL_CANVAS || obj->objclass == FL_GLCANVAS ) && fl_get_canvas_id( obj ) ) return fl_get_canvas_id( obj ); else if ( formp && formp->win ) return formp->win; return obj->form->window; } /*************************************** ***************************************/ FL_RECT * fli_union_rect( const FL_RECT * r1, const FL_RECT * r2 ) { FL_RECT *p = fl_malloc( sizeof *p ); int xi, yi, xf, yf; xi = p->x = FL_max( r1->x, r2->x ); yi = p->y = FL_max( r1->y, r2->y ); xf = FL_min( r1->x + r1->width, r2->x + r2->width ) - 1; yf = FL_min( r1->y + r1->height, r2->y + r2->height ) - 1; p->width = xf - xi + 1; p->height = yf - yi + 1; if ( p->width <= 0 || p->height <= 0 ) { fl_free( p ); return NULL; } return p; } /*************************************** ***************************************/ static const FL_RECT * get_bounding_rect( const FL_RECT * r1, const FL_RECT * r2 ) { static FL_RECT rect; int xi, yi, xf, yf; xi = rect.x = FL_min( r1->x, r2->x ); yi = rect.y = FL_min( r1->y, r2->y ); xf = FL_max( r1->x + r1->width, r2->x + r2->width ); yf = FL_max( r1->y + r1->height, r2->y + r2->height ); rect.width = xf - xi; rect.height = yf - yi; return ▭ } /*************************************** ***************************************/ void fli_scale_length( FL_Coord * x, FL_Coord * w, double s ) { FL_Coord xi, xf; xi = FL_crnd( s * *x ); xf = FL_crnd( s * ( *x + *w ) ); *x = xi; *w = xf - xi; } /*************************************** * Scale an object. For internal use. No gravity and resize settings * for the object are taken into account. The calculation takes care * of round-off errors and has the property that if two objects were * "glued" before scaling, they will remain so. ***************************************/ void fl_scale_object( FL_OBJECT * obj, double xs, double ys ) { if ( xs == 1.0 && ys == 1.0 ) return; if ( ! obj->form ) { obj->x = FL_crnd( xs * obj->x ); obj->y = FL_crnd( ys * obj->y ); obj->w = FL_crnd( xs * obj->w ); obj->h = FL_crnd( ys * obj->h ); } else { double new_w = xs * ( obj->fl2 - obj->fl1 ), new_h = ys * ( obj->ft2 - obj->ft1 ); obj->fl1 *= xs; obj->fr1 = obj->form->w_hr - obj->fl1; obj->ft1 *= ys; obj->fb1 = obj->form->h_hr - obj->ft1; obj->fl2 = obj->fl1 + new_w; obj->fr2 = obj->form->w_hr - obj->fl2; obj->ft2 = obj->ft1 + new_h;; obj->fb2 = obj->form->h_hr - obj->ft2;; obj->x = FL_crnd( obj->fl1 ); obj->y = FL_crnd( obj->ft1 ); obj->w = FL_crnd( new_w ); obj->h = FL_crnd( new_h ); if ( fli_inverted_y ) obj->y = TRANY( obj, obj->form ); fli_handle_object( obj, FL_RESIZED, 0, 0, 0, NULL, 0 ); /* If there are child objects also inform them about the size change */ if ( obj->child ) fli_composite_has_been_resized( obj ); fli_recalc_intersections( obj->form ); } } /*************************************** * Register a preemptive object handler ***************************************/ FL_HANDLEPTR fl_set_object_prehandler( FL_OBJECT * obj, FL_HANDLEPTR phandler ) { FL_HANDLEPTR oldh = obj->prehandle; obj->prehandle = phandler; return oldh; } /*************************************** ***************************************/ FL_HANDLEPTR fl_set_object_posthandler( FL_OBJECT * obj, FL_HANDLEPTR post ) { FL_HANDLEPTR oldh = obj->posthandle; obj->posthandle = post; return oldh; } /*************************************** ***************************************/ int fl_get_object_return_state( FL_OBJECT *obj ) { return obj->returned; } /*************************************** ***************************************/ void fl_trigger_object( FL_OBJECT * obj ) { if ( obj && obj != FL_EVENT && obj->form && obj->visible && obj->active ) { obj->returned = FL_RETURN_TRIGGERED; fli_object_qenter( obj ); } } /*************************************** ***************************************/ void fl_draw_object_label( FL_OBJECT * obj ) { int align = obj->align % FL_ALIGN_INSIDE; if ( align != obj->align ) fl_drw_text( align, obj->x, obj->y, obj->w, obj->h, obj->lcol, obj->lstyle, obj->lsize, obj->label ); else fl_drw_text_beside( align, obj->x, obj->y, obj->w, obj->h, obj->lcol, obj->lstyle, obj->lsize, obj->label ); } /*************************************** ***************************************/ void fl_draw_object_label_outside( FL_OBJECT * obj ) { fl_drw_text_beside( obj->align & ~ FL_ALIGN_INSIDE, obj->x, obj->y, obj->w, obj->h, obj->lcol, obj->lstyle, obj->lsize, obj->label ); } /*************************************** ***************************************/ void fl_call_object_callback( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_call_object_callback", "NULL object" ); return; } if ( obj->object_callback ) obj->object_callback( obj, obj->argument ); } /*************************************** * Rechecks for all objects of a form if they are * partially or fully hidden by another object ***************************************/ void fli_recalc_intersections( FL_FORM * form ) { FL_OBJECT *obj; for ( obj = form->first; obj && obj->next; obj = obj->next ) obj->is_under = object_is_under( obj ); } /*************************************** ***************************************/ void fl_move_object( FL_OBJECT * obj, FL_Coord dx, FL_Coord dy ) { FL_Coord x, y; if ( obj->objclass == FL_BEGIN_GROUP ) { FL_OBJECT *o; fl_freeze_form( obj->form ); for ( o = obj->next; o->objclass != FL_END_GROUP; o = o->next ) { fl_get_object_position( o, &x, &y ); fl_set_object_position( o, x + dx, y + dy ); } fl_unfreeze_form( obj->form ); } else { fl_get_object_position( obj, &x, &y ); fl_set_object_position( obj, x + dx, y + dy ); } } /*************************************** * Returns the position of an object ***************************************/ void fl_get_object_position( FL_OBJECT * obj, FL_Coord * x, FL_Coord * y ) { *x = obj->x; *y = fli_inverted_y ? TRANY( obj, obj->form ) : obj->y; } /*************************************** * Sets the position of an object ***************************************/ void fl_set_object_position( FL_OBJECT * obj, FL_Coord x, FL_Coord y ) { int visible = obj->visible; double diff; if ( obj->x == x && obj->y == y ) return; if ( fli_inverted_y ) y = obj->form->h - obj->h - y; if ( obj->x == x && obj->y == y ) return; if ( visible ) fl_hide_object( obj ); if ( x != obj->x ) { diff = x - obj->fl1; obj->fl1 += diff; obj->fl2 += diff; obj->fr1 -= diff; obj->fr2 -= diff; obj->x = x; } if ( y != obj->y ) { diff = y - obj->ft1; obj->ft1 += diff; obj->ft2 += diff; obj->fb1 -= diff; obj->fb2 -= diff; obj->y = y; } if ( fli_inverted_y ) obj->y = TRANY( obj, obj->form ); if ( ! obj->parent ) fli_recalc_intersections( obj->form ); if ( visible ) { fli_handle_object( obj, FL_MOVEORIGIN, 0, 0, 0, NULL, 0 ); fl_show_object( obj ); } } /*************************************** * Returns the size of an object ***************************************/ void fl_get_object_size( FL_OBJECT * obj, FL_Coord * w, FL_Coord * h ) { *w = obj->w; *h = obj->h; } /*************************************** * Sets the size of an object ***************************************/ void fl_set_object_size( FL_OBJECT * obj, FL_Coord w, FL_Coord h ) { int visible = obj->visible; double diff; if ( obj->w == w && obj->h == h ) return; if ( visible ) fl_hide_object( obj ); if ( w != obj->w ) { diff = w - ( obj->fl2 - obj->fl1 ); if ( HAS_FIXED_HORI_ULC_POS( obj ) ) { obj->fl2 += diff; obj->fr2 -= diff; } if ( HAS_FIXED_HORI_LRC_POS( obj ) ) { obj->fl1 -= diff; obj->fr1 += diff; } else /* keep center of gravity */ { diff *= 0.5; obj->fl1 -= diff; obj->fr1 += diff; obj->fl2 += diff; obj->fr2 -= diff; } obj->x = FL_crnd( obj->fl1 ); obj->w = FL_crnd( obj->fl2 - obj->fl1 ); } if ( h != obj->h ) { diff = h - ( obj->ft2 - obj->ft1 ); if ( HAS_FIXED_VERT_ULC_POS( obj ) ) { obj->ft2 += diff; obj->fb2 -= diff; } else if ( HAS_FIXED_VERT_LRC_POS( obj ) ) { obj->ft1 -= diff; obj->fb1 += diff; } else /* keep center of gravity */ { diff *= 0.5; obj->ft1 -= diff; obj->fb1 += diff; obj->ft2 += diff; obj->fb2 -= diff; } obj->y = FL_crnd( obj->ft1 ); obj->h = FL_crnd( obj->ft2 - obj->ft1 ); } if ( fli_inverted_y ) obj->y = TRANY( obj, obj->form ); fli_handle_object( obj, FL_RESIZED, 0, 0, 0, NULL, 0 ); /* If there are child objects also inform them about the size change */ if ( obj->child ) fli_composite_has_been_resized( obj ); if ( ! obj->parent ) fli_recalc_intersections( obj->form ); if ( visible ) fl_show_object( obj ); } /*************************************** * Returns the position and size of an object ***************************************/ void fl_get_object_geometry( FL_OBJECT * obj, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ) { fl_get_object_position( obj, x, y ); fl_get_object_size( obj, w, h ); } /*************************************** * Sets the position and size of an object ***************************************/ void fl_set_object_geometry( FL_OBJECT * obj, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { fl_set_object_size( obj, w, h ); fl_set_object_position( obj, x, y ); } /*************************************** * Computes object geometry also taking the label into account ***************************************/ void fl_get_object_bbox( FL_OBJECT * obj, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ) { FL_OBJECT *tmp; int extra = 0; XRectangle lrect, orect; const XRectangle *xr; if ( obj->objclass == FL_FRAME || obj->objclass == FL_LABELFRAME ) extra += FL_abs( obj->bw ); if ( obj->objclass >= FL_USER_CLASS_START && obj->objclass <= FL_USER_CLASS_END ) extra = FL_abs( obj->bw ) + obj->lsize; lrect.x = orect.x = obj->x - extra; lrect.y = orect.y = obj->y - extra; lrect.width = orect.width = obj->w + 2 * extra; lrect.height = orect.height = obj->h + 2 * extra; /* Label position */ if ( obj->label && *obj->label ) { int sw, sh; int xx, yy, ascent, descent; fl_get_string_dimension( obj->lstyle, obj->lsize, obj->label, strlen( obj->label ), &sw, &sh ); fl_get_char_height( obj->lstyle, obj->lsize, &ascent, &descent ); fl_get_align_xy( obj->align, obj->x, obj->y, obj->w, obj->h, sw, sh + descent, 3, 3, &xx, &yy ); lrect.x = xx - 1; lrect.y = yy; lrect.width = sw + 1; lrect.height = sh + descent; } xr = get_bounding_rect( &lrect, &orect ); for ( tmp = obj->child; tmp; tmp = tmp->nc ) { lrect = *xr; orect.x = tmp->x; orect.y = tmp->y; orect.width = tmp->w; orect.height = tmp->h; xr = get_bounding_rect( &lrect, &orect ); } *x = xr->x; *y = xr->y; *w = xr->width; *h = xr->height; } /*************************************** ***************************************/ static void get_object_bbox_rect( FL_OBJECT * obj, FL_RECT * xr ) { FL_Coord x, y, w, h; fl_get_object_bbox( obj, &x, &y, &w, &h ); xr->x = x; xr->y = y; xr->width = w; xr->height = h; } /*************************************** ***************************************/ void fl_set_object_automatic( FL_OBJECT * obj, int flag ) { if ( obj->automatic != ( flag ? 1 : 0 ) ) { obj->automatic = flag ? 1 : 0; if ( obj->form ) { if ( flag ) obj->form->num_auto_objects++; else obj->form->num_auto_objects--; } fli_recount_auto_objects( ); } } /*************************************** ***************************************/ int fl_object_is_automatic( FL_OBJECT * obj ) { if ( ! obj ) { M_err( "fl_object_is_automatic", "NULL object" ); return 0; } return obj->automatic; } /*************************************** ***************************************/ static void lose_focus( FL_OBJECT * obj ) { FL_FORM *form = obj->form; if ( ! form || ! obj->focus || obj != form->focusobj ) return; if ( obj == form->focusobj ) fli_handle_object( form->focusobj, FL_UNFOCUS, 0, 0, 0, NULL, 1 ); obj->focus = 0; /* Try to find some input object to give it the focus */ obj->input = 0; form->focusobj = fli_find_first( obj->form, FLI_FIND_INPUT, 0, 0 ); obj->input = 1; if ( obj == refocus ) refocus = form->focusobj ? form->focusobj : NULL; if ( form->focusobj ) fli_handle_object( form->focusobj, FL_FOCUS, 0, 0, 0, NULL, 0 ); } /*************************************** * Part of the public interface, not used within the library ***************************************/ void fl_for_all_objects( FL_FORM * form, int ( * cb )( FL_OBJECT *, void * ), void * v ) { FL_OBJECT *obj; if ( ! form ) { M_err( "fl_for_all_objects", "NULL form" ); return; } if ( ! cb ) { M_err( "fl_for_all_objects", "NULL callback function" ); return; } for ( obj = form->first; obj && ! cb( obj, v ); obj = obj->next ) /* empty */ ; } /*************************************** ***************************************/ void fl_set_object_helper( FL_OBJECT * obj, const char * tip ) { if ( ! obj ) { M_err( "fl_set_object_helper", "NULL object" ); return; } fl_safe_free( obj->tooltip ); obj->tooltip = tip ? fl_strdup( tip ) : NULL; } /*************************************** * Function for setting the conditions under which an object gets * returned (or its callback invoked). If the object has to do * additional work on setting te condition (e.g. it has child * objects that also need to be set) it has to set up it's own * function that then will called in the end. This function should * only be called once an object has been created completely! ***************************************/ int fl_set_object_return( FL_OBJECT * obj, unsigned int when ) { int old_when; if ( ! obj ) return FL_RETURN_ALWAYS; old_when = obj->how_return; /* FL_RETURN_END_CHANGED means FL_RETURN and FL_RETURN_CHANGED at the same moment, so it those two events can't be set at the same time */ if ( when & FL_RETURN_END_CHANGED ) when &= ~ ( FL_RETURN_END | FL_RETURN_CHANGED ); if ( obj->set_return ) obj->set_return( obj, when ); else obj->how_return = when; return old_when; } /*************************************** ***************************************/ void fl_notify_object( FL_OBJECT * obj, int cause ) { if ( ! obj || ( cause != FL_ATTRIB && cause != FL_RESIZED && cause != FL_MOVEORIGIN ) ) return; fli_handle_object( obj, cause, 0, 0, 0, NULL, 0 ); } /*************************************** * Sets the visibility flag for an object and all its children * without inducing a redraw. Used e.g. in browser and multi- * line input object's code to switch scrollbars on and off. ***************************************/ void fli_set_object_visibility( FL_OBJECT * obj, int vis ) { if ( obj ) /* let's be careful... */ { obj->visible = vis; for ( obj = obj->child; obj; obj = obj->nc ) fli_set_object_visibility( obj, vis ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/goodie_input.c0000644000175000017500000001167111247055071015635 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file goodie_input.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include typedef struct { FL_FORM * form; FL_OBJECT * input; FL_OBJECT * cancel; FL_OBJECT * clear; FL_OBJECT * ok; } FD_input; /*************************************** * Callback for "Clear" button ***************************************/ static void clear_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_set_input( ( ( FD_input * ) ob->form->fdui )->input, "" ); } /*************************************** ***************************************/ static FD_input * create_form_input( const char *str1, const char *defstr ) { FL_OBJECT *obj; FD_input *fdui = fl_calloc( 1, sizeof *fdui ); int oldy = fli_inverted_y; int oldu = fl_get_coordunit( ); fli_inverted_y = 0; fl_set_coordunit( FL_COORD_PIXEL ); fdui->form = fl_bgn_form( FL_NO_BOX, 410, 120 ); fl_set_form_title( fdui->form, "Input" ); obj = fl_add_box( FL_UP_BOX, 0, 0, 410, 120, "" ); fl_set_object_bw( obj, -2 ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 8, 9, 394, 67, "" ); fdui->input = obj = fl_add_input( FL_NORMAL_INPUT, 20, 33, 370, 30, str1 ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fl_set_input( obj, defstr ); fdui->cancel = obj = fl_add_button( FL_NORMAL_BUTTON, 30, 85, 80, 26, "Cancel" ); fli_parse_goodies_label( obj, FLInputCancelLabel ); fl_set_button_shortcut( obj, "^[", 1 ); fdui->clear = obj = fl_add_button( FL_NORMAL_BUTTON, 300, 85, 80, 26, "Clear" ); fli_parse_goodies_label( obj, FLInputClearLabel ); fl_set_object_callback( obj, clear_cb, 0 ); fdui->ok = obj = fl_add_button( FL_RETURN_BUTTON, 165, 85, 80, 26, "Ok" ); fli_parse_goodies_label( obj, FLOKLabel ); fl_end_form( ); fl_adjust_form_size( fdui->form ); fdui->form->fdui = fdui; fl_set_form_hotobject( fdui->form, fdui->ok ); fl_set_form_atclose( fdui->form, fl_goodies_atclose, fdui->ok ); fl_register_raw_callback( fdui->form, FL_ALL_EVENT, fli_goodies_preemptive ); fli_handle_goodie_font( fdui->ok, fdui->input ); fli_handle_goodie_font( fdui->cancel, fdui->clear ); fli_get_goodie_title( fdui->form, FLInputTitle ); fli_inverted_y = oldy; fl_set_coordunit( oldu ); return fdui; } static FD_input *fd_input = NULL; static char *ret_str = NULL; /*************************************** * Asks the user for textual input ***************************************/ const char * fl_show_input( const char *str1, const char *defstr ) { FL_OBJECT *retobj; if ( fd_input ) { fl_hide_form( fd_input->form ); fl_free_form( fd_input->form ); fl_safe_free( fd_input ); } else fl_deactivate_all_forms( ); fl_safe_free( ret_str ); fd_input = create_form_input( str1, defstr ); fl_show_form( fd_input->form, FL_PLACE_HOTSPOT, FL_TRANSIENT, fd_input->form->label ); fl_update_display( 0 ); /* Grab keyboard focus */ fl_winfocus( fd_input->form->window ); while ( ( retobj = fl_do_only_forms( ) ) != fd_input->ok && retobj != fd_input->cancel ) /* empty */ ; if ( retobj == fd_input->ok ) ret_str = fl_strdup( fl_get_input( fd_input->input ) ); fl_hide_form( fd_input->form ); fl_free_form( fd_input->form ); fl_safe_free( fd_input ); fl_activate_all_forms( ); return ret_str; } /*************************************** ***************************************/ void fl_hide_input( void ) { if ( fd_input ) fl_trigger_object( fd_input->cancel ); else M_warn( "fl_hide_input", "No input box is shown" ); } /*************************************** ***************************************/ void fli_input_cleanup( void ) { fl_safe_free( fd_input ); fl_safe_free( ret_str ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/version.c0000644000175000017500000000426711247055071014640 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file version.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Version info */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" static const char *version = "(Compiled " __DATE__ ")\n" #ifdef FL_WIN32 "Copyright (c) 1996-2002 by T.C. Zhao, Gang Li and Mark Overmars\n" #else "Copyright (c) 1996-2002 by T.C. Zhao and Mark Overmars\n" #endif "Parts Copyright(c) 1999-2002 by T.C. Zhao and Steve Lamont\n" "GNU Lesser General Public License since 2002"; /*************************************** ***************************************/ int fl_library_version( int * ver, int * rev ) { if ( ver ) *ver = FL_VERSION; if ( rev ) *rev = FL_REVISION; return FL_VERSION * 1000 + FL_REVISION; } /*************************************** ***************************************/ void fli_print_version( int in_window ) { char *msg = fl_malloc( strlen( version ) + sizeof "FORMS Library Version " + 30 ); sprintf( msg, "FORMS Library Version %d.%d.%s\n%s", FL_VERSION, FL_REVISION, FL_FIXLEVEL, version ); if ( in_window ) fl_show_messages( msg ); else fprintf( stderr, "%s\n", msg ); fl_free( msg ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/box.c0000644000175000017500000000560411376006331013735 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file box.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ static int handle_box( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { switch ( event ) { case FL_DRAW: fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); /* fall through */ case FL_DRAWLABEL: if ( ob->align & FL_ALIGN_INSIDE ) fl_set_text_clipping( ob->x + ob->bw, ob->y + ob->bw, ob->w - 2 * ob->bw, ob->h - 2 * ob->bw ); fl_draw_object_label( ob ); if ( ob->align & FL_ALIGN_INSIDE ) fl_unset_text_clipping( ); break; } return FL_RETURN_NONE; } /*************************************** ***************************************/ FL_OBJECT * fl_create_box( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_make_object( FL_BOX, type, x, y, w, h, label, handle_box ); ob->boxtype = type; ob->col1 = FL_COL1; ob->col2 = FL_COL1; ob->lcol = FL_LCOL; ob->align = FL_ALIGN_CENTER; ob->active = 0; return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_box( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label) { FL_OBJECT *ob = fl_create_box( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/goodie_msg.c0000644000175000017500000001471411247055071015265 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file goodie_msg.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" /*************** Three line messages *******************{*****/ typedef struct { FL_FORM * form; FL_OBJECT * str; FL_OBJECT * but; } FD_msg; /*************************************** ***************************************/ static FD_msg * create_msg( const char * str ) { FD_msg *fdui = fl_calloc( 1, sizeof *fdui ); int oldy = fli_inverted_y; int oldu = fl_get_coordunit( ); int style, size; int w_msg, h_msg, w_but, h_but; int box_w, box_h, but_w; char but_text[ 256 ] = "Ok"; fli_inverted_y = 0; fl_set_coordunit( FL_COORD_PIXEL ); fli_get_goodies_font( &style, &size ); /* Get size of box that fits the message. The message will have 20 px around spacing it (and the box a minimum width of 400 px) */ fl_get_string_dimension( style, size, str, strlen( str ), &w_msg, &h_msg ); box_w = FL_max( 400, w_msg + 40 ); box_h = h_msg + 40; /* Get the text for the button (default is "Ok") and the size needed for it. The button should have at least 20 px space to the left and right and 10 px inner horizontal margins (and a minimum width of 90 px). Vertical inner margins are 5 px and the button should have 10 px spacing to the lower border of the box. */ fl_get_resource( FLOKLabel, NULL, FL_STRING, NULL, but_text, 256 ); fl_get_string_dimension( style, size, but_text, strlen( but_text ), &w_but, &h_but ); but_w = FL_max( 90, w_but + 20 ); box_w = FL_max( box_w, but_w + 40 ); box_h += h_but + 20; fdui->form = fl_bgn_form( FL_UP_BOX, box_w, box_h ); fdui->str = fl_add_box( FL_FLAT_BOX, ( box_w - w_msg ) / 2, 20, w_msg, h_msg, str ); fl_set_object_lstyle( fdui->str, style ); fl_set_object_lsize( fdui->str, size ); fdui->but = fl_add_button( FL_RETURN_BUTTON, ( box_w - but_w ) / 2, box_h - h_but - 20, but_w, h_but + 10, "Ok" ); fl_set_form_hotobject( fdui->form, fdui->but ); fl_set_object_lstyle( fdui->but, style ); fl_set_object_lsize( fdui->but, size ); fl_end_form( ); fl_register_raw_callback( fdui->form, FL_ALL_EVENT, fli_goodies_preemptive ); fl_set_form_atclose( fdui->form, fl_goodies_atclose, fdui->but ); fli_inverted_y = oldy; fl_set_coordunit( oldu ); return fdui; } static FD_msg *fd_msg = NULL; /*************************************** ***************************************/ void fl_show_messages( const char *str ) { if ( ! str || ! * str ) { M_warn( "fl_show_messages", "NULL or empty string" ); return; } if ( fd_msg ) { fl_hide_form( fd_msg->form ); fl_free_form( fd_msg->form ); fl_safe_free( fd_msg ); } else fl_deactivate_all_forms( ); fd_msg = create_msg( str ); fl_show_form( fd_msg->form, FL_PLACE_HOTSPOT, FL_TRANSIENT, "Message" ); fl_update_display( 1 ); while ( fl_do_only_forms( ) != fd_msg->but ) /* empty */ ; fl_hide_form( fd_msg->form ); fl_free_form( fd_msg->form ); fl_safe_free( fd_msg ); fl_activate_all_forms( ); } /*************************************** ***************************************/ void fl_show_msg( const char * fmt, ... ) { char *buf, *p; int len; int written; va_list ap; if ( ! fmt || ! * fmt ) { M_warn( "fl_show_msg", "NULL or empty format string" ); return; } /* Try to come up with an estimate of the length required for the whole string */ len = strlen( fmt ) + 1; for ( p = strchr( fmt, '%' ); p; p = strchr( ++p, '%' ) ) len += 15; buf = fl_malloc( len ); while ( 1 ) { va_start( ap, fmt ); written = fl_vsnprintf( buf, len, fmt, ap ); va_end( ap ); /* Take care: e.g. in older libc versions a negative value got returned if the buffer wasn't large enough while newer ones follow C99 and return the length of the string that would be needed (but without the trailing '\0') */ if ( written > -1 && written < len ) break; len = written < 0 ? ( 2 * len ) : ( written + 1 ); buf = fl_realloc( buf, len ); } fl_show_messages( buf ); fl_free( buf ); } /*************************************** ***************************************/ void fl_show_message( const char * s1, const char * s2, const char * s3 ) { char *buf; size_t len; len = ( s1 ? strlen( s1 ) : 0 ) + 1 + ( s2 ? strlen( s2 ) : 0 ) + 1 + ( s3 ? strlen( s3 ) : 0 ) + 1; if ( len == 3 ) { M_warn( "fl_show_message", "Only NULL or empty strings" ); return; } buf = fl_malloc( len ); fl_snprintf( buf, len, "%s\n%s\n%s", s1 ? s1 : "", s2 ? s2 : "", s3 ? s3 : "" ); fl_show_messages( buf ); fl_free( buf ); } /*************************************** ***************************************/ void fl_hide_message( void ) { if ( fd_msg ) fl_trigger_object( fd_msg->but ); else M_warn( "fl_hide_message", "No message box is shown" ); } /*************************************** ***************************************/ void fli_msg_cleanup( void ) { fl_safe_free( fd_msg ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/handling.c0000644000175000017500000013165011374542321014734 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" #include "global.h" static void do_interaction_step( int ); static int get_next_event_or_idle( int, FL_FORM **, XEvent * ); static void handle_EnterNotify_event( FL_FORM * ); static void handle_LeaveNotify_event( void ); static void handle_MotionNotify_event( FL_FORM * ); static void handle_Expose_event( FL_FORM *, FL_FORM ** ); static void handle_ConfigureNotify_event( FL_FORM *, FL_FORM ** ); static int form_event_queued( XEvent *, int ); /* Waiting time (in ms) for fl_check_forms() and fl_check_only_forms(). Originally this value was 10 ms. */ #define SHORT_PAUSE 1 /* How frequently to generate FL_STEP event, in milli-seconds is set here. * These are modified if an idle callback exists */ static int delta_msec = FLI_TIMER_RES; static XEvent st_xev; extern void ( * fli_handle_signal )( void ); /* defined in signal.c */ extern int ( * fli_handle_clipboard )( void * ); /* defined in clipboard.c */ /* When set results in behaviour as in version 1.0.90 and before where clicking on a non-input object didn't make an input object lose focus shortly and thus no "end of editing" was signaled to the user */ static int end_event_for_input = FL_INPUT_END_EVENT_ALWAYS; /*************************************** * Function for switching between "old" and "new" input handling * when another non-input object is clicked on ***************************************/ int fl_input_end_return_handling( int type ) { int old_end_event_for_input = end_event_for_input; end_event_for_input = type; return old_end_event_for_input; } /*************************************** ***************************************/ static int fli_XLookupString( XKeyEvent * xkey, char * buf, int buflen, KeySym * ks ) { int len = INT_MIN; if ( ! fli_context->xic ) len = XLookupString( xkey, buf, buflen, ks, 0 ); else { Status status; if ( XFilterEvent( ( XEvent * ) xkey, None ) ) { *ks = NoSymbol; return 0; } len = XmbLookupString( fli_context->xic, xkey, buf, buflen, ks, &status ); if ( status == XBufferOverflow ) len = -len; } return len; } /*************************************** * Converts 'state' member of the 'xkey' member of an XEvent * into the corresponding mouse button number ***************************************/ static int xmask2button( unsigned int mask ) { if ( mask & Button1Mask ) return FL_LEFT_MOUSE; if ( mask & Button2Mask ) return FL_MIDDLE_MOUSE; if ( mask & Button3Mask ) return FL_RIGHT_MOUSE; if ( mask & Button4Mask ) return FL_SCROLLUP_MOUSE; if ( mask & Button5Mask ) return FL_SCROLLDOWN_MOUSE; return 0; } /*************************************** * A radio object is pushed ***************************************/ void fli_do_radio_push( FL_OBJECT * obj, FL_Coord x, FL_Coord y, int key, void * xev ) { FL_OBJECT *o = obj; if ( ! obj || ! obj->radio ) return; /* If this radio button does not belong to any group we have to search the entire form, otherwise just treat the members of the group */ if ( obj->group_id == 0 ) { for ( o = obj->form->first; o; o = o->next ) if ( o != obj && o->radio && o->group_id == 0 && fl_get_button( o ) ) { fli_handle_object( o, FL_RELEASE, x, y, key, xev, 0 ); break; } } else { while ( o->prev && o->prev->objclass != FL_BEGIN_GROUP ) o = o->prev; for ( ; o && o->objclass != FL_END_GROUP; o = o->next ) if ( o != obj && o->radio && fl_get_button( o ) ) { fli_handle_object( o, FL_RELEASE, x, y, key, xev, 0 ); break; } } fli_handle_object( obj, FL_PUSH, x, y, key, xev, 1 ); } /*************************************** ***************************************/ static int do_shortcut( FL_FORM * form, int key, FL_Coord x, FL_Coord y, XEvent * xev ) { int key1, key2; FL_OBJECT *obj; long *s; key1 = key2 = key; /* Check for ALT modifier key */ if ( fl_keypressed( XK_Alt_L ) || fl_keypressed( XK_Alt_R ) ) { if ( key < 256 ) { key1 = FL_ALT_MASK + ( islower( ( int ) key ) ? toupper( ( int ) key ) : key ); key2 = FL_ALT_MASK + key; } else key1 = key2 = FL_ALT_MASK + key; } M_info( "do_shortcut", "win = %ld key = %d %d %d", form->window, key, key1, key2 ); /* Check if an object has this as a shortcut */ for ( obj = form->first; obj; obj = obj->next ) { if ( ! obj->shortcut || ! obj->active || ! obj->visible) continue; for ( s = obj->shortcut; *s; s++ ) { if ( *s != key1 && *s != key2 ) continue; if ( obj->objclass == FL_INPUT ) { if ( obj != form->focusobj ) { fli_handle_object( form->focusobj, FL_UNFOCUS, x, y, 0, xev, 1 ); fli_handle_object( obj, FL_FOCUS, x, y, 0, xev, 1 ); } } else { if ( obj->radio ) fli_do_radio_push( obj, x, y, FL_MBUTTON1, xev ); XAutoRepeatOff( flx->display ); if ( ! obj->radio ) fli_handle_object( obj, FL_SHORTCUT, x, y, key1, xev, 1 ); fli_context->mouse_button = FL_SHORTCUT + key1; /* This is not exactly correct as shortcut might quit, fl_finish() will restore the keyboard state */ if ( fli_keybdcontrol.auto_repeat_mode == AutoRepeatModeOn ) XAutoRepeatOn( flx->display ); } return 1; } } return 0; } /*************************************** ***************************************/ int fli_do_shortcut( FL_FORM * form, int key, FL_Coord x, FL_Coord y, XEvent * xev ) { int ret = do_shortcut( form, key, x, y, xev ); if ( ! ret ) { if ( form->child ) ret = do_shortcut( form->child, key, x, y, xev ); if ( ! ret && form->parent ) ret = do_shortcut( form->parent, key, x, y, xev ); } return ret; } /*************************************** ***************************************/ static void handle_keyboard( FL_FORM * form, int key, FL_Coord x, FL_Coord y, void * xev ) { FL_OBJECT *obj, *special; /* Always check shortcut first */ if ( fli_do_shortcut( form, key, x, y, xev ) ) return; /* Focus policy is done as follows: Input object has the highest priority. Next comes the object that wants special keys, finally followed by 'mouseobj', having the lowest proiority. */ special = fli_find_first( form, FLI_FIND_KEYSPECIAL, 0, 0 ); obj = special ? fli_find_object( special->next, FLI_FIND_KEYSPECIAL, 0, 0 ) : NULL; /* If two or more objects want keyboard input none will get it and keyboard input will go to mouseobj instead */ if ( obj && obj != special ) special = fli_int.mouseobj; if ( form->focusobj ) { FL_OBJECT *focusobj = form->focusobj; /* Handle special keys first */ if ( key > 255 ) { if ( IsLeft( key ) || IsRight( key ) || IsHome( key ) || IsEnd( key ) ) fli_handle_object( focusobj, FL_KEYPRESS, x, y, key, xev, 1 ); else if ( ( IsUp( key ) || IsDown( key ) || IsPageUp( key ) || IsPageDown( key ) ) && focusobj->wantkey & FL_KEY_TAB ) fli_handle_object( focusobj, FL_KEYPRESS, x, y, key, xev, 1 ); else if ( special && special->wantkey & FL_KEY_SPECIAL ) { /* Moving the cursor in input field that does not have focus looks weird */ if ( special->objclass != FL_INPUT ) fli_handle_object( special, FL_KEYPRESS, x, y, key, xev, 1 ); } else if ( key == XK_BackSpace || key == XK_Delete ) fli_handle_object( focusobj, FL_KEYPRESS, x, y, key, xev, 1 ); return; } /* The and keys move the focus to the next or previous input object (depending on being pressed also, and for only if the current focus object hasn't set FL_KEY_TAB as it's the case for multiline input objects) */ if ( key == '\t' || ( key == '\r' && ! ( focusobj->wantkey & FL_KEY_TAB ) ) ) { fli_handle_object( focusobj, FL_UNFOCUS, x, y, 0, xev, 1 ); if ( ( ( XKeyEvent * ) xev )->state & fli_context->navigate_mask ) { if ( ! ( obj = fli_find_object_backwards( focusobj->prev, FLI_FIND_INPUT, 0, 0 ) ) ) obj = fli_find_last( form, FLI_FIND_INPUT, 0, 0 ); } else /* search forward */ { if ( ! ( obj = fli_find_object( focusobj->next, FLI_FIND_INPUT, 0, 0 ) ) ) obj = fli_find_first( form, FLI_FIND_INPUT, 0, 0 ); } fli_handle_object( obj, FL_FOCUS, x, y, 0, xev, 1 ); } else if ( focusobj->wantkey != FL_KEY_SPECIAL ) fli_handle_object( focusobj, FL_KEYPRESS, x, y, key, xev, 1 ); return; } /* Keyboard input is not wanted */ if ( ! special || special->wantkey == 0 ) return; /* Space is an exception for browser */ if ( ( key > 255 || key == ' ' ) && special->wantkey & FL_KEY_SPECIAL ) fli_handle_object( special, FL_KEYPRESS, x, y, key, xev, 1 ); else if ( key < 255 && special->wantkey & FL_KEY_NORMAL ) fli_handle_object( special, FL_KEYPRESS, x, y, key, xev, 1 ); else if ( special->wantkey == FL_KEY_ALL ) fli_handle_object( special, FL_KEYPRESS, x, y, key, xev, 1 ); #if FL_DEBUG >= ML_INFO1 M_info( "handle_keyboard", "(%d %d) pushing %d to %s\n", x, y, key, special->label ); #endif } /*************************************** * Updates a form according to an event ***************************************/ void fli_handle_form( FL_FORM * form, int event, int key, XEvent * xev ) { FL_OBJECT *obj = NULL; FL_Coord x, y; if ( ! form || form->visible != FL_VISIBLE ) return; if ( form->deactivated && event != FL_DRAW ) return; if ( form->parent_obj && ! form->parent_obj->active && event != FL_DRAW ) return; if ( event != FL_STEP ) fli_set_form_window( form ); if ( fli_int.query_age > 0 && fli_int.mouseform ) { fl_get_form_mouse( fli_int.mouseform, &fli_int.mousex, &fli_int.mousey, &fli_int.keymask ); if ( event != FL_KEYPRESS ) key = xmask2button( fli_int.keymask ); fli_int.query_age = 0; } x = fli_int.mousex; y = fli_int.mousey; /* Except for step and draw events search for the object the event is for */ if ( event != FL_STEP && event != FL_DRAW ) obj = fli_find_last( form, FLI_FIND_MOUSE, x, y ); switch ( event ) { case FL_DRAW: /* form must be redrawn */ fli_redraw_form_using_xevent( form, key, xev ); break; case FL_ENTER: /* mouse did enter the form */ fli_int.mouseobj = obj; fli_handle_object( fli_int.mouseobj, FL_ENTER, x, y, 0, xev, 1 ); break; case FL_LEAVE: /* mouse left the form */ fli_handle_object( fli_int.mouseobj, FL_LEAVE, x, y, 0, xev, 1 ); if ( fli_int.pushobj == fli_int.mouseobj ) fli_int.pushobj = NULL; fli_int.mouseobj = NULL; break; case FL_PUSH: /* mouse button was pushed inside the form */ /* Change focus: If an input object has the focus make it lose it (and thus report changes) and then set the focus to either the object that got pushed (if it's an input object) or back to the original one. Then we have to recheck that the object the FL_PUSH was for is still active - it may have become deactivated due to the handler for the object that became unfocused! */ if ( obj && form->focusobj && form->focusobj != obj && ( obj->input || end_event_for_input ) ) { FL_OBJECT *old_focusobj = form->focusobj; fli_handle_object( form->focusobj, FL_UNFOCUS, x, y, key, xev, 1 ); if ( ! obj->input || ! obj->active ) fli_handle_object( old_focusobj, FL_FOCUS, x, y, key, xev, 1 ); } if ( obj && obj->input && obj->active ) fli_handle_object( obj, FL_FOCUS, x, y, key, xev, 1 ); if ( form->focusobj ) fli_int.keyform = form; if ( ! obj || ! obj->active ) break; /* Radio button only get handled on button release, other objects get the button press unless focus is overriden */ if ( ! obj->radio && ( ! obj->input || ( obj->input && obj->active && obj->focus ) ) ) { fli_handle_object( obj, FL_PUSH, x, y, key, xev, 1 ); fli_int.pushobj = obj; } else if ( obj->radio ) fli_do_radio_push( obj, x, y, key, xev ); break; case FL_RELEASE: /* mouse button was released inside the form */ if ( fli_int.pushobj ) { obj = fli_int.pushobj; fli_int.pushobj = NULL; fli_handle_object( obj, FL_RELEASE, x, y, key, xev, 1 ); } break; case FL_MOTION: /* mouse position changed in the form */ /* "Pushable" objects always get FL_MOTION events. Since there's no direct EnterNotify or LeaveNotify event for objects we "fake" them when an object gets entered or left. */ if ( fli_int.pushobj != NULL ) fli_handle_object( fli_int.pushobj, FL_MOTION, x, y, key, xev, 1 ); else if ( obj != fli_int.mouseobj ) { fli_handle_object( fli_int.mouseobj, FL_LEAVE, x, y, 0, xev, 1 ); fli_handle_object( fli_int.mouseobj = obj, FL_ENTER, x, y, 0, xev, 1 ); } /* Objects can declare that they want FL_MOTION events even though they're not "pushable" objects e.g. because they have some internal structure that depends on the mouse position (e.g. choice and counter objects). */ if ( obj != fli_int.pushobj && obj && obj->want_motion ) fli_handle_object( obj, FL_MOTION, x, y, key, xev, 1 ); break; case FL_KEYPRESS: /* key was pressed */ handle_keyboard( form, key, x, y, xev ); break; case FL_STEP: /* simple step */ obj = fli_find_first( form, FLI_FIND_AUTOMATIC, 0, 0 ); if ( obj ) fli_set_form_window( form ); /* set only if required */ while ( obj ) { fli_handle_object( obj, FL_STEP, x, y, 0, xev, 1 ); obj = fli_find_object( obj->next, FLI_FIND_AUTOMATIC, 0, 0 ); } break; case FL_UPDATE: /* "Pushable" objects may request an FL_UPDATE event by an artificial (but not very precise) timer.*/ if ( fli_int.pushobj && fli_int.pushobj->want_update ) fli_handle_object( fli_int.pushobj, FL_UPDATE, x, y, key, xev, 1 ); break; case FL_MOVEORIGIN: case FL_OTHER: /* Need to dispatch it through all objects and monitor the status of forms as it may get closed */ for ( obj = form->first; obj && form->visible == FL_VISIBLE; obj = obj->next ) if ( obj->visible ) fli_handle_object( obj, event, x, y, key, xev, 0 ); break; } } /*************************************** * Formevent is either FL_KEYPRESS or FL_KEYRELEASE ***************************************/ static void do_keyboard( XEvent * xev, int formevent ) { Window win = xev->xkey.window; KeySym keysym = 0; unsigned char keybuf[ 227 ]; int kbuflen; fli_int.mousex = xev->xkey.x; fli_int.mousey = xev->xkey.y; fli_int.keymask = xev->xkey.state; fli_int.query_age = 0; /* Before doing anything save the current modifier key for the handlers */ if ( win && ( ! fli_int.keyform || fli_get_visible_forms_index( fli_int.keyform ) < 0 ) ) fli_int.keyform = fl_win_to_form( win ); /* Switch keyboard input only if different top-level form */ if ( fli_int.keyform && fli_int.keyform->window != win ) { M_warn( "do_keyboard", "pointer/keybd focus differ" ); if ( fli_int.keyform->child && fli_int.keyform->child->window != win && fli_int.keyform->parent && fli_int.keyform->parent->window != win ) fli_int.keyform = fl_win_to_form( win ); } if ( ! fli_int.keyform ) return; kbuflen = fli_XLookupString( ( XKeyEvent * ) xev, ( char * ) keybuf, sizeof keybuf, &keysym ); if ( kbuflen < 0 ) { if ( kbuflen != INT_MIN ) M_err( "do_keyboard", "keyboad buffer overflow?" ); else M_err( "do_keyboard", "fli_XLookupString failed?" ); return; } /* Ignore modifier keys as they don't cause action and are taken care of by the lookupstring routine */ if ( IsModifierKey( keysym ) ) /* empty */ ; else if ( IsTab( keysym ) ) { /* Fake a tab key, some systems shift+tab do not generate a tab */ fli_handle_form( fli_int.keyform, formevent, '\t', xev ); } else if ( IsCursorKey( keysym ) || kbuflen == 0 ) fli_handle_form( fli_int.keyform, formevent, keysym, xev ); else { unsigned char *ch; /* All regular keys, including mapped strings */ for ( ch = keybuf; ch < keybuf + kbuflen && fli_int.keyform; ch++ ) fli_handle_form( fli_int.keyform, formevent, *ch, xev ); } } /*************************************** * ClientMessage is intercepted if it's WM_DELETE_WINDOW ***************************************/ static void handle_ClientMessage_event( FL_FORM * form, void * xev ) { XClientMessageEvent *xcm = xev; static Atom atom_protocol; static Atom atom_del_win = None; if ( ! atom_del_win ) { atom_protocol = XInternAtom( xcm->display, "WM_PROTOCOLS", 0 ); atom_del_win = XInternAtom( xcm->display, "WM_DELETE_WINDOW", 0 ); } /* If delete top-level window, quit unless handlers are installed */ if ( xcm->message_type == atom_protocol && ( Atom ) xcm->data.l[ 0 ] == atom_del_win ) { if ( form->close_callback ) { if ( form->close_callback( form, form->close_data ) != FL_IGNORE && form->visible == FL_VISIBLE ) fl_hide_form( form ); if ( form->sort_of_modal ) fl_activate_all_forms( ); } else if ( fli_context->atclose ) { if ( fli_context->atclose( form, fli_context->close_data ) != FL_IGNORE ) exit( 1 ); } else exit( 1 ); } else /* pump it through current form */ fli_handle_form( form, FL_OTHER, 0, xev ); } static int preemptive_consumed( FL_FORM *, int, XEvent * ); /*************************************** * Given an X event check for which of our forms it is ***************************************/ FL_FORM * fli_find_event_form( XEvent * xev ) { return fl_win_to_form( ( ( XAnyEvent * ) xev )->window ); } /*************************************** ***************************************/ const XEvent * fl_last_event( void ) { return &st_xev; } static int ignored_fake_configure; /*************************************** ***************************************/ static int button_is_really_down( void ) { FL_Coord x, y; unsigned int km; fl_get_mouse( &x, &y, &km ); return button_down( km ); } /*************************************** * Handle all events in the queue and flush output buffer ***************************************/ void fli_treat_interaction_events( int wait_io ) { XEvent xev; /* If no event is present output buffer will be flushed. If event exists XNextEvent in do_interaction() will flush the output buffer */ do do_interaction_step( wait_io ); while ( form_event_queued( &xev, QueuedAfterFlush ) ); } /*************************************** ***************************************/ static void do_interaction_step( int wait_io ) { FL_FORM *evform = NULL; static FL_FORM *redraw_form = NULL; if ( ! get_next_event_or_idle( wait_io, &evform, &st_xev ) ) return; /* Got an event for one of the forms */ #if FL_DEBUG >= ML_WARN if ( st_xev.type != MotionNotify || fli_cntl.debug > 2 ) fli_xevent_name( "MainLoop", &st_xev ); #endif fli_compress_event( &st_xev, evform->compress_mask ); fli_int.query_age++; /* Run user raw callbacks for events, we're done if we get told that we're not supposed to do anything else with the event */ if ( preemptive_consumed( evform, st_xev.type, &st_xev ) ) return; /* Otherwise we need to handle the event ourself... */ switch ( st_xev.type ) { case MappingNotify: XRefreshKeyboardMapping( ( XMappingEvent * ) &st_xev ); break; case FocusIn: if ( evform->focusobj ) fli_int.keyform = evform; if ( fli_context->xic ) XSetICValues( fli_context->xic, XNFocusWindow, st_xev.xfocus.window, XNClientWindow, st_xev.xfocus.window, ( char * ) NULL ); break; case FocusOut: fli_int.keyform = NULL; break; case KeyPress: do_keyboard( &st_xev, FL_KEYPRESS ); break; case KeyRelease: do_keyboard( &st_xev, FL_KEYRELEASE ); break; case EnterNotify: handle_EnterNotify_event( evform ); break; case LeaveNotify: handle_LeaveNotify_event( ); break; case MotionNotify: handle_MotionNotify_event( evform ); break; case ButtonPress: fli_int.mousex = st_xev.xbutton.x; fli_int.mousey = st_xev.xbutton.y; fli_int.keymask = st_xev.xbutton.state | ( Button1Mask << ( st_xev.xbutton.button - 1 ) ); fli_int.query_age = 0; fli_context->mouse_button = st_xev.xbutton.button; if ( metakey_down( fli_int.keymask ) && st_xev.xbutton.button == 2 ) fli_print_version( 1 ); else fli_handle_form( fli_int.mouseform, FL_PUSH, st_xev.xbutton.button, &st_xev ); break; case ButtonRelease: fli_int.mousex = st_xev.xbutton.x; fli_int.mousey = st_xev.xbutton.y; fli_int.keymask = st_xev.xbutton.state & ~ ( Button1Mask << ( st_xev.xbutton.button - 1 ) ); fli_int.query_age = 0; fli_context->mouse_button = st_xev.xbutton.button; if ( fli_int.mouseform ) fli_handle_form( fli_int.mouseform, FL_RELEASE, st_xev.xbutton.button, &st_xev ); fli_int.mouseform = evform; break; case Expose: handle_Expose_event( evform, &redraw_form ); break; case ConfigureNotify: handle_ConfigureNotify_event( evform, &redraw_form ); break; case ClientMessage: handle_ClientMessage_event( evform, &st_xev ); break; case DestroyNotify: /* only sub-form gets this due to parent destroy */ fl_hide_form( evform ); break; case SelectionClear: case SelectionRequest: case SelectionNotify: if ( ! fli_handle_clipboard || fli_handle_clipboard( &st_xev ) < 0 ) fli_handle_form( evform, FL_OTHER, 0, &st_xev ); break; default: fli_handle_form( evform, FL_OTHER, 0, &st_xev ); break; } } /*************************************** ***************************************/ void fli_handle_idling( XEvent * xev, long msec, int do_idle_cb ) { int i; /* Sleep a bit while keeping a lookout for async IO events */ fli_watch_io( fli_context->io_rec, msec ); /* Deal with signals */ if ( fli_handle_signal ) fli_handle_signal( ); /* Make sure we have an up-to-date set of data for the mouse position and the state of the keyboard and mouse buttons */ if ( fli_int.query_age > 0 && fli_int.mouseform ) { fl_get_form_mouse( fli_int.mouseform, &fli_int.mousex, &fli_int.mousey, &fli_int.keymask ); fli_int.query_age = 0; xev->xmotion.time = CurrentTime; } else xev->xmotion.time += msec; /* FL_UPDATE and automatic handlers as well as idle callbacks can expect a synthetic MotionNotify event, make it up, then call the handler */ xev->type = MotionNotify; xev->xany.window = fli_int.mouseform ? fli_int.mouseform->window : None; xev->xany.send_event = 1; xev->xmotion.state = fli_int.keymask; xev->xmotion.x = fli_int.mousex; xev->xmotion.y = fli_int.mousey; xev->xmotion.is_hint = 0; /* We need to send an FL_UPDATE while a mouse button is down to "pushable" objects that want it (currently touch button, slider, choice, textbox and counter objects) */ if ( button_down( fli_int.keymask ) && fli_int.pushobj && fli_int.pushobj->want_update && fli_int.mouseform ) fli_handle_form( fli_int.mouseform, FL_UPDATE, xmask2button( fli_int.keymask ), xev ); /* Handle automatic tasks */ if ( fli_int.auto_count ) for ( i = 0; i < fli_int.formnumb; i++ ) if ( fli_int.forms[ i ]->num_auto_objects ) fli_handle_form( fli_int.forms[ i ], FL_STEP, 0, xev ); /* If asked to also execute user idle callbacks */ if ( do_idle_cb && fli_context->idle_rec && fli_context->idle_rec->callback ) fli_context->idle_rec->callback( xev, fli_context->idle_rec->data ); } /*************************************** ***************************************/ static int get_next_event_or_idle( int wait_io, FL_FORM ** form, XEvent * xev ) { static unsigned int cnt = 0; long msec; /* Timeouts should be as precise as possible, so check them each time round. Since they may dictate how long we're going to wait if there is no event determine how how much time we will have to wait now */ if ( ! wait_io ) msec = SHORT_PAUSE; else if ( fli_int.auto_count || fli_int.pushobj || fli_context->idle_rec ) msec = delta_msec; else msec = FL_min( delta_msec * 3, 300 ); if ( fli_context->timeout_rec ) fli_handle_timeouts( &msec ); /* Skip checking for an X event after 10 events, thus giving X events a 10:1 priority over async IO, UPDATE events, automatic handlers and idle callbacks etc. */ if ( ++cnt % 11 && XEventsQueued( flx->display, QueuedAfterFlush ) ) { XNextEvent( flx->display, xev ); /* Find the form the event is for - if it's for none of "our" forms it must be for e.g. a canvas window and must be put on the internal event queue */ if ( ( *form = fli_find_event_form( xev ) ) != NULL ) return 1; /* Please note: we do event compression before the user ever sees the events. This is a bit questionable at least for mouse movements since a user may want to get all events (e.g. because s/he wants to draw something exactly following the mouse movements). If this is removed then care must be taken that in the mask for MotionNotify PointerMotionHintMask is *not* set (see the fli_xevent_to_mask() function in appwin.c) since that keeps most motion events from coming through! */ fli_compress_event( xev, ExposureMask | PointerMotionMask | ButtonMotionMask ); fl_XPutBackEvent( xev ); return 0; } cnt = 0; fli_handle_idling( &st_xev, msec, 1 ); return 0; } /*************************************** * Handling of EnterNotiy events ***************************************/ static void handle_EnterNotify_event( FL_FORM * evform ) { Window win = st_xev.xany.window; fli_int.mousex = st_xev.xcrossing.x; fli_int.mousey = st_xev.xcrossing.y; fli_int.keymask = st_xev.xcrossing.state; fli_int.query_age = 0; if ( button_down( fli_int.keymask ) && st_xev.xcrossing.mode != NotifyUngrab ) return; if ( fli_int.mouseform ) fli_handle_form( fli_int.mouseform, FL_LEAVE, xmask2button( fli_int.keymask ), &st_xev ); if ( evform ) { fli_int.mouseform = evform; /* This is necessary because the window might be un-managed. To be friendly to other applications, grab focus only if absolutely necessary */ if ( ! fli_int.mouseform->deactivated && ! st_xev.xcrossing.focus && fli_int.unmanaged_count > 0 ) { fli_check_key_focus( "EnterNotify", win ); fl_winfocus( win ); } fli_handle_form( fli_int.mouseform, FL_ENTER, xmask2button( fli_int.keymask ), &st_xev ); } #if FL_DEBUG >= ML_DEBUG else M_err( "handle_EnterNotify_event", "Null form" ); #endif } /*************************************** * Handling of LeaveNotiy events ***************************************/ static void handle_LeaveNotify_event( void ) { fli_int.mousex = st_xev.xcrossing.x; fli_int.mousey = st_xev.xcrossing.y; fli_int.keymask = st_xev.xcrossing.state; fli_int.query_age = 0; if ( button_down( fli_int.keymask ) && st_xev.xcrossing.mode == NotifyNormal ) return; /* olvwm sends LeaveNotify with NotifyGrab whenever button is clicked, ignore it. Due to Xpopup grab, (maybe Wm bug?), end grab can also generate this event. We can tell these two situations by doing a real button_down test (as opposed to relying on the keymask in event) */ if ( st_xev.xcrossing.mode == NotifyGrab && button_is_really_down( ) ) return; if ( ! fli_int.mouseform ) return; fli_handle_form( fli_int.mouseform, FL_LEAVE, xmask2button( fli_int.keymask ), &st_xev ); } /*************************************** * Handling of MotionNotify events ***************************************/ static void handle_MotionNotify_event( FL_FORM * evform ) { Window win = st_xev.xany.window; fli_int.keymask = st_xev.xmotion.state; fli_int.mousex = st_xev.xmotion.x; fli_int.mousey = st_xev.xmotion.y; fli_int.query_age = 0; if ( ! fli_int.mouseform ) { M_warn( "handle_MotionNotify_event", "event win = %ld", win ); return; } if ( fli_int.mouseform->window != win ) { M_warn( "handle_MotionNotify_event", "mousewin = %ld event win = %ld", fli_int.mouseform->window, win ); fli_int.mousex += evform->x - fli_int.mouseform->x; fli_int.mousey += evform->y - fli_int.mouseform->y; } fli_handle_form( fli_int.mouseform, FL_MOTION, xmask2button( fli_int.keymask ), &st_xev ); } /*************************************** * Handling of Expose events ***************************************/ static void handle_Expose_event( FL_FORM * evform, FL_FORM ** redraw_form ) { if ( ! evform ) return; /* If 'redraw_form' is the same as 'evform' we actually got a ConfigureNotify before that isn't handled yet and the data for the Exposure event must be modified - set clipping to the complete area of the form since we got to redraw it completely. */ if ( *redraw_form == evform ) { st_xev.xexpose.x = 0; st_xev.xexpose.y = 0; st_xev.xexpose.width = evform->w; st_xev.xexpose.height = evform->h; *redraw_form = NULL; } else { if ( st_xev.xexpose.x + st_xev.xexpose.width > evform->w ) st_xev.xexpose.width = evform->w - st_xev.xexpose.x; if ( st_xev.xexpose.y + st_xev.xexpose.height > evform->h ) st_xev.xexpose.height = evform->h - st_xev.xexpose.y; } fli_set_perm_clipping( st_xev.xexpose.x, st_xev.xexpose.y, st_xev.xexpose.width, st_xev.xexpose.height ); fl_set_clipping( st_xev.xexpose.x, st_xev.xexpose.y, st_xev.xexpose.width, st_xev.xexpose.height ); /* Run into trouble by ignoring configure notify */ if ( ignored_fake_configure ) { FL_Coord neww, newh; M_warn( "handle_Expose_event", "Run into trouble - correcting it" ); fl_get_winsize( evform->window, &neww, &newh ); fli_scale_form( evform, ( double ) neww / evform->w, ( double ) newh / evform->h ); ignored_fake_configure = 0; } fli_handle_form( evform, FL_DRAW, 0, &st_xev ); fli_unset_perm_clipping( ); fl_unset_clipping( ); fl_unset_text_clipping( ); } /*************************************** * Handling of ConfigureNotify events ***************************************/ static void handle_ConfigureNotify_event( FL_FORM * evform, FL_FORM ** redraw_form ) { Window win = st_xev.xany.window; int old_w = evform->w; int old_h = evform->h; if ( ! evform ) return; if ( ! st_xev.xconfigure.send_event ) fl_get_winorigin( win, &evform->x, &evform->y ); else { evform->x = st_xev.xconfigure.x; evform->y = st_xev.xconfigure.y; M_warn( "handle_ConfigureNotify_event", "WMConfigure:x = %d y = %d" "w = %d h = %d", evform->x, evform->y, st_xev.xconfigure.width, st_xev.xconfigure.height ); } /* mwm sends bogus ConfigureNotify randomly without following up with a redraw event, but it does set send_event. The check is somewhat dangerous, use 'ignored_fake_configure' to make sure when we got expose we can respond correctly. The correct fix is always to get window geometry in Expose handler, but that has a two-way traffic overhead */ ignored_fake_configure = st_xev.xconfigure.send_event && ( st_xev.xconfigure.width != evform->w || st_xev.xconfigure.height != evform->h ); /* Dragging a form across the screen changes its absolute x, y coords. Objects that themselves contain forms should ensure that they are up to date. */ fli_handle_form( evform, FL_MOVEORIGIN, 0, &st_xev ); if ( st_xev.xconfigure.send_event ) return; /* Can't just set form->{w,h}. Need to take care of obj gravity */ fli_scale_form( evform, ( double ) st_xev.xconfigure.width / evform->w, ( double ) st_xev.xconfigure.height / evform->h ); /* If both the width and the height got smaller (or one got smaller and the other one remained unchanged) we're not going to get an Expose event, so we need to redraw the form. If only one of the lengths got smaller or remained unchanged while the other got larger the next (compressed) Expose event will only cover the added part. In this case store the forms address so on the next Expose event we receive for it its full area will be redrawn. */ if ( evform->w <= old_w && evform->h <= old_h ) fl_redraw_form( evform ); else if ( ! ( evform->w > old_w && evform->h > old_h ) ) *redraw_form = evform; } /*************************************** * Checks all forms. Does not wait. ***************************************/ FL_OBJECT * fl_check_forms( void ) { FL_OBJECT *obj; if ( ( obj = fli_object_qread( ) ) == NULL ) { fli_treat_interaction_events( 0 ); fli_treat_user_events( ); obj = fli_object_qread( ); } return obj; } /*************************************** * Same as fl_check_forms() but never returns FL_EVENT. ***************************************/ FL_OBJECT * fl_check_only_forms( void ) { FL_OBJECT *obj; if ( ( obj = fli_object_qread( ) ) == NULL ) { fli_treat_interaction_events( 0 ); obj = fli_object_qread( ); } return obj; } /*************************************** * Checks all forms and keeps checking as long as nothing happens. ***************************************/ FL_OBJECT * fl_do_forms( void ) { FL_OBJECT *obj; while ( ! ( obj = fli_object_qread( ) ) ) { fli_treat_interaction_events( 1 ); fli_treat_user_events( ); } return obj; } /*************************************** * Same as fl_do_forms() but never returns FL_EVENT. ***************************************/ FL_OBJECT * fl_do_only_forms( void ) { FL_OBJECT *obj; while ( ! ( obj = fli_object_qread( ) ) ) fli_treat_interaction_events( 1 ); if ( obj == FL_EVENT ) M_warn( "fl_do_only_forms", "Shouldn't happen" ); return obj; } /*************************************** ***************************************/ static int form_event_queued( XEvent * xev, int mode ) { if ( XEventsQueued( flx->display, mode ) ) { XPeekEvent( flx->display, xev ); return fli_find_event_form( xev ) != NULL; } return 0; } /*************************************** ***************************************/ static int preemptive_consumed( FL_FORM * form, int type, XEvent * xev ) { if ( ! form || ! form->evmask || form->deactivated ) return 0; if ( ( form->evmask & FL_ALL_EVENT ) == FL_ALL_EVENT && form->all_callback ) return form->all_callback( form, xev ); switch ( type ) { case ButtonPress: if ( form->evmask & ButtonPressMask && form->push_callback ) return form->push_callback( form, xev ); break; case ButtonRelease: if ( form->evmask & ButtonReleaseMask && form->push_callback ) return form->push_callback( form, xev ); break; case KeyPress: if ( form->evmask & KeyPressMask && form->key_callback ) return form->key_callback( form, xev ); break; case KeyRelease: if ( form->evmask & KeyRelease && form->key_callback ) return form->key_callback( form, xev ); break; case EnterNotify: if ( form->evmask & EnterWindowMask && form->crossing_callback ) return form->crossing_callback( form, xev ); break; case LeaveNotify: if ( form->evmask & LeaveWindowMask && form->crossing_callback ) return form->crossing_callback( form, xev ); break; case MotionNotify: if ( form->evmask & ( ButtonMotionMask | PointerMotionMask ) && form->motion_callback ) return form->motion_callback( form, xev ); } return 0; } /*************************************** ***************************************/ long fl_mouse_button( void ) { return fli_context->mouse_button; } /*************************************** ***************************************/ FLI_TARGET * fli_internal_init( void ) { static FLI_TARGET *default_flx; if ( ! default_flx ) default_flx = fl_calloc( 1, sizeof *default_flx ); return flx = default_flx; } /*************************************** * fl_display is exposed to the outside world. Bad ***************************************/ void fli_switch_target( FLI_TARGET * newtarget ) { flx = newtarget; fl_display = flx->display; } /*************************************** ***************************************/ void fli_restore_target( void ) { fli_internal_init( ); fl_display = flx->display; } /*************************************** * Currently only a single idle callback is support ***************************************/ static void add_idle_callback( FL_APPEVENT_CB cb, void * data ) { if ( ! fli_context->idle_rec ) { fli_context->idle_rec = fl_malloc( sizeof *fli_context->io_rec ); fli_context->idle_rec->next = NULL; } fli_context->idle_rec->callback = cb; fli_context->idle_rec->data = data; } /*************************************** * Sets an idle callback ***************************************/ FL_APPEVENT_CB fl_set_idle_callback( FL_APPEVENT_CB callback, void * user_data ) { FL_APPEVENT_CB old = fli_context->idle_rec ? fli_context->idle_rec->callback : NULL; add_idle_callback( callback, user_data ); /* If we have idle callbacks, decrease the wait time */ delta_msec = FLI_TIMER_RES * ( callback ? 0.8 : 1.0 ); fli_context->idle_delta = delta_msec; return old; } /*************************************** ***************************************/ void fl_set_idle_delta( long delta ) { if ( delta < 0 ) delta = FLI_TIMER_RES; else if ( delta == 0 ) delta = FLI_TIMER_RES / 10; delta_msec = delta; fli_context->idle_delta = delta; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/button.c0000644000175000017500000004360311271045314014457 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file button.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * All Buttons. Additional button class can be added via * fl_add_button_class and fl_create_generic_button */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #define ISTABBOX( t ) ( t == FL_TOPTAB_UPBOX \ || t == FL_SELECTED_TOPTAB_UPBOX \ || t == FL_BOTTOMTAB_UPBOX \ || t == FL_SELECTED_BOTTOMTAB_UPBOX ) #define WITHIN( obj, mx, my ) ( ( mx ) >= ( obj )->x \ && ( mx ) < ( obj )->x + ( obj )->w \ && ( my ) >= ( obj )->y \ && ( my ) < ( obj )->y + ( obj )->h ) /*************************************** ***************************************/ static void free_pixmap( FL_BUTTON_STRUCT * sp ) { if ( sp->pixmap ) { XFreePixmap( flx->display, sp->pixmap ); sp->pixmap = None; } } /********** DRAWING *************/ /*************************************** * Draws a button object ***************************************/ void fli_draw_button( FL_OBJECT * obj ) { FL_Coord dh, dw, ww, absbw = FL_abs( obj->bw ); int off2 = 0; FL_BUTTON_STRUCT *sp = obj->spec; FL_COLOR col = sp->val ? obj->col2 : obj->col1; if ( obj->belowmouse && col == FL_BUTTON_COL1 ) col = FL_BUTTON_MCOL1; if ( obj->belowmouse && col == FL_BUTTON_COL2 ) col = FL_BUTTON_MCOL2; if ( FL_IS_UPBOX( obj->boxtype ) && ( sp->val || sp->is_pushed ) ) fl_drw_box( FL_TO_DOWNBOX( obj->boxtype ), obj->x, obj->y, obj->w, obj->h, col, obj->bw ); else fl_drw_box( obj->boxtype, obj->x, obj->y, obj->w, obj->h, col, obj->bw ); dh = FL_crnd( 0.6 * obj->h ); dw = FL_crnd( FL_min( 0.6 * obj->w, dh ) ); ww = FL_crnd( 0.75 * obj->h ); if ( ww < dw + absbw + 1 + ( obj->bw > 0 ) ) ww = dw + absbw + 1 + ( obj->bw > 0 ); if ( obj->type == FL_RETURN_BUTTON ) { fl_drw_text( 0, obj->x + obj->w - ww, FL_crnd( obj->y + 0.2 * obj->h ), dw, dh, obj->lcol, 0, 0, "@returnarrow" ); off2 = dw - 2; } if ( obj->type == FL_MENU_BUTTON && obj->boxtype == FL_UP_BOX ) { int dbh = FL_max( absbw - 1, 1 ); dw = FL_max( 0.11 * obj->w, 13 ); dh = FL_max( 6 + (obj->bw > 0 ), obj->h * 0.1 ); fl_drw_box( FL_UP_BOX, obj->x + obj->w - dw - absbw - 2, obj->y + ( obj->h - dh ) / 2, dw, dh, obj->col1, -dbh ); off2 = dw - 1; } if ( obj->type == FL_MENU_BUTTON || obj->type == FL_RETURN_BUTTON ) { obj->w -= off2; fl_draw_object_label( obj ); obj->w += off2; } else if ( obj->boxtype & FLI_BROKEN_BOX || ISTABBOX( obj->boxtype ) ) { fl_set_text_clipping( obj->x + 3, obj->y, obj->w - 6, obj->h ); fl_draw_object_label( obj ); fl_unset_text_clipping( ); } else fl_draw_object_label( obj ); } /*************************************** * All button classes differ only in the way they are drawn, so we * separate this info out from generic button handlers ***************************************/ #define MAX_BUTTON_CLASS 12 typedef struct { FL_DrawButton drawbutton; FL_CleanupButton cleanup; int bclass; /* button class */ } ButtonRec; static ButtonRec how_draw[ MAX_BUTTON_CLASS ]; /*************************************** * Look up a drawing function given a button class ID ***************************************/ static FL_DrawButton lookup_drawfunc( int bclass ) { ButtonRec *db = how_draw, *dbs = how_draw + MAX_BUTTON_CLASS; for ( ; db < dbs; db++ ) if ( db->bclass == bclass ) return db->drawbutton; return NULL; } /*************************************** ***************************************/ static FL_CleanupButton lookup_cleanupfunc( int bclass ) { ButtonRec *db = how_draw, *dbs = how_draw + MAX_BUTTON_CLASS; for ( ; db < dbs; db++ ) if ( db->bclass == bclass ) return db->cleanup; return NULL; } /*************************************** * Associates a button class with a drawing function ***************************************/ void fl_add_button_class( int bclass, FL_DrawButton drawit, FL_CleanupButton cleanup ) { static int initialized; ButtonRec *db = how_draw, *dbs = how_draw + MAX_BUTTON_CLASS, *first_avail; if ( ! initialized ) { for ( ; db < dbs; db++ ) db->bclass = -1; initialized = 1; } for ( db = how_draw, first_avail = NULL; db < dbs; db++ ) if ( db->bclass == bclass ) { db->drawbutton = drawit; db->cleanup = cleanup; return; } else if ( db->bclass < 0 && ! first_avail ) first_avail = db; /* If we get here, the class is not defined yet */ if ( first_avail ) { first_avail->bclass = bclass; first_avail->drawbutton = drawit; first_avail->cleanup = cleanup; } else M_err( "fl_add_button_class", "Exceeding limit: %d", MAX_BUTTON_CLASS ); } /*************************************** ***************************************/ static void wait_for_release( XKeyEvent * ev ) { KeySym ksm; if ( ( ksm = XLookupKeysym( ev, 0 ) ) == NoSymbol ) return; while ( fl_keysym_pressed( ksm ) ) { XSync( flx->display, 0 ); fl_msleep( 15 ); } } /*************************************** * Handles an event for a button object ***************************************/ static int handle_button( FL_OBJECT * obj, int event, FL_Coord mx, FL_Coord my, int key, void * ev ) { static int oldval; int newval; FL_BUTTON_STRUCT *sp = obj->spec; FL_DrawButton drawit; FL_CleanupButton cleanup; int ret = FL_RETURN_NONE; switch ( event ) { case FL_DRAW: if ( obj->type != FL_HIDDEN_BUTTON && obj->type != FL_HIDDEN_RET_BUTTON ) { if ( ( drawit = lookup_drawfunc( obj->objclass ) ) ) drawit( obj ); else M_err( "handle_button", "Unknown button class: %d", obj->objclass ); } sp->event = FL_DRAW; break; case FL_DRAWLABEL: sp->event = FL_DRAWLABEL; break; /* TODO. Missing labels */ case FL_LEAVE: /* FL_MENU_BUTTON objects never get a FL_RELEASE event, so we have to "fake" one */ if ( obj->type == FL_MENU_BUTTON ) { sp->event = FL_RELEASE; sp->is_pushed = 0; sp->val = 0; } /* fall through */ case FL_ENTER: /* Keep active radio buttons from reacting */ if ( obj->type == FL_RADIO_BUTTON && sp->val == 1 ) obj->belowmouse = 0; sp->event = event; fl_redraw_object( obj ); break; case FL_PUSH: if ( key < FL_MBUTTON1 || key > FL_MBUTTON5 || ! sp->react_to[ key - 1 ] ) break; sp->event = FL_PUSH; sp->is_pushed = 1; if ( obj->type == FL_RADIO_BUTTON ) { obj->belowmouse = 0; sp->val = 1; fl_redraw_object( obj ); return FL_RETURN_CHANGED | FL_RETURN_END; } oldval = sp->val; sp->val = ! sp->val; sp->mousebut = key; sp->timdel = 1; fl_redraw_object( obj ); if ( obj->type == FL_MENU_BUTTON ) ret |= FL_RETURN_END; if ( obj->type == FL_INOUT_BUTTON || obj->type == FL_MENU_BUTTON || obj->type == FL_TOUCH_BUTTON ) ret |= FL_RETURN_CHANGED; break; case FL_MOTION: if ( key < FL_MBUTTON1 || key > FL_MBUTTON5 || ! sp->react_to[ key - 1 ] ) break; if ( obj->type != FL_RADIO_BUTTON && obj->type != FL_INOUT_BUTTON && obj->type != FL_MENU_BUTTON ) { if ( WITHIN( obj, mx, my ) ) { obj->belowmouse = 1; newval = ! oldval; } else { obj->belowmouse = 0; newval = oldval; } if ( sp->val != newval ) { sp->val = newval; fl_redraw_object( obj ); } } break; case FL_RELEASE: if ( key < FL_MBUTTON1 || key > FL_MBUTTON5 || ! sp->react_to[ key - 1 ] ) break; sp->event = FL_RELEASE; sp->is_pushed = 0; if ( obj->type == FL_INOUT_BUTTON && ! WITHIN( obj, mx, my ) ) obj->belowmouse = 0; if ( obj->type == FL_PUSH_BUTTON ) { fl_redraw_object( obj ); if ( sp->val != oldval ) ret |= FL_RETURN_END | FL_RETURN_CHANGED; } else if ( sp->val == 0 && obj->type != FL_MENU_BUTTON ) fl_redraw_object( obj ); else { sp->val = 0; fl_redraw_object( obj ); if ( obj->type != FL_MENU_BUTTON && obj->type != FL_TOUCH_BUTTON ) ret |= FL_RETURN_END | FL_RETURN_CHANGED; if ( obj->type == FL_TOUCH_BUTTON ) ret |= FL_RETURN_END; } break; case FL_UPDATE: if ( key < FL_MBUTTON1 || key > FL_MBUTTON5 || ! sp->react_to[ key - 1 ] ) break; sp->event = FL_UPDATE; if ( sp->val && obj->type == FL_TOUCH_BUTTON && sp->timdel++ > 10 && ( sp->timdel & 1 ) == 0 ) ret |= FL_RETURN_CHANGED; else if ( obj->type != FL_RADIO_BUTTON && obj->type != FL_INOUT_BUTTON ) { if ( ! WITHIN( obj, mx, my ) ) newval = oldval; else newval = ! oldval; if ( sp->val != newval ) { sp->val = newval; fl_redraw_object( obj ); } } break; case FL_SHORTCUT: sp->event = FL_SHORTCUT; /* This is a horrible hack */ if ( obj->type == FL_PUSH_BUTTON || obj->type == FL_RADIO_BUTTON ) { sp->val = ! sp->val; obj->pushed = obj->type == FL_RADIO_BUTTON; fl_redraw_object( obj ); wait_for_release( ev ); } else if ( obj->type == FL_NORMAL_BUTTON || obj->type == FL_RETURN_BUTTON ) { int obl = obj->belowmouse; sp->val = obj->belowmouse = 1; fl_redraw_object( obj ); wait_for_release( ev ); sp->val = 0; obj->belowmouse = obl; fl_redraw_object( obj ); } sp->mousebut = FL_SHORTCUT + key; ret |= FL_RETURN_END | FL_RETURN_CHANGED; break; case FL_FREEMEM: if ( ( cleanup = lookup_cleanupfunc( obj->objclass ) ) ) cleanup( sp ); free_pixmap( sp ); fl_safe_free( obj->spec ); break; } return ret; } /*************************************** * Creates a (generic) button object ***************************************/ FL_OBJECT * fl_create_generic_button( int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FL_BUTTON_STRUCT *sp; int i; obj = fl_make_object( objclass, type, x, y, w, h, label, handle_button ); if ( type == FL_RADIO_BUTTON ) obj->radio = 1; if ( type == FL_RETURN_BUTTON || type == FL_HIDDEN_RET_BUTTON ) fl_set_object_shortcut( obj, "^M", 0 ); if ( type == FL_HIDDEN_BUTTON || type == FL_HIDDEN_RET_BUTTON ) obj->boxtype = FL_NO_BOX; if ( obj->type == FL_TOUCH_BUTTON ) { obj->want_update = 1; obj->how_return = FL_RETURN_CHANGED; } sp = obj->spec = fl_calloc( 1, sizeof *sp ); sp->event = FL_DRAW; sp->is_pushed = 0; sp->pixmap = sp->mask = sp->focus_pixmap = sp->focus_mask = None; sp->cspecv = NULL; sp-> filename = sp->focus_filename = NULL; /* Per default a button (unfortunately) reacts to all mouse buttons */ for ( i = 0; i < 5; i++ ) sp->react_to[ i ] = 1; if ( fli_cntl.buttonLabelSize ) obj->lsize = fli_cntl.buttonLabelSize; return obj; } /*************************************** * Sets the buttons state ***************************************/ void fl_set_button( FL_OBJECT * obj, int pushed ) { FL_BUTTON_STRUCT *sp = obj->spec; pushed = pushed ? 1 : 0; /* button can only be on or off */ if ( sp->val != pushed ) { if ( obj->type == FL_RADIO_BUTTON ) { if ( ! pushed ) return; fli_do_radio_push( obj, obj->x, obj->y, FL_MBUTTON1, NULL ); } sp->val = pushed; fl_redraw_object( obj ); } } /*************************************** * Returns the value of the button ***************************************/ int fl_get_button( FL_OBJECT * obj ) { return ( ( FL_BUTTON_STRUCT * ) obj->spec )->val; } /*************************************** * Returns the number of the last used mouse button. * fl_mouse_button will also return the mouse number ***************************************/ int fl_get_button_numb( FL_OBJECT * obj ) { return ( ( FL_BUTTON_STRUCT * ) obj->spec )->mousebut; } /*************************************** * Creates a button ***************************************/ FL_OBJECT * fl_create_button( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; fl_add_button_class( FL_BUTTON, fli_draw_button, 0 ); obj = fl_create_generic_button( FL_BUTTON, type, x, y, w, h, label ); obj->boxtype = FL_BUTTON_BOXTYPE; obj->col1 = FL_BUTTON_COL1; obj->col2 = FL_BUTTON_COL2; obj->align = FL_BUTTON_ALIGN | FL_ALIGN_INSIDE; obj->lcol = FL_BUTTON_LCOL; return obj; } /*************************************** * Adds a button to the current form ***************************************/ FL_OBJECT * fl_add_button( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label) { FL_OBJECT *obj = fl_create_button( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** * Function allows to set up to which mouse * buttons the button object will react. ***************************************/ void fl_set_button_mouse_buttons( FL_OBJECT * obj, unsigned int mouse_buttons ) { FL_BUTTON_STRUCT *sp = obj->spec; unsigned int i; for ( i = 0; i < 5; i++, mouse_buttons >>= 1 ) sp->react_to[ i ] = mouse_buttons & 1; } /*************************************** * Function returns a value via 'mouse_buttons', indicating * which mouse buttons the button object will react to. ***************************************/ void fl_get_button_mouse_buttons( FL_OBJECT * obj, unsigned int * mouse_buttons ) { FL_BUTTON_STRUCT *sp; int i; unsigned int k; if ( ! obj ) { M_err( "fl_get_button_mouse_buttons", "NULL object" ); return; } if ( ! mouse_buttons ) return; sp = obj->spec; *mouse_buttons = 0; for ( i = 0, k = 1; i < 5; i++, k <<= 1 ) *mouse_buttons |= sp->react_to[ i ] ? k : 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/child.c0000644000175000017500000002111111375320550014220 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file child.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Temporary hack to get composite (sort of) object support in */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ void fl_add_child( FL_OBJECT * parent, FL_OBJECT * child ) { FL_OBJECT *t; /* If the child is already linked to a form that is not the one of the parent unlink it from that form and then add it to the parents form (if the parent already belongs to one) */ if ( child->form && child->form != parent->form ) fl_delete_object( child ); if ( ! child->form && parent->form ) fl_add_object( parent->form, child ); /* Now set up the parent-child relationship */ child->parent = parent; /* Child gets same gravity and resize attributes as the parent */ child->nwgravity = parent->nwgravity; child->segravity = parent->segravity; child->resize = parent->resize; /* Append the new child to the linked list of objects that are children of the parent */ if ( parent->child == NULL ) parent->child = child; else { for ( t = parent->child; t->nc; t = t->nc ) /* empty */ ; t->nc = child; } /* If the child itself has children set their gravity and resizing behaviour to that of the parent */ if ( ! child->child ) { parent = child; for ( child = child->child; child; child = child->nc ) { fli_set_composite_gravity( child, parent->nwgravity, parent->segravity ); fli_set_composite_resize( child, parent->resize ); } } } /*************************************** * Adds all children of an object to its form ***************************************/ void fli_add_composite( FL_OBJECT * obj ) { FL_FORM *form = obj->form; FL_OBJECT *tmp; for ( tmp = obj->child; tmp; tmp = tmp->nc ) { tmp->parent = obj; fl_add_object( form, tmp ); } } /*************************************** * Inserts all children of a object before the object 'before' ***************************************/ void fli_insert_composite( FL_OBJECT * obj, FL_OBJECT * before ) { FL_OBJECT *tmp; for ( tmp = obj->child; tmp; tmp = tmp->nc ) { tmp->parent = obj; fli_insert_object( tmp, before ); } } /*************************************** * Unlinks all children of an object from its form ***************************************/ void fli_delete_composite( FL_OBJECT * obj ) { for ( obj = obj->child; obj; obj = obj->nc ) if ( obj->form ) fl_delete_object( obj ); } /*************************************** * Irrevocably deletes all children of an object ***************************************/ void fli_free_composite( FL_OBJECT * obj ) { FL_OBJECT *next, *parent = obj; for ( obj = obj->child; obj; obj = next ) { next = obj->nc; fl_free_object( obj ) ; } parent->child = NULL; } /*************************************** ***************************************/ void fli_show_composite( FL_OBJECT * obj ) { for ( obj = obj->child; obj; obj = obj->nc ) fli_show_object( obj ); } /*************************************** ***************************************/ void fli_hide_composite( FL_OBJECT * obj, Region * reg ) { for ( obj = obj->child; obj; obj = obj->nc ) { if ( obj->child ) fli_hide_composite( obj, reg ); fli_hide_and_get_region( obj, reg ); } } /*************************************** ***************************************/ void fli_activate_composite( FL_OBJECT * ob ) { for ( ob = ob->child; ob; ob = ob->nc ) { if ( ob->child ) fli_activate_composite( ob ); ob->active = 1; } } /*************************************** ***************************************/ void fli_deactivate_composite( FL_OBJECT * ob ) { for ( ob = ob->child; ob; ob = ob->nc ) { if ( ob->child ) fli_deactivate_composite( ob ); ob->active = 0; } } /*************************************** ***************************************/ void fli_set_composite_resize( FL_OBJECT * obj, unsigned int resize ) { for ( obj = obj->child; obj; obj = obj->nc ) { if ( obj->child ) fli_set_composite_resize( obj, resize ); obj->resize = resize; } } /*************************************** * Sets the gravity property for the children of an object * (and their children in turn) ***************************************/ void fli_set_composite_gravity( FL_OBJECT * obj, unsigned int nw, unsigned int se ) { for ( obj = obj->child; obj; obj = obj->nc ) { if ( obj->child ) fli_set_composite_gravity( obj, nw, se ); obj->nwgravity = nw; obj->segravity = se; } } /*************************************** ***************************************/ void fli_composite_has_been_resized( FL_OBJECT * obj ) { for ( obj = obj->child; obj; obj = obj->nc ) { if ( obj->child ) fli_composite_has_been_resized( obj ); fli_handle_object( obj, FL_RESIZED, 0, 0, 0, NULL, 0 ); } } /*************************************** * Inserts a composite object into a form after object 'after' ***************************************/ void fli_insert_composite_after( FL_OBJECT * obj, FL_OBJECT * after ) { FL_OBJECT *next, *tmp, *prev; FL_FORM *form; if ( ! obj || ! after ) { M_err( "fli_insert_composite_after", "Bad argument" ); return; } if ( ! ( form = after->form ) ) { M_err( "fli_insert_composite_after", "Null form" ); return; } obj->form = form; next = after->next; after->next = obj; obj->prev = after; obj->next = obj->child; obj->next->prev = obj; prev = obj; for ( tmp = obj->child; tmp->nc; prev = tmp, tmp = tmp->nc ) { tmp->parent = obj; tmp->form = form; tmp->next = tmp->nc; tmp->prev = prev; } tmp->next = next; tmp->prev = prev; tmp->form = form; if ( form->last == after ) form->last = tmp; } /*************************************** ***************************************/ FL_OBJECT * fl_get_object_component( FL_OBJECT * composite, int objclass, int type, int numb ) { FL_OBJECT *tmp; int n; for ( n = 0, tmp = composite->child; tmp; tmp = tmp->nc ) if ( tmp->objclass == objclass && ( tmp->type == type || type < 0 ) ) { if ( ++n >= numb ) return tmp; } M_err( "fl_get_object_component", "Requested object not found" ); return NULL; } /*************************************** * copy the parent attributes. gravity stuff is taken care of by * fl_add_child() ***************************************/ void fli_inherit_attributes( FL_OBJECT * parent, FL_OBJECT * child ) { child->bw = parent->bw; child->lcol = parent->lcol; child->col1 = parent->col1; child->lsize = parent->lsize; child->lstyle = parent->lstyle; if ( ! child->child ) return; parent = child; for ( child = child->child; child; child = child->nc ) fli_inherit_attributes( parent, child ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/flinternal.h0000644000175000017500000010075511376175716015331 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file flinternal.h * * This file is part of the XForms library package. * Copyright (c) 1996-1998 T.C. Zhao and Mark Overmars * All rights reserved. * * Internal routines used by the Forms Library. An application should * not use any of this since there is no guarantee that exactly some * thing will exist in future versions of XForms. */ #ifndef FLINTERNAL_H #define FLINTERNAL_H #include #include #include "local.h" #include "ulib.h" /* macros and constants */ /* FL_DEBUG controls some conditional compilations. Even if the code * is compiled in, it still needs -debug level on the command line * to activate the message output. FL_DEBUG less than ML_ERR probably * is not a good idea. Only when making real production executables * should FL_DEBUG be less than ML_ERR (say ML_ERR-1) * * ML_ERR -- print some error messages * ML_WARN -- print some error messages * ML_INFO1 -- some messages * ML_INFO2 -- more messages * ML_DEBUG -- debugging code compiled in * ML_TRACE -- can be unbearable */ #ifndef FL_DEBUG #define FL_DEBUG ML_WARN #endif /* Mask for all possible events */ #define AllEventsMask ( ( OwnerGrabButtonMask << 1 ) - 1 ) /* There are two ways to handle interaction. One is to process object * Q only if there are no more event pending. This can result in * an event entered into object Q more than once if the connection * is slow and clicking is rapid. If subsequently the object is * hidden or deleted/freed, problem occurs as the callback will * still be processed. To fix this, need to flush the object Q * when hiding/deleting objects. Also if an object is entered * multiple times, and its status changed each time, when the * Q is handled, we get wrong status. * * The other way to handle the interaction is to process object * Q as soon as the status of the object is changed. This is * the correct behavior. However, a change in status is typically * preceeded by a redraw (say mouse release on button), and due to * the X buffering mechnism, the redraw probably not get shown yet * when the callback is evoked. To fix this, an explicit flush * is needed. This can be time consuming. Also objects that do * not have callbacks may be handled out of order (after the one's * having callbacks). */ #if 1 #define DELAYED_ACTION #endif /* If we want to have gamma correction as a built-in feature. * Probably useless */ #define DO_GAMMA_CORRECTION /* XForms internal colormap */ typedef struct { const char * name; FL_COLOR index; unsigned short r; unsigned short g; unsigned short b; unsigned short a; int grayval; } FLI_IMAP; #define BadPixel FL_NoColor #define Clamp( v, vmin, vmax ) ( ( v ) < ( vmin ) ? \ ( vmin ) : ( ( v ) > ( vmax ) ? \ ( vmax ) :( v ) ) ) #define IsValidClass( o, c ) ( ( o ) && ( o )->objclass == ( c ) ) #define fl_safe_free( p ) \ do { if ( p ) { \ fl_free( p ); \ p = NULL; \ } \ } while( 0 ) #define fli_class( i ) fl_state[ i ].vclass #define fli_depth( i ) fl_state[ i ].depth #define fli_visual( i ) fl_state[ i ].xvinfo->visual #define fli_colormap( i ) fl_state[ i ].colormap #define fli_map( i ) fl_state[ i ].colormap #define fli_dithered( i ) fl_state[ i ].dithered enum { FLI_FIND_INPUT, FLI_FIND_AUTOMATIC, FLI_FIND_MOUSE, FLI_FIND_CANVAS, FLI_FIND_KEYSPECIAL, FLI_FIND_RETURN }; /* events.c or event related */ extern FL_OBJECT *fli_handled_obj; extern FL_OBJECT *fli_handled_parent; extern void fli_obj_queue_delete( void ); extern void fli_event_queue_delete( void ); extern void fli_object_qenter( FL_OBJECT * ); extern void fli_filter_returns( FL_OBJECT * ); extern FL_OBJECT * fli_object_qread( void ); extern void fli_object_qflush( FL_FORM * ); extern void fli_object_qflush_object( FL_OBJECT * ); extern FL_OBJECT *fli_object_qtest( void ); extern void fli_treat_user_events( void ); extern void fli_treat_interaction_events( int ); extern void fli_compress_event( XEvent *, unsigned long ); extern const char *fli_event_name( int ); extern XEvent * fli_xevent_name( const char *, const XEvent * ); extern void fli_handle_idling( XEvent * xev, long msec, int do_idle_cb ); /* Variables defined in handling.c */ extern FL_FORM * mouseform; /* the current form under mouse */ extern FL_FORM * keyform; /* keyboard focus form */ extern FL_OBJECT * fli_pushobj; extern FL_OBJECT * fli_mouseobj; extern FL_Coord fli_mousex, fli_mousey; extern unsigned int fli_keymask; extern unsigned int fli_query_age; /* Misc. utilitnes */ extern FL_FORM * fli_find_event_form( XEvent * ); extern void fli_print_version( int ); /* from forms.c and object.c */ extern void fli_scale_form( FL_FORM *, double, double ); extern void fli_handle_form( FL_FORM *, int, int, XEvent * ); extern FL_OBJECT *fli_end_group( void ); extern void fli_handle_object( FL_OBJECT *, int, FL_Coord, FL_Coord, int, XEvent *, int ); extern FL_OBJECT *fli_find_first( FL_FORM *, int, FL_Coord, FL_Coord ); extern void fli_redraw_form_using_xevent( FL_FORM *, int, XEvent * ); extern void fli_show_object( FL_OBJECT * ); extern void fli_recalc_intersections( FL_FORM * ); extern FL_OBJECT *fli_find_last( FL_FORM *, int, FL_Coord, FL_Coord ); extern FL_OBJECT *fli_find_object( FL_OBJECT *, int, FL_Coord, FL_Coord ); extern FL_OBJECT *fli_find_object_backwards( FL_OBJECT *, int, FL_Coord, FL_Coord ); extern void fli_insert_object( FL_OBJECT *, FL_OBJECT * ); extern void fli_set_object_visibility( FL_OBJECT * obj, int vis ); /* double buffering etc. */ extern void fli_free_flpixmap( FL_pixmap * ); extern void fli_create_object_pixmap( FL_OBJECT * ); extern void fli_show_object_pixmap( FL_OBJECT * ); extern void fli_create_form_pixmap( FL_FORM * ); extern void fli_show_form_pixmap( FL_FORM * ); /* windowing support */ extern void fli_default_xswa( void ); extern Window fli_cmap_winopen( Window, Colormap, const char * ); extern Window fli_create_window( Window, Colormap, const char * ); extern void fli_create_gc( Window ); enum { FLI_COMMAND_PROP = 1, FLI_PROP_SET = ( 1 << 10 ) /* really set */ }; extern void fli_set_winproperty( Window, unsigned int ); /* graphics related */ extern void fli_init_colormap( int ); extern void fli_free_colormap( int ); extern void fli_dump_state_info( int, const char * ); extern void fli_init_stipples( void ); extern void fli_draw_button( FL_OBJECT * ); /* for fdesign */ const char *fli_query_colorname( FL_COLOR ); extern long fli_query_namedcolor( const char *s ); void fli_free_xtext_workmem( void ); extern int fli_get_pos_in_string( int, int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, int, int, FL_Coord, FL_Coord, const char *, int *, int * ); extern int fli_drw_stringTAB( Window, GC, int, int, int, int, const char *, int, int ); extern int fli_drw_string( int, int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, int, FL_COLOR, FL_COLOR, FL_COLOR, int, int, int, int, int, const char *, int, int, int, FL_COLOR ); extern int fli_get_maxpixel_line( void ); extern int fli_get_string_widthTABfs( XFontStruct *, const char *, int ); extern void fli_init_font( void ); extern void fli_canonicalize_rect( FL_Coord *, FL_Coord *, FL_Coord *, FL_Coord * ); extern void fli_get_goodie_title( FL_FORM *, const char * ); extern void fli_add_q_icon( FL_Coord, FL_Coord, FL_Coord, FL_Coord ); extern void fli_add_warn_icon( FL_Coord, FL_Coord, FL_Coord, FL_Coord ); extern void fli_check_key_focus( const char *, Window ); extern void fli_free_cmdline_args( void ); extern XRectangle *fli_get_underline_rect( XFontStruct *, FL_Coord, FL_Coord, const char *, int ); /* Group some WM stuff into a structure for easy maintainance */ typedef struct { unsigned int pos_request; /* USPOSITION or PPOSITION */ } FLI_WM_STUFF; /* Routines in sldraw.c. */ typedef struct { FL_Coord x; FL_Coord y; FL_Coord w; FL_Coord h; } FLI_SCROLLBAR_KNOB; enum { FLI_SLIDER_NONE = 0, FLI_SLIDER_BOX = 1, FLI_SLIDER_KNOB = 2, FLI_SLIDER_ALL = 3 }; extern void fli_calc_slider_size( FL_OBJECT *, FLI_SCROLLBAR_KNOB * ); extern void fli_drw_slider( FL_OBJECT *, FL_COLOR, FL_COLOR, const char *, int ); extern void fli_set_perm_clipping( FL_Coord, FL_Coord, FL_Coord, FL_Coord ); extern void fli_unset_perm_clipping( void ); extern int fli_perm_clip; extern XRectangle fli_perm_xcr; /* Application windows */ typedef struct fli_win_ { struct fli_win_ * next; Window win; FL_APPEVENT_CB pre_emptive; /* always gets called first if set */ FL_APPEVENT_CB callback[ LASTEvent ]; void * pre_emptive_data; void * user_data[ LASTEvent ]; FL_APPEVENT_CB default_callback; unsigned long mask; } FLI_WIN; extern FLI_WIN * fl_app_win; extern void fli_set_form_window( FL_FORM * ); extern void fli_unmap_canvas_window( FL_OBJECT * ); extern FL_APPEVENT_CB fli_set_preemptive_callback( Window, FL_APPEVENT_CB, void * ); extern unsigned long fli_xevent_to_mask( int ); extern int fli_initialize_program_visual( void ); #define FLI_TIMER_RES 50 /* resolution of FL_STEP event */ /* currently only one idle procedure is permitted, so the next * field is of no much use */ typedef struct fli_idle_cb_ { struct fli_idle_cb_ * next; FL_APPEVENT_CB callback; void * data; } FLI_IDLE_REC; typedef struct fli_io_event_ { struct fli_io_event_ * next; FL_IO_CALLBACK callback; void * data; unsigned int mask; int source; } FLI_IO_REC; /* signals */ #if ! defined HAVE_SIGACTION typedef RETSIGTYPE ( * FLI_OSSIG_HANDLER )( int ); #endif typedef struct fli_signallist_ { struct fli_signallist_ * next; FL_SIGNAL_HANDLER callback; #if defined HAVE_SIGACTION struct sigaction old_sigact; #else FLI_OSSIG_HANDLER ocallback; /* default OS signal handler */ #endif void * data; int signum; int caught; } FLI_SIGNAL_REC; extern void fl_remove_all_signal_callbacks( void ); /* timeouts */ typedef struct fli_timeout_ { int id; struct fli_timeout_ * next; struct fli_timeout_ * prev; long start_sec, start_usec; long ms_to_wait; FL_TIMEOUT_CALLBACK callback; void * data; } FLI_TIMEOUT_REC; extern void fl_remove_all_timeouts( void ); /* * Intenal controls. */ typedef struct fli_context_ { FL_FORM_ATCLOSE atclose; /* what to do if WM_DELETE_WINDOW */ void * close_data; FLI_IDLE_REC * idle_rec; /* idle callback record */ FLI_IO_REC * io_rec; /* async IO record */ FLI_SIGNAL_REC * signal_rec; /* list of app signals */ FLI_TIMEOUT_REC * timeout_rec; /* timeout callbacks */ int idle_delta; /* timer resolution */ long mouse_button; /* push/release record */ int pup_id; /* current active pup id */ FL_FORM * modal; /* current modal form */ long max_request_size; /* max protocol size */ int num_io; int hscb, vscb; /* default scrollbar */ long ext_request_size; /* extended request size */ int tooltip_time; #ifdef XlibSpecificationRelease XIM xim; /* input method */ XIC xic; /* input context */ #else void * xim; void * xic; #endif unsigned int navigate_mask; /* input field */ long reserverd[ 6 ]; } FLI_CONTEXT; /* some X info that helps to make the windowing system independent * API work (fl_color() etc. */ typedef struct { Display * display; Window win; GC gc, textgc; GC miscgc; int isRGBColor; int isMBFont; /* multi-byte font */ unsigned long bktextcolor; int newpix; int fdesc; /* font descent */ int fasc; /* font ascent */ int fheight; /* font height */ Colormap colormap; XFontStruct * fs; unsigned long color; /* last color. cache */ unsigned long textcolor; /* last textcolor. cache */ unsigned long bkcolor; int screen; } FLI_TARGET; typedef struct { FL_FORM ** forms; /* all forms, visible and hidden */ int formnumb; /* number of visible forms */ int hidden_formnumb; /* number of hidden forms */ size_t auto_count; int unmanaged_count; FL_Coord mousex, /* last recorded mouse position */ mousey; unsigned int keymask; /* state of buttons and modifier keys */ unsigned int query_age; /* age of recorded information */ FL_FORM * mouseform; /* the current form under the mouse */ FL_FORM * keyform; /* keyboard focus form */ FL_OBJECT * pushobj; /* latest pushed object */ FL_OBJECT * mouseobj; /* object under the mouse */ } FLI_INTERNAL; extern FLI_INTERNAL fli_int; extern void fli_init_context( void ); #include "extern.h" extern void fli_watch_io( FLI_IO_REC *, long ); extern int fli_do_shortcut( FL_FORM *, int, FL_Coord, FL_Coord, XEvent * ); extern void fli_get_hv_align( int, int *, int *); extern void fli_get_outside_align( int, int, int, int, int, int *, int *, int * ); extern void fli_init_symbols( void ); extern void fli_release_symbols( void ); extern int fli_handle_event_callbacks( XEvent * ); /* Some macros to test how an object can be moved or resized, depending on its gravity settings (ULC = uppler left hand cornner, LRC = lower right hand corner) */ #define ULC_POS_LEFT_FIXED( obj ) \ ( ( obj )->nwgravity == FL_NorthWest \ || ( obj )->nwgravity == FL_West \ || ( obj )->nwgravity == FL_SouthWest ) #define ULC_POS_RIGHT_FIXED( obj ) \ ( ( obj )->nwgravity == FL_NorthEast \ || ( obj )->nwgravity == FL_East \ || ( obj )->nwgravity == FL_SouthEast ) #define LRC_POS_LEFT_FIXED( obj ) \ ( ( obj )->segravity == FL_NorthWest \ || ( obj )->segravity == FL_West \ || ( obj )->segravity == FL_SouthWest ) #define LRC_POS_RIGHT_FIXED( obj ) \ ( ( obj )->segravity == FL_NorthEast \ || ( obj )->segravity == FL_East \ || ( obj )->segravity == FL_SouthEast ) #define HAS_FIXED_HORI_ULC_POS( obj ) \ ( ULC_POS_LEFT_FIXED( obj ) || ULC_POS_RIGHT_FIXED( obj ) ) #define HAS_FIXED_HORI_LRC_POS( obj ) \ ( LRC_POS_LEFT_FIXED( obj ) || LRC_POS_RIGHT_FIXED( obj ) ) #define HAS_FIXED_WIDTH( obj ) \ ( HAS_FIXED_HORI_ULC_POS( obj ) && HAS_FIXED_HORI_LRC_POS( obj ) ) #define ULC_POS_TOP_FIXED( obj ) \ ( ( obj )->nwgravity == FL_NorthWest \ || ( obj )->nwgravity == FL_North \ || ( obj )->nwgravity == FL_NorthEast ) #define ULC_POS_BOTTOM_FIXED( obj ) \ ( ( obj )->nwgravity == FL_SouthWest \ || ( obj )->nwgravity == FL_South \ || ( obj )->nwgravity == FL_SouthEast ) #define LRC_POS_TOP_FIXED( obj ) \ ( ( obj )->segravity == FL_NorthWest \ || ( obj )->segravity == FL_North \ || ( obj )->segravity == FL_NorthEast ) #define LRC_POS_BOTTOM_FIXED( obj ) \ ( ( obj )->segravity == FL_SouthWest \ || ( obj )->segravity == FL_South \ || ( obj )->segravity == FL_SouthEast ) #define HAS_FIXED_VERT_ULC_POS( obj ) \ ( ULC_POS_TOP_FIXED( obj ) || ULC_POS_BOTTOM_FIXED( obj ) ) #define HAS_FIXED_VERT_LRC_POS( obj ) \ ( LRC_POS_TOP_FIXED( obj ) || LRC_POS_BOTTOM_FIXED( obj ) ) #define HAS_FIXED_HEIGHT( obj ) \ ( HAS_FIXED_VERT_ULC_POS( obj ) && HAS_FIXED_VERT_LRC_POS( obj ) ) #define XK_PageUp XK_Prior #define XK_PageDn XK_Next #define XK_PageUp XK_Prior #define XK_PageDn XK_Next /* some header has XK_XP_Left etc */ #if XlibSpecificationRelease >= 6 #define IsHome( k ) ( k == XK_Home || k == XK_Begin || k == XK_KP_Home ) #define IsLeft( k ) ( k == XK_Left || k == XK_KP_Left ) #define IsRight( k ) ( k == XK_Right || k == XK_KP_Right ) #define IsUp( k ) ( k == XK_Up || k == XK_KP_Up ) #define IsDown( k ) ( k == XK_Down || k == XK_KP_Down ) #define IsEnd( k ) ( k == XK_End || k == XK_KP_End ) #define IsPageDown( k ) ( k == XK_Next || k == XK_Page_Down || k == XK_KP_Page_Down ) #define IsPageUp( k ) ( k == XK_Prior || k == XK_Page_Up || k==XK_KP_Page_Up) #else #define IsHome( k ) ( k == XK_Home || k == XK_Begin ) #define IsLeft( k ) ( k == XK_Left ) #define IsRight( k ) ( k == XK_Right ) #define IsDown( k ) ( k == XK_Down ) #define IsUp( k ) ( k == XK_Up ) #define IsEnd( k ) ( k == XK_End ) #define IsPageDown( k ) ( k == XK_Next ) #define IsPageUp( k ) ( k == XK_Prior ) #endif #define FLI_HALFPAGE_UP 0x10000000 #define FLI_HALFPAGE_DOWN 0x20000000 #define FLI_NLINES_UP 0x30000000 #define FLI_NLINES_DOWN 0x40000000 #define FLI_1LINE_UP 0x50000000 #define FLI_1LINE_DOWN 0x60000000 #define IsHalfPageUp( k ) ( ( k ) == FLI_HALFPAGE_UP ) #define IsHalfPageDown( k ) ( ( k ) == FLI_HALFPAGE_DOWN ) #define IsNLinesUp( k ) ( ( k ) == FLI_NLINES_UP ) #define IsNLinesDown( k ) ( ( k ) == FLI_NLINES_DOWN ) #define Is1LineUp( k ) ( ( k ) == FLI_1LINE_UP ) #define Is1LineDown( k ) ( ( k ) == FLI_1LINE_DOWN ) void fli_hide_and_get_region( FL_OBJECT *, Region * ); extern int fli_convert_shortcut( const char *, long * ); extern int fli_get_underline_pos( const char *, const char * ); extern void fli_scale_length( FL_Coord *, FL_Coord *, double ); extern int fli_get_visible_forms_index( FL_FORM * ); extern void fli_recount_auto_objects( void ); extern int fli_get_tabpixels( XFontStruct * ); extern int fli_get_default_scrollbarsize( FL_OBJECT * ); extern void fli_set_app_name( const char *, const char * ); void fli_hide_composite( FL_OBJECT *, Region * ); extern void fli_show_composite( FL_OBJECT * ); extern void fli_deactivate_composite( FL_OBJECT * ); extern void fli_activate_composite( FL_OBJECT * ); extern void fli_delete_composite( FL_OBJECT * ob ); extern void fli_free_composite( FL_OBJECT * ob ); extern void fli_set_composite_gravity( FL_OBJECT *, unsigned int, unsigned int ); extern void fli_set_composite_resize( FL_OBJECT *, unsigned int ); extern void fli_composite_has_been_resized( FL_OBJECT * ); extern void fli_parse_goodies_label( FL_OBJECT *, const char * ); extern int fli_goodies_preemptive( FL_FORM *, void * ); extern void fli_get_goodies_font( int *, int * ); extern void fli_handle_goodie_font( FL_OBJECT *, FL_OBJECT * ); extern void fli_goodies_cleanup( void ); extern void fli_msg_cleanup( void ); extern void fli_alert_cleanup( void ); extern void fli_choice_cleanup( void ); extern void fli_question_cleanup( void ); extern void fli_input_cleanup( void ); extern void fli_sinput_cleanup( void ); extern void fli_handle_timeouts( long * ); #define FL_IS_NONSQRBOX( t ) ( t == FL_SHADOW_BOX \ || t == FL_NO_BOX \ || t == FL_RFLAT_BOX \ || t == FL_ROUNDED_BOX \ || t == FL_OVAL_BOX \ || t == FL_ROUNDED3D_UPBOX \ || t == FL_ROUNDED3D_DOWNBOX ) enum { FLI_TRIANGLE_UPBOX1, FLI_TRIANGLE_UPBOX2, FLI_TRIANGLE_UPBOX3, FLI_TRIANGLE_UPBOX4, FLI_TRIANGLE_UPBOX6, FLI_TRIANGLE_UPBOX7, FLI_TRIANGLE_UPBOX8, FLI_TRIANGLE_UPBOX9, FLI_TRIANGLE_DOWNBOX1, FLI_TRIANGLE_DOWNBOX2, FLI_TRIANGLE_DOWNBOX3, FLI_TRIANGLE_DOWNBOX4, FLI_TRIANGLE_DOWNBOX6, FLI_TRIANGLE_DOWNBOX7, FLI_TRIANGLE_DOWNBOX8, FLI_TRIANGLE_DOWNBOX9 }; extern void fli_set_additional_clipping( FL_Coord, FL_Coord, FL_Coord, FL_Coord ); extern FL_RECT *fli_union_rect( const FL_RECT *, const FL_RECT * ); extern void fli_xyplot_nice_label( float, int, float, char * ); extern void fli_xyplot_compute_data_bounds( FL_OBJECT *, int *, int *, int ); extern int fli_xyplot_interpolate( FL_OBJECT *, int, int, int ); extern void fli_insert_composite_after( FL_OBJECT *, FL_OBJECT * ); extern void fli_add_composite( FL_OBJECT * ); extern void fli_insert_composite( FL_OBJECT *, FL_OBJECT * ); extern int fli_is_watched_io( int ); extern const char *fli_object_class_name( FL_OBJECT * ); extern char *fli_print_to_string( const char * fmt, ... ); extern char *fli_read_line( FILE * fp ); extern char *fli_sstrcpy( char * dest, const char * src, size_t n ); extern void fli_set_form_icon_data( FL_FORM *, char ** ); extern char *fli_getcwd( char *, int ); extern void fli_get_clipping( FL_Coord *, FL_Coord *, FL_Coord *, FL_Coord * ); extern void fli_replacepup_text( int, int, const char * ); extern int fli_handle_mouse_wheel( int *, int *, void * ); extern int fli_valuator_handle_drag( FL_OBJECT *, double ); extern int fli_valuator_handle_release( FL_OBJECT *, double ); extern void *fli_init_valuator( FL_OBJECT * ); extern double fli_valuator_round_and_clamp( FL_OBJECT *, double ); extern double fli_clamp( double, double, double ); extern void fli_inherit_attributes( FL_OBJECT *, FL_OBJECT * ); extern int fli_boxtype2frametype( int ); extern void fli_xvisual2flstate( FL_State *, XVisualInfo * ); extern int fli_find_closest_color( int, int, int, XColor *, int, unsigned long * ); extern void fli_rgbmask_to_shifts( unsigned long, unsigned int *, unsigned int * ); extern void fli_show_tooltip( const char *, int, int ); extern void fli_hide_tooltip( void ); extern int fli_is_tooltip_form( FL_FORM * ); extern void fli_do_radio_push( FL_OBJECT *, FL_Coord, FL_Coord, int, void * ); extern long fli_getpid( void ); extern void fli_xlinestyle( Display *, GC, int ); #define FLI_BROKEN_BOX ( 1 << 10 ) extern FLI_TARGET *fli_internal_init( void ); extern void fli_switch_target( FLI_TARGET * ); extern void fli_restore_target( void ); extern void fli_draw_text_inside( int align, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *, int, int, FL_COLOR, FL_COLOR, int ); /* Misc. stuff */ extern void fli_add_vertex( FL_Coord x, FL_Coord y ); extern void fli_add_float_vertex( float x, float y ); extern void fli_reset_vertex( void ); extern void fli_endpolygon( void ); extern void fli_endclosedline( void ); extern void fli_endline( void ); extern const char * fli_get_xevent_name( const XEvent * ); extern void fli_set_input_navigate( unsigned int mask ); extern void fli_adjust_browser_scrollbar( FL_OBJECT * ); extern FL_POPUP *fli_popup_add( Window, const char *, const char * ); extern FL_POPUP_ENTRY *fli_popup_add_entries( FL_POPUP *, const char *, va_list, const char *, int ); extern FL_POPUP_ENTRY *fli_popup_insert_entries( FL_POPUP *, FL_POPUP_ENTRY *, const char *, va_list, const char *, int ); extern FL_POPUP_ENTRY *fli_popup_insert_items( FL_POPUP *, FL_POPUP_ENTRY *, FL_POPUP_ITEM *, const char * ); extern void fli_popup_init( void ); extern void fli_popup_finish( void ); extern int fli_check_popup_exists( FL_POPUP * ); extern int fli_check_popup_entry_exists( FL_POPUP_ENTRY * ); extern FL_POPUP_RETURN *fli_set_popup_return( FL_POPUP_ENTRY * ); extern void fli_popup_reset_counter( FL_POPUP * ); extern void fli_free_cursors( void ); extern void fli_free_fselectors( void ); /* Some utility stuff */ typedef struct { int val; const char * name; } FLI_VN_PAIR; extern int fli_get_vn_value( FLI_VN_PAIR * vn_pair, const char * name ); extern const char * fli_get_vn_name( FLI_VN_PAIR * vn_pair, int val ); #if XlibSpecificationRelease == 6 # define IsTab( ksym ) ( ksym == XK_ISO_Left_Tab || ksym== XK_Tab ) #else # define IsTab( ksym ) ( ksym == XK_Tab ) #endif #endif /* ! defined FL_INTERNAL_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/roundbut.c0000644000175000017500000000701111247055071015003 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file roundbut.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /*************************************** * Draws a round button ***************************************/ static void draw_roundbutton( FL_OBJECT * ob ) { int c1; FL_Coord xx, yy, rr; FL_BUTTON_STRUCT *sp = ob->spec; if ( ob->boxtype == FL_NO_BOX && ( sp->event == FL_ENTER || sp->event == FL_LEAVE ) ) return; c1 = ob->belowmouse ? FL_ROUNDBUTTON_MCOL : FL_ROUNDBUTTON_TOPCOL; fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, c1, ob->bw ); rr = 0.3 * FL_min( ob->w, ob->h ) + 0.5; xx = ob->x + rr + 4.1; yy = ob->y + 0.5 * ob->h; fl_circf( xx, yy, rr, ob->col1 ); fl_circ( xx, yy, rr, FL_BLACK ); if ( sp->val ) { fl_circf( xx, yy, ( int ) ( 0.8 * rr ), ob->col2 ); fl_circ( xx, yy, ( int ) ( 0.8 * rr ), FL_BLACK ); } if ( ob->align == FL_ALIGN_CENTER ) fl_drw_text( FL_ALIGN_LEFT, xx + rr + 1, ob->y, 0, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else fl_draw_object_label_outside( ob ); if ( ob->type == FL_RETURN_BUTTON ) fl_drw_text( 0, ob->x + ob->w - 0.8 * ob->h, ob->y + 0.2 * ob->h, 0.6 * ob->h, 0.6 * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } /*************************************** * creates an object ***************************************/ FL_OBJECT * fl_create_roundbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; fl_add_button_class( FL_ROUNDBUTTON, draw_roundbutton, 0 ); ob = fl_create_generic_button( FL_ROUNDBUTTON, type, x, y, w, h, label ); ob->boxtype = FL_ROUNDBUTTON_BOXTYPE; ob->col1 = FL_ROUNDBUTTON_COL1; ob->col2 = FL_ROUNDBUTTON_COL2; ob->align = FL_ROUNDBUTTON_ALIGN; ob->lcol = FL_ROUNDBUTTON_LCOL; return ob; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_roundbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_roundbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/vn_pair.c0000644000175000017500000000353611247055071014607 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file vn_pair.c * * Name value pair stuff */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "ulib.h" #include #include /*************************************** ***************************************/ int fli_get_vn_value( FLI_VN_PAIR * vn_pair, const char * name ) { long val; char *ep; for ( ; vn_pair->name; vn_pair++ ) if ( ! strcmp( vn_pair->name, name ) ) return vn_pair->val; val = strtol( name, &ep, 10 ); if ( ep != name && ! *ep && val >= INT_MIN && val <= INT_MAX ) return val; return -1; } /*************************************** ***************************************/ const char * fli_get_vn_name( FLI_VN_PAIR * vn_pair, int val ) { static char buf[ 5 ][ 16 ]; static int k; k = ( k + 1 ) % 5; for ( ; vn_pair->name; vn_pair++ ) if ( vn_pair->val == val ) return vn_pair->name; sprintf( buf[ k ], "%d", val ); return buf[ k ]; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/fonts.c0000644000175000017500000004234511370071176014304 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fonts.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * All font and string size query routines. There are rooms for speed ups. * For one, font switching can be reduced somewhat. * */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include static XFontStruct *defaultfs; static XFontStruct *try_get_font_struct( int, int, int ); static char *get_fname( const char *str, int size ); /* * Question marks indicate the sizes in tenth of a point. It will be * replaced on the fly by the font requesting routines. Depending on * the availability of the fonts and capabilities of the server, the * font may or may not be scalable. * * Resolution field is left blank on purpose as the resolution reported * by the server is not reliable thus the program can't force the * resolution. This way the admins can set the proper font path. * * Order is important as it has to agree with FL_TIMES_STYLE etc * defined in Basic.h * */ static const char *fnts[ FL_MAXFONTS ] = { "-*-helvetica-medium-r-*-*-*-?-*-*-p-*-*-*", "-*-helvetica-bold-r-*-*-*-?-*-*-p-*-*-*", "-*-helvetica-medium-o-*-*-*-?-*-*-p-*-*-*", "-*-helvetica-bold-o-no*-*-*-?-*-*-p-*-*-*", "-*-courier-medium-r-*-*-*-?-*-*-m-*-*-*", "-*-courier-bold-r-*-*-*-?-*-*-m-*-*-*", "-*-courier-medium-o-*-*-*-?-*-*-m-*-*-*", "-*-courier-bold-o-*-*-*-?-*-*-m-*-*-*", "-*-times-medium-r-*-*-*-?-*-*-p-*-*-*", "-*-times-bold-r-*-*-*-?-*-*-p-*-*-*", "-*-times-medium-i-*-*-*-?-*-*-p-*-*-*", "-*-times-bold-i-*-*-*-?-*-*-p-*-*-*", /* bitstream fonts can scale all */ "-*-charter-medium-r-*-*-*-?-*-*-*-*-*-*", "-*-charter-bold-r-*-*-*-?-*-*-*-*-*-*", "-*-charter-medium-i-*-*-*-?-*-*-*-*-*-*", "-*-symbol-medium-r-*-*-*-?-*-*-*-*-*-*", }; static FL_FONT fl_fonts[ FL_MAXFONTS ]; static const char *cv_fname( const char * ); #define DEFAULTF1 "fixed" #define DEFAULTF2 "6x13" /*************************************** * Global initialization routine. Must be called before any font * routine can be used. We can place fli_init_font in all font switching * and string size query routines so a seperate initialization is not * needed, and it has the added bonus that startup *may* be faster, * but we pay a function call overhead in every call to any of these * font related routines. ***************************************/ void fli_init_font( void ) { FL_FONT *flf = fl_fonts; const char *const *f = fnts; static int initialized; if ( initialized ) return; initialized = 1; /* If fl_set_font_name() is called before fl_initialize(), we need to keep the change */ for ( ; *f; f++, flf++ ) if ( ! *flf->fname ) strcpy( flf->fname, *f ); /* Load a default font */ if ( ! defaultfs && ! ( defaultfs = XLoadQueryFont( flx->display, DEFAULTF1 ) ) ) defaultfs = XLoadQueryFont( flx->display, DEFAULTF2 ); /* Load a couple of fonts at normal size to prevent the caching code from using bad looking replacement if strange sizes are requested */ fl_get_font_struct( FL_NORMAL_STYLE, FL_DEFAULT_SIZE ); fl_get_font_struct( FL_BOLD_STYLE, FL_DEFAULT_SIZE ); fl_get_font_struct( FL_FIXED_STYLE, FL_DEFAULT_SIZE ); } /*************************************** * In addition to get the font handle, we also make the font current * in default GC ***************************************/ void fl_set_font( int numb, int size ) { int dh; XCharStruct overall; XFontStruct *fs; fs = fl_get_font_struct( numb, size ); /* cur_font is always the one in current GC */ if ( fl_state[ fl_vmode ].cur_fnt == fs ) { #if FL_DEBUG >= ML_DEBUG M_debug( "fl_set_font", "current", fli_curfnt ); #endif return; } fl_state[ fl_vmode ].cur_fnt = flx->fs = fs; #if 1 /* Basic font info */ XTextExtents( flx->fs, "gbjQ", 4, &dh, &flx->fasc, &flx->fdesc, &overall ); #else /* This is theorectically correct, but looks bad */ fl->fdesc = flx->fs->max_bounds.descent; fl->fasc = flx->fs->max_bounds.ascent; #endif XSetFont( flx->display, flx->textgc, flx->fs->fid ); flx->fheight = flx->fasc + flx->fdesc; if ( fli_cntl.debug > 1 ) { unsigned long res = 0; if ( XGetFontProperty( flx->fs, XA_RESOLUTION, &res ) ) M_info2( "fl_set_font", "FontResolution: %lu", res ); } } /*************************************** * Add a new font (indexed by n) or change an existing font. * preferably the font name constains a '?' in the size * position so different sizes can be used. ***************************************/ int fl_set_font_name( int n, const char * name ) { FL_FONT *flf; int i; if ( n < 0 || n >= FL_MAXFONTS ) { M_warn( "fl_set_font_name", "bad font number (%d)", n ); return -1; } if ( ! name ) { M_warn( "fl_set_font_name", "bad font name" ); return -1; } flf = fl_fonts + n; if ( *flf->fname ) { for ( i = 0; i < flf->nsize; i++ ) XFreeFont( flx->display, flf->fs[ i ] ); *flf->fname = '\0'; } flf->nsize = 0; strcpy( flf->fname, name ); if ( ! flx || ! flx->display ) return 1; return try_get_font_struct( n, FL_DEFAULT_SIZE, 1 ) ? 0 : -1; } /*************************************** * List built-in fonts ***************************************/ int fl_enumerate_fonts( void ( * output )( const char *s ), int shortform) { FL_FONT *flf = fl_fonts, *fe = flf + FL_MAXFONTS; int n = 0; for ( ; output && flf < fe; flf++ ) if ( *flf->fname ) { output( shortform ? cv_fname( flf->fname ) : flf->fname ); n++; } return n; } /*************************************** * All font changes go through this routine. If with_fail is false, * this routine will not fail even if requested font can't be loaded. * A substitution will be made. ***************************************/ static XFontStruct * try_get_font_struct( int numb, int size, int with_fail ) { FL_FONT *flf = fl_fonts; XFontStruct *fs = NULL; int n = 0, i; if ( special_style( numb ) ) numb %= FL_SHADOW_STYLE; flf = fl_fonts + numb; if ( numb < 0 || numb >= FL_MAXFONTS || ! *flf->fname ) { if ( ! fli_no_connection ) { /* This function is typically used to test whether a font is loadable or not, so need not be a fatal condition if it fails. Issue a message for information therefore. */ M_info( "try_get_font_struct", "Bad FontStyle requested: %d: %s", numb, flf->fname ); } if ( ! fl_state[ fl_vmode ].cur_fnt ) M_warn( "try_get_font_struct", "bad font returned" ); return fl_state[ fl_vmode ].cur_fnt; } strcpy( fli_curfnt, get_fname( flf->fname, size ) ); /* Search for requested size */ for ( fs = NULL, i = 0; i < flf->nsize; i++ ) if ( size == flf->size[ i ] ) { fs = flf->fs[ i ]; #if FL_DEBUG >= ML_DEBUG M_debug( "try_get_font_struct", "Cache hit: %s", fl_cur_fontname ); #endif } /* If requested font is not found or cache is full, get the destination cache for this size */ if ( ! fs && flf->nsize == FL_MAX_FONTSIZES ) { XFreeFont( flx->display, flf->fs[ FL_MAX_FONTSIZES - 1 ] ); flf->nsize--; } /* Font is not cached, try to load the font */ if ( ! fs ) { n = flf->nsize; flf->fs[ n ] = XLoadQueryFont( flx->display, fli_curfnt ); if ( ( fs = flf->fs[ n ] ) ) { flf->size[ n ] = size; flf->nsize++; } } if ( ! fs && with_fail ) return NULL; /* Didn't get it. Try to find a substitute */ if ( ! fs ) { int mdiff = 1000, k = -1; M_warn( "try_get_font_struct", "can't load %s", fli_curfnt ); /* Search for a replacement */ for ( i = 0; i < flf->nsize; i++ ) { if ( mdiff > FL_abs( size - flf->size[ i ] ) ) { mdiff = FL_abs( size - flf->size[ i ] ); k = i; } } fs = k == -1 ? ( flx->fs ? flx->fs : defaultfs ) : flf->fs[ k ]; /* If we did not get it this time, we won't get it next time either, so replace it with whatever we found */ flf->size[ flf->nsize ] = size; flf->fs[ flf->nsize ] = fs; flf->nsize++; } /* Here we are guranteed a valid font handle although there is no gurantee the font handle corresponds to the font requested */ return fs; } /*************************************** ***************************************/ XFontStruct * fl_get_font_struct( int style, int size ) { return try_get_font_struct( style, size, 0 ); } /*************************************** * Similar to fl_get_string_xxxGC except that there is no side effects. * Must not free the fontstruct as structure FL_FONT caches the * structure for possible future use. ***************************************/ int fl_get_string_width( int style, int size, const char * s, int len ) { XFontStruct *fs = fl_get_font_struct( style, size ); return fli_no_connection ? ( len * size ) : XTextWidth( fs, s, len ); } /*************************************** ***************************************/ int fli_get_string_widthTABfs( XFontStruct * fs, const char * s, int len ) { int w, tab; const char *p, *q; if ( fli_no_connection ) return 12 * len; tab = fli_get_tabpixels( fs ); for ( w = 0, q = s; *q && ( p = strchr( q, '\t' ) ) && ( p - s ) < len; q = p + 1 ) { w += XTextWidth( fs, q, p - q ); w = ( ( w / tab ) + 1 ) * tab; } return w += XTextWidth( fs, q, len - ( q - s ) ); } /*************************************** ***************************************/ int fl_get_string_widthTAB( int style, int size, const char * s, int len ) { XFontStruct *fs = fl_get_font_struct( style, size ); return fli_get_string_widthTABfs( fs, s, len ); } /*************************************** ***************************************/ int fl_get_string_height( int style, int size, const char * s, int len, int * asc, int * desc ) { XFontStruct *fs = fl_get_font_struct( style, size ); XCharStruct overall; int dh, a, d; if ( fli_no_connection ) a = d = size / 2; else XTextExtents( fs, s, len, &dh, &a, &d, &overall ); if ( asc ) *asc = a; if ( desc ) *desc = d; return a + d; } /*************************************** ***************************************/ int fl_get_char_height( int style, int size, int * asc, int * desc ) { return fl_get_string_height( style, size, "gbjQ", 4, asc, desc ); } /*************************************** ***************************************/ int fl_get_char_width( int style, int size ) { XFontStruct *fs = fl_get_font_struct( style, size ); return fs->max_bounds.width; } /*************************************** ***************************************/ void fl_get_string_dimension( int fntstyle, int fntsize, const char * s, int len, int * width, int * height ) { const char *p, *q; int h, maxw = 0, maxh = 0; h = fl_get_string_height( fntstyle, fntsize, "qjb", 3, 0, 0 ); for ( q = s; *q && ( p = strchr( q, '\n' ) ); q = p + 1 ) { maxw = FL_max( maxw, fl_get_string_width( fntstyle, fntsize, q, p - q ) ); maxh += h; } maxw = FL_max( maxw, fl_get_string_width( fntstyle, fntsize, q, len - ( q - s ) ) ); maxh += h; *width = maxw; *height = maxh; } /* * Tab handling. Currently only one tab */ #define MaxTabs 5 static char *tabstop[ MaxTabs ] = { "aaaaaaaa", 0 }; static int tabstopNchar[ MaxTabs ] = { 7 }; /*************************************** ***************************************/ void fl_set_tabstop( const char *s ) { static int set; if ( s ) { if ( set ) fl_free( *tabstop ); *tabstop = fl_strdup( s ); *tabstopNchar = strlen( *tabstop ); set = 1; } } #if 0 /*************************************** ***************************************/ int fl_set_tabstops( int n, const char * s ) { if ( n < 0 || n >= MaxTabs || ! s ) return -1; if ( tabstop[ n ] != 0 ) fl_free( tabstop[ n ] ); tabstop[ n ] = fl_strdup( s ); tabstopNchar[ n ] = strlen( tabstop[ n ] ); return 0; } #endif /*************************************** ***************************************/ int fli_get_tabpixels( XFontStruct * fs ) { return XTextWidth( fs, *tabstop, *tabstopNchar ) + XTextWidth( fs, " ", 1 ); } /*************************************** * Convert X font names to more conventional names by striping the * auxilary info. ***************************************/ #define is_garb( c ) ( ! isalpha( ( int ) c ) && ! isdigit( ( int ) c ) ) static const char * cv_fname( const char *f ) { static char fname[ 127 ]; char *q, *p; /* Remove all the garbages from head */ for ( q = strcpy( fname, f ); *q && is_garb( *q ); q++ ) /* empty */ ; /* Remove all the garbage from the end, starting from '?' */ if ( ( p = strchr( fname, '?' ) ) ) *--p = '\0'; /* Remove all remaining garbages */ for ( p = fname + strlen( fname ) - 1; p > q && is_garb( *p ); p-- ) /* empty */ ; *++p = '\0'; return q; } /*************************************** * Given a font name and a size (in points), assemble the complete name ***************************************/ static char * get_fname( const char * str, int size ) { static char fname[ sizeof fli_curfnt ]; char len_str[ 50 ]; /* should be enough for all ints */ int len; char *p; /* If necessary truncate font names that are too long, the caller expects a real string */ strncpy( fname, str, sizeof fname - 1 ); fname[ sizeof fname - 1 ] = '\0'; if ( ( p = strchr( fname, '?' ) ) ) { len = sprintf( len_str, "%d0", size ); if ( len + strlen( str ) <= sizeof fname - 1 ) { memmove( p + len, p + 1, strlen( p ) ); strncpy( p, len_str, len ); } } return fname; } /*************************************** * Some compatibility stuff ***************************************/ int fl_fdesc_( void ) { return flx->fdesc; } /*************************************** ***************************************/ int fl_fheight_( void ) { return flx->fheight; } /*************************************** ***************************************/ GC fl_gc_( void ) { return flx->gc; } /*************************************** ***************************************/ GC fl_textgc_( void ) { return flx->textgc; } /*************************************** ***************************************/ Window fl_cur_win_( void ) { return flx->win; } /*************************************** ***************************************/ XFontStruct * fl_cur_fs_( void ) { return flx->fs; } /*************************************** ***************************************/ Display * fl_display_( void ) { return flx->display; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/flsnprintf.c0000644000175000017500000013102111247055071015325 0ustar jensjens/* * snprintf.c - a portable implementation of snprintf * * AUTHOR * Mark Martinec , April 1999. * * Copyright 1999, Mark Martinec. All rights reserved. * * TERMS AND CONDITIONS * This program is free software; you can redistribute it and/or modify * it under the terms of the "Frontier Artistic License" which comes * with this Kit. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Frontier Artistic License for more details. * * You should have received a copy of the Frontier Artistic License * with this Kit in the file named LICENSE.txt . * If not, I'll be glad to provide one. * * FEATURES * - careful adherence to specs regarding flags, field width and precision; * - good performance for large string handling (large format, large * argument or large paddings). Performance is similar to system's sprintf * and in several cases significantly better (make sure you compile with * optimizations turned on, tell the compiler the code is strict ANSI * if necessary to give it more freedom for optimizations); * - return value semantics as per ISO C9X; * - written in standard ISO/ANSI C - requires an ANSI C compiler. * * SUPPORTED FORMATS AND DATA TYPES * * This snprintf only supports format specifiers: * s, c, d, o, u, x, X, p (and synonyms: i, D, U, O - see below) * with flags: '-', '+', ' ', '0' and '#'. * An asterisk is supported for field width as well as precision. * * Data type modifiers 'h' (short int), 'l' (long int) * and 'll' (long long int) are supported. * NOTE: * If macro SNPRINTF_LONGLONG_SUPPORT is not defined (default) the * data type modifier 'll' is recognized but treated the same as 'l', * which may cause argument value truncation! Defining * SNPRINTF_LONGLONG_SUPPORT requires that your system's sprintf also * handles data type modifier 'll'. long long int is a language * extension which may not be portable. * * Conversion of numeric data (formats d, o, u, x, X, p) with data type * modifiers (none or h, l, ll) is left to the system routine sprintf, * but all handling of flags, field width and precision as well as c and * s formats is done very carefully by this portable routine. If a string * precision (truncation) is specified (e.g. %.8s) it is guaranteed the * string beyond the specified precision will not be referenced. * * Data type modifiers h, l and ll are ignored for c and s formats (data * types wint_t and wchar_t are not supported). * * The following common synonyms for conversion characters are supported: * - i is a synonym for d * - D is a synonym for ld, explicit data type modifiers are ignored * - U is a synonym for lu, explicit data type modifiers are ignored * - O is a synonym for lo, explicit data type modifiers are ignored * * The following is specifically not supported: * - flag ' (thousands' grouping character) is recognized but ignored * - numeric formats: f, e, E, g, G and synonym F * - data type modifier 'L' (long double) and 'q' (quad - use 'll' instead) * - wide character/string formats: C, lc, S, ls * - writeback of converted string length: conversion character n * - the n$ specification for direct reference to n-th argument * - locales * * It is permitted for str_m to be zero, and it is permitted to specify NULL * pointer for resulting string argument if str_m is zero (as per ISO C9X). * * The return value is the number of characters which would be generated * for the given input, excluding the trailing null. If this value * is greater or equal to str_m, not all characters from the result * have been stored in str. If str_m is greater than zero it is * guaranteed the resulting string will be null-terminated. * * NOTE that this matches the ISO C9X and GNU C library 2.1, * but is different from some older implementations! * * Routines asprintf and vasprintf return a pointer (in the ptr argument) * to a buffer sufficiently large to hold the resulting string. This pointer * should be passed to free(3) to release the allocated storage when it is * no longer needed. If sufficient space cannot be allocated, these functions * will return -1 and set ptr to be a NULL pointer. These two routines are a * GNU C library extensions (glibc). * * Routines asnprintf and vasnprintf are similar to asprintf and vasprintf, * yet, like snprintf and vsnprintf counterparts, will write at most str_m-1 * characters into the allocated output string, the last character in the * allocated buffer then gets the terminating null. If the formatted string * length (the return value) is greater than or equal to the str_m argument, * the resulting string was truncated and some of the formatted characters * were discarded. These routines present a handy way to limit the amount * of allocated memory to some sane value. * * AVAILABILITY * http://www.ijs.si/software/snprintf/ * * REVISION HISTORY * 1999-04 V0.9 Mark Martinec * - initial version, some modifications after comparing printf * man pages for Digital Unix 4.0, Solaris 2.6 and HPUX 10, * and checking how Perl handles sprintf (differently!); * 1999-04-09 V1.0 Mark Martinec * - added main test program, fixed remaining inconsistencies, * added optional (long long int) support; * 1999-04-12 V1.1 Mark Martinec * - support the 'p' format (pointer to void); * - if a string precision is specified * make sure the string beyond the specified precision * will not be referenced (e.g. by strlen); * 1999-04-13 V1.2 Mark Martinec * - support synonyms %D=%ld, %U=%lu, %O=%lo; * - speed up the case of long format string with few conversions; * 1999-06-30 V1.3 Mark Martinec * - fixed runaway loop (eventually crashing when str_l wraps * beyond 2*31) while copying format string without * conversion specifiers to a buffer that is too short * (thanks to Edwin Young for * spotting the problem); * - added macros PORTABLE_SNPRINTF_VERSION_(MAJOR|MINOR) * to snprintf.h * 2000-02-14 V2.0 (never released) Mark Martinec * - relaxed license terms: The Artistic License now applies. * You may still apply the GNU GENERAL PUBLIC LICENSE * as was distributed with previous versions, if you prefer; * - changed REVISION HISTORY dates to use ISO 8601 date format; * - added vsnprintf (patch also independently proposed by * Caolan McNamara 2000-05-04, and Keith M Willenson 2000-06-01) * 2000-06-27 V2.1 Mark Martinec * - removed POSIX check for str_m<1; value 0 for str_m is * allowed by ISO C9X (and GNU C library 2.1) - (pointed out * on 2000-05-04 by Caolan McNamara, caolan@ csn dot ul dot ie). * Besides relaxed license this change in standards adherence * is the main reason to bump up the major version number; * - added nonstandard routines asnprintf, vasnprintf, asprintf, * vasprintf that dynamically allocate storage for the * resulting string; these routines are not compiled by default, * see comments where NEED_V?ASN?PRINTF macros are defined; * - autoconf contributed by Caolan McNamara */ /* Define HAVE_SNPRINTF if your system already has snprintf and vsnprintf. * * If HAVE_SNPRINTF is defined this module will not produce code for * snprintf and vsnprintf, unless PREFER_PORTABLE_SNPRINTF is defined as well, * causing this portable version of snprintf to be called fl_portable_snprintf * (and fl_portable_vsnprintf). */ /* #define HAVE_SNPRINTF */ /* Define PREFER_PORTABLE_SNPRINTF if your system does have snprintf and * vsnprintf but you would prefer to use the portable routine(s) instead. * In this case the portable routine is declared as fl_portable_snprintf * (and fl_portable_vsnprintf) and a macro 'snprintf' (and 'vsnprintf') * is defined to expand to 'portable_v?snprintf' - see file snprintf.h . * Defining this macro is only useful if HAVE_SNPRINTF is also defined, * but does does no harm if defined nevertheless. */ /* #define PREFER_PORTABLE_SNPRINTF */ /* Define SNPRINTF_LONGLONG_SUPPORT if you want to support * data type (long long int) and data type modifier 'll' (e.g. %lld). * If undefined, 'll' is recognized but treated as a single 'l'. * * If the system's sprintf does not handle 'll' * the SNPRINTF_LONGLONG_SUPPORT must not be defined! * * This is off by default since (long long int) is a language extension. */ /* #define SNPRINTF_LONGLONG_SUPPORT */ /* Define NEED_SNPRINTF_ONLY if you only need snprintf, and not vsnprintf. * If NEED_SNPRINTF_ONLY is defined, the snprintf will be defined directly, * otherwise both snprintf and vsnprintf routines will be defined * and snprintf will be a simple wrapper around vsnprintf, at the expense * of an extra procedure call. */ /* #define NEED_SNPRINTF_ONLY */ /* Define NEED_V?ASN?PRINTF macros if you need library extension * routines asprintf, vasprintf, asnprintf, vasnprintf respectively, * and your system library does not provide them. They are all small * wrapper routines around fl_portable_vsnprintf. Defining any of the four * NEED_V?ASN?PRINTF macros automatically turns off NEED_SNPRINTF_ONLY * and turns on PREFER_PORTABLE_SNPRINTF. * * Watch for name conflicts with the system library if these routines * are already present there. * * NOTE: vasprintf and vasnprintf routines need va_copy() from stdarg.h, as * specified by C9X, to be able to traverse the same list of arguments twice. * I don't know of any other standard and portable way of achieving the same. * With some versions of gcc you may use __va_copy(). You might even get away * with "ap2 = ap", in this case you must not call va_end(ap2) ! */ /* #define NEED_ASPRINTF */ /* #define NEED_ASNPRINTF */ /* #define NEED_VASPRINTF */ /* #define NEED_VASNPRINTF */ /* Define the following macros if desired: * SOLARIS_COMPATIBLE, SOLARIS_BUG_COMPATIBLE, * HPUX_COMPATIBLE, HPUX_BUG_COMPATIBLE, * DIGITAL_UNIX_COMPATIBLE, DIGITAL_UNIX_BUG_COMPATIBLE, * PERL_COMPATIBLE, PERL_BUG_COMPATIBLE, * * - For portable applications it is best not to rely on peculiarities * of a given implementation so it may be best not to define any * of the macros that select compatibility and to avoid features * that vary among the systems. * * - Selecting compatibility with more than one operating system * is not strictly forbidden but is not recommended. * * - 'x'_BUG_COMPATIBLE implies 'x'_COMPATIBLE . * * - 'x'_COMPATIBLE refers to (and enables) a behaviour that is * documented in a sprintf man page on a given operating system * and actually adhered to by the system's sprintf (but not on * most other operating systems). It may also refer to and enable * a behaviour that is declared 'undefined' or 'implementation specific' * in the man page but a given implementation behaves predictably * in a certain way. * * - 'x'_BUG_COMPATIBLE refers to (and enables) a behaviour of system's sprintf * that contradicts the sprintf man page on the same operating system. * * - I do not claim that the 'x'_COMPATIBLE and 'x'_BUG_COMPATIBLE * conditionals take into account all idiosyncrasies of a particular * implementation, there may be other incompatibilities. */ /* added by Lgb, the LyX Project */ #ifdef HAVE_CONFIG_H #include #endif /* ============================================= */ /* NO USER SERVICABLE PARTS FOLLOWING THIS POINT */ /* ============================================= */ #define PORTABLE_SNPRINTF_VERSION_MAJOR 2 #define PORTABLE_SNPRINTF_VERSION_MINOR 1 #if defined ( NEED_ASPRINTF ) || defined ( NEED_ASNPRINTF ) || defined ( NEED_VASPRINTF ) || defined ( NEED_VASNPRINTF ) # if defined ( NEED_SNPRINTF_ONLY ) # undef NEED_SNPRINTF_ONLY # endif # if ! defined ( PREFER_PORTABLE_SNPRINTF ) # define PREFER_PORTABLE_SNPRINTF # endif #endif #if defined ( SOLARIS_BUG_COMPATIBLE ) && ! defined ( SOLARIS_COMPATIBLE ) #define SOLARIS_COMPATIBLE #endif #if defined ( HPUX_BUG_COMPATIBLE ) && ! defined ( HPUX_COMPATIBLE ) #define HPUX_COMPATIBLE #endif #if defined ( DIGITAL_UNIX_BUG_COMPATIBLE ) && ! defined( DIGITAL_UNIX_COMPATIBLE ) #define DIGITAL_UNIX_COMPATIBLE #endif #if defined ( PERL_BUG_COMPATIBLE ) && ! defined ( PERL_COMPATIBLE ) #define PERL_COMPATIBLE #endif #include #include #include #include #include #include #include #ifdef isdigit #undef isdigit #endif #define isdigit( c ) ( ( c ) >= '0' && ( c ) <= '9' ) /* prototypes */ #if defined ( NEED_ASPRINTF ) int asprintf( char **, const char *, ... ); #endif #if defined ( NEED_VASPRINTF ) int vasprintf( char **, const char *, va_list ); #endif #if defined ( NEED_ASNPRINTF ) int asnprintf( char **, size_t, const char *, ... ); #endif #if defined ( NEED_VASNPRINTF ) int vasnprintf( char **, size_t, const char *, va_list ); #endif #ifndef va_copy #define va_copy( ap2, ap ) ap2 = ap #endif #if 0 #if defined ( HAVE_SNPRINTF ) /* declare our portable snprintf routine under name fl_portable_snprintf */ /* declare our portable vsnprintf routine under name fl_portable_vsnprintf */ #else /* declare our portable routines under names snprintf and vsnprintf */ #define fl_portable_snprintf snprintf #if !defined ( NEED_SNPRINTF_ONLY ) #define fl_portable_vsnprintf vsnprintf #endif #endif #endif /* 0 */ #if ! defined ( HAVE_SNPRINTF ) || defined ( PREFER_PORTABLE_SNPRINTF ) int fl_portable_snprintf( char *, size_t, const char *, ... ); #if ! defined ( NEED_SNPRINTF_ONLY ) int fl_portable_vsnprintf( char *, size_t, const char *, va_list ); #endif #endif /*************************************** ***************************************/ #if defined ( NEED_ASPRINTF ) int asprintf( char **ptr, const char *fmt, ... ) { va_list ap; size_t str_m; int str_l; *ptr = NULL; va_start( ap, fmt ); /* measure the required size */ str_l = fl_portable_vsnprintf( NULL, ( size_t ) 0, fmt, ap ); va_end( ap ); assert( str_l >= 0 ); /* possible integer overflow if str_m > INT_MAX */ *ptr = fl_malloc( str_m = str_l + 1 ); if ( *ptr == NULL ) { errno = ENOMEM; str_l = -1; } else { int str_l2; va_start( ap, fmt ); str_l2 = fl_portable_vsnprintf( *ptr, str_m, fmt, ap ); va_end( ap ); assert( str_l2 == str_l ); } return str_l; } #endif /*************************************** ***************************************/ #if defined ( NEED_VASPRINTF ) int vasprintf( char ** ptr, const char * fmt, va_list ap ) { size_t str_m; int str_l; *ptr = NULL; { va_list ap2; va_copy( ap2, ap ); /* don't consume the original ap, we'll need it again */ /* measure the required size: */ str_l = fl_portable_vsnprintf( NULL, ( size_t ) 0, fmt, ap2 ); va_end( ap2 ); } assert( str_l >= 0 ); /* possible integer overflow if str_m > INT_MAX */ *ptr = fl_malloc( str_m = str_l + 1 ); if ( *ptr == NULL ) { errno = ENOMEM; str_l = -1; } else { int str_l2 = fl_portable_vsnprintf( *ptr, str_m, fmt, ap ); assert( str_l2 == str_l ); } return str_l; } #endif /*************************************** ***************************************/ #if defined ( NEED_ASNPRINTF ) int asnprintf( char ** ptr, size_t str_m, const char * fmt, ... ) { va_list ap; int str_l; *ptr = NULL; va_start( ap, fmt ); /* measure the required size */ str_l = fl_portable_vsnprintf( NULL, ( size_t ) 0, fmt, ap ); va_end( ap ); assert( str_l >= 0 ); /* possible integer overflow if str_m > INT_MAX */ if ( ( size_t ) str_l + 1 < str_m ) str_m = ( size_t ) str_l + 1; /* truncate */ /* if str_m is 0, no buffer is allocated, just set *ptr to NULL */ if ( str_m == 0 ) { /* not interested in resulting string, just return size */ } else { *ptr = fl_malloc( str_m ); if ( *ptr == NULL ) { errno = ENOMEM; str_l = -1; } else { int str_l2; va_start( ap, fmt ); str_l2 = fl_portable_vsnprintf( *ptr, str_m, fmt, ap ); va_end( ap ); assert( str_l2 == str_l ); } } return str_l; } #endif /*************************************** ***************************************/ #if defined ( NEED_VASNPRINTF ) int vasnprintf ( char ** ptr, size_t str_m, const char * fmt, va_list ap ) { int str_l; *ptr = NULL; { va_list ap2; va_copy( ap2, ap ); /* don't consume the original ap, we'll need it again */ /* measure the required size: */ str_l = fl_portable_vsnprintf( NULL, ( size_t ) 0, fmt, ap2 ); va_end( ap2 ); } assert( str_l >= 0 ); /* possible integer overflow if str_m > INT_MAX */ if ( ( size_t ) str_l + 1 < str_m ) str_m = ( size_t )str_l + 1; /* truncate */ /* if str_m is 0, no buffer is allocated, just set *ptr to NULL */ if ( str_m == 0 ) { /* not interested in resulting string, just return size */ } else { *ptr = fl_malloc( str_m ); if ( *ptr == NULL ) { errno = ENOMEM; str_l = -1; } else { int str_l2 = fl_portable_vsnprintf( *ptr, str_m, fmt, ap ); assert( str_l2 == str_l ); } } return str_l; } #endif /*************************************** ***************************************/ /* * If the system does have snprintf and the portable routine is not * specifically required, this module produces no code for snprintf/vsnprintf. */ #if ! defined ( HAVE_SNPRINTF ) || defined ( PREFER_PORTABLE_SNPRINTF ) #if ! defined ( NEED_SNPRINTF_ONLY ) int fl_portable_snprintf( char * str, size_t str_m, const char * fmt, ... ) { va_list ap; int str_l; va_start( ap, fmt ); str_l = fl_portable_vsnprintf( str, str_m, fmt, ap ); va_end( ap ); return str_l; } #endif /*************************************** ***************************************/ #if defined ( NEED_SNPRINTF_ONLY ) int fl_portable_snprintf( char * str, size_t str_m, const char * fmt, ... ) { #else int fl_portable_vsnprintf( char * str, size_t str_m, const char * fmt, va_list ap ) { #endif #if defined ( NEED_SNPRINTF_ONLY ) va_list ap; #endif size_t str_l = 0; const char *p = fmt; /* In contrast with POSIX, the ISO C9X now says * that str can be NULL and str_m can be 0. This is more useful. */ /*if (str_m < 1) return -1;*/ #if defined ( NEED_SNPRINTF_ONLY ) va_start( ap, fmt ); #endif if ( ! p ) p = ""; while ( *p ) { if ( *p != '%' ) { /* if (str_l < str_m) str[str_l++] = *p++; -- this would be sufficient but the following code achieves better performance for cases where format string is long and contains few conversions */ const char *q = strchr( p + 1, '%' ); int n = ! q ? strlen( p ) : ( q - p ); int avail = ( int ) ( str_m - str_l ); if ( avail > 0 ) { int k; char *r; const char* p1; for ( p1 = p, r = str + str_l, k = ( n > avail ? avail : n ); k > 0 ; k-- ) *r++ = *p1++; } p += n; str_l += n; } else { const char *starting_p; int min_field_width = 0, precision = 0; int zero_padding = 0, precision_specified = 0, justify_left = 0; int alternative_form = 0, force_sign = 0; int space_for_positive = 1; /* If both the ' ' and '+' flags appear, the ' ' flag should be ignored. */ char data_type_modifier = '\0';/* allowed valued: \0, h, l, L, p */ char tmp[ 32 ]; /* temporary buffer for simple numeric->string conversion */ const char *str_arg = NULL; /* string address in case of string arguments */ int str_arg_l; /* natural field width of arg without padding and sign */ long int long_arg; /* long int argument value - always defined in case of numeric arguments, regardless of data type modifiers. In case of data type modifier 'll' the value is stored in long_long_arg and only the sign of long_arg is guaranteed to be correct */ void *ptr_arg; /* pointer argument value - only defined for p format */ int int_arg; /* int argument value - only defined if no h or l modif.*/ #ifdef SNPRINTF_LONGLONG_SUPPORT long long int long_long_arg = 0; /* long long argument value - only defined if ll modifier is present */ #endif int number_of_zeros_to_pad = 0; int zero_padding_insertion_ind = 0; char fmt_spec = '\0'; /* current format specifier character */ starting_p = p; p++; /* skip '%' */ /* parse flags */ while ( *p == '0' || *p == '-' || *p == '+' || *p == ' ' || *p == '#' || *p == '\'') { switch ( *p ) { case '0': zero_padding = 1; break; case '-': justify_left = 1; break; case '+': force_sign = 1; space_for_positive = 0; break; case ' ': force_sign = 1; /* If both the ' ' and '+' flags appear, the ' ' flag should be ignored */ #ifdef PERL_COMPATIBLE /* ... but in Perl the last of ' ' and '+' applies */ space_for_positive = 1; #endif break; case '#': alternative_form = 1; break; case '\'': break; } p++; } /* If the '0' and '-' flags both appear, the '0' flag should be ignored. */ /* parse field width */ if ( *p == '*' ) { p++; min_field_width = va_arg( ap, int ); if ( min_field_width < 0 ) { min_field_width = -min_field_width; justify_left = 1; } } else if ( isdigit( ( int ) *p ) ) { min_field_width = *p++ - '0'; while (isdigit( ( int ) *p ) ) min_field_width = 10 * min_field_width + ( *p++ - '0' ); } /* parse precision */ if ( *p == '.' ) { p++; precision_specified = 1; if ( *p == '*' ) { p++; precision = va_arg( ap, int ); if ( precision < 0 ) { precision_specified = 0; precision = 0; /* NOTE: Solaris 2.6 man page claims that in this * case the precision should be set to 0. Digital * Unix 4.0 and HPUX 10 man page claim that this * case should be treated as unspecified precision, * which is what we do here. */ } } else if ( isdigit( ( int ) *p ) ) { precision = *p++ - '0'; while ( isdigit( ( int ) *p ) ) precision = 10 * precision + ( *p++ - '0' ); } } /* parse 'h', 'l' and 'll' data type modifiers */ if ( *p == 'h' || *p == 'l' ) { data_type_modifier = *p; p++; if ( data_type_modifier == 'l' && *p == 'l' ) { /* double l = long long */ #ifdef SNPRINTF_LONGLONG_SUPPORT data_type_modifier = '2'; /* double l encoded as '2' */ #else data_type_modifier = 'l'; /* treat it as single 'l' */ #endif p++; } } fmt_spec = *p; /* common synonyms: */ switch ( fmt_spec ) { case 'i': fmt_spec = 'd'; break; case 'D': fmt_spec = 'd'; data_type_modifier = 'l'; break; case 'U': fmt_spec = 'u'; data_type_modifier = 'l'; break; case 'O': fmt_spec = 'o'; data_type_modifier = 'l'; break; default: break; } /* get parameter value, do initial processing */ switch ( fmt_spec ) { case '%': /* % behaves similar to 's' regarding flags and field widths */ case 'c': /* c behaves similar to 's' regarding flags and field widths */ case 's': data_type_modifier = '\0'; /* wint_t and wchar_t not supported */ /* the result of zero padding flag with non-numeric format is undefined */ /* Solaris and HPUX 10 does zero padding in this case, Digital Unix not */ #ifdef DIGITAL_UNIX_COMPATIBLE zero_padding = 0; /* turn zero padding off for string formats */ #endif str_arg_l = 1; switch ( fmt_spec ) { case '%': str_arg = p; break; case 'c': { int j = va_arg( ap, int ); str_arg = ( const char * ) &j; } break; case 's': str_arg = va_arg( ap, const char * ); if ( ! str_arg ) str_arg_l = 0; /* make sure not to address string beyond the specified precision !!! */ else if ( ! precision_specified ) str_arg_l = strlen( str_arg ); /* truncate string if necessary as requested by precision */ else if ( precision <= 0 ) str_arg_l = 0; else { const char *q = memchr( str_arg, '\0', ( size_t ) precision ); str_arg_l = ! q ? precision : ( q - str_arg ); } break; default: break; } break; case 'd': case 'o': case 'u': case 'x': case 'X': case 'p': long_arg = 0; int_arg = 0; ptr_arg = NULL; if ( fmt_spec == 'p' ) { /* * HPUX 10: An l, h, ll or L before any other conversion character (other than d, i, o, u, x, or X) is ignored. * Digital Unix: not specified, but seems to behave as HPUX does. * Solaris: If an h, l, or L appears before any other conversion specifier (other than d, i, o, u, x, or X), the behavior is undefined. (Actually %hp converts only 16-bits of address and %llp treats address as 64-bit data which is incompatible with (void *) argument on a 32-bit system). */ #ifdef SOLARIS_COMPATIBLE # ifdef SOLARIS_BUG_COMPATIBLE /* keep data type modifiers even if it represents 'll' */ # else if ( data_type_modifier == '2' ) data_type_modifier = '\0'; # endif #else data_type_modifier = '\0'; #endif ptr_arg = va_arg( ap, void * ); long_arg = ! ptr_arg ? 0 : 1; } else { switch ( data_type_modifier ) { case '\0': case 'h': /* It is non-portable to specify a second argument of char or short to va_arg, because arguments seen by the called function are not char or short. C converts char and short arguments to int before passing them to a function. */ int_arg = va_arg( ap, int ); long_arg = int_arg; break; case 'l': long_arg = va_arg( ap, long int ); break; #ifdef SNPRINTF_LONGLONG_SUPPORT case '2': long_long_arg = va_arg( ap, long long int ); /* only the sign of long_arg is guaranteed */ if ( long_long_arg > 0 ) long_arg = +1; else if ( long_long_arg < 0 ) long_arg = -1; else long_arg = 0; break; #endif } } str_arg = tmp; str_arg_l = 0; /* NOTE: * For d, i, o, u, x, and X conversions, if precision * is specified, the '0' flag should be ignored. This * is so with Solaris 2.6, Digital UNIX 4.0 and HPUX 10; * but not with Perl. */ #ifndef PERL_COMPATIBLE if ( precision_specified ) zero_padding = 0; #endif if ( fmt_spec == 'd' ) { if ( force_sign && long_arg >= 0 ) tmp[ str_arg_l++ ] = space_for_positive ? ' ' : '+'; /* leave negative numbers for sprintf to handle, to avoid handling tricky cases like (short int)(-32768) */ } else if ( alternative_form ) { if ( long_arg != 0 && ( fmt_spec == 'x' || fmt_spec == 'X' ) ) { tmp[ str_arg_l++ ] = '0'; tmp[ str_arg_l++ ] = fmt_spec; } #ifdef HPUX_COMPATIBLE else if ( fmt_spec == 'p' /* HPUX 10: for an alternative form of p conversion, * a nonzero result is prefixed by 0x. */ #ifndef HPUX_BUG_COMPATIBLE /* Actually it uses 0x prefix even for a zero value. */ && long_arg != 0 #endif ) { tmp[ str_arg_l++ ] = '0'; tmp[ str_arg_l++ ] = 'x'; } #endif } zero_padding_insertion_ind = str_arg_l; if ( ! precision_specified ) precision = 1; /* default precision is 1 */ if ( precision == 0 && long_arg == 0 #ifdef HPUX_BUG_COMPATIBLE && fmt_spec != 'p' /* HPUX 10 man page claims: With conversion character * p the result of converting a zero value with a * precision of zero is a null string. * Actually it returns all zeroes. */ #endif ) { /* converted to null string */ } else { char f[ 5 ]; int f_l = 0; f[ f_l++ ] = '%'; if ( ! data_type_modifier ) { } else if ( data_type_modifier == '2' ) { f[ f_l++ ] = 'l'; f[ f_l++ ] = 'l'; } else f[ f_l++ ] = data_type_modifier; f[ f_l++ ] = fmt_spec; f[ f_l++ ] = '\0'; if ( fmt_spec == 'p' ) str_arg_l += sprintf( tmp + str_arg_l, f, ptr_arg ); else { switch ( data_type_modifier ) { case '\0': case 'h': str_arg_l += sprintf( tmp + str_arg_l, f, int_arg ); break; case 'l': str_arg_l += sprintf( tmp + str_arg_l, f, long_arg ); break; #ifdef SNPRINTF_LONGLONG_SUPPORT case '2': str_arg_l += sprintf( tmp + str_arg_l, f, long_long_arg ); break; #endif } } if ( zero_padding_insertion_ind < str_arg_l && tmp[ zero_padding_insertion_ind ] == '-' ) zero_padding_insertion_ind++; } { int num_of_digits = str_arg_l - zero_padding_insertion_ind; if ( alternative_form && fmt_spec == 'o' #ifdef HPUX_COMPATIBLE /* ("%#.o",0) -> "" */ && ( str_arg_l > 0 ) #endif #ifdef DIGITAL_UNIX_BUG_COMPATIBLE /* ("%#o",0) -> "00" */ #else && ! ( zero_padding_insertion_ind < str_arg_l && tmp[zero_padding_insertion_ind] == '0' ) #endif ) { /* assure leading zero for alternative-form octal numbers */ if ( ! precision_specified || precision < num_of_digits + 1 ) { precision = num_of_digits + 1; precision_specified = 1; } } /* zero padding to specified precision? */ if ( num_of_digits < precision ) number_of_zeros_to_pad = precision - num_of_digits; } /* zero padding to specified minimal field width? */ if ( ! justify_left && zero_padding ) { int n = min_field_width - ( str_arg_l + number_of_zeros_to_pad ); if ( n > 0 ) number_of_zeros_to_pad += n; } break; default: /* unrecognized format, keep format string unchanged */ zero_padding = 0; /* turn zero padding off for non-numeric formats */ #ifndef DIGITAL_UNIX_COMPATIBLE justify_left = 1; min_field_width = 0; /* reset flags */ #endif #ifdef PERL_COMPATIBLE /* keep the entire format string unchanged */ str_arg = starting_p; str_arg_l = p - starting_p; #else /* discard the unrecognized format, just keep the unrecognized fmt char */ str_arg = p; str_arg_l = 0; #endif if ( *p ) str_arg_l++; /* include invalid fmt specifier if not at EOS */ break; } if ( *p ) p++; /* step over the just processed format specifier */ /* insert padding to the left as requested by min_field_width */ if ( ! justify_left ) { /* left padding with blank or zero */ int n = min_field_width - ( str_arg_l + number_of_zeros_to_pad ); if ( n > 0 ) { int avail = ( int ) ( str_m - str_l ); if ( avail > 0 ) { /* memset(str+str_l, zp, (n>avail?avail:n)); */ const char zp = zero_padding ? '0' : ' '; int k; char *r; for ( r = str + str_l, k= ( n > avail ? avail : n ); k > 0; k-- ) *r++ = zp; } str_l += n; } } /* zero padding as requested by the precision for numeric formats requred?*/ if ( number_of_zeros_to_pad <= 0 ) { /* will not copy first part of numeric here, * * force it to be copied later in its entirety */ zero_padding_insertion_ind = 0; } else { /* insert first part of numerics (sign or '0x') before zero padding */ int n = zero_padding_insertion_ind; if ( n > 0 ) { int avail = ( int ) ( str_m - str_l ); if ( avail > 0 ) memcpy( str + str_l, str_arg, ( size_t ) ( n > avail ? avail : n ) ); str_l += n; } /* insert zero padding as requested by the precision */ n = number_of_zeros_to_pad; if ( n > 0 ) { int avail = ( int ) ( str_m - str_l ); if ( avail > 0 ) { /* memset(str+str_l, '0', (n>avail?avail:n)); */ int k; char *r; for ( r = str + str_l, k = ( n > avail ? avail : n ); k > 0; k-- ) *r++ = '0'; } str_l += n; } } /* insert formatted string (or unmodified format for unknown formats) */ { int n = str_arg_l - zero_padding_insertion_ind; if ( n > 0 ) { int avail = ( int ) ( str_m - str_l ); if ( avail > 0 ) memcpy( str + str_l, str_arg + zero_padding_insertion_ind, ( size_t ) ( n > avail ? avail : n ) ); str_l += n; } } /* insert right padding */ if ( justify_left ) { /* right blank padding to the field width */ int n = min_field_width - ( str_arg_l + number_of_zeros_to_pad ); if ( n > 0 ) { int avail = ( int ) ( str_m - str_l ); if ( avail > 0 ) { /* memset(str+str_l, ' ', (n>avail?avail:n)); */ int k; char *r; for ( r = str + str_l, k= n > avail ? avail : n; k > 0; k-- ) *r++ = ' '; } str_l += n; } } } } #if defined(NEED_SNPRINTF_ONLY) va_end( ap ); #endif if ( str_m > 0 ) { /* make sure the string is null-terminated even at the expense of overwriting the last character */ str[ str_l <= str_m - 1 ? str_l : str_m-1 ] = '\0'; } return str_l; /* return the number of characters formatted (excluding trailing null character), that is, the number of characters that would have been written to the buffer if it were large enough */ } #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/positioner.c0000644000175000017500000002631311316735457015354 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file positioner.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/ppositioner.h" #include #include /* The special information for positioners. * ymin is the value at the bottom and ymax is the value at the top */ /*************************************** * performs linear interpolation ***************************************/ static double flinear( double val, double smin, double smax, double gmin, double gmax ) { if ( smin == smax ) return gmax; return gmin + ( gmax - gmin ) * ( val - smin ) / ( smax - smin ); } /*************************************** * Draws a positioner ***************************************/ static void draw_positioner( FL_OBJECT * ob ) { FLI_POSITIONER_SPEC *sp = ob->spec; FL_Coord absbw = FL_abs( ob->bw ); FL_Coord x1 = ob->x + absbw + 1, y1 = ob->y + absbw + 1; FL_Coord w1 = ob->w - 2 * absbw - 2, h1 = ob->h - 2 * absbw - 2; FL_Coord xx, yy; int oldmode = fl_get_drawmode( ); int newmode = ob->type == FL_OVERLAY_POSITIONER ? GXxor : GXcopy; if ( ! sp->partial ) { if ( ob->type != FL_OVERLAY_POSITIONER ) fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); fl_draw_object_label_outside( ob ); } else { long col = ob->type == FL_OVERLAY_POSITIONER ? ob->col2 : ob->col1; xx = flinear( sp->lxval, sp->xmin, sp->xmax, x1, x1 + w1 - 1.0 ); yy = flinear( sp->lyval, sp->ymin, sp->ymax, y1 + h1 - 1.0, y1 ); if ( oldmode != newmode ) fl_drawmode( newmode ); fl_diagline( x1, yy, w1, 1, col ); fl_diagline( xx, y1, 1, h1, col ); } xx = flinear( sp->xval, sp->xmin, sp->xmax, x1, x1 + w1 - 1.0 ); yy = flinear( sp->yval, sp->ymin, sp->ymax, y1 + h1 - 1.0, y1 ); if ( oldmode != newmode ) fl_drawmode( newmode ); fl_diagline( x1, yy, w1, 1, ob->col2 ); fl_diagline( xx, y1, 1, h1, ob->col2 ); if ( oldmode != newmode ) fl_drawmode( oldmode ); } /*************************************** * Handle a mouse position change ***************************************/ static int handle_mouse( FL_OBJECT * ob, FL_Coord mx, FL_Coord my ) { FLI_POSITIONER_SPEC *sp = ob->spec; FL_Coord absbw = FL_abs(ob->bw); FL_Coord x1 = ob->x + absbw + 1, y1 = ob->y + absbw + 1; FL_Coord w1 = ob->w - 2 * absbw - 2, h1 = ob->h - 2 * absbw - 2; double oldx = sp->xval, oldy = sp->yval; sp->xval = flinear( mx, x1, x1 + w1 - 1.0, sp->xmin, sp->xmax ); sp->yval = flinear( my, y1 + h1 - 1.0, y1, sp->ymin, sp->ymax ); if ( sp->xstep != 0.0 ) sp->xval = ( ( int ) (sp->xval / sp->xstep + 0.5 ) ) * sp->xstep; if ( sp->ystep != 0.0 ) sp->yval = ( ( int ) ( sp->yval / sp->ystep + 0.5 ) ) * sp->ystep; /* make sure the position is in bounds */ sp->xval = fli_clamp( sp->xval, sp->xmin, sp->xmax ); sp->yval = fli_clamp( sp->yval, sp->ymin, sp->ymax ); if ( sp->xval != oldx || sp->yval != oldy ) { sp->partial = 1; sp->lxval = oldx; sp->lyval = oldy; fl_redraw_object( ob ); if ( ! ( ob->how_return & FL_RETURN_END_CHANGED ) ) return FL_RETURN_CHANGED; } return FL_RETURN_NONE; } /*************************************** * Handles an event ***************************************/ static int handle_positioner( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_POSITIONER_SPEC *sp = ob->spec; int ret = FL_RETURN_NONE; switch ( event ) { case FL_DRAW: if ( ob->type != FL_INVISIBLE_POSITIONER ) draw_positioner( ob ); sp->partial = 0; break; case FL_DRAWLABEL: fl_draw_object_label_outside( ob ); break; case FL_PUSH: if ( key != FL_MBUTTON1 ) break; sp->old_x = sp->xval; sp->old_y = sp->yval; /* fall through */ case FL_MOTION: if ( key != FL_MBUTTON1 ) break; ret = handle_mouse( ob, mx, my ); break; case FL_RELEASE: if ( key != FL_MBUTTON1 ) break; ret = FL_RETURN_END; if ( ob->how_return & FL_RETURN_END_CHANGED && ( sp->xval != sp->old_x || sp->yval != sp->old_y ) ) ret |= FL_RETURN_CHANGED; break; case FL_FREEMEM: fl_free( ob->spec ); break; } return ret; } /*************************************** * Creates a posiioner object ***************************************/ FL_OBJECT * fl_create_positioner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_POSITIONER_SPEC *sp; ob = fl_make_object( FL_POSITIONER, type, x, y, w, h, label, handle_positioner ); ob->boxtype = FL_POSITIONER_BOXTYPE; ob->col1 = FL_POSITIONER_COL1; ob->col2 = FL_POSITIONER_COL2; ob->align = FL_POSITIONER_ALIGN; ob->lcol = FL_POSITIONER_LCOL; if ( ob->type == FL_OVERLAY_POSITIONER || ob->type == FL_INVISIBLE_POSITIONER ) { ob->bw = 0; ob->boxtype = FL_NO_BOX; } ob->spec = sp = fl_calloc( 1, sizeof *sp ); sp->xmin = 0.0; sp->ymin = 0.0; sp->xmax = 1.0; sp->ymax = 1.0; sp->xval = sp->lxval = 0.5; sp->yval = sp->lyval = 0.5; fl_set_object_return( ob, FL_RETURN_CHANGED ); return ob; } /*************************************** * Adds a positioner object ***************************************/ FL_OBJECT * fl_add_positioner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_positioner( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** ***************************************/ void fl_set_positioner_xvalue(FL_OBJECT * ob, double val) { FLI_POSITIONER_SPEC *sp = ob->spec; val = fli_clamp( val, sp->xmin, sp->xmax ); if ( sp->xval != val ) { sp->lxval = sp->xval; sp->xval = val; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_positioner_yvalue( FL_OBJECT * ob, double val ) { FLI_POSITIONER_SPEC *sp = ob->spec; val = fli_clamp( val, sp->ymin, sp->ymax ); if ( sp->yval != val ) { sp->lyval = sp->yval; sp->yval = val; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_positioner_xbounds( FL_OBJECT * ob, double min, double max ) { FLI_POSITIONER_SPEC *sp = ob->spec; if ( sp->xmin != min || sp->xmax != max ) { sp->xmin = min; sp->xmax = max; sp->xval = fli_clamp( sp->xval, sp->xmin, sp->xmax ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_positioner_ybounds( FL_OBJECT * ob, double min, double max ) { FLI_POSITIONER_SPEC *sp = ob->spec; if ( sp->ymin != min || sp->ymax != max ) { sp->ymin = min; sp->ymax = max; sp->yval = fli_clamp( sp->yval, sp->ymin, sp->ymax ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ double fl_get_positioner_xvalue( FL_OBJECT * ob ) { return ( ( FLI_POSITIONER_SPEC * ) ob->spec )->xval; } /*************************************** ***************************************/ double fl_get_positioner_yvalue( FL_OBJECT * ob ) { return ( ( FLI_POSITIONER_SPEC * ) ob->spec )->yval; } /*************************************** ***************************************/ void fl_get_positioner_xbounds( FL_OBJECT * ob, double * min, double * max ) { *min = ( ( FLI_POSITIONER_SPEC * ) ob->spec)->xmin; *max = ( ( FLI_POSITIONER_SPEC * ) ob->spec)->xmax; } void fl_get_positioner_ybounds( FL_OBJECT * ob, double * min, double * max) { *min = ( ( FLI_POSITIONER_SPEC * ) ob->spec)->ymin; *max = ( ( FLI_POSITIONER_SPEC * ) ob->spec)->ymax; } /*************************************** * Sets the step size to which values are rounded. ***************************************/ void fl_set_positioner_xstep( FL_OBJECT * ob, double value ) { ( ( FLI_POSITIONER_SPEC * ) ob->spec )->xstep = value; } /*************************************** * Sets the step size to which values are rounded. ***************************************/ void fl_set_positioner_ystep( FL_OBJECT * ob, double value ) { ( ( FLI_POSITIONER_SPEC * ) ob->spec )->ystep = value; } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function should be regarded as deprecated and * fl_set_object_return() should be used instead. * Please note that this function doesn't work like the other * object specific functions for setting the return policy! ***************************************/ void fl_set_positioner_return( FL_OBJECT * obj, unsigned int when ) { if ( when ) fl_set_object_return( obj, FL_RETURN_CHANGED ); else fl_set_object_return( obj, FL_RETURN_END ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/keyboard.c0000644000175000017500000000257011253016446014746 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file keyboard.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Misc. keyboard routines */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ void fl_ringbell( int percent ) { if ( percent < -100 ) percent = -100; else if ( percent > 100 ) percent = 100; if ( flx->display ) XBell( flx->display, percent ); else fprintf( stderr, "\a" ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/asyn_io.c0000644000175000017500000001517011247055071014607 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file asyn_io.c *. * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Handle input other than the X event queue. Mostly maintanance * here. Actual input/output handling is triggered in the main loop * via fli_watch_io. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #ifndef FL_WIN32 #include #endif #ifdef HAVE_SYS_SELECT_H #include #endif #ifdef __sgi #include #endif #ifdef FL_WIN32 #include #endif static fd_set st_rfds, st_wfds, st_efds; static void fl_add_to_freelist( FLI_IO_REC * io ); static void fl_clear_freelist( void ); /*************************************** * collect all the fd_sets so we don't do it inside the * critical select inner loop ***************************************/ static void collect_fd( void ) { FLI_IO_REC *p; int nf = 0; /* initialize the sets */ FD_ZERO( &st_rfds ); FD_ZERO( &st_wfds ); FD_ZERO( &st_efds ); /* loop through all requested IOs */ for ( p = fli_context->io_rec; p; p = p->next ) { if ( p->source < 0 ) { M_err( "collect_fd", "source < 0\n" ); continue; } if ( p->mask & FL_READ ) FD_SET( p->source, &st_rfds ); if ( p->mask & FL_WRITE ) FD_SET( p->source, &st_wfds ); if ( p->mask & FL_EXCEPT ) FD_SET( p->source, &st_efds ); if ( nf < p->source + 1 ) nf = p->source + 1; } fli_context->num_io = nf; } /*************************************** * Register a callback function for file descriptor fd ***************************************/ void fl_add_io_callback( int fd, unsigned int mask, FL_IO_CALLBACK callback, void * data ) { FLI_IO_REC *io_rec; /* create new record and make it the start of the list */ io_rec = fl_malloc( sizeof *io_rec ); io_rec->next = fli_context->io_rec; io_rec->callback = callback; io_rec->data = data; io_rec->source = fd; io_rec->mask = mask; fli_context->io_rec = io_rec; collect_fd( ); } /*************************************** ***************************************/ void fl_remove_io_callback( int fd, unsigned int mask, FL_IO_CALLBACK cb ) { FLI_IO_REC *io, *last; for ( last = io = fli_context->io_rec; io && ! ( io->source == fd && io->callback == cb && io->mask & mask ); last = io, io = io->next ) /* empty */ ; if ( ! io ) { M_err( "fl_remove_io_callback", "Non-existent handler for %d", fd ); return; } io->mask &= ~mask; /* Special case: if after removal fd does not do anything anymore, i.e. mask == 0, remove it from global record */ if ( io->mask == 0 ) { if ( io == fli_context->io_rec ) fli_context->io_rec = io->next; else last->next = io->next; fl_add_to_freelist( io ); } collect_fd( ); } /*************************************** * Watch for activities using select or poll. Timeout in milli-second ***************************************/ void fli_watch_io( FLI_IO_REC * io_rec, long msec ) { fd_set rfds, wfds, efds; struct timeval timeout; FLI_IO_REC *p; int nf; fl_clear_freelist( ); if ( ! io_rec ) { if ( msec > 0 ) fl_msleep( msec ); return; } timeout.tv_usec = 1000 * ( msec % 1000 ); timeout.tv_sec = msec / 1000; /* initialize the sets */ rfds = st_rfds; wfds = st_wfds; efds = st_efds; /* now watch it. HP defines rfds to be ints. Althought compiler will bark, it is harmless. */ nf = select( fli_context->num_io, &rfds, &wfds, &efds, &timeout ); if ( nf < 0 ) /* something is wrong. */ { if ( errno == EINTR ) M_warn( "fli_watch_io", "select interrupted by signal" ); /* select() on some platforms returns -1 with errno == 0 */ else if ( errno != 0 ) M_err( "fli_watch_io", fli_get_syserror_msg( ) ); } /* time expired */ if ( nf <= 0 ) return; /* handle it */ for ( p = io_rec; p; p = p->next ) { if ( ! p->callback || p->source < 0 || p->mask == 0 ) continue; if ( p->mask & FL_READ && FD_ISSET( p->source, &rfds ) ) p->callback( p->source, p->data ); if ( p->mask & FL_WRITE && FD_ISSET( p->source, &wfds ) ) p->callback( p->source, p->data ); if ( p->mask & FL_EXCEPT && FD_ISSET( p->source, &efds ) ) p->callback( p->source, p->data ); } fl_clear_freelist( ); } /*************************************** ***************************************/ int fli_is_watched_io( int fd ) { FLI_IO_REC *p; for ( p = fli_context->io_rec; p; p = p->next ) if ( p->source == fd && p->mask ) return 1; return 0; } /*************************************** ***************************************/ typedef struct free_list_ { struct free_list_ * next; FLI_IO_REC * io; } Free_List_T; static Free_List_T *fl = NULL; static void fl_add_to_freelist( FLI_IO_REC * io ) { Free_List_T *cur; cur = malloc( sizeof *cur ); cur->next = fl; cur->io = io; fl = cur; } /*************************************** ***************************************/ static void fl_clear_freelist( void ) { Free_List_T *cur; while ( fl ) { fl_free( fl->io ); cur = fl; fl = fl->next; fl_free( cur ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/.cvsignore0000644000175000017500000000010211171560225014765 0ustar jensjenslibforms* Makefile Makefile.in config.* .deps .libs *.lo xforms.5 xforms-1.0.93sp1/lib/read2msbf.c0000644000175000017500000000267211247055071015016 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file read2msbf.c * * Copyright(c) 1993,1994 by T.C. Zhao * All rights reserved. * * Read 2bytes MSB first */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" #include "ulib.h" /*************************************** ***************************************/ int fli_fget2MSBF( FILE * fp ) { int ret = getc(fp); return (ret << 8) + getc(fp); } /*************************************** ***************************************/ int fli_fput2MSBF( int code, FILE * fp ) { putc( ( code >> 8 ) & 0xff, fp ); putc( code & 0xff, fp ); return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/include/0000755000175000017500000000000011377311602014420 5ustar jensjensxforms-1.0.93sp1/lib/include/spinner.h0000644000175000017500000000520311247055071016250 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ #ifndef FL_SPINNER_H #define FL_SPINNER_H typedef enum { FL_INT_SPINNER, FL_FLOAT_SPINNER, } FL_SPINNER_TYPE; FL_EXPORT FL_OBJECT * fl_create_spinner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_spinner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT double fl_get_spinner_value( FL_OBJECT * obj ); FL_EXPORT double fl_set_spinner_value( FL_OBJECT * obj, double val ); FL_EXPORT void fl_set_spinner_bounds( FL_OBJECT * obj, double min, double max ); FL_EXPORT void fl_get_spinner_bounds( FL_OBJECT * obj, double * min, double * max ); FL_EXPORT void fl_set_spinner_step( FL_OBJECT * obj, double step ); FL_EXPORT double fl_get_spinner_step( FL_OBJECT * obj ); FL_EXPORT void fl_set_spinner_precision( FL_OBJECT * obj, int prec ); FL_EXPORT int fl_get_spinner_precision( FL_OBJECT * obj ); FL_EXPORT FL_OBJECT * fl_get_spinner_input( FL_OBJECT * obj ); FL_EXPORT FL_OBJECT * fl_get_spinner_up_button( FL_OBJECT * obj ); FL_EXPORT FL_OBJECT * fl_get_spinner_down_button( FL_OBJECT * obj ); #endif /* ! defined FL_SPINNER_H */ xforms-1.0.93sp1/lib/include/popup.h0000644000175000017500000003054711317215156015746 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ #ifndef FL_POPUP_H #define FL_POPUP_H typedef struct FL_POPUP_ FL_POPUP; typedef struct FL_POPUP_ENTRY_ FL_POPUP_ENTRY; typedef struct FL_POPUP_RETURN_ FL_POPUP_RETURN; typedef int ( * FL_POPUP_CB )( FL_POPUP_RETURN * ); struct FL_POPUP_RETURN_ { long int val; /* value assigned to popup entry */ void * user_data; /* pointer to user data */ const char * text; /* text of the selected popup entry */ const char * label; /* left-flushed label part */ const char * accel; /* right-flushed label part */ const FL_POPUP_ENTRY * entry; /* pointer to selected popup entry */ const FL_POPUP * popup; /* popup we're called for */ }; struct FL_POPUP_ { FL_POPUP * next; /* next in linked list */ FL_POPUP * prev; /* previous in linked list */ FL_POPUP * parent; /* for sub-popups: direct parent */ FL_POPUP * top_parent; /* and top-most parent */ FL_POPUP_ENTRY * entries; /* pointer to list of entries */ char * title; Window win; /* popup window */ Window parent_win; /* parent window of popup window */ Cursor cursor; /* cursor for the popup */ FL_POPUP_CB callback; int use_req_pos; /* if set use req_x, req_y */ int req_x, req_y; int x, /* position of popup window */ y; unsigned int w, /* dimensions of popup window */ h; int min_width; /* minimum width of popup */ int title_box_x, /* position of title box */ title_box_y; unsigned int title_box_w, /* dimensions of title box */ title_box_h; int has_subs, has_boxes; int counter; int title_font_style; int title_font_size; int entry_font_style; int entry_font_size; unsigned long event_mask; int bw; /* border width */ FL_COLOR bg_color; /* background color of popup*/ FL_COLOR on_color; /* color of entry under mouse */ FL_COLOR title_color; /* color of title text */ FL_COLOR text_color; /* normal text color of entry */ FL_COLOR text_on_color; /* text color when mouse on entry */ FL_COLOR text_off_color; /* text color of disabled entry */ FL_COLOR radio_color; /* color of radio buttons */ int policy; int need_recalc; /* do we need to recalc position? */ FL_POPUP_RETURN ret; /* structure passed to calbacks and returned on selection */ }; struct FL_POPUP_ENTRY_ { FL_POPUP_ENTRY * prev; /* next in linked list */ FL_POPUP_ENTRY * next; /* previous in linked list */ FL_POPUP * popup; /* popup it belongs to */ int is_act; /* set while mouse is over it */ char * text; /* complete text of entry */ char * label; /* cleaned-up label text */ char * accel; /* cleaned-up accelerator key text */ long int val; /* value associated with entry */ void * user_data; /* pointer to user data */ int type; /* normal, toggle, radio, sub-popup */ unsigned int state; /* disabled, hidden, checked */ int group; /* group (for radio entries only) */ FL_POPUP * sub; /* sub-popup bound to entry */ long int * shortcut; /* keyboard shortcuts */ int ulpos; /* underline position in text */ FL_POPUP_CB callback; /* callback for entry */ FL_POPUP_CB enter_callback; /* callback for entering entry */ FL_POPUP_CB leave_callback; /* callback for leaving entry */ int x, /* position of entry text */ y; unsigned int w, h; /* height of entry text */ int box_x, box_y; unsigned int box_w, box_h; unsigned int sl_h; int ul_x, ul_y; unsigned int ul_w, ul_h; }; typedef struct { const char * text; /* text of entry */ FL_POPUP_CB callback; /* (selection) callback */ const char * shortcut; /* keyboard shortcut description */ int type; /* type of entry */ int state; /* disabled, hidden, checked */ } FL_POPUP_ITEM; /* Popup policies */ enum { FL_POPUP_NORMAL_SELECT, FL_POPUP_DRAG_SELECT }; /* Popup states */ enum { FL_POPUP_NONE = 0, FL_POPUP_DISABLED = 1, /* entry is disabled */ FL_POPUP_HIDDEN = 2, /* entry is temporarily hidden */ FL_POPUP_CHECKED = 4 /* tooogle/radio item is in on state */ }; /* Popup entry types */ enum { FL_POPUP_NORMAL, /* normal popup entry */ FL_POPUP_TOGGLE, /* toggle ("binary") popup entry */ FL_POPUP_RADIO, /* radio popup entry */ FL_POPUP_SUB, /* sub-popup popup entry */ FL_POPUP_LINE /* line popup entry */ }; /* Popup color types */ enum { FL_POPUP_BACKGROUND_COLOR, FL_POPUP_HIGHLIGHT_COLOR, FL_POPUP_TITLE_COLOR, FL_POPUP_TEXT_COLOR, FL_POPUP_HIGHLIGHT_TEXT_COLOR, FL_POPUP_DISABLED_TEXT_COLOR, FL_POPUP_RADIO_COLOR }; FL_EXPORT FL_POPUP *fl_popup_add( Window, const char * ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_add_entries( FL_POPUP *, const char *, ... ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_insert_entries( FL_POPUP *, FL_POPUP_ENTRY *, const char *, ... ); FL_EXPORT FL_POPUP *fl_popup_create( Window, const char *, FL_POPUP_ITEM * ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_add_items( FL_POPUP *, FL_POPUP_ITEM * ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_insert_items( FL_POPUP *, FL_POPUP_ENTRY *, FL_POPUP_ITEM * ); FL_EXPORT int fl_popup_delete( FL_POPUP * ); FL_EXPORT int fl_popup_entry_delete( FL_POPUP_ENTRY * ); FL_EXPORT FL_POPUP_RETURN *fl_popup_do( FL_POPUP * ); FL_EXPORT void fl_popup_set_position( FL_POPUP *, int, int ); FL_EXPORT int fl_popup_get_policy( FL_POPUP * ); FL_EXPORT int fl_popup_set_policy( FL_POPUP *, int ); FL_EXPORT FL_POPUP_CB fl_popup_set_callback( FL_POPUP *, FL_POPUP_CB ); FL_EXPORT void fl_popup_get_title_font( FL_POPUP *, int *, int * ); FL_EXPORT void fl_popup_set_title_font( FL_POPUP *, int, int ); FL_EXPORT void fl_popup_entry_get_font( FL_POPUP *, int *, int * ); FL_EXPORT void fl_popup_entry_set_font( FL_POPUP *, int, int ); FL_EXPORT int fl_popup_get_bw( FL_POPUP * ); FL_EXPORT int fl_popup_set_bw( FL_POPUP *, int ); FL_EXPORT FL_COLOR fl_popup_get_color( FL_POPUP *, int ); FL_EXPORT FL_COLOR fl_popup_set_color( FL_POPUP *, int, FL_COLOR ); FL_EXPORT void fl_popup_set_cursor( FL_POPUP *, int ); FL_EXPORT const char *fl_popup_get_title( FL_POPUP * ); FL_EXPORT FL_POPUP *fl_popup_set_title( FL_POPUP *, const char * ); FL_EXPORT FL_POPUP_CB fl_popup_entry_set_callback( FL_POPUP_ENTRY *, FL_POPUP_CB ); FL_EXPORT FL_POPUP_CB fl_popup_entry_set_enter_callback( FL_POPUP_ENTRY *, FL_POPUP_CB ); FL_EXPORT FL_POPUP_CB fl_popup_entry_set_leave_callback( FL_POPUP_ENTRY *, FL_POPUP_CB ); FL_EXPORT unsigned int fl_popup_entry_get_state( FL_POPUP_ENTRY * ); FL_EXPORT unsigned int fl_popup_entry_set_state( FL_POPUP_ENTRY *, unsigned int ); FL_EXPORT unsigned int fl_popup_entry_clear_state( FL_POPUP_ENTRY *, unsigned int ); FL_EXPORT unsigned int fl_popup_entry_raise_state( FL_POPUP_ENTRY *, unsigned int ); FL_EXPORT unsigned int fl_popup_entry_toggle_state( FL_POPUP_ENTRY *, unsigned int ); FL_EXPORT int fl_popup_entry_set_text( FL_POPUP_ENTRY *, const char * ); FL_EXPORT void fl_popup_entry_set_shortcut( FL_POPUP_ENTRY *, const char * ); FL_EXPORT long int fl_popup_entry_set_value( FL_POPUP_ENTRY *, long int ); FL_EXPORT void *fl_popup_entry_set_user_data( FL_POPUP_ENTRY *, void * ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_entry_get_by_position( FL_POPUP *, int ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_entry_get_by_value( FL_POPUP *, long ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_entry_get_by_user_data( FL_POPUP *, void * ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_entry_get_by_text( FL_POPUP *, const char * ); FL_EXPORT FL_POPUP_ENTRY *fl_popup_entry_get_by_label( FL_POPUP *, const char * ); FL_EXPORT int fl_popup_entry_get_group( FL_POPUP_ENTRY * ); FL_EXPORT int fl_popup_entry_set_group( FL_POPUP_ENTRY *, int ); FL_EXPORT FL_POPUP *fl_popup_entry_get_subpopup( FL_POPUP_ENTRY * ); FL_EXPORT FL_POPUP *fl_popup_entry_set_subpopup( FL_POPUP_ENTRY *, FL_POPUP * ); FL_EXPORT int fl_popup_get_size( FL_POPUP *, unsigned int *, unsigned int * ); FL_EXPORT int fl_popup_get_min_width( FL_POPUP * ); FL_EXPORT int fl_popup_set_min_width( FL_POPUP *, int ); #endif /* ! defined FL_POPUP_H */ xforms-1.0.93sp1/lib/include/dial.h0000644000175000017500000000601711316735110015503 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file dial.h */ #ifndef FL_DIAL_H #define FL_DIAL_H typedef enum { FL_NORMAL_DIAL, FL_LINE_DIAL, FL_FILL_DIAL } FL_DIAL_TYPE; enum { FL_DIAL_CW, FL_DIAL_CCW }; /***** Defaults *****/ #define FL_DIAL_BOXTYPE FL_FLAT_BOX #define FL_DIAL_COL1 FL_COL1 #define FL_DIAL_COL2 FL_RIGHT_BCOL #define FL_DIAL_LCOL FL_LCOL #define FL_DIAL_ALIGN FL_ALIGN_BOTTOM /***** Others *****/ #define FL_DIAL_TOPCOL FL_COL1 /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_dial( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_dial( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_dial_value( FL_OBJECT * ob, double val ); FL_EXPORT double fl_get_dial_value( FL_OBJECT * ob ); FL_EXPORT void fl_set_dial_bounds( FL_OBJECT * ob, double min, double max ); FL_EXPORT void fl_get_dial_bounds( FL_OBJECT * ob, double * min, double * max ); FL_EXPORT void fl_set_dial_step( FL_OBJECT * ob, double value ); FL_EXPORT void fl_set_dial_return( FL_OBJECT * ob, unsigned int value ); FL_EXPORT void fl_set_dial_angles( FL_OBJECT * ob, double amin, double amax ); FL_EXPORT void fl_set_dial_cross( FL_OBJECT * ob, int flag ); #define fl_set_dial_crossover fl_set_dial_cross FL_EXPORT void fl_set_dial_direction( FL_OBJECT * ob, int dir ); #endif /* ! defined FL_DIAL_H */ xforms-1.0.93sp1/lib/include/Basic.h0000644000175000017500000014320511374045030015613 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file Basic.h * * Basic definitions and limits. * Window system independent prototypes * * Modify with care */ #ifndef FL_BASIC_H #define FL_BASIC_H #include #include #include #include #include #include #if defined __GNUC__ #define FL_UNUSED_ARG __attribute__ ((unused)) #else #define FL_UNUSED_ARG #endif /* Some general constants */ enum { FL_ON = 1, FL_OK = 1, FL_VALID = 1, FL_PREEMPT = 1, FL_AUTO = 2, FL_WHEN_NEEDED = FL_AUTO, FL_OFF = 0, FL_CANCEL = 0, FL_INVALID = 0, /* WM_DELETE_WINDOW callback return */ FL_IGNORE = -1, }; /* Max directory length */ #ifndef FL_PATH_MAX #ifndef PATH_MAX #define FL_PATH_MAX 1024 #else #define FL_PATH_MAX PATH_MAX #endif #endif /* ! def FL_PATH_MAX */ /* The screen coordinate unit, FL_Coord, must be of signed type */ typedef int FL_Coord; #define FL_COORD FL_Coord typedef unsigned long FL_COLOR; /* Coordinates can be in pixels, milli-meters or points (1/72inch) */ typedef enum { FL_COORD_PIXEL, /* default, Pixel */ FL_COORD_MM, /* milli-meter */ FL_COORD_POINT, /* point */ FL_COORD_centiMM, /* one hundredth of a mm */ FL_COORD_centiPOINT /* one hundredth of a point */ } FL_COORD_UNIT; /* All object classes. */ typedef enum { FL_INVALID_CLASS, /* 0 */ FL_BUTTON, /* 1 */ FL_LIGHTBUTTON, /* 2 */ FL_ROUNDBUTTON, /* 3 */ FL_ROUND3DBUTTON, /* 4 */ FL_CHECKBUTTON, /* 5 */ FL_BITMAPBUTTON, /* 6 */ FL_PIXMAPBUTTON, /* 7 */ FL_BITMAP, /* 8 */ FL_PIXMAP, /* 9 */ FL_BOX, /* 10 */ FL_TEXT, /* 11 */ FL_MENU, /* 12 */ FL_CHART, /* 13 */ FL_CHOICE, /* 14 */ FL_COUNTER, /* 15 */ FL_SLIDER, /* 16 */ FL_VALSLIDER, /* 17 */ FL_INPUT, /* 18 */ FL_BROWSER, /* 19 */ FL_DIAL, /* 20 */ FL_TIMER, /* 21 */ FL_CLOCK, /* 22 */ FL_POSITIONER, /* 23 */ FL_FREE, /* 24 */ FL_XYPLOT, /* 25 */ FL_FRAME, /* 26 */ FL_LABELFRAME, /* 27 */ FL_CANVAS, /* 28 */ FL_GLCANVAS, /* 29 */ FL_TABFOLDER, /* 30 */ FL_SCROLLBAR, /* 31 */ FL_SCROLLBUTTON, /* 32 */ FL_MENUBAR, /* 33 */ FL_TEXTBOX, /* 34, for internal use only */ FL_LABELBUTTON, /* 35 */ FL_COMBOBOX, /* 36 */ FL_IMAGECANVAS, /* 37 */ FL_THUMBWHEEL, /* 38 */ FL_COLORWHEEL, /* 39 */ FL_FORMBROWSER, /* 40 */ FL_SELECT, /* 41 */ FL_NMENU, /* 42 */ FL_SPINNER, /* 43 */ FL_TBOX, /* 44 */ FL_CLASS_END /* sentinel */ } FL_CLASS; #define FL_BEGIN_GROUP 10000 #define FL_END_GROUP 20000 #define FL_USER_CLASS_START 1001 /* min. user class value */ #define FL_USER_CLASS_END 9999 /* max. user class value */ /* Maximum border width (in pixel) */ #define FL_MAX_BW 10 /* How to display a form onto screen */ typedef enum { FL_PLACE_FREE = 0, /* size remain resizable */ FL_PLACE_MOUSE = 1, /* mouse centered on form */ FL_PLACE_CENTER = 2, /* center of the screen */ FL_PLACE_POSITION = 4, /* specific position */ FL_PLACE_SIZE = 8, /* specific size */ FL_PLACE_GEOMETRY = 16, /* specific size and position */ FL_PLACE_ASPECT = 32, /* keep aspect ratio */ FL_PLACE_FULLSCREEN = 64, /* scale to fit to screen */ FL_PLACE_HOTSPOT = 128, /* so mouse fall on (x,y) */ FL_PLACE_ICONIC = 256, /* start in iconified form */ /* Modifiers */ FL_FREE_SIZE = ( 1 << 14 ), FL_FIX_SIZE = ( 1 << 15 ) /* seems to be useless, but some programs seem to rely on it... */ } FL_PLACE; #define FL_PLACE_FREE_CENTER ( FL_PLACE_CENTER | FL_FREE_SIZE ) #define FL_PLACE_CENTERFREE ( FL_PLACE_CENTER | FL_FREE_SIZE ) /* Window manager decoration request and forms attributes */ enum { FL_FULLBORDER = 1, /* normal */ FL_TRANSIENT, /* set TRANSIENT_FOR property */ FL_NOBORDER, /* use override_redirect to supress decor. */ }; /* All box types */ typedef enum { FL_NO_BOX, /* 0 */ FL_UP_BOX, /* 1 */ FL_DOWN_BOX, /* 2 */ FL_BORDER_BOX, /* 3 */ FL_SHADOW_BOX, /* 4 */ FL_FRAME_BOX, /* 5 */ FL_ROUNDED_BOX, /* 6 */ FL_EMBOSSED_BOX, /* 7 */ FL_FLAT_BOX, /* 8 */ FL_RFLAT_BOX, /* 9 */ FL_RSHADOW_BOX, /* 10 */ FL_OVAL_BOX, /* 11 */ FL_ROUNDED3D_UPBOX, /* 12 */ FL_ROUNDED3D_DOWNBOX, /* 13 */ FL_OVAL3D_UPBOX, /* 14 */ FL_OVAL3D_DOWNBOX, /* 15 */ FL_OVAL3D_FRAMEBOX, /* 16 */ FL_OVAL3D_EMBOSSEDBOX, /* 17 */ /* for internal use only */ FL_TOPTAB_UPBOX, FL_SELECTED_TOPTAB_UPBOX, FL_BOTTOMTAB_UPBOX, FL_SELECTED_BOTTOMTAB_UPBOX, FL_MAX_BOX_STYLES /* sentinel */ } FL_BOX_TYPE; #define FL_IS_UPBOX( t ) ( ( t ) == FL_UP_BOX \ || ( t ) == FL_OVAL3D_UPBOX \ || ( t ) == FL_ROUNDED3D_UPBOX) #define FL_IS_DOWNBOX( t ) ( ( t ) == FL_DOWN_BOX \ || ( t ) == FL_OVAL3D_DOWNBOX \ || ( t ) == FL_ROUNDED3D_DOWNBOX) #define FL_TO_DOWNBOX( t ) ( ( t ) == FL_UP_BOX ? FL_DOWN_BOX: \ ( ( t ) == FL_ROUNDED3D_UPBOX ? \ FL_ROUNDED3D_DOWNBOX: \ ( ( t ) == FL_OVAL3D_UPBOX ? \ FL_OVAL3D_DOWNBOX : ( t ) ) ) ) /* How to place text relative to a box */ typedef enum { FL_ALIGN_CENTER, FL_ALIGN_TOP = 1, FL_ALIGN_BOTTOM = 2, FL_ALIGN_LEFT = 4, FL_ALIGN_RIGHT = 8, FL_ALIGN_LEFT_TOP = ( FL_ALIGN_TOP | FL_ALIGN_LEFT ), FL_ALIGN_RIGHT_TOP = ( FL_ALIGN_TOP | FL_ALIGN_RIGHT ), FL_ALIGN_LEFT_BOTTOM = ( FL_ALIGN_BOTTOM | FL_ALIGN_LEFT ), FL_ALIGN_RIGHT_BOTTOM = ( FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT ), FL_ALIGN_INSIDE = ( 1 << 13 ), FL_ALIGN_VERT = ( 1 << 14 ), /* not functional yet */ /* the rest is for backward compatibility only, don't use! */ FL_ALIGN_TOP_LEFT = FL_ALIGN_LEFT_TOP, FL_ALIGN_TOP_RIGHT = FL_ALIGN_RIGHT_TOP, FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_LEFT_BOTTOM, FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_RIGHT_BOTTOM } FL_ALIGN; /* Mouse buttons. Don't have to be consecutive */ enum { FL_MBUTTON1 = 1, FL_MBUTTON2, FL_MBUTTON3, FL_MBUTTON4, FL_MBUTTON5 }; #define FL_LEFT_MOUSE FL_MBUTTON1 #define FL_MIDDLE_MOUSE FL_MBUTTON2 #define FL_RIGHT_MOUSE FL_MBUTTON3 #define FL_SCROLLUP_MOUSE FL_MBUTTON4 #define FL_SCROLLDOWN_MOUSE FL_MBUTTON5 #define FL_LEFTMOUSE FL_LEFT_MOUSE #define FL_MIDDLEMOUSE FL_MIDDLE_MOUSE #define FL_RIGHTMOUSE FL_RIGHT_MOUSE #define FL_SCROLLUPMOUSE FL_SCROLLUP_MOUSE #define FL_SCROLLDOWNMOUSE FL_SCROLLDOWN_MOUSE /* control when to return input, slider and dial etc. object. */ #define FL_RETURN_NONE 0U #define FL_RETURN_CHANGED 1U #define FL_RETURN_END 2U #define FL_RETURN_END_CHANGED 4U #define FL_RETURN_SELECTION 8U #define FL_RETURN_DESELECTION 16U #define FL_RETURN_TRIGGERED 1024U #define FL_RETURN_ALWAYS ( ~ FL_RETURN_END_CHANGED ) /* Some special color indices for FL private colormap. It does not matter * what the value of each enum is, but it must start from 0 and be * consecutive. */ typedef enum { FL_BLACK, FL_RED, FL_GREEN, FL_YELLOW, FL_BLUE, FL_MAGENTA, FL_CYAN, FL_WHITE, FL_TOMATO, FL_INDIANRED, FL_SLATEBLUE, FL_COL1, FL_RIGHT_BCOL, FL_BOTTOM_BCOL, FL_TOP_BCOL, FL_LEFT_BCOL, FL_MCOL, FL_INACTIVE, FL_PALEGREEN, FL_DARKGOLD, FL_ORCHID, FL_DARKCYAN, FL_DARKTOMATO, FL_WHEAT, FL_DARKORANGE, FL_DEEPPINK, FL_CHARTREUSE, FL_DARKVIOLET, FL_SPRINGGREEN, FL_DODGERBLUE, FL_LIGHTER_COL1, FL_DARKER_COL1, FL_ALICEBLUE, FL_ANTIQUEWHITE, FL_AQUA, FL_AQUAMARINE, FL_AZURE, FL_BEIGE, FL_BISQUE, FL_BLANCHEDALMOND, FL_BLUEVIOLET, FL_BROWN, FL_BURLYWOOD, FL_CADETBLUE, FL_CHOCOLATE, FL_CORAL, FL_CORNFLOWERBLUE, FL_CORNSILK, FL_CRIMSON, FL_DARKBLUE, FL_DARKGOLDENROD, FL_DARKGRAY, FL_DARKGREEN, FL_DARKGREY, FL_DARKKHAKI, FL_DARKMAGENTA, FL_DARKOLIVEGREEN, FL_DARKORCHID, FL_DARKRED, FL_DARKSALMON, FL_DARKSEAGREEN, FL_DARKSLATEBLUE, FL_DARKSLATEGRAY, FL_DARKSLATEGREY, FL_DARKTURQUOISE, FL_DEEPSKYBLUE, FL_DIMGRAY, FL_DIMGREY, FL_FIREBRICK, FL_FLORALWHITE, FL_FORESTGREEN, FL_FUCHSIA, FL_GAINSBORO, FL_GHOSTWHITE, FL_GOLD, FL_GOLDENROD, FL_GRAY, FL_GREENYELLOW, FL_GREY, FL_HONEYDEW, FL_HOTPINK, FL_INDIGO, FL_IVORY, FL_KHAKI, FL_LAVENDER, FL_LAVENDERBLUSH, FL_LAWNGREEN, FL_LEMONCHIFFON, FL_LIGHTBLUE, FL_LIGHTCORAL, FL_LIGHTCYAN, FL_LIGHTGOLDENRODYELLOW, FL_LIGHTGRAY, FL_LIGHTGREEN, FL_LIGHTGREY, FL_LIGHTPINK, FL_LIGHTSALMON, FL_LIGHTSEAGREEN, FL_LIGHTSKYBLUE, FL_LIGHTSLATEGRAY, FL_LIGHTSLATEGREY, FL_LIGHTSTEELBLUE, FL_LIGHTYELLOW, FL_LIME, FL_LIMEGREEN, FL_LINEN, FL_MAROON, FL_MEDIUMAQUAMARINE, FL_MEDIUMBLUE, FL_MEDIUMORCHID, FL_MEDIUMPURPLE, FL_MEDIUMSEAGREEN, FL_MEDIUMSLATEBLUE, FL_MEDIUMSPRINGGREEN, FL_MEDIUMTURQUOISE, FL_MEDIUMVIOLETRED, FL_MIDNIGHTBLUE, FL_MINTCREAM, FL_MISTYROSE, FL_MOCCASIN, FL_NAVAJOWHITE, FL_NAVY, FL_OLDLACE, FL_OLIVE, FL_OLIVEDRAB, FL_ORANGE, FL_ORANGERED, FL_PALEGOLDENROD, FL_PALETURQUOISE, FL_PALEVIOLETRED, FL_PAPAYAWHIP, FL_PEACHPUFF, FL_PERU, FL_PINK, FL_PLUM, FL_POWDERBLUE, FL_PURPLE, FL_ROSYBROWN, FL_ROYALBLUE, FL_SADDLEBROWN, FL_SALMON, FL_SANDYBROWN, FL_SEAGREEN, FL_SEASHELL, FL_SIENNA, FL_SILVER, FL_SKYBLUE, FL_SLATEGRAY, FL_SLATEGREY, FL_SNOW, FL_STEELBLUE, FL_TAN, FL_TEAL, FL_THISTLE, FL_TURQUOISE, FL_VIOLET, FL_WHITESMOKE, FL_YELLOWGREEN, FL_FREE_COL1 = 256, FL_FREE_COL2, FL_FREE_COL3, FL_FREE_COL4, FL_FREE_COL5, FL_FREE_COL6, FL_FREE_COL7, FL_FREE_COL8, FL_FREE_COL9, FL_FREE_COL10, FL_FREE_COL11, FL_FREE_COL12, FL_FREE_COL13, FL_FREE_COL14, FL_FREE_COL15, FL_FREE_COL16, FL_NOCOLOR = INT_MAX } FL_PD_COL; #define FL_BUILT_IN_COLS ( FL_YELLOWGREEN + 1 ) #define FL_INACTIVE_COL FL_INACTIVE /* Some aliases for a number of colors */ #define FL_GRAY16 FL_RIGHT_BCOL #define FL_GRAY35 FL_BOTTOM_BCOL #define FL_GRAY80 FL_TOP_BCOL #define FL_GRAY90 FL_LEFT_BCOL #define FL_GRAY63 FL_COL1 #define FL_GRAY75 FL_MCOL #define FL_LCOL FL_BLACK #define FL_NoColor FL_NOCOLOR /* An alias probably for an earlier typo */ #define FL_DOGERBLUE FL_DODGERBLUE /* Events that a form reacts to */ typedef enum { FL_NOEVENT, /* 0 */ FL_DRAW, /* 1 */ FL_PUSH, /* 2 */ FL_RELEASE, /* 3 */ FL_ENTER, /* 4 */ FL_LEAVE, /* 5 */ FL_MOTION, /* 6 */ FL_FOCUS, /* 7 */ FL_UNFOCUS, /* 8 */ FL_KEYPRESS, /* 9 */ FL_UPDATE, /* 10 for objects that need to update something from time to time */ FL_STEP, /* 11 */ FL_SHORTCUT, /* 12 */ FL_FREEMEM, /* 13 */ FL_OTHER, /* 14 property, selection etc */ FL_DRAWLABEL, /* 15 */ FL_DBLCLICK, /* 16 double click */ FL_TRPLCLICK, /* 17 triple click */ FL_ATTRIB, /* 18 attribute change */ FL_KEYRELEASE, /* 19 */ FL_PS, /* 20 dump a form into EPS */ FL_MOVEORIGIN, /* 21 dragging the form across the screen changes its absolute x,y coords. Objects that themselves contain forms should ensure that they are up to date. */ FL_RESIZED, /* 22 the object has been resized by scale_form Tell it that this has happened so that it can resize any FL_FORMs that it contains. */ /* The following are only for backward compatibility, not used anymore */ FL_MOVE = FL_MOTION, FL_KEYBOARD = FL_KEYPRESS, FL_MOUSE = FL_UPDATE } FL_EVENTS; /* Resize policies */ typedef enum { FL_RESIZE_NONE, FL_RESIZE_X, FL_RESIZE_Y, FL_RESIZE_ALL = ( FL_RESIZE_X | FL_RESIZE_Y ) } FL_RESIZE_T; /* Keyboard focus control */ typedef enum { FL_KEY_NORMAL = 1, /* normal keys(0-255) - tab +left/right */ FL_KEY_TAB = 2, /* normal keys + 4 direction cursor */ FL_KEY_SPECIAL = 4, /* only needs special keys(>255) */ FL_KEY_ALL = 7 /* all keys */ } FL_KEY; #define FL_ALT_MASK ( 1L << 25 ) /* alt + Key --> FL_ALT_MASK + key */ #define FL_CONTROL_MASK ( 1L << 26 ) #define FL_SHIFT_MASK ( 1L << 27 ) #define FL_ALT_VAL FL_ALT_MASK /* Don' use! */ #define MAX_SHORTCUTS 8 /* Pop-up menu item attributes. NOTE if more than 8, need to change * choice and menu class where mode is kept by a single byte */ enum { FL_PUP_NONE, FL_PUP_GREY = 1, FL_PUP_BOX = 2, FL_PUP_CHECK = 4, FL_PUP_RADIO = 8 }; #define FL_PUP_GRAY FL_PUP_GREY #define FL_PUP_TOGGLE FL_PUP_BOX /* not used anymore */ #define FL_PUP_INACTIVE FL_PUP_GREY /* Popup and menu entries */ typedef int ( * FL_PUP_CB )( int ); /* callback prototype */ typedef struct { const char * text; /* label of a popup/menu item */ FL_PUP_CB callback; /* the callback function */ const char * shortcut; /* hotkeys */ int mode; /* FL_PUP_GRAY, FL_PUP_CHECK etc */ } FL_PUP_ENTRY; #define FL_MENU_ENTRY FL_PUP_ENTRY /******************************************************************* * FONTS ******************************************************************/ #define FL_MAXFONTS 48 /* max number of fonts */ typedef enum { FL_INVALID_STYLE = -1, FL_NORMAL_STYLE, FL_BOLD_STYLE, FL_ITALIC_STYLE, FL_BOLDITALIC_STYLE, FL_FIXED_STYLE, FL_FIXEDBOLD_STYLE, FL_FIXEDITALIC_STYLE, FL_FIXEDBOLDITALIC_STYLE, FL_TIMES_STYLE, FL_TIMESBOLD_STYLE, FL_TIMESITALIC_STYLE, FL_TIMESBOLDITALIC_STYLE, FL_MISC_STYLE, FL_MISCBOLD_STYLE, FL_MISCITALIC_STYLE, FL_SYMBOL_STYLE, /* modfier masks. Need to fit a short */ FL_SHADOW_STYLE = ( 1 << 9 ), FL_ENGRAVED_STYLE = ( 1 << 10 ), FL_EMBOSSED_STYLE = ( 1 << 11 ) } FL_TEXT_STYLE; #define FL_FONT_STYLE FL_TEXT_STYLE #define special_style( a ) ( ( a ) >= FL_SHADOW_STYLE \ && ( a ) <= ( FL_EMBOSSED_STYLE + FL_MAXFONTS ) ) /* Standard sizes in XForms */ #define FL_TINY_SIZE 8 #define FL_SMALL_SIZE 10 #define FL_NORMAL_SIZE 12 #define FL_MEDIUM_SIZE 14 #define FL_LARGE_SIZE 18 #define FL_HUGE_SIZE 24 #define FL_DEFAULT_SIZE FL_SMALL_SIZE /* Defines for compatibility */ #define FL_TINY_FONT FL_TINY_SIZE #define FL_SMALL_FONT FL_SMALL_SIZE #define FL_NORMAL_FONT FL_NORMAL_SIZE #define FL_MEDIUM_FONT FL_MEDIUM_SIZE #define FL_LARGE_FONT FL_LARGE_SIZE #define FL_HUGE_FONT FL_HUGE_SIZE #define FL_NORMAL_FONT1 FL_SMALL_FONT #define FL_NORMAL_FONT2 FL_NORMAL_FONT #define FL_DEFAULT_FONT FL_SMALL_FONT #define FL_BOUND_WIDTH ( FL_Coord ) 1 /* Border width of boxes */ /* Definition of basic struct that holds an object */ #define FL_CLICK_TIMEOUT 400 /* double click interval */ typedef struct FL_FORM_ FL_FORM; typedef struct FL_OBJECT_ FL_OBJECT; typedef struct FL_pixmap_ FL_pixmap; struct FL_OBJECT_ { FL_FORM * form; /* the form this object belongs to */ void * u_vdata; /* anything the user likes */ char * u_cdata; /* anything the user likes */ long u_ldata; /* anything the user likes */ int objclass; /* class of object, button, slider etc */ int type; /* type within the class */ int boxtype; /* what kind of box type */ FL_Coord x, /* current obj. location and size */ y, w, h; double fl1, /* distances of upper left hand (1) and */ fr1, /* lower right hand corner (2) to left, */ ft1, /* right, top and bottom of enclosing */ fb1, /* form */ fl2, fr2, ft2, fb2; FL_Coord bw; FL_COLOR col1, /* colors of obj */ col2; char * label; /* object label */ FL_COLOR lcol; /* label color */ int align; int lsize, /* label size and style */ lstyle; long * shortcut; int ( * handle )( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); void ( * object_callback )( FL_OBJECT *, long ); long argument; void * spec; /* instantiation */ int ( * prehandle )( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); int ( * posthandle )( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); void ( * set_return )( FL_OBJECT *, unsigned int ); /* re-configure preference */ unsigned int resize; /* what to do if WM resizes the FORM */ unsigned int nwgravity; /* how to re-position top-left corner */ unsigned int segravity; /* how to re-position lower-right corner */ FL_OBJECT * prev; /* prev. obj in form */ FL_OBJECT * next; /* next. obj in form */ FL_OBJECT * parent; FL_OBJECT * child; FL_OBJECT * nc; /* next child */ FL_pixmap * flpixmap; /* pixmap double buffering stateinfo */ int use_pixmap; /* true to use pixmap double buffering*/ /* some interaction flags */ int returned; /* what last interaction returned */ unsigned int how_return; /* under which conditions to return */ int double_buffer; /* only used by mesa/gl canvas */ int pushed; int focus; int belowmouse; int active; /* if object accepts events */ int input; int wantkey; int radio; int automatic; int redraw; int visible; int is_under; /* if (partially) hidden by other object */ int clip; unsigned long click_timeout; void * c_vdata; /* for class use */ char * c_cdata; /* for class use */ long c_ldata; /* for class use */ FL_COLOR dbl_background; /* double buffer background */ char * tooltip; int tipID; int group_id; int want_motion; int want_update; }; /* typedef'ed to FL_OBJECT above */; /* callback function for an entire form */ typedef void ( * FL_FORMCALLBACKPTR )( FL_OBJECT *, void * ); /* object callback function */ typedef void ( * FL_CALLBACKPTR )( FL_OBJECT *, long ); /* preemptive callback function */ typedef int ( * FL_RAW_CALLBACK )( FL_FORM *, void * ); /* at close (WM menu delete/close etc.) */ typedef int ( * FL_FORM_ATCLOSE )( FL_FORM *, void * ); /* deactivate/activate callback */ typedef void ( * FL_FORM_ATDEACTIVATE )( FL_FORM *, void * ); typedef void ( * FL_FORM_ATACTIVATE )( FL_FORM *, void * ); typedef int ( * FL_HANDLEPTR )( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); /* error callback */ typedef void ( * FL_ERROR_FUNC )( const char *, const char *, ... ); FL_EXPORT FL_OBJECT *FL_EVENT; /*** FORM ****/ /* form visibility state: form->visible */ enum { FL_BEING_HIDDEN = -1, FL_HIDDEN = 0, FL_INVISIBLE = FL_HIDDEN, FL_VISIBLE = 1 }; struct FL_FORM_ { void * fdui; /* for fdesign */ void * u_vdata; /* for application */ char * u_cdata; /* for application */ long u_ldata; /* for application */ char * label; /* window title */ Window window; /* X resource ID for window */ FL_Coord x, /* current geometry info */ y, w, h; int handle_dec_x, handle_dec_y; FL_Coord hotx, /* hot-spot of the form */ hoty; double w_hr, /* high resolution width and height */ h_hr; /* (needed for precise scaling) */ FL_OBJECT * first; FL_OBJECT * last; FL_OBJECT * focusobj; FL_FORMCALLBACKPTR form_callback; FL_FORM_ATACTIVATE activate_callback; FL_FORM_ATDEACTIVATE deactivate_callback; void * form_cb_data; void * activate_data; void * deactivate_data; FL_RAW_CALLBACK key_callback; FL_RAW_CALLBACK push_callback; FL_RAW_CALLBACK crossing_callback; FL_RAW_CALLBACK motion_callback; FL_RAW_CALLBACK all_callback; unsigned long compress_mask; unsigned long evmask; /* WM_DELETE_WINDOW message handler */ FL_FORM_ATCLOSE close_callback; void * close_data; FL_pixmap * flpixmap; /* back buffer */ Pixmap icon_pixmap; Pixmap icon_mask; /* interaction and other flags */ int deactivated; /* non-zero if deactivated */ int use_pixmap; /* true if dbl buffering */ int frozen; /* true if sync change */ int visible; /* true if mapped */ int wm_border; /* window manager info */ unsigned int prop; /* other attributes */ int num_auto_objects; int top; int sort_of_modal; /* internal use */ FL_FORM * parent; FL_FORM * child; FL_OBJECT * parent_obj; int attached; /* not independent anymore */ void ( * pre_attach )( FL_FORM * ); void * attach_data; int no_tooltip; }; /* typedef'ed to FL_FORM above */ /* All FD_xxx structure emitted by fdesign contains at least the * following */ typedef struct { FL_FORM * form; void * vdata; char * cdata; long ldata; } FD_Any; /* Async IO stuff */ enum { FL_READ = 1, FL_WRITE = 2, FL_EXCEPT = 4 }; /* IO other than XEvent Q */ typedef void ( * FL_IO_CALLBACK )( int, void * ); FL_EXPORT void fl_add_io_callback( int fd, unsigned int mask, FL_IO_CALLBACK callback, void * data ); FL_EXPORT void fl_remove_io_callback( int fd, unsigned int mask, FL_IO_CALLBACK cb ); /* signals */ typedef void ( * FL_SIGNAL_HANDLER )( int, void * ); FL_EXPORT void fl_add_signal_callback( int s, FL_SIGNAL_HANDLER cb, void * data ); FL_EXPORT void fl_remove_signal_callback( int s ); FL_EXPORT void fl_signal_caught( int s ); FL_EXPORT void fl_app_signal_direct( int y ); enum { FL_INPUT_END_EVENT_CLASSIC = 0, FL_INPUT_END_EVENT_ALWAYS = 1 }; FL_EXPORT int fl_input_end_return_handling( int type ); /* timeouts */ typedef void (* FL_TIMEOUT_CALLBACK )( int, void * ); FL_EXPORT int fl_add_timeout( long msec, FL_TIMEOUT_CALLBACK callback, void * data ); FL_EXPORT void fl_remove_timeout( int id ); /* Basic public routine prototypes */ FL_EXPORT int fl_library_version( int * ver, int * rev ); /** Generic routines that deal with FORMS **/ FL_EXPORT FL_FORM * fl_bgn_form( int type, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_end_form( void ); FL_EXPORT FL_OBJECT * fl_do_forms( void ); FL_EXPORT FL_OBJECT * fl_check_forms( void ); FL_EXPORT FL_OBJECT * fl_do_only_forms( void ); FL_EXPORT FL_OBJECT * fl_check_only_forms( void ); FL_EXPORT void fl_freeze_form( FL_FORM * form ); FL_EXPORT void fl_set_focus_object( FL_FORM * form, FL_OBJECT * obj ); FL_EXPORT FL_OBJECT *fl_get_focus_object( FL_FORM * form ); FL_EXPORT void fl_reset_focus_object( FL_OBJECT * ob ); #define fl_set_object_focus fl_set_focus_object FL_EXPORT FL_FORM_ATCLOSE fl_set_form_atclose( FL_FORM * form, FL_FORM_ATCLOSE fmclose, void * data ); FL_EXPORT FL_FORM_ATCLOSE fl_set_atclose( FL_FORM_ATCLOSE fmclose, void * data ); FL_EXPORT FL_FORM_ATACTIVATE fl_set_form_atactivate( FL_FORM * form, FL_FORM_ATACTIVATE cb, void * data ); FL_EXPORT FL_FORM_ATDEACTIVATE fl_set_form_atdeactivate( FL_FORM * form, FL_FORM_ATDEACTIVATE cb, void * data ); FL_EXPORT void fl_unfreeze_form( FL_FORM * form ); FL_EXPORT void fl_deactivate_form( FL_FORM * form ); FL_EXPORT void fl_activate_form( FL_FORM * form ); FL_EXPORT void fl_deactivate_all_forms( void ); FL_EXPORT void fl_activate_all_forms( void ); FL_EXPORT void fl_freeze_all_forms( void ); FL_EXPORT void fl_unfreeze_all_forms( void ); FL_EXPORT void fl_scale_form( FL_FORM * form, double xsc, double ysc ); FL_EXPORT void fl_set_form_position( FL_FORM * form, FL_Coord x, FL_Coord y ); FL_EXPORT void fl_set_form_title( FL_FORM * form, const char * name ); FL_EXPORT void fl_set_app_mainform( FL_FORM * form ); FL_EXPORT FL_FORM * fl_get_app_mainform( void ); FL_EXPORT void fl_set_app_nomainform( int flag ); FL_EXPORT void fl_set_form_callback( FL_FORM * form, FL_FORMCALLBACKPTR callback, void * d ); #define fl_set_form_call_back fl_set_form_callback FL_EXPORT void fl_set_form_size( FL_FORM * form, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_set_form_hotspot( FL_FORM * form, FL_Coord x, FL_Coord y ); FL_EXPORT void fl_set_form_hotobject( FL_FORM * form, FL_OBJECT * ob ); FL_EXPORT void fl_set_form_minsize( FL_FORM * form, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_set_form_maxsize( FL_FORM * form, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_set_form_event_cmask( FL_FORM * form, unsigned long cmask ); FL_EXPORT unsigned long fl_get_form_event_cmask( FL_FORM * form ); FL_EXPORT void fl_set_form_geometry( FL_FORM * form, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ); #define fl_set_initial_placement fl_set_form_geometry FL_EXPORT Window fl_show_form( FL_FORM * form, int place, int border, const char * name ); FL_EXPORT void fl_hide_form( FL_FORM * form ); FL_EXPORT void fl_free_form( FL_FORM * form ); FL_EXPORT void fl_redraw_form( FL_FORM * form ); FL_EXPORT void fl_set_form_dblbuffer( FL_FORM * form, int y ); FL_EXPORT Window fl_prepare_form_window( FL_FORM * form, int place, int border, const char * name ); FL_EXPORT Window fl_show_form_window( FL_FORM * form ); FL_EXPORT double fl_adjust_form_size( FL_FORM * form ); FL_EXPORT int fl_form_is_visible( FL_FORM * form ); FL_EXPORT int fl_form_is_iconified( FL_FORM * form ); FL_EXPORT FL_RAW_CALLBACK fl_register_raw_callback( FL_FORM * form, unsigned long mask, FL_RAW_CALLBACK rcb ); #define fl_register_call_back fl_register_raw_callback FL_EXPORT FL_OBJECT * fl_bgn_group( void ); FL_EXPORT void fl_end_group( void ); FL_EXPORT FL_OBJECT *fl_addto_group( FL_OBJECT * group ); /****** Routines that deal with FL_OBJECTS ********/ FL_EXPORT int fl_get_object_objclass( FL_OBJECT * obj ); FL_EXPORT int fl_get_object_type( FL_OBJECT * obj ); FL_EXPORT void fl_set_object_boxtype( FL_OBJECT * ob, int boxtype ); FL_EXPORT int fl_get_object_boxtype( FL_OBJECT * obj ); FL_EXPORT void fl_set_object_bw( FL_OBJECT * ob, int bw ); FL_EXPORT void fl_get_object_bw( FL_OBJECT * ob, int * bw ); FL_EXPORT void fl_set_object_resize( FL_OBJECT * ob, unsigned int what ); FL_EXPORT void fl_get_object_resize( FL_OBJECT * ob, unsigned int * what ); FL_EXPORT void fl_set_object_gravity( FL_OBJECT * ob, unsigned int nw, unsigned int se ); FL_EXPORT void fl_get_object_gravity( FL_OBJECT * ob, unsigned int * nw, unsigned int * se ); FL_EXPORT void fl_set_object_lsize( FL_OBJECT * obj, int lsize ); FL_EXPORT int fl_get_object_lsize( FL_OBJECT * obj ); FL_EXPORT void fl_set_object_lstyle( FL_OBJECT * obj, int lstyle ); FL_EXPORT int fl_get_object_lstyle( FL_OBJECT * obj ); FL_EXPORT void fl_set_object_lcol( FL_OBJECT * ob, FL_COLOR lcol ); FL_EXPORT FL_COLOR fl_get_object_lcol( FL_OBJECT * obj ); FL_EXPORT int fl_set_object_return( FL_OBJECT * ob, unsigned int when ); FL_EXPORT void fl_notify_object( FL_OBJECT * obj, int cause ); FL_EXPORT void fl_set_object_lalign( FL_OBJECT * obj, int align ); FL_EXPORT int fl_get_object_lalign( FL_OBJECT * obj ); FL_EXPORT void fl_set_object_shortcut( FL_OBJECT * obj, const char * sstr, int showit ); FL_EXPORT void fl_set_object_shortcutkey( FL_OBJECT * obj, unsigned int keysym ); FL_EXPORT void fl_set_object_dblbuffer( FL_OBJECT * ob, int y ); FL_EXPORT void fl_set_object_color( FL_OBJECT * ob, FL_COLOR col1, FL_COLOR col2 ); FL_EXPORT void fl_get_object_color( FL_OBJECT * obj, FL_COLOR * col1, FL_COLOR * col2 ); FL_EXPORT void fl_set_object_label( FL_OBJECT * ob, const char * label ); FL_EXPORT const char * fl_get_object_label( FL_OBJECT * obj ); FL_EXPORT void fl_set_object_helper( FL_OBJECT * ob, const char * tip ); FL_EXPORT void fl_set_object_position( FL_OBJECT * obj, FL_Coord x, FL_Coord y ); FL_EXPORT void fl_get_object_size( FL_OBJECT * obj, FL_Coord * w, FL_Coord * h ); FL_EXPORT void fl_set_object_size( FL_OBJECT * obj, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_set_object_automatic( FL_OBJECT * obj, int flag ); FL_EXPORT int fl_object_is_automatic( FL_OBJECT * obj ); FL_EXPORT void fl_draw_object_label( FL_OBJECT * ob ); FL_EXPORT void fl_draw_object_label_outside( FL_OBJECT * ob ); FL_EXPORT FL_OBJECT * fl_get_object_component( FL_OBJECT * composite, int objclass, int type, int numb ); FL_EXPORT void fl_for_all_objects( FL_FORM * form, int ( * cb )( FL_OBJECT *, void * ), void * v ); #define fl_draw_object_outside_label fl_draw_object_label_outside FL_EXPORT void fl_set_object_dblclick( FL_OBJECT * obj, unsigned long timeout ); FL_EXPORT unsigned long fl_get_object_dblclick( FL_OBJECT * obj ); FL_EXPORT void fl_set_object_geometry( FL_OBJECT * obj, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_move_object( FL_OBJECT * obj, FL_Coord dx, FL_Coord dy ); #define fl_set_object_lcolor fl_set_object_lcol FL_EXPORT void fl_fit_object_label( FL_OBJECT * obj, FL_Coord xmargin, FL_Coord ymargin ); FL_EXPORT void fl_get_object_geometry( FL_OBJECT * ob, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ); FL_EXPORT void fl_get_object_position( FL_OBJECT * ob, FL_Coord * x, FL_Coord * y ); /* this one takes into account the label */ FL_EXPORT void fl_get_object_bbox( FL_OBJECT * obj, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ); #define fl_compute_object_geometry fl_get_object_bbox FL_EXPORT void fl_call_object_callback( FL_OBJECT * ob ); FL_EXPORT FL_HANDLEPTR fl_set_object_prehandler( FL_OBJECT * ob, FL_HANDLEPTR phandler ); FL_EXPORT FL_HANDLEPTR fl_set_object_posthandler( FL_OBJECT * ob, FL_HANDLEPTR post ); FL_EXPORT FL_CALLBACKPTR fl_set_object_callback( FL_OBJECT * obj, FL_CALLBACKPTR callback, long argument ); #define fl_set_object_align fl_set_object_lalign #define fl_set_call_back fl_set_object_callback FL_EXPORT void fl_redraw_object( FL_OBJECT * obj ); FL_EXPORT void fl_scale_object( FL_OBJECT * ob, double xs, double ys ); FL_EXPORT void fl_show_object( FL_OBJECT * ob ); FL_EXPORT void fl_hide_object( FL_OBJECT * ob ); FL_EXPORT int fl_object_is_visible( FL_OBJECT * obj ); FL_EXPORT void fl_free_object( FL_OBJECT * obj ); FL_EXPORT void fl_delete_object( FL_OBJECT * obj ); FL_EXPORT int fl_get_object_return_state( FL_OBJECT *obj ); FL_EXPORT void fl_trigger_object( FL_OBJECT * obj ); FL_EXPORT void fl_activate_object( FL_OBJECT * ob ); FL_EXPORT void fl_deactivate_object( FL_OBJECT * ob ); FL_EXPORT int fl_object_is_active( FL_OBJECT * obj ); FL_EXPORT int fl_enumerate_fonts( void ( * output )( const char * s ), int shortform ); FL_EXPORT int fl_set_font_name( int n, const char * name ); FL_EXPORT void fl_set_font( int numb, int size ); /* routines that facilitate free object */ FL_EXPORT int fl_get_char_height( int style, int size, int * asc, int * desc ); FL_EXPORT int fl_get_char_width( int style, int size ); FL_EXPORT int fl_get_string_height( int style, int size, const char * s, int len, int * asc, int * desc ); FL_EXPORT int fl_get_string_width( int style, int size, const char * s, int len ); FL_EXPORT int fl_get_string_widthTAB( int style, int size, const char * s, int len ); FL_EXPORT void fl_get_string_dimension( int fntstyle, int fntsize, const char * s, int len, int * width, int * height ); #define fl_get_string_size fl_get_string_dimension FL_EXPORT void fl_get_align_xy( int align, int x, int y, int w, int h, int xsize, int ysize, int xoff, int yoff, int * xx, int * yy ); FL_EXPORT void fl_drw_text( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int style, int size, const char * istr ); FL_EXPORT void fl_drw_text_beside( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int style, int size, const char * str ); FL_EXPORT void fl_drw_text_cursor( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int style, int size, const char * str, int cc, int pos ); FL_EXPORT void fl_drw_box( int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int bw_in ); typedef void ( * FL_DRAWPTR )( FL_Coord, FL_Coord, FL_Coord, FL_Coord, int, FL_COLOR); FL_EXPORT int fl_add_symbol( const char * name, FL_DRAWPTR drawit, int scalable ); FL_EXPORT int fl_draw_symbol( const char * label, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ); FL_EXPORT unsigned long fl_mapcolor( FL_COLOR col, int r, int g, int b ); FL_EXPORT long fl_mapcolorname( FL_COLOR col, const char * name ); #define fl_mapcolor_name fl_mapcolorname FL_EXPORT void fl_free_colors( FL_COLOR * c, int n ); FL_EXPORT void fl_free_pixels( unsigned long * pix, int n ); FL_EXPORT void fl_set_color_leak( int y ); FL_EXPORT unsigned long fl_getmcolor( FL_COLOR i, int * r, int * g, int * b ); FL_EXPORT unsigned long fl_get_pixel( FL_COLOR col ); #define fl_get_flcolor fl_get_pixel FL_EXPORT void fl_get_icm_color( FL_COLOR col, int * r, int * g, int * b ); FL_EXPORT void fl_set_icm_color( FL_COLOR col, int r, int g, int b ); FL_EXPORT void fl_color( FL_COLOR col ); FL_EXPORT void fl_bk_color( FL_COLOR col ); FL_EXPORT void fl_textcolor( FL_COLOR col ); FL_EXPORT void fl_bk_textcolor( FL_COLOR col ); FL_EXPORT void fl_set_gamma( double r, double g, double b ); FL_EXPORT void fl_show_errors( int y ); /* Some macros */ #define FL_max( a, b ) ( ( a ) > ( b ) ? ( a ) : ( b ) ) #define FL_min( a, b ) ( ( a ) < ( b ) ? ( a ) : ( b ) ) #define FL_abs( a ) ( ( a ) > 0 ? ( a ) : ( - ( a ) ) ) #define FL_nint( a ) ( ( int ) ( ( a ) > 0 ? \ ( ( a ) + 0.5 ) : \ ( ( a ) - 0.5 ) ) ) #define FL_clamp( a, amin, amax ) ( ( a ) < ( amin ) ? \ ( amin ) : ( ( a ) > ( amax ) ? \ ( amax ) : ( a ) ) ) #define FL_crnd( a ) ( ( FL_Coord ) ( ( a ) > 0 ? \ ( ( a ) + 0.5 ) : \ ( ( a ) - 0.5 ) ) ) typedef int ( * FL_FSCB )( const char *, void * ); /* utilities for new objects */ FL_EXPORT FL_FORM *fl_current_form; FL_EXPORT void fl_add_object( FL_FORM * form, FL_OBJECT * obj ); FL_EXPORT FL_FORM *fl_addto_form( FL_FORM * form ); FL_EXPORT FL_OBJECT * fl_make_object( int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label, FL_HANDLEPTR handle ); FL_EXPORT void fl_add_child( FL_OBJECT *, FL_OBJECT * ); FL_EXPORT void fl_set_coordunit( int u ); FL_EXPORT void fl_set_border_width( int bw ); FL_EXPORT void fl_set_scrollbar_type( int t ); #define fl_set_thinscrollbar( t ) \ fl_set_scrollbar_type( t ? FL_THIN_SCROLLBAR : FL_NORMAL_SCROLLBAR ) FL_EXPORT void fl_flip_yorigin( void ); FL_EXPORT int fl_get_coordunit( void ); FL_EXPORT int fl_get_border_width( void ); /* misc. routines */ FL_EXPORT void fl_ringbell( int percent ); FL_EXPORT void fl_gettime( long * sec, long * usec ); FL_EXPORT const char * fl_now( void ); FL_EXPORT const char * fl_whoami( void ); FL_EXPORT long fl_mouse_button( void ); FL_EXPORT char * fl_strdup( const char * s ); FL_EXPORT void fl_set_err_logfp( FILE * fp ); FL_EXPORT void fl_set_error_handler( FL_ERROR_FUNC user_func ); FL_EXPORT char ** fl_get_cmdline_args( int * ); /* This function was called 'fl_set_error_logfp/' in XForms 0.89. */ #define fl_set_error_logfp fl_set_err_logfp #define fl_mousebutton fl_mouse_button /* these give more flexibility for future changes. Also application * can re-assign these pointers to whatever function it wants, e.g., * to a shared memory pool allocator. */ FL_EXPORT void ( * fl_free )( void * ); FL_EXPORT void * ( * fl_malloc )( size_t ); FL_EXPORT void * ( * fl_calloc )( size_t, size_t ); FL_EXPORT void * ( * fl_realloc )( void *, size_t ); FL_EXPORT int fl_msleep( unsigned long msec ); #define FL_MAX_MENU_CHOICE_ITEMS 128 typedef const char * ( * FL_VAL_FILTER )( FL_OBJECT *, double, int ); FL_EXPORT int fl_is_same_object( FL_OBJECT * obj1, FL_OBJECT * obj2 ); #endif /* ! defined FL_BASIC_H */ xforms-1.0.93sp1/lib/include/canvas.h0000644000175000017500000001134411247055071016050 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file canvas.h * * Header for FL_CANVAS * */ #ifndef FL_CANVAS_H_ #define FL_CANVAS_H_ typedef enum { FL_NORMAL_CANVAS, FL_SCROLLED_CANVAS } FL_CANVAS_TYPE; typedef int ( * FL_HANDLE_CANVAS )( FL_OBJECT *, Window, int, int, XEvent *, void * ); typedef int ( * FL_MODIFY_CANVAS_PROP )( FL_OBJECT * ); /******************** Default *********************/ #define FL_CANVAS_BOXTYPE FL_DOWN_BOX /* really the decoration frame */ #define FL_CANVAS_ALIGN FL_ALIGN_TOP /************ Interfaces ************************/ FL_EXPORT FL_OBJECT * fl_create_generic_canvas( int canvas_class, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_canvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_canvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); /* backward compatibility */ #define fl_set_canvas_decoration fl_set_object_boxtype FL_EXPORT void fl_set_canvas_colormap( FL_OBJECT * ob, Colormap colormap ); FL_EXPORT void fl_set_canvas_visual( FL_OBJECT * obj, Visual * vi ); FL_EXPORT void fl_set_canvas_depth( FL_OBJECT * obj, int depth ); FL_EXPORT void fl_set_canvas_attributes( FL_OBJECT * ob, unsigned int mask, XSetWindowAttributes * xswa ); FL_EXPORT FL_HANDLE_CANVAS fl_add_canvas_handler( FL_OBJECT * ob, int ev, FL_HANDLE_CANVAS h, void * udata ); FL_EXPORT Window fl_get_canvas_id( FL_OBJECT * ob ); FL_EXPORT Colormap fl_get_canvas_colormap( FL_OBJECT * ob ); FL_EXPORT int fl_get_canvas_depth( FL_OBJECT * obj ); FL_EXPORT void fl_remove_canvas_handler( FL_OBJECT * ob, int ev, FL_HANDLE_CANVAS h ); FL_EXPORT void fl_hide_canvas( FL_OBJECT * ob ); FL_EXPORT void fl_share_canvas_colormap( FL_OBJECT * ob, Colormap colormap ); FL_EXPORT void fl_clear_canvas( FL_OBJECT * ob ); FL_EXPORT void fl_modify_canvas_prop( FL_OBJECT * obj, FL_MODIFY_CANVAS_PROP init, FL_MODIFY_CANVAS_PROP activate, FL_MODIFY_CANVAS_PROP cleanup ); FL_EXPORT void fl_canvas_yield_to_shortcut( FL_OBJECT * ob, int yes ); /* This is an attempt to maintain some sort of backwards compatibility * with old code whilst also getting rid of the old, system-specific * hack. */ #ifdef AUTOINCLUDE_GLCANVAS_H #include #endif #endif /* ! defined FL_CANVAS_H */ xforms-1.0.93sp1/lib/include/frame.h0000644000175000017500000000516511247055071015673 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file frame.h */ #ifndef FL_FRAME_H #define FL_FRAME_H /* types of frames */ enum { FL_NO_FRAME, FL_UP_FRAME, FL_DOWN_FRAME, FL_BORDER_FRAME, FL_SHADOW_FRAME, FL_ENGRAVED_FRAME, FL_ROUNDED_FRAME, FL_EMBOSSED_FRAME, FL_OVAL_FRAME }; #define FL_FRAME_COL1 FL_BLACK /* border color */ #define FL_FRAME_COL2 FL_COL1 /* label background */ #define FL_FRAME_LCOL FL_BLACK /* label color */ FL_EXPORT FL_OBJECT * fl_create_frame( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_frame( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); /* labeld frame */ FL_EXPORT FL_OBJECT * fl_create_labelframe( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_labelframe( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); #endif /* ! defined FL_FRAME_H */ xforms-1.0.93sp1/lib/include/slider.h0000644000175000017500000001264711316735603016071 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file slider.h * * Object Class: Slider */ #ifndef FL_SLIDER_H #define FL_SLIDER_H #define FL_HOR_FLAG 1 #define FL_SCROLL_FLAG 8 typedef enum { FL_VERT_SLIDER = 0, FL_HOR_SLIDER = FL_VERT_SLIDER | FL_HOR_FLAG, FL_VERT_FILL_SLIDER = 2, FL_HOR_FILL_SLIDER = FL_VERT_FILL_SLIDER | FL_HOR_FLAG, FL_VERT_NICE_SLIDER = 4, FL_HOR_NICE_SLIDER = FL_VERT_NICE_SLIDER | FL_HOR_FLAG, FL_VERT_BROWSER_SLIDER = 6, FL_HOR_BROWSER_SLIDER = FL_VERT_BROWSER_SLIDER | FL_HOR_FLAG, /* The following are for use with scrollbars only! */ /* for FL_VERT_SCROLLBAR and FL_HOR_SCROLLBAR */ FL_VERT_BROWSER_SLIDER2 = FL_VERT_SLIDER | FL_SCROLL_FLAG, FL_HOR_BROWSER_SLIDER2 = FL_HOR_SLIDER | FL_SCROLL_FLAG, /* for FL_VERT_THIN_SCROLLBAR and FL_VERT_THIN_SCROLLBAR */ FL_VERT_THIN_SLIDER = FL_VERT_FILL_SLIDER | FL_SCROLL_FLAG, FL_HOR_THIN_SLIDER = FL_HOR_FILL_SLIDER | FL_SCROLL_FLAG, /* for FL_VERT_NICE_SCROLLBAR and FL_HOR_NICE_SCROLLBAR */ FL_VERT_NICE_SLIDER2 = FL_VERT_NICE_SLIDER | FL_SCROLL_FLAG, FL_HOR_NICE_SLIDER2 = FL_HOR_NICE_SLIDER | FL_SCROLL_FLAG, /* for use as FL_VERT_PLAIN_SCROLLBAR and FL_VERT_PLAIN_SCROLLBAR */ FL_VERT_BASIC_SLIDER = FL_VERT_BROWSER_SLIDER | FL_SCROLL_FLAG, FL_HOR_BASIC_SLIDER = FL_HOR_BROWSER_SLIDER | FL_SCROLL_FLAG } FL_SLIDER_TYPE; /***** Defaults *****/ #define FL_SLIDER_BW1 FL_BOUND_WIDTH #define FL_SLIDER_BW2 ( FL_abs( FL_BOUND_WIDTH ) - 1 ) #define FL_SLIDER_BOXTYPE FL_DOWN_BOX #define FL_SLIDER_COL1 FL_COL1 #define FL_SLIDER_COL2 FL_COL1 #define FL_SLIDER_LCOL FL_LCOL #define FL_SLIDER_ALIGN FL_ALIGN_BOTTOM /***** Others *****/ #define FL_SLIDER_FINE 0.25 #define FL_SLIDER_WIDTH 0.10 /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_slider( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_slider( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_valslider( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_valslider( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_slider_value( FL_OBJECT * ob, double val ); FL_EXPORT double fl_get_slider_value( FL_OBJECT * ob ); FL_EXPORT void fl_set_slider_bounds( FL_OBJECT * ob, double min, double max ); FL_EXPORT void fl_get_slider_bounds( FL_OBJECT * ob, double * min, double * max ); FL_EXPORT void fl_set_slider_return( FL_OBJECT * ob, unsigned int value ); FL_EXPORT void fl_set_slider_step( FL_OBJECT * ob, double value ); FL_EXPORT void fl_set_slider_increment( FL_OBJECT * ob, double l, double r ); FL_EXPORT void fl_get_slider_increment( FL_OBJECT * ob, double * l, double * r ); FL_EXPORT void fl_set_slider_size( FL_OBJECT * ob, double size ); FL_EXPORT void fl_set_slider_precision( FL_OBJECT * ob, int prec ); FL_EXPORT void fl_set_slider_filter( FL_OBJECT * ob, FL_VAL_FILTER filter ); #endif /* ! defined FL_SLIDER_H */ xforms-1.0.93sp1/lib/include/input.h0000644000175000017500000001646111316735334015745 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file input.h */ #ifndef FL_INPUT_H #define FL_INPUT_H /***** Types *****/ typedef enum { FL_NORMAL_INPUT, FL_FLOAT_INPUT, FL_INT_INPUT, FL_DATE_INPUT, FL_MULTILINE_INPUT, FL_HIDDEN_INPUT, FL_SECRET_INPUT } FL_INPUT_TYPE; /* for date input */ enum { FL_INPUT_MMDD, FL_INPUT_DDMM }; /***** Defaults *****/ #define FL_INPUT_BOXTYPE FL_DOWN_BOX #define FL_INPUT_COL1 FL_COL1 #define FL_INPUT_COL2 FL_MCOL #define FL_INPUT_LCOL FL_LCOL #define FL_INPUT_ALIGN FL_ALIGN_LEFT /***** Others *****/ #define FL_INPUT_TCOL FL_LCOL #define FL_INPUT_CCOL FL_BLUE #define FL_RINGBELL ( 1 << 4 ) /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_input( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_input( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_input( FL_OBJECT * ob, const char * str ); FL_EXPORT void fl_set_input_return( FL_OBJECT * ob, unsigned int when ); FL_EXPORT void fl_set_input_color( FL_OBJECT * ob, FL_COLOR textcol, FL_COLOR curscol ); FL_EXPORT void fl_get_input_color( FL_OBJECT * ob, FL_COLOR * textcol, FL_COLOR * curscol ); FL_EXPORT void fl_set_input_scroll( FL_OBJECT * ob, int yes ); FL_EXPORT void fl_set_input_cursorpos( FL_OBJECT * ob, int xpos, int ypos ); FL_EXPORT void fl_set_input_selected( FL_OBJECT * ob, int yes ); FL_EXPORT void fl_set_input_selected_range( FL_OBJECT * ob, int begin, int end ); FL_EXPORT const char *fl_get_input_selected_range( FL_OBJECT * ob, int * begin, int * end ); FL_EXPORT void fl_set_input_maxchars( FL_OBJECT * ob, int maxchars ); FL_EXPORT void fl_set_input_format( FL_OBJECT * ob, int fmt, int sep ); FL_EXPORT void fl_set_input_hscrollbar( FL_OBJECT * ob, int pref ); FL_EXPORT void fl_set_input_vscrollbar( FL_OBJECT * ob, int pref ); FL_EXPORT void fl_set_input_topline( FL_OBJECT * ob, int top ); FL_EXPORT void fl_set_input_scrollbarsize( FL_OBJECT * ob, int hh, int vw ); FL_EXPORT void fl_get_input_scrollbarsize( FL_OBJECT * ob, int * hh, int * vw ); FL_EXPORT void fl_set_input_xoffset( FL_OBJECT * ob, int xoff ); FL_EXPORT int fl_get_input_xoffset( FL_OBJECT * ob ); FL_EXPORT int fl_set_input_fieldchar( FL_OBJECT * ob, int fchar ); FL_EXPORT int fl_get_input_topline( FL_OBJECT * ob ); FL_EXPORT int fl_get_input_screenlines( FL_OBJECT * ob ); FL_EXPORT int fl_get_input_cursorpos( FL_OBJECT * ob, int * x, int * y ); FL_EXPORT void fl_set_input_cursor_visible( FL_OBJECT * ob, int visible ); FL_EXPORT int fl_get_input_numberoflines( FL_OBJECT * ob ); FL_EXPORT void fl_get_input_format( FL_OBJECT * ob, int * fmt, int * sep ); FL_EXPORT const char * fl_get_input( FL_OBJECT * ob ); typedef int ( * FL_INPUTVALIDATOR )(FL_OBJECT *, const char *, const char *, int ); FL_EXPORT FL_INPUTVALIDATOR fl_set_input_filter( FL_OBJECT * ob, FL_INPUTVALIDATOR validate ); FL_EXPORT int fl_validate_input( FL_OBJECT *obj ); #define fl_set_input_shortcut fl_set_object_shortcut /* edit keys. */ typedef struct { /* basic editing */ long del_prev_char; /* delete previous char */ long del_next_char; /* delete next char */ long del_prev_word; /* delete previous word */ long del_next_word; /* delete next word */ /* movement */ long moveto_prev_line; /* one line up */ long moveto_next_line; /* one line down */ long moveto_prev_char; /* one char left */ long moveto_next_char; /* one char right */ long moveto_prev_word; /* one word left */ long moveto_next_word; /* one word right */ long moveto_prev_page; /* one page up */ long moveto_next_page; /* one page down */ long moveto_bol; /* move to begining of line */ long moveto_eol; /* move to end of line */ long moveto_bof; /* move to begin of file */ long moveto_eof; /* move to end of file */ /* misc. stuff */ long transpose; /* switch two char positions */ long paste; /* paste the edit buffer */ long backspace; /* another del_prev_char */ long del_to_bol; /* cut to begining of line */ long del_to_eol; /* cut to end of line */ long clear_field; /* delete everything */ long del_to_eos; /* not implemented */ } FL_EditKeymap; FL_EXPORT void fl_set_input_editkeymap( const FL_EditKeymap * keymap ); #endif /* ! defined FL_INPUT_H */ xforms-1.0.93sp1/lib/include/box.h0000644000175000017500000000302611311526737015367 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file box.h * */ #ifndef FL_BOX_H #define FL_BOX_H /* Type is already defined in Basic.h */ FL_EXPORT FL_OBJECT * fl_create_box( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_box( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); #endif /* ! defined FL_BOX_H */ xforms-1.0.93sp1/lib/include/choice.h0000644000175000017500000000771311247055071016034 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file choice.h * */ #ifndef FL_CHOICE_H #define FL_CHOICE_H typedef enum { FL_NORMAL_CHOICE, FL_NORMAL_CHOICE2, FL_DROPLIST_CHOICE, FL_BROWSER_CHOICE } FL_CHOICE_TYPE; #define FL_SIMPLE_CHOICE FL_NORMAL_CHOICE /***** Defaults *****/ #define FL_CHOICE_BOXTYPE FL_ROUNDED_BOX #define FL_CHOICE_COL1 FL_COL1 #define FL_CHOICE_COL2 FL_LCOL #define FL_CHOICE_LCOL FL_LCOL #define FL_CHOICE_ALIGN FL_ALIGN_LEFT /***** Others *****/ #define FL_CHOICE_MCOL FL_MCOL #define FL_CHOICE_MAXITEMS 128 /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_choice( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_choice( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_clear_choice( FL_OBJECT * ob ); FL_EXPORT int fl_addto_choice( FL_OBJECT * ob, const char * str ); FL_EXPORT void fl_replace_choice( FL_OBJECT * ob, int numb, const char * str ); FL_EXPORT void fl_delete_choice( FL_OBJECT * ob, int numb ); FL_EXPORT void fl_set_choice( FL_OBJECT * ob, int choice ); FL_EXPORT void fl_set_choice_text( FL_OBJECT * ob, const char * txt ); FL_EXPORT int fl_get_choice( FL_OBJECT * ob ); FL_EXPORT const char * fl_get_choice_item_text( FL_OBJECT * ob, int n ); FL_EXPORT int fl_get_choice_maxitems( FL_OBJECT * ob ); FL_EXPORT const char * fl_get_choice_text( FL_OBJECT * ob ); FL_EXPORT void fl_set_choice_fontsize( FL_OBJECT * ob, int size ); FL_EXPORT void fl_set_choice_fontstyle( FL_OBJECT * ob, int style ); FL_EXPORT void fl_set_choice_align( FL_OBJECT * ob, int align ); FL_EXPORT int fl_get_choice_item_mode( FL_OBJECT * ob, int item ); FL_EXPORT void fl_set_choice_item_mode( FL_OBJECT * ob, int item, unsigned int mode ); FL_EXPORT void fl_set_choice_item_shortcut( FL_OBJECT * ob, int item, const char * sc ); FL_EXPORT int fl_set_choice_entries( FL_OBJECT * ob, FL_PUP_ENTRY * ent ); FL_EXPORT int fl_set_choice_notitle( FL_OBJECT * ob, int n ); #endif /* ! defined FL_CHOICE_H */ xforms-1.0.93sp1/lib/include/Makefile.am0000644000175000017500000000165211311775537016471 0ustar jensjensinclude $(top_srcdir)/config/common.am nodist_include_HEADERS = forms.h CLEANFILES = forms.h AAA.h stamp-forms noinst_HEADERS = \ Basic.h \ XBasic.h \ popup.h \ bitmap.h \ box.h \ browser.h \ button.h \ canvas.h \ chart.h \ choice.h \ clipbd.h \ clock.h \ counter.h \ cursor.h \ dial.h \ filesys.h \ flps.h \ formbrowser.h \ frame.h \ free.h \ goodies.h \ input.h \ menu.h \ nmenu.h \ positioner.h \ scrollbar.h \ select.h \ slider.h \ spinner.h \ tabfolder.h \ text.h \ thumbwheel.h \ timer.h \ xpopup.h \ xyplot.h \ zzz.h forms.h: stamp-forms @: stamp-forms: AAA.h $(noinst_HEADERS) rm -f tmpforms sed "1,/crop here for forms/d" AAA.h > tmpforms for i in $(noinst_HEADERS); do \ sed "1,/crop here for forms/d" ${srcdir}/`basename $$i` >> tmpforms; \ done if cmp -s tmpforms forms.h ; then \ rm -f tmpforms ;\ else \ rm -f forms.h ;\ mv tmpforms forms.h ;\ fi echo timestamp > $@ xforms-1.0.93sp1/lib/include/cursor.h0000644000175000017500000000410111247055071016103 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file cursor.h * * Cursor defs and prototypes */ #ifndef FL_CURSOR_H #define FL_CURSOR_H #include enum { FL_INVISIBLE_CURSOR = -2, FL_DEFAULT_CURSOR = -1, FL_BUSY_CURSOR = XC_watch, FL_CROSSHAIR_CURSOR = XC_tcross, FL_KILL_CURSOR = XC_pirate, FL_NWARROW_CURSOR = XC_top_left_arrow, FL_NEARROW_CURSOR = XC_arrow }; #ifndef XC_invisible #define XC_invisible FL_INVISIBLE_CURSOR #endif FL_EXPORT void fl_set_cursor( Window win, int name ); FL_EXPORT void fl_set_cursor_color( int name, FL_COLOR fg, FL_COLOR bg ); FL_EXPORT int fl_create_bitmap_cursor( const char * source, const char * mask, int w, int h, int hotx, int hoty ); FL_EXPORT int fl_create_animated_cursor( int * cur_names, int timeout ); FL_EXPORT Cursor fl_get_cursor_byname( int name ); #define fl_reset_cursor( win ) fl_set_cursor( win, FL_DEFAULT_CURSOR ); #endif /* ! defined FL_CURSOR_H */ xforms-1.0.93sp1/lib/include/flps.h0000644000175000017500000000360711247055071015544 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file flps.h */ #ifndef FLPS_H #define FLPS_H /* postscript stuff */ enum { FLPS_AUTO, /* switch to landscale if does not fit */ FLPS_LANDSCAPE, /* landscape always */ FLPS_PORTRAIT, /* portrait always */ FLPS_BESTFIT /* even margins/best fit */ }; enum { FLPS_BW = -1, FLPS_GRAYSCALE, FLPS_COLOR }; typedef struct { int ps_color; int orientation; int auto_fit; int drawbox; int eps; float xdpi, ydpi; float paper_w, paper_h; float gamma; const char * tmpdir; int printer_dpi; float hm, vm; float xscale, yscale; int scale_text; int first_page_only; int clip; } FLPS_CONTROL; FL_EXPORT FLPS_CONTROL * flps_init( void ); FL_EXPORT int fl_object_ps_dump( FL_OBJECT * ob, const char * fname ); #endif /* ! defined FLPS_H */ xforms-1.0.93sp1/lib/include/clipbd.h0000644000175000017500000000326411247055071016034 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file clipbd.h * * prototypes for clipboard stuff */ #ifndef FL_CLIPBD_H #define FL_CLIPBD_H typedef Atom FL_CPTYPE; typedef int ( * FL_LOSE_SELECTION_CB )( FL_OBJECT *, long ); typedef int ( * FL_SELECTION_CB )( FL_OBJECT *, long, const void *, long ); #define FL_SELECTION_CALLBACK FL_SELECTION_CB #define FL_LOSE_SELECTION_CALLBACK FL_LOSE_SELECTION_CB FL_EXPORT int fl_stuff_clipboard( FL_OBJECT * ob, long type, const void * data, long size, FL_LOSE_SELECTION_CB lose_callback ); FL_EXPORT int fl_request_clipboard( FL_OBJECT * ob, long type, FL_SELECTION_CB got_it_callback ); #endif /* ! defined FL_CLIPBD_H */ xforms-1.0.93sp1/lib/include/browser.h0000644000175000017500000001665311317633031016264 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /* * \file browser.h * * Object class Browser */ #ifndef FL_BROWSER_H #define FL_BROWSER_H /***** Types *****/ typedef enum { FL_NORMAL_BROWSER, FL_SELECT_BROWSER, FL_HOLD_BROWSER, FL_MULTI_BROWSER } FL_BROWSER_TYPE; /***** Defaults *****/ #define FL_BROWSER_BOXTYPE FL_DOWN_BOX #define FL_BROWSER_COL1 FL_COL1 #define FL_BROWSER_COL2 FL_YELLOW #define FL_BROWSER_LCOL FL_LCOL #define FL_BROWSER_ALIGN FL_ALIGN_BOTTOM /***** Others *****/ #define FL_BROWSER_SLCOL FL_COL1 #define FL_BROWSER_FONTSIZE FL_SMALL_SIZE /* This exists only for backward compatibility and isn't used anymore! */ #define FL_BROWSER_LINELENGTH 2048 /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_browser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_browser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_clear_browser( FL_OBJECT * ob ); FL_EXPORT void fl_add_browser_line( FL_OBJECT * ob, const char * newtext ); FL_EXPORT void fl_addto_browser( FL_OBJECT * ob, const char * newtext ); FL_EXPORT void fl_addto_browser_chars( FL_OBJECT * ob, const char * str ); #define fl_append_browser fl_addto_browser_chars FL_EXPORT void fl_insert_browser_line( FL_OBJECT * ob, int linenumb, const char * newtext ); FL_EXPORT void fl_delete_browser_line( FL_OBJECT * ob, int linenumb ); FL_EXPORT void fl_replace_browser_line( FL_OBJECT * ob, int linenumb, const char * newtext ); FL_EXPORT const char *fl_get_browser_line( FL_OBJECT * ob, int linenumb ); FL_EXPORT int fl_load_browser( FL_OBJECT * ob, const char * filename ); FL_EXPORT void fl_select_browser_line( FL_OBJECT * ob, int line ); FL_EXPORT void fl_deselect_browser_line( FL_OBJECT * ob, int line ); FL_EXPORT void fl_deselect_browser( FL_OBJECT * ob ); FL_EXPORT int fl_isselected_browser_line( FL_OBJECT * ob, int line ); FL_EXPORT int fl_get_browser_topline( FL_OBJECT * ob ); FL_EXPORT int fl_get_browser( FL_OBJECT * ob ); FL_EXPORT int fl_get_browser_maxline( FL_OBJECT * ob ); FL_EXPORT int fl_get_browser_screenlines( FL_OBJECT * ob ); FL_EXPORT void fl_set_browser_topline( FL_OBJECT * ob, int line ); FL_EXPORT void fl_set_browser_bottomline( FL_OBJECT * ob, int line ); FL_EXPORT void fl_set_browser_fontsize( FL_OBJECT * ob, int size ); FL_EXPORT void fl_set_browser_fontstyle( FL_OBJECT * ob, int style ); FL_EXPORT void fl_set_browser_specialkey( FL_OBJECT * ob, int specialkey ); FL_EXPORT void fl_set_browser_vscrollbar( FL_OBJECT * ob, int on ); FL_EXPORT void fl_set_browser_hscrollbar( FL_OBJECT * ob, int on ); FL_EXPORT void fl_set_browser_line_selectable( FL_OBJECT * ob, int line, int flag ); FL_EXPORT void fl_get_browser_dimension( FL_OBJECT * ob, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ); FL_EXPORT void fl_set_browser_dblclick_callback( FL_OBJECT * ob, FL_CALLBACKPTR cb, long a ); FL_EXPORT FL_Coord fl_get_browser_xoffset( FL_OBJECT * ob ); FL_EXPORT double fl_get_browser_rel_xoffset( FL_OBJECT * ob ); FL_EXPORT void fl_set_browser_xoffset( FL_OBJECT * ob, FL_Coord npixels ); FL_EXPORT void fl_set_browser_rel_xoffset( FL_OBJECT * ob, double val ); FL_EXPORT FL_Coord fl_get_browser_yoffset( FL_OBJECT * ob ); FL_EXPORT double fl_get_browser_rel_yoffset( FL_OBJECT * ob ); FL_EXPORT void fl_set_browser_yoffset( FL_OBJECT * ob, FL_Coord npixels ); FL_EXPORT void fl_set_browser_rel_yoffset( FL_OBJECT * ob, double val ); FL_EXPORT void fl_set_browser_scrollbarsize( FL_OBJECT * ob, int hh, int vw ); FL_EXPORT void fl_show_browser_line( FL_OBJECT * ob, int j ); FL_EXPORT int fl_set_default_browser_maxlinelength( int n ); #ifndef FL_BROWSER_SCROLL_CALLBACKt #define FL_BROWSER_SCROLL_CALLBACKt typedef void ( * FL_BROWSER_SCROLL_CALLBACK )( FL_OBJECT *ob, int, void * ); #endif FL_EXPORT void fl_set_browser_hscroll_callback( FL_OBJECT * ob, FL_BROWSER_SCROLL_CALLBACK cb, void * data ); FL_EXPORT void fl_set_browser_vscroll_callback( FL_OBJECT * ob, FL_BROWSER_SCROLL_CALLBACK cb, void * data ); FL_EXPORT int fl_get_browser_line_yoffset( FL_OBJECT * obj, int line ); FL_EXPORT FL_BROWSER_SCROLL_CALLBACK fl_get_browser_hscroll_callback( FL_OBJECT * ob ); FL_EXPORT FL_BROWSER_SCROLL_CALLBACK fl_get_browser_vscroll_callback( FL_OBJECT * ob ); #endif /* ! defined FL_BROWSER_H */ xforms-1.0.93sp1/lib/include/chart.h0000644000175000017500000000754211320706026015676 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file chart.h * * Object Class: Chart * */ #ifndef FL_CHART_H #define FL_CHART_H typedef enum { FL_BAR_CHART, FL_HORBAR_CHART, FL_LINE_CHART, FL_FILL_CHART, FL_SPIKE_CHART, FL_PIE_CHART, FL_SPECIALPIE_CHART } FL_CHART_TYPE; #define FL_FILLED_CHART FL_FILL_CHART /* for backward compatibility */ /***** Defaults *****/ #define FL_CHART_BOXTYPE FL_BORDER_BOX #define FL_CHART_COL1 FL_COL1 #define FL_CHART_LCOL FL_LCOL #define FL_CHART_ALIGN FL_ALIGN_BOTTOM /***** Others *****/ #define FL_CHART_MAX 2048 /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_chart( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_chart( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_clear_chart( FL_OBJECT * ob ); FL_EXPORT void fl_add_chart_value( FL_OBJECT * ob, double val, const char * str, FL_COLOR col ); FL_EXPORT void fl_insert_chart_value( FL_OBJECT * ob, int indx, double val, const char * str, FL_COLOR col ); FL_EXPORT void fl_replace_chart_value( FL_OBJECT * ob, int indx, double val, const char * str, FL_COLOR col ); FL_EXPORT void fl_set_chart_bounds( FL_OBJECT * ob, double min, double max ); FL_EXPORT void fl_get_chart_bounds( FL_OBJECT * ob, double * min, double * max ); FL_EXPORT void fl_set_chart_maxnumb( FL_OBJECT * ob, int maxnumb ); FL_EXPORT void fl_set_chart_autosize( FL_OBJECT * ob, int autosize ); FL_EXPORT void fl_set_chart_lstyle( FL_OBJECT * ob, int lstyle ); FL_EXPORT void fl_set_chart_lsize( FL_OBJECT * ob, int lsize ); FL_EXPORT void fl_set_chart_lcolor( FL_OBJECT * ob, FL_COLOR lcol ); FL_EXPORT void fl_set_chart_baseline( FL_OBJECT * ob, int iYesNo ); #define fl_set_chart_lcol fl_set_chart_lcolor #endif /* ! defined FL_CHART_H */ xforms-1.0.93sp1/lib/include/bitmap.h0000644000175000017500000001277411315715001016051 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file bitmap.h * * Object Class: Bitmap */ #ifndef FL_BITMAP_H #define FL_BITMAP_H #define FL_NORMAL_BITMAP 0 /***** Defaults *****/ #define FL_BITMAP_BOXTYPE FL_NO_BOX #define FL_BITMAP_COL1 FL_COL1 /* background of bitmap */ #define FL_BITMAP_COL2 FL_COL1 /* not used currently */ #define FL_BITMAP_LCOL FL_LCOL /* foreground of bitmap */ #define FL_BITMAP_ALIGN FL_ALIGN_BOTTOM /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_bitmap( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_bitmap( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_bitmap_data( FL_OBJECT * ob, int w, int h, unsigned char * data ); FL_EXPORT void fl_set_bitmap_file( FL_OBJECT * ob, const char * fname ); FL_EXPORT Pixmap fl_read_bitmapfile( Window win, const char * file, unsigned int * w, unsigned int * h, int * hotx, int * hoty ); FL_EXPORT Pixmap fl_create_from_bitmapdata( Window win, const char * data, int width, int height ); /* for compatibility */ #define fl_set_bitmap_datafile fl_set_bitmap_file /* PIXMAP stuff */ #define FL_NORMAL_PIXMAP 0 FL_EXPORT FL_OBJECT * fl_create_pixmap( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_pixmap( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_pixmap_data( FL_OBJECT * ob, char ** bits ); FL_EXPORT void fl_set_pixmap_file( FL_OBJECT * ob, const char * fname ); FL_EXPORT void fl_set_pixmap_align( FL_OBJECT * ob, int align, int xmargin, int ymargin ); FL_EXPORT void fl_set_pixmap_pixmap( FL_OBJECT * ob, Pixmap id, Pixmap mask ); FL_EXPORT void fl_set_pixmap_colorcloseness( int red, int green, int blue ); FL_EXPORT void fl_free_pixmap_pixmap( FL_OBJECT * ob ); FL_EXPORT Pixmap fl_get_pixmap_pixmap( FL_OBJECT * ob, Pixmap * p, Pixmap * m ); FL_EXPORT Pixmap fl_read_pixmapfile( Window win, const char * file, unsigned int * w, unsigned int * h, Pixmap * shape_mask, int * hotx, int * hoty, FL_COLOR tran ); FL_EXPORT Pixmap fl_create_from_pixmapdata( Window win, char ** data, unsigned int * w, unsigned int * h, Pixmap * sm, int * hotx, int * hoty, FL_COLOR tran ); FL_EXPORT void fl_free_pixmap( Pixmap id ); #endif /* ! defined FL_BITMAP_H */ xforms-1.0.93sp1/lib/include/xyplot.h0000644000175000017500000003217411316735766016155 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file xyplot.h */ #ifndef FL_XYPLOT_H #define FL_XYPLOT_H /* Class FL_XYPLOT */ typedef enum { FL_NORMAL_XYPLOT, /* solid line */ FL_SQUARE_XYPLOT, /* with added square */ FL_CIRCLE_XYPLOT, /* with added circle */ FL_FILL_XYPLOT, /* fill completely */ FL_POINTS_XYPLOT, /* only data points */ FL_DASHED_XYPLOT, /* dashed line */ FL_IMPULSE_XYPLOT, FL_ACTIVE_XYPLOT, /* accepts interactive manipulations */ FL_EMPTY_XYPLOT, FL_DOTTED_XYPLOT, FL_DOTDASHED_XYPLOT, FL_LONGDASHED_XYPLOT, FL_LINEPOINTS_XYPLOT /* line & points */ } FL_XYPLOT_TYPE; enum { FL_LINEAR, FL_LOG }; enum { FL_GRID_NONE = 0, FL_GRID_MAJOR = 1, FL_GRID_MINOR = 2 }; /***** Defaults *****/ #define FL_XYPLOT_BOXTYPE FL_FLAT_BOX #define FL_XYPLOT_COL1 FL_COL1 #define FL_XYPLOT_LCOL FL_LCOL #define FL_XYPLOT_ALIGN FL_ALIGN_BOTTOM #define FL_MAX_XYPLOTOVERLAY 32 /***** Others *****/ FL_EXPORT FL_OBJECT * fl_create_xyplot( int t, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_xyplot( int t, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_xyplot_data( FL_OBJECT * ob, float * x, float * y, int n, const char * title, const char * xlabel, const char * ylabel ); FL_EXPORT void fl_set_xyplot_data_double( FL_OBJECT * ob, double * x, double * y, int n, const char * title, const char * xlabel, const char * ylabel ); FL_EXPORT int fl_set_xyplot_file( FL_OBJECT * ob, const char * f, const char * title, const char * xl, const char * yl ); FL_EXPORT void fl_insert_xyplot_data( FL_OBJECT * ob, int id, int n, double x, double y ); #define fl_set_xyplot_datafile fl_set_xyplot_file FL_EXPORT void fl_add_xyplot_text( FL_OBJECT * ob, double x, double y, const char * text, int al, FL_COLOR col ); FL_EXPORT void fl_delete_xyplot_text( FL_OBJECT * ob, const char * text ); FL_EXPORT int fl_set_xyplot_maxoverlays( FL_OBJECT * ob, int maxover ); FL_EXPORT void fl_add_xyplot_overlay( FL_OBJECT * ob, int id, float * x, float * y, int n, FL_COLOR col ); FL_EXPORT int fl_add_xyplot_overlay_file( FL_OBJECT * ob, int id, const char * f, FL_COLOR c ); FL_EXPORT void fl_set_xyplot_return( FL_OBJECT * ob, unsigned int when ); FL_EXPORT void fl_set_xyplot_xtics( FL_OBJECT * ob, int major, int minor ); FL_EXPORT void fl_set_xyplot_ytics( FL_OBJECT * ob, int major, int minor ); FL_EXPORT void fl_set_xyplot_xbounds( FL_OBJECT * ob, double xmin, double xmax ); FL_EXPORT void fl_set_xyplot_ybounds( FL_OBJECT * ob, double ymin, double ymax ); FL_EXPORT void fl_get_xyplot_xbounds( FL_OBJECT * ob, float * xmin, float * xmax ); FL_EXPORT void fl_get_xyplot_ybounds( FL_OBJECT * ob, float * ymin, float * ymax ); FL_EXPORT void fl_get_xyplot( FL_OBJECT * ob, float * x, float * y, int * i ); FL_EXPORT void fl_get_xyplot_data( FL_OBJECT * ob, float * x, float * y, int * n ); FL_EXPORT void fl_get_xyplot_data_pointer( FL_OBJECT * ob, int id, float ** x, float ** y, int *n ); FL_EXPORT void fl_get_xyplot_overlay_data( FL_OBJECT * ob, int id, float * x, float * y, int * n ); FL_EXPORT void fl_set_xyplot_overlay_type( FL_OBJECT * ob, int id, int type ); FL_EXPORT void fl_delete_xyplot_overlay( FL_OBJECT * ob, int id ); FL_EXPORT void fl_set_xyplot_interpolate( FL_OBJECT * ob, int id, int deg, double grid ); FL_EXPORT void fl_set_xyplot_inspect( FL_OBJECT * ob, int yes ); FL_EXPORT void fl_set_xyplot_symbolsize( FL_OBJECT * ob, int n ); FL_EXPORT void fl_replace_xyplot_point( FL_OBJECT * ob, int i, double x, double y ); /* Replace the value of a particular point in dataset setID, * where setID=0 is the first data set. * This routine is an extension of fl_replace_xyplot_point * which acts on the first dataset only. */ FL_EXPORT void fl_replace_xyplot_point_in_overlay( FL_OBJECT * ob, int i, int setID, double x, double y ); FL_EXPORT void fl_get_xyplot_xmapping( FL_OBJECT * ob, float * a, float * b ); FL_EXPORT void fl_get_xyplot_ymapping( FL_OBJECT * ob, float * a, float * b ); FL_EXPORT void fl_set_xyplot_keys( FL_OBJECT * ob, char ** keys, float x, float y, int align ); FL_EXPORT void fl_set_xyplot_key( FL_OBJECT * ob, int id, const char * key ); FL_EXPORT void fl_set_xyplot_key_position( FL_OBJECT * ob, float x, float y, int align ); FL_EXPORT void fl_set_xyplot_key_font( FL_OBJECT * ob, int style, int size ); FL_EXPORT int fl_get_xyplot_numdata( FL_OBJECT * ob, int id ); /* The following two functions will be removed. * Use fl_set_object_l[size|style] for the functionalities */ FL_EXPORT void fl_set_xyplot_fontsize( FL_OBJECT * ob, int size ); FL_EXPORT void fl_set_xyplot_fontstyle( FL_OBJECT * ob, int style ); FL_EXPORT void fl_xyplot_s2w( FL_OBJECT * ob, double sx, double sy, float * wx, float * wy ); FL_EXPORT void fl_xyplot_w2s( FL_OBJECT * ob, double wx, double wy, float * sx, float * sy ); FL_EXPORT void fl_set_xyplot_xscale( FL_OBJECT * ob, int scale, double base ); FL_EXPORT void fl_set_xyplot_yscale( FL_OBJECT * ob, int scale, double base ); FL_EXPORT void fl_clear_xyplot( FL_OBJECT * ob ); FL_EXPORT void fl_set_xyplot_linewidth( FL_OBJECT * ob, int id, int lw ); FL_EXPORT void fl_set_xyplot_xgrid( FL_OBJECT * ob, int xgrid ); FL_EXPORT void fl_set_xyplot_ygrid( FL_OBJECT * ob, int ygrid ); FL_EXPORT int fl_set_xyplot_grid_linestyle( FL_OBJECT * ob, int style ); FL_EXPORT void fl_set_xyplot_alphaxtics( FL_OBJECT * ob, const char * m, const char * s ); FL_EXPORT void fl_set_xyplot_alphaytics( FL_OBJECT * ob, const char * m, const char * s ); FL_EXPORT void fl_set_xyplot_fixed_xaxis( FL_OBJECT * ob, const char * lm, const char * rm ); FL_EXPORT void fl_set_xyplot_fixed_yaxis( FL_OBJECT * ob, const char * bm, const char * tm ); FL_EXPORT int fl_interpolate( const float * wx, const float * wy, int nin, float * x, float * y, double grid, int ndeg ); FL_EXPORT int fl_spline_interpolate( const float * wx, const float * wy, int nin, float * x, float * y, double grid ); typedef void ( * FL_XYPLOT_SYMBOL )( FL_OBJECT *, int, FL_POINT *, int, int, int ); FL_EXPORT FL_XYPLOT_SYMBOL fl_set_xyplot_symbol( FL_OBJECT * ob, int id, FL_XYPLOT_SYMBOL symbol ); FL_EXPORT int fl_set_xyplot_mark_active( FL_OBJECT * ob, int y ); #endif /* ! defined FL_XYPLOT_H */ xforms-1.0.93sp1/lib/include/scrollbar.h0000644000175000017500000000624411316735531016566 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ #ifndef FL_SCROLLBAR_H #define FL_SCROLLBAR_H enum { FL_VERT_SCROLLBAR, FL_HOR_SCROLLBAR, FL_VERT_THIN_SCROLLBAR, FL_HOR_THIN_SCROLLBAR, FL_VERT_NICE_SCROLLBAR, FL_HOR_NICE_SCROLLBAR, FL_VERT_PLAIN_SCROLLBAR, FL_HOR_PLAIN_SCROLLBAR, FL_HOR_BASIC_SCROLLBAR = FL_HOR_PLAIN_SCROLLBAR, FL_VERT_BASIC_SCROLLBAR = FL_VERT_PLAIN_SCROLLBAR }; enum { FL_NORMAL_SCROLLBAR, FL_THIN_SCROLLBAR, FL_NICE_SCROLLBAR, FL_PLAIN_SCROLLBAR }; FL_EXPORT FL_OBJECT * fl_create_scrollbar( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_scrollbar( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT double fl_get_scrollbar_value( FL_OBJECT * ob ); FL_EXPORT void fl_set_scrollbar_value( FL_OBJECT * ob, double val ); FL_EXPORT void fl_set_scrollbar_size( FL_OBJECT * ob, double val ); FL_EXPORT void fl_set_scrollbar_increment( FL_OBJECT * ob, double l, double r ); FL_EXPORT void fl_get_scrollbar_increment( FL_OBJECT * ob, double * a, double * b ); FL_EXPORT void fl_set_scrollbar_bounds( FL_OBJECT * ob, double b1, double b2 ); FL_EXPORT void fl_get_scrollbar_bounds( FL_OBJECT * ob, double * b1, double * b2 ); FL_EXPORT void fl_set_scrollbar_return( FL_OBJECT * ob, unsigned int when ); FL_EXPORT void fl_set_scrollbar_step( FL_OBJECT * ob, double step ); #endif /* ! defined FL_SCROLLBAR_H */ xforms-1.0.93sp1/lib/include/button.h0000644000175000017500000003361311311527064016111 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file button.h * * All Buttons: regular button, light button and round button * */ #ifndef FL_BUTTON_H #define FL_BUTTON_H typedef enum { FL_NORMAL_BUTTON, FL_PUSH_BUTTON, FL_RADIO_BUTTON, FL_HIDDEN_BUTTON, FL_TOUCH_BUTTON, FL_INOUT_BUTTON, FL_RETURN_BUTTON, FL_HIDDEN_RET_BUTTON, FL_MENU_BUTTON } FL_BUTTON_TYPE; #define FL_TOGGLE_BUTTON FL_PUSH_BUTTON typedef struct { Pixmap pixmap, mask; unsigned int bits_w, bits_h; int val; /* state of button (on/off) */ int mousebut; /* mouse button that caused the push */ int timdel; /* time since last touch (TOUCH buttons) */ int event; /* what event triggers redraw */ int is_pushed; /* set while drawn as pushed down */ int react_to[ 5 ]; /* mouse buttons button reacts to */ long cspecl; /* reserved for class specfic stuff */ void * cspecv; /* misc. things */ char * filename; Pixmap focus_pixmap, focus_mask; char * focus_filename; } FL_BUTTON_SPEC; #define FL_BUTTON_STRUCT FL_BUTTON_SPEC typedef void ( * FL_DrawButton )( FL_OBJECT * ); typedef void ( * FL_CleanupButton )( FL_BUTTON_STRUCT * ); #define FL_DRAWBUTTON FL_DrawButton #define FL_CLEANUPBUTTON FL_CleanupButton /* normal button default */ #define FL_BUTTON_BOXTYPE FL_UP_BOX #define FL_BUTTON_COL1 FL_COL1 #define FL_BUTTON_COL2 FL_COL1 #define FL_BUTTON_LCOL FL_LCOL #define FL_BUTTON_ALIGN FL_ALIGN_CENTER #define FL_BUTTON_MCOL1 FL_MCOL #define FL_BUTTON_MCOL2 FL_MCOL #define FL_BUTTON_BW FL_BOUND_WIDTH /* light button defaults */ #define FL_LIGHTBUTTON_BOXTYPE FL_UP_BOX #define FL_LIGHTBUTTON_COL1 FL_COL1 #define FL_LIGHTBUTTON_COL2 FL_YELLOW #define FL_LIGHTBUTTON_LCOL FL_LCOL #define FL_LIGHTBUTTON_ALIGN FL_ALIGN_CENTER #define FL_LIGHTBUTTON_TOPCOL FL_COL1 #define FL_LIGHTBUTTON_MCOL FL_MCOL #define FL_LIGHTBUTTON_MINSIZE ( ( FL_Coord ) 12 ) /* round button defaults */ #define FL_ROUNDBUTTON_BOXTYPE FL_NO_BOX #define FL_ROUNDBUTTON_COL1 FL_MCOL #define FL_ROUNDBUTTON_COL2 FL_YELLOW #define FL_ROUNDBUTTON_LCOL FL_LCOL #define FL_ROUNDBUTTON_ALIGN FL_ALIGN_CENTER #define FL_ROUNDBUTTON_TOPCOL FL_COL1 #define FL_ROUNDBUTTON_MCOL FL_MCOL /* round3d button defaults */ #define FL_ROUND3DBUTTON_BOXTYPE FL_NO_BOX #define FL_ROUND3DBUTTON_COL1 FL_COL1 #define FL_ROUND3DBUTTON_COL2 FL_BLACK #define FL_ROUND3DBUTTON_LCOL FL_LCOL #define FL_ROUND3DBUTTON_ALIGN FL_ALIGN_CENTER #define FL_ROUND3DBUTTON_TOPCOL FL_COL1 #define FL_ROUND3DBUTTON_MCOL FL_MCOL /* check button defaults */ #define FL_CHECKBUTTON_BOXTYPE FL_NO_BOX #define FL_CHECKBUTTON_COL1 FL_COL1 #define FL_CHECKBUTTON_COL2 FL_YELLOW #define FL_CHECKBUTTON_LCOL FL_LCOL #define FL_CHECKBUTTON_ALIGN FL_ALIGN_CENTER #define FL_CHECKBUTTON_TOPCOL FL_COL1 #define FL_CHECKBUTTON_MCOL FL_MCOL /* bitmap button defaults */ #define FL_BITMAPBUTTON_BOXTYPE FL_UP_BOX #define FL_BITMAPBUTTON_COL1 FL_COL1 /* bitmap background */ #define FL_BITMAPBUTTON_COL2 FL_BLUE /* "focus" color */ #define FL_BITMAPBUTTON_LCOL FL_LCOL /* bitmap foreground */ #define FL_BITMAPBUTTON_ALIGN FL_ALIGN_BOTTOM /* bitmap button defaults */ #define FL_PIXMAPBUTTON_BOXTYPE FL_UP_BOX #define FL_PIXMAPBUTTON_COL1 FL_BUTTON_COL1 #define FL_PIXMAPBUTTON_COL2 FL_BUTTON_COL2 #define FL_PIXMAPBUTTON_LCOL FL_BUTTON_LCOL #define FL_PIXMAPBUTTON_MCOL1 FL_BUTTON_MCOL1 #define FL_PIXMAPBUTTON_MCOL2 FL_BUTTON_MCOL2 #define FL_PIXMAPBUTTON_ALIGN FL_ALIGN_BOTTOM /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_button( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_roundbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_round3dbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_lightbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_checkbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_bitmapbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_pixmapbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_scrollbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_labelbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT *fl_add_roundbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_round3dbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_lightbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_checkbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_button( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_bitmapbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_scrollbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_labelbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); #define fl_set_bitmapbutton_file fl_set_bitmap_file FL_EXPORT void fl_set_bitmapbutton_data( FL_OBJECT * ob, int w, int h, unsigned char * bits ); #define fl_set_bitmapbutton_datafile fl_set_bitmapbutton_file FL_EXPORT FL_OBJECT * fl_add_pixmapbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); #define fl_set_pixmapbutton_data fl_set_pixmap_data #define fl_set_pixmapbutton_file fl_set_pixmap_file #define fl_set_pixmapbutton_pixmap fl_set_pixmap_pixmap #define fl_get_pixmapbutton_pixmap fl_get_pixmap_pixmap #define fl_set_pixmapbutton_align fl_set_pixmap_align #define fl_free_pixmapbutton_pixmap fl_free_pixmap_pixmap #define fl_set_pixmapbutton_datafile fl_set_pixmapbutton_file #define fl_set_pixmapbutton_show_focus fl_set_pixmapbutton_focus_outline FL_EXPORT void fl_set_pixmapbutton_focus_outline( FL_OBJECT * ob, int yes ); FL_EXPORT void fl_set_pixmapbutton_focus_data( FL_OBJECT * ob, char ** bits ); FL_EXPORT void fl_set_pixmapbutton_focus_file( FL_OBJECT * ob, const char * fname ); FL_EXPORT void fl_set_pixmapbutton_focus_pixmap( FL_OBJECT * ob, Pixmap id, Pixmap mask ); FL_EXPORT int fl_get_button( FL_OBJECT * ob ); FL_EXPORT void fl_set_button( FL_OBJECT * ob, int pushed ); FL_EXPORT int fl_get_button_numb( FL_OBJECT * ob ); #define fl_set_button_shortcut fl_set_object_shortcut FL_EXPORT FL_OBJECT * fl_create_generic_button( int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_add_button_class( int bclass, FL_DrawButton drawit, FL_CleanupButton cleanup ); FL_EXPORT void fl_set_button_mouse_buttons( FL_OBJECT * ob, unsigned int buttons ); FL_EXPORT void fl_get_button_mouse_buttons( FL_OBJECT * ob, unsigned int * buttons ); #endif /* ! defined FL_BUTTON_H */ xforms-1.0.93sp1/lib/include/counter.h0000644000175000017500000000751111316736043016257 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file counter.h */ #ifndef FL_COUNTER_H #define FL_COUNTER_H typedef enum { FL_NORMAL_COUNTER, FL_SIMPLE_COUNTER } FL_COUNTER_TYPE; /***** Defaults *****/ #define FL_COUNTER_BOXTYPE FL_UP_BOX #define FL_COUNTER_COL1 FL_COL1 #define FL_COUNTER_COL2 FL_BLUE /* ct label */ #define FL_COUNTER_LCOL FL_LCOL /* ct reporting */ #define FL_COUNTER_ALIGN FL_ALIGN_BOTTOM /***** Others *****/ #define FL_COUNTER_BW ( FL_BOUND_WIDTH - 1 ) /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_counter( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_counter( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_counter_value( FL_OBJECT * ob, double val ); FL_EXPORT void fl_set_counter_bounds( FL_OBJECT * ob, double min, double max ); FL_EXPORT void fl_set_counter_step( FL_OBJECT * ob, double s, double l ); FL_EXPORT void fl_set_counter_precision( FL_OBJECT * ob, int prec ); FL_EXPORT int fl_get_counter_precision( FL_OBJECT * ob ); FL_EXPORT void fl_set_counter_return( FL_OBJECT * ob, unsigned int how ); FL_EXPORT double fl_get_counter_value( FL_OBJECT * ob ); FL_EXPORT void fl_get_counter_bounds( FL_OBJECT * ob, double * min, double * max ); FL_EXPORT void fl_get_counter_step( FL_OBJECT * ob, double * s, double * l ); FL_EXPORT void fl_set_counter_filter( FL_OBJECT * ob, FL_VAL_FILTER filter ); /* Functions to set and get the timeout value used by the * counter code to control modification of the counter value. */ FL_EXPORT int fl_get_counter_repeat( FL_OBJECT * ob ); FL_EXPORT void fl_set_counter_repeat( FL_OBJECT * ob, int millisec ); FL_EXPORT int fl_get_counter_min_repeat( FL_OBJECT * ob ); FL_EXPORT void fl_set_counter_min_repeat( FL_OBJECT * ob, int millisec ); FL_EXPORT int fl_get_counter_speedjump( FL_OBJECT * ob ); FL_EXPORT void fl_set_counter_speedjump( FL_OBJECT * ob, int yes_no ); #endif /* ! defined FL_COUNTER_H */ xforms-1.0.93sp1/lib/include/goodies.h0000644000175000017500000001756111311775340016235 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file goodies.h */ #ifndef FL_GOODIES_H #define FL_GOODIES_H /***** Resources and misc. goodie routines ******/ #define FLAlertDismissLabel "flAlert.dismiss.label" #define FLAlertTitle "flAlert.title" #define FLQuestionYesLabel "flQuestion.yes.label" #define FLQuestionNoLabel "flQuestion.no.label" #define FLQuestionTitle "flQuestion.title" #define FLOKLabel "flInput.ok.label" #define FLInputClearLabel "flInput.clear.label" #define FLInputCancelLabel "flInput.cancel.label" #define FLInputTitle "flInput.title" #define FLChoiceTitle "flChoice.title" FL_EXPORT void fl_set_goodies_font( int style, int size ); /*********** messages and questions **************/ FL_EXPORT void fl_show_message( const char *, const char *, const char * ); FL_EXPORT void fl_show_messages( const char * ); FL_EXPORT void fl_show_msg( const char *, ... ); FL_EXPORT void fl_hide_message( void ); #define fl_hide_msg fl_hide_message #define fl_hide_messages fl_hide_message FL_EXPORT int fl_show_question( const char *, int ); FL_EXPORT void fl_hide_question( void ); FL_EXPORT void fl_show_alert( const char *, const char *, const char *, int ); FL_EXPORT void fl_show_alert2( int c, const char * fmt, ... ); FL_EXPORT void fl_hide_alert( void ); FL_EXPORT const char * fl_show_input( const char *, const char * ); FL_EXPORT void fl_hide_input( void ); FL_EXPORT const char * fl_show_simple_input( const char *, const char * ); FL_EXPORT int fl_show_colormap( int ); /********* choices *****************/ FL_EXPORT int fl_show_choices( const char *, int, const char *, const char *, const char *, int ); FL_EXPORT int fl_show_choice( const char *, const char *, const char *, int, const char *, const char *, const char *, int ); FL_EXPORT void fl_hide_choice( void ); FL_EXPORT void fl_set_choices_shortcut( const char *, const char *, const char * ); #define fl_set_choice_shortcut fl_set_choices_shortcut /************ one liner ***************/ FL_EXPORT void fl_show_oneliner( const char *, FL_Coord, FL_Coord ); FL_EXPORT void fl_hide_oneliner( void ); FL_EXPORT void fl_set_oneliner_font( int, int ); FL_EXPORT void fl_set_oneliner_color( FL_COLOR, FL_COLOR ); FL_EXPORT void fl_set_tooltip_font( int, int ); FL_EXPORT void fl_set_tooltip_color( FL_COLOR, FL_COLOR ); FL_EXPORT void fl_set_tooltip_boxtype( int ); FL_EXPORT void fl_set_tooltip_lalign( int ); /************* command log **************/ typedef struct { FL_FORM * form; void * vdata; char * cdata; long ldata; FL_OBJECT * browser; FL_OBJECT * close_browser; FL_OBJECT * clear_browser; } FD_CMDLOG; #ifdef FL_WIN32 #define FL_PID_T HANDLE #else #define FL_PID_T long #endif FL_EXPORT FL_PID_T fl_exe_command( const char *, int ); FL_EXPORT int fl_end_command( FL_PID_T ); FL_EXPORT int fl_check_command( FL_PID_T ); FL_EXPORT FILE * fl_popen( const char *, const char * ); FL_EXPORT int fl_pclose( FILE * ); FL_EXPORT int fl_end_all_command( void ); FL_EXPORT void fl_show_command_log( int ); FL_EXPORT void fl_hide_command_log( void ); FL_EXPORT void fl_clear_command_log( void ); FL_EXPORT void fl_addto_command_log( const char * ); FL_EXPORT void fl_set_command_log_position( int, int ); FL_EXPORT FD_CMDLOG * fl_get_command_log_fdstruct( void ); /* Aliases */ #define fl_open_command fl_exe_command #define fl_close_command fl_end_command /******* File selector *****************/ #define FL_MAX_FSELECTOR 6 typedef struct { FL_FORM * fselect; void * vdata; void * cdata; long ldata; FL_OBJECT * browser, * input, * prompt, * resbutt; FL_OBJECT * patbutt, * dirbutt, * cancel, * ready; FL_OBJECT * dirlabel, * patlabel; FL_OBJECT * appbutt[ 3 ]; } FD_FSELECTOR; FL_EXPORT int fl_use_fselector( int ); FL_EXPORT const char * fl_show_fselector( const char *, const char *, const char *, const char * ); FL_EXPORT void fl_hide_fselector( void ); FL_EXPORT void fl_set_fselector_fontsize( int ); FL_EXPORT void fl_set_fselector_fontstyle( int ); FL_EXPORT void fl_set_fselector_placement( int ); FL_EXPORT void fl_set_fselector_border( int ); #define fl_set_fselector_transient( b ) \ fl_set_fselector_border( ( b ) ? FL_TRANSIENT : FL_FULLBORDER ) FL_EXPORT void fl_set_fselector_callback( FL_FSCB, void * ); FL_EXPORT const char * fl_get_filename( void ); FL_EXPORT const char * fl_get_directory( void ); FL_EXPORT const char * fl_get_pattern( void ); FL_EXPORT int fl_set_directory( const char * ); FL_EXPORT void fl_set_pattern( const char * ); FL_EXPORT void fl_refresh_fselector( void ); FL_EXPORT void fl_add_fselector_appbutton( const char *, void ( * )( void * ), void * ); FL_EXPORT void fl_remove_fselector_appbutton( const char * ); FL_EXPORT void fl_disable_fselector_cache( int ); FL_EXPORT void fl_invalidate_fselector_cache( void ); FL_EXPORT FL_FORM * fl_get_fselector_form( void ); FL_EXPORT FD_FSELECTOR * fl_get_fselector_fdstruct( void ); FL_EXPORT void fl_hide_fselector( void ); FL_EXPORT void fl_set_fselector_filetype_marker( int, int, int, int, int ); #define fl_show_file_selector fl_show_fselector #define fl_set_fselector_cb fl_set_fselector_callback #define fl_set_fselector_title( s ) \ fl_set_form_title( fl_get_fselector_form( ), s ) FL_EXPORT int fl_goodies_atclose( FL_FORM *, void * ); #endif /* ! defined FL_GOODIES_H */ xforms-1.0.93sp1/lib/include/nmenu.h0000644000175000017500000000566211317760424015730 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ #ifndef FL_NMENU_H #define FL_NMENU_H /* Nmenu object types */ enum { FL_NORMAL_NMENU, FL_NORMAL_TOUCH_NMENU, FL_BUTTON_NMENU, FL_BUTTON_TOUCH_NMENU }; FL_EXPORT FL_OBJECT *fl_create_nmenu( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); FL_EXPORT FL_OBJECT *fl_add_nmenu( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); FL_EXPORT int fl_clear_nmenu( FL_OBJECT * ); FL_EXPORT FL_POPUP_ENTRY *fl_add_nmenu_items( FL_OBJECT *, const char *, ... ); FL_EXPORT FL_POPUP_ENTRY *fl_insert_nmenu_items( FL_OBJECT *, FL_POPUP_ENTRY *, const char *, ... ); FL_EXPORT FL_POPUP_ENTRY *fl_replace_nmenu_item( FL_OBJECT *, FL_POPUP_ENTRY *, const char *, ... ); FL_EXPORT int fl_delete_nmenu_item( FL_OBJECT *, FL_POPUP_ENTRY * ); FL_EXPORT FL_POPUP_ENTRY *fl_set_nmenu_items( FL_OBJECT *, FL_POPUP_ITEM * ); FL_EXPORT FL_POPUP_ENTRY *fl_add_nmenu_items2( FL_OBJECT *, FL_POPUP_ITEM * ); FL_EXPORT FL_POPUP_ENTRY *fl_insert_nmenu_items2( FL_OBJECT *, FL_POPUP_ENTRY *, FL_POPUP_ITEM * ); FL_EXPORT FL_POPUP_ENTRY *fl_replace_nmenu_items2( FL_OBJECT *, FL_POPUP_ENTRY *, FL_POPUP_ITEM * ); FL_EXPORT FL_POPUP *fl_get_nmenu_popup( FL_OBJECT * ); FL_EXPORT int fl_set_nmenu_popup( FL_OBJECT *, FL_POPUP * ); FL_EXPORT FL_POPUP_RETURN *fl_get_nmenu_item( FL_OBJECT * ); FL_EXPORT FL_POPUP_ENTRY *fl_get_nmenu_item_by_value( FL_OBJECT *, long int ); FL_EXPORT FL_POPUP_ENTRY *fl_get_nmenu_item_by_label( FL_OBJECT *, const char * ); FL_EXPORT FL_POPUP_ENTRY *fl_get_nmenu_item_by_text( FL_OBJECT *, const char * ); FL_EXPORT int fl_set_nmenu_policy( FL_OBJECT *, int ); FL_EXPORT FL_COLOR fl_set_nmenu_hl_text_color( FL_OBJECT *, FL_COLOR ); #endif /* ! defined FL_NMENU_H */ xforms-1.0.93sp1/lib/include/xpopup.h0000644000175000017500000001114211313123215016112 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file xpopup.h * * Prototypes for xpop-up menus */ #ifndef FL_XPOPUP_H #define FL_XPOPUP_H #define FL_MAXPUPI 128 /* max item each pup */ #define FL_PUP_PADH 4 /* space between each items */ typedef void ( * FL_PUP_ENTERCB )( int, void * ); /* call back prototype */ typedef void ( * FL_PUP_LEAVECB )( int, void * ); /* call back prototype */ FL_EXPORT int fl_setpup_entries( int nm, FL_PUP_ENTRY * entries ); FL_EXPORT int fl_newpup( Window win ); FL_EXPORT int fl_defpup( Window win, const char * str, ... ); FL_EXPORT int fl_addtopup( int n, const char * str, ... ); FL_EXPORT int fl_setpup_mode( int nm, int ni, unsigned int mode ); FL_EXPORT void fl_freepup( int n ); FL_EXPORT int fl_dopup( int n ); FL_EXPORT Cursor fl_setpup_default_cursor( int cursor ); FL_EXPORT void fl_setpup_default_color( FL_COLOR fg, FL_COLOR bg ); FL_EXPORT void fl_setpup_default_pup_checked_color( FL_COLOR col ); FL_EXPORT int fl_setpup_default_fontsize( int size ); FL_EXPORT int fl_setpup_default_fontstyle( int style ); #define fl_setpup_fontsize fl_setpup_default_fontsize #define fl_setpup_fontstyle fl_setpup_default_fontstyle #define fl_setpup_color fl_setpup_default_color #define fl_setpup_default_checkcolor fl_setpup_default_pup_checked_color #define fl_setpup_checkcolor fl_setpup_default_pup_checked_color FL_EXPORT int fl_setpup_default_bw( int bw ); FL_EXPORT void fl_setpup_shortcut( int nm, int ni, const char * sc ); FL_EXPORT void fl_setpup_position( int x, int y ); FL_EXPORT void fl_setpup_selection( int nm, int ni ); FL_EXPORT void fl_setpup_shadow( int n, int y ); FL_EXPORT void fl_setpup_softedge( int n, int y ); FL_EXPORT void fl_setpup_bw( int n, int bw ); FL_EXPORT void fl_setpup_title( int nm, const char * title ); FL_EXPORT FL_PUP_ENTERCB fl_setpup_entercb( int nm, FL_PUP_ENTERCB cb, void * data ); FL_EXPORT FL_PUP_LEAVECB fl_setpup_leavecb( int nm, FL_PUP_LEAVECB cb, void * data ); FL_EXPORT void fl_setpup_pad( int n, int padw, int padh ); FL_EXPORT Cursor fl_setpup_cursor( int nm, int cursor ); FL_EXPORT int fl_setpup_maxpup( int n ); FL_EXPORT unsigned int fl_getpup_mode( int nm, int ni ); FL_EXPORT const char * fl_getpup_text( int nm, int ni ); FL_EXPORT void fl_showpup( int n ); FL_EXPORT void fl_hidepup( int n ); FL_EXPORT int fl_getpup_items( int n ); FL_EXPORT int fl_current_pup( void ); #define fl_setpup_hotkey fl_setpup_shortcut FL_EXPORT FL_PUP_CB fl_setpup_itemcb( int nm, int ni, FL_PUP_CB cb ); FL_EXPORT FL_PUP_CB fl_setpup_menucb( int nm, FL_PUP_CB cb ); FL_EXPORT void fl_setpup_submenu( int m, int i, int subm ); #define fl_setpup fl_setpup_mode #endif /* ! defined FL_XPOPUP_H */ xforms-1.0.93sp1/lib/include/free.h0000644000175000017500000000352411247055071015517 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file free.h * * Object Class: Free */ #ifndef FL_FREE_H #define FL_FREE_H typedef enum { FL_NORMAL_FREE, FL_INACTIVE_FREE, FL_INPUT_FREE, FL_CONTINUOUS_FREE, FL_ALL_FREE } FL_FREE_TYPE; #define FL_SLEEPING_FREE FL_INACTIVE_FREE FL_EXPORT FL_OBJECT * fl_create_free( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label, FL_HANDLEPTR handle ); FL_EXPORT FL_OBJECT * fl_add_free( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label, FL_HANDLEPTR handle ); #endif /* ! defined FL_FREE_H */ xforms-1.0.93sp1/lib/include/.cvsignore0000644000175000017500000000003311171560225016413 0ustar jensjensMakefile Makefile.in AAA.h xforms-1.0.93sp1/lib/include/timer.h0000644000175000017500000000474211247055071015721 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file timer.h * * Object Class: Timer */ #ifndef FL_TIMER_H #define FL_TIMER_H typedef enum { FL_NORMAL_TIMER, FL_VALUE_TIMER, FL_HIDDEN_TIMER } FL_TIMER_TYPE; /***** Defaults *****/ #define FL_TIMER_BOXTYPE FL_DOWN_BOX #define FL_TIMER_COL1 FL_COL1 #define FL_TIMER_COL2 FL_RED #define FL_TIMER_LCOL FL_LCOL #define FL_TIMER_ALIGN FL_ALIGN_CENTER /***** Others *****/ #define FL_TIMER_BLINKRATE 0.2 /***** Routines *****/ typedef char * ( * FL_TIMER_FILTER )( FL_OBJECT *, double ); FL_EXPORT FL_OBJECT * fl_create_timer( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_timer( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_timer( FL_OBJECT * ob, double total ); FL_EXPORT double fl_get_timer( FL_OBJECT * ob ); FL_EXPORT void fl_set_timer_countup( FL_OBJECT * ob, int yes ); FL_EXPORT FL_TIMER_FILTER fl_set_timer_filter( FL_OBJECT * ob, FL_TIMER_FILTER filter ); FL_EXPORT void fl_suspend_timer( FL_OBJECT * ob ); FL_EXPORT void fl_resume_timer( FL_OBJECT * ob ); #endif /* ! defined FL_TIMER_H */ xforms-1.0.93sp1/lib/include/menu.h0000644000175000017500000001030711247055071015537 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file menu.h */ #ifndef FL_MENU_H #define FL_MENU_H /************ Object Class: Menu ************/ typedef enum { FL_TOUCH_MENU, FL_PUSH_MENU, FL_PULLDOWN_MENU } FL_MENU_TYPE; /***** Defaults *****/ #define FL_MENU_BOXTYPE FL_BORDER_BOX #define FL_MENU_COL1 FL_COL1 #define FL_MENU_COL2 FL_MCOL #define FL_MENU_LCOL FL_LCOL #define FL_MENU_ALIGN FL_ALIGN_CENTER /***** Others *****/ #define FL_MENU_MAXITEMS 128 #define FL_MENU_MAXSTR 64 /* not used anymore! JTT */ /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_menu( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_menu( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_clear_menu( FL_OBJECT * ob ); FL_EXPORT void fl_set_menu( FL_OBJECT * ob, const char * menustr , ... ); FL_EXPORT int fl_addto_menu( FL_OBJECT * ob, const char * menustr, ... ); FL_EXPORT void fl_replace_menu_item( FL_OBJECT * ob, int numb, const char * str, ... ); FL_EXPORT void fl_delete_menu_item( FL_OBJECT * ob, int numb ); FL_EXPORT FL_PUP_CB fl_set_menu_item_callback( FL_OBJECT * ob, int numb, FL_PUP_CB cb ); FL_EXPORT void fl_set_menu_item_shortcut( FL_OBJECT * ob, int numb, const char * str ); FL_EXPORT void fl_set_menu_item_mode( FL_OBJECT * ob, int numb, unsigned int mode ); FL_EXPORT void fl_show_menu_symbol( FL_OBJECT * ob, int show ); FL_EXPORT void fl_set_menu_popup( FL_OBJECT * ob, int pup ); FL_EXPORT int fl_get_menu_popup( FL_OBJECT * ob ); FL_EXPORT int fl_get_menu( FL_OBJECT * ob ); FL_EXPORT const char * fl_get_menu_item_text( FL_OBJECT * ob, int numb ); FL_EXPORT int fl_get_menu_maxitems( FL_OBJECT * ob ); FL_EXPORT unsigned int fl_get_menu_item_mode( FL_OBJECT * ob, int numb ); FL_EXPORT const char *fl_get_menu_text( FL_OBJECT * ob ); FL_EXPORT int fl_set_menu_entries( FL_OBJECT * ob, FL_PUP_ENTRY * ent ); FL_EXPORT int fl_set_menu_notitle( FL_OBJECT * ob, int off ); FL_EXPORT int fl_set_menu_item_id( FL_OBJECT * ob, int item, int id ); #endif /* ! defined FL_MENU_H */ xforms-1.0.93sp1/lib/include/thumbwheel.h0000644000175000017500000000547311316735710016751 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file thumbwheel.h */ #ifndef FL_THUMBWHEEL_H #define FL_THUMBWHEEL_H enum { FL_VERT_THUMBWHEEL, FL_HOR_THUMBWHEEL }; /* defaults */ #define FL_THUMBWHEEL_COL1 FL_COL1 #define FL_THUMBWHEEL_COL2 FL_COL1 #define FL_THUMBWHEEL_LCOL FL_BLACK #define FL_THUMBWHEEL_BOXTYPE FL_BORDER_BOX #define FL_THUMBWHEEL_ALIGN FL_ALIGN_BOTTOM FL_EXPORT double fl_get_thumbwheel_value( FL_OBJECT * ob ); FL_EXPORT double fl_set_thumbwheel_value( FL_OBJECT * ob, double value ); FL_EXPORT double fl_get_thumbwheel_step( FL_OBJECT * ob ); FL_EXPORT double fl_set_thumbwheel_step( FL_OBJECT * ob, double step ); FL_EXPORT int fl_set_thumbwheel_return( FL_OBJECT * ob, unsigned int when ); FL_EXPORT int fl_set_thumbwheel_crossover( FL_OBJECT * ob, int flag ); FL_EXPORT void fl_set_thumbwheel_bounds( FL_OBJECT * ob, double min, double max ); FL_EXPORT void fl_get_thumbwheel_bounds( FL_OBJECT * ob, double * min, double * max ); FL_EXPORT FL_OBJECT * fl_create_thumbwheel( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_thumbwheel( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); #endif /* ! defined FL_THUMBWHEEL_H */ xforms-1.0.93sp1/lib/include/AAA.h.in0000644000175000017500000000527211247055071015567 0ustar jensjens/* There has to be at least one line preceding the next one*/ /********************** crop here for forms.h **********************/ /* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file forms.h * *. All XForms files as distributed in this package are * Copyright(c) 1996-2002 by T.C. Zhao and Mark Overmars, * with part of the code Copyright (c) 1999-2002 by T.C. Zhao * and Steve Lamont. * ALL RIGHTS RESERVED. * * Permission to use, copy, and distribute this software in its entirety * without fee, is hereby granted, provided that the above copyright * notice and this permission notice appear in all copies and their * documentation. * * As of April 2002, xforms is released under the GNU LGPL license. * You can use xforms for any purpose that's compatible with * LGPL with the restriction that you will need a special license * for distributed binary commercial software that requires or is * based on xforms or its derivative. * * This software is provided "as is" without expressed or implied * warranty of any kind. * * The homepage for XForms is at * https://savannah.nongnu.org/projects/xforms/ * * If you have questions about XForms or encounter problems please * subscribe to the mailing list at * http://cweblog.usuhs.mil/mailman/listinfo/xforms * * ******** This file is generated automatically. DO NOT CHANGE ********* */ #ifndef FL_FORMS_H #define FL_FORMS_H #define FL_VERSION @FL_VERSION@ #define FL_REVISION @FL_REVISION@ #define FL_FIXLEVEL "@FL_FIXLEVEL@" #define FL_INCLUDE_VERSION ( FL_VERSION * 1000 + FL_REVISION ) #include #include #include #include #if defined __cplusplus extern "C" { #endif #if defined _WIN32 #define FL_WIN32 #include #endif #if ! defined FL_WIN32 || ! defined SHARED_LIB #define FL_EXPORT extern #else #ifdef MAKING_FORMS #define FL_EXPORT __declspec( dllexport ) extern #else #define FL_EXPORT __declspec( dllimport ) extern #endif /* MAKING_FORMS */ #endif /* FL_WIN32 */ xforms-1.0.93sp1/lib/include/zzz.h0000644000175000017500000000306611250740651015433 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /* the following (fl_fheight) etc. were never documented and were removed from V0.89, but apparently this broke some applications that were using them. Put them back in 10/22/00 */ #define fl_textgc fl_textgc_( ) #define fl_gc fl_gc_( ) #define fl_cur_win fl_cur_win_( ) #define fl_fheight fl_fheight_( ) #define fl_fdesc fl_fdesc_( ) #define fl_cur_fs fl_cur_fs_( ) extern GC fl_gc_( void ); extern GC fl_textgc_( void ); extern int fl_fheight_( void ); extern int fl_fdesc_( void ); extern Window fl_cur_win_( void ); extern XFontStruct * fl_cur_fs_( void ); extern Display * fl_display_( void ); #if ! defined FL_TRUE && ! defined FL_FALSE #define FL_FALSE 0 #define FL_TRUE ( ! FL_FALSE ) #endif #if defined __cplusplus } #endif #endif /* FL_FORMS_H */ xforms-1.0.93sp1/lib/include/menubar.h0000644000175000017500000000451611247055071016231 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file menubar.h */ /*-------------------------------------------------------*/ /* ---- THIS FILE SEEMS NOT TO BE NEEDED AT ALL JTT ---- */ /*-------------------------------------------------------*/ #ifndef FL_MENUBAR_H #define FL_MENUBAR_H /************ Object Class: MenuBar ************/ enum { FL_NORMAL_MENUBAR }; /***** Defaults *****/ #define FL_MENUBAR_BOXTYPE FL_UP_BOX #define FL_MENUBAR_COL1 FL_COL1 #define FL_MENUBAR_COL2 FL_MCOL #define FL_MENUBAR_LCOL FL_LCOL /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_menubar( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_menubar( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_clear_menubar( FL_OBJECT * ob ); FL_EXPORT void fl_set_menubar( FL_OBJECT * ob, const char * label ); FL_EXPORT void fl_set_menubar_entries( FL_OBJECT * ob, const char * label, FL_PUP_ENTRY * pup ); #endif /* ! defined FL_MENUBAR_H */ xforms-1.0.93sp1/lib/include/filesys.h0000644000175000017500000000540511247055071016254 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file filesys.h * * Convenience functions to read a directory */ #ifndef FL_FILESYS_H #define FL_FILESYS_H /* File types */ enum { FT_FILE, FT_DIR, FT_LINK, FT_SOCK, FT_FIFO, FT_BLK, FT_CHR, FT_OTHER }; typedef struct { char * name; /* entry name */ int type; /* FILE_TYPE */ long dl_mtime; /* file modification time */ unsigned long dl_size; /* file size in bytes */ } FL_Dirlist; enum { FL_ALPHASORT = 1, /* sort in alphabetic order */ FL_RALPHASORT, /* sort in reverse alphabetic order */ FL_MTIMESORT, /* sort according to modifcation time */ FL_RMTIMESORT, /* sort in reverse modificaiton time */ FL_SIZESORT, /* sort in increasing size order */ FL_RSIZESORT, /* sort in decreasing size order */ FL_CASEALPHASORT, /* sort case insensitive */ FL_RCASEALPHASORT /* sort case insensitive */ }; typedef int ( * FL_DIRLIST_FILTER )( const char *, int ); /* read dir with pattern filtering. All dirs read might be cached. * must not change dirlist in anyway. */ FL_EXPORT const FL_Dirlist * fl_get_dirlist( const char * dir, const char * pattern, int * n, int rescan ); FL_EXPORT FL_DIRLIST_FILTER fl_set_dirlist_filter( FL_DIRLIST_FILTER filter ); FL_EXPORT int fl_set_dirlist_sort( int method ); FL_EXPORT int fl_set_dirlist_filterdir( int yes ); FL_EXPORT void fl_free_dirlist( FL_Dirlist * dl ); /* Free all directory caches */ FL_EXPORT void fl_free_all_dirlist( void ); FL_EXPORT int fl_is_valid_dir( const char * name ); FL_EXPORT unsigned long fl_fmtime( const char * s ); FL_EXPORT char * fl_fix_dirname( char * dir ); #endif /* ! defined FL_FILESYS_H */ xforms-1.0.93sp1/lib/include/Makefile.in0000644000175000017500000003562411377311602016477 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/AAA.h.in \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = lib/include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = AAA.h CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(nodist_include_HEADERS) $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D nodist_include_HEADERS = forms.h CLEANFILES = forms.h AAA.h stamp-forms noinst_HEADERS = \ Basic.h \ XBasic.h \ popup.h \ bitmap.h \ box.h \ browser.h \ button.h \ canvas.h \ chart.h \ choice.h \ clipbd.h \ clock.h \ counter.h \ cursor.h \ dial.h \ filesys.h \ flps.h \ formbrowser.h \ frame.h \ free.h \ goodies.h \ input.h \ menu.h \ nmenu.h \ positioner.h \ scrollbar.h \ select.h \ slider.h \ spinner.h \ tabfolder.h \ text.h \ thumbwheel.h \ timer.h \ xpopup.h \ xyplot.h \ zzz.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign lib/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): AAA.h: $(top_builddir)/config.status $(srcdir)/AAA.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_includeHEADERS: $(nodist_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nodist_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nodist_includeHEADERS \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-nodist_includeHEADERS forms.h: stamp-forms @: stamp-forms: AAA.h $(noinst_HEADERS) rm -f tmpforms sed "1,/crop here for forms/d" AAA.h > tmpforms for i in $(noinst_HEADERS); do \ sed "1,/crop here for forms/d" ${srcdir}/`basename $$i` >> tmpforms; \ done if cmp -s tmpforms forms.h ; then \ rm -f tmpforms ;\ else \ rm -f forms.h ;\ mv tmpforms forms.h ;\ fi echo timestamp > $@ # 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: xforms-1.0.93sp1/lib/include/positioner.h0000644000175000017500000000655011316735445017002 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file positioner.h */ #ifndef FL_POSITIONER_H #define FL_POSITIONER_H #define FL_NORMAL_POSITIONER 0 #define FL_OVERLAY_POSITIONER 1 #define FL_INVISIBLE_POSITIONER 2 /***** Defaults *****/ #define FL_POSITIONER_BOXTYPE FL_DOWN_BOX #define FL_POSITIONER_COL1 FL_COL1 #define FL_POSITIONER_COL2 FL_RED #define FL_POSITIONER_LCOL FL_LCOL #define FL_POSITIONER_ALIGN FL_ALIGN_BOTTOM /***** Routines *****/ FL_EXPORT FL_OBJECT * fl_create_positioner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_positioner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_positioner_xvalue( FL_OBJECT * ob, double val ); FL_EXPORT double fl_get_positioner_xvalue( FL_OBJECT * ob ); FL_EXPORT void fl_set_positioner_xbounds( FL_OBJECT * ob, double min, double max ); FL_EXPORT void fl_get_positioner_xbounds( FL_OBJECT * ob, double * min, double * max ); FL_EXPORT void fl_set_positioner_yvalue( FL_OBJECT * ob, double val ); FL_EXPORT double fl_get_positioner_yvalue( FL_OBJECT * ob ); FL_EXPORT void fl_set_positioner_ybounds( FL_OBJECT * ob, double min, double max ); FL_EXPORT void fl_get_positioner_ybounds( FL_OBJECT * ob, double * min, double * max ); FL_EXPORT void fl_set_positioner_xstep( FL_OBJECT * ob, double value ); FL_EXPORT void fl_set_positioner_ystep( FL_OBJECT * ob, double value ); FL_EXPORT void fl_set_positioner_return( FL_OBJECT * ob, unsigned int when ); #endif /* ! defined FL_POSITIONER_H */ xforms-1.0.93sp1/lib/include/formbrowser.h0000644000175000017500000001036011247055071017141 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file formbrowser.h * */ #ifndef FL_FORMBROWSER_H #define FL_FORMBROWSER_H enum { FL_NORMAL_FORMBROWSER }; enum { FL_SMOOTH_SCROLL, FL_JUMP_SCROLL }; #define FL_FORMBROWSER_BOXTYPE FL_DOWN_BOX #define FL_FORMBROWSER_COL1 FL_COL1 #define FL_FORMBROWSER_ALIGN FL_ALIGN_TOP FL_EXPORT int fl_addto_formbrowser( FL_OBJECT * ob, FL_FORM * form ); FL_EXPORT FL_FORM * fl_delete_formbrowser_bynumber( FL_OBJECT * ob, int num ); FL_EXPORT int fl_delete_formbrowser( FL_OBJECT * ob, FL_FORM * candidate_form ); FL_EXPORT FL_FORM * fl_replace_formbrowser( FL_OBJECT * ob, int num, FL_FORM * form ); FL_EXPORT int fl_insert_formbrowser( FL_OBJECT * ob, int line, FL_FORM * new_form ); FL_EXPORT int fl_get_formbrowser_area( FL_OBJECT * ob, int * x, int * y, int * w, int * h ); FL_EXPORT void fl_set_formbrowser_scroll( FL_OBJECT * ob, int how ); FL_EXPORT void fl_set_formbrowser_hscrollbar( FL_OBJECT * ob, int how ); FL_EXPORT void fl_set_formbrowser_vscrollbar( FL_OBJECT * ob, int how ); FL_EXPORT FL_FORM *fl_get_formbrowser_topform( FL_OBJECT * ob ); FL_EXPORT int fl_set_formbrowser_topform( FL_OBJECT * ob, FL_FORM * form ); FL_EXPORT FL_FORM * fl_set_formbrowser_topform_bynumber( FL_OBJECT * ob, int n ); FL_EXPORT int fl_set_formbrowser_xoffset( FL_OBJECT * ob, int offset ); FL_EXPORT int fl_set_formbrowser_yoffset( FL_OBJECT * ob, int offset ); FL_EXPORT int fl_get_formbrowser_xoffset( FL_OBJECT * ob ); FL_EXPORT int fl_get_formbrowser_yoffset( FL_OBJECT * ob ); FL_EXPORT int fl_find_formbrowser_form_number( FL_OBJECT * ob, FL_FORM * candidate_form ); FL_EXPORT FL_OBJECT * fl_add_formbrowser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_create_formbrowser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT int fl_get_formbrowser_numforms( FL_OBJECT * ob ); #define fl_get_formbrowser_forms fl_get_formbrowser_numforms FL_EXPORT FL_FORM * fl_get_formbrowser_form( FL_OBJECT * ob, int n ); #endif /* ! defined FL_FORMBROWSER_H */ xforms-1.0.93sp1/lib/include/clock.h0000644000175000017500000000426311247055071015672 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file clock.h */ #ifndef FL_CLOCK_H #define FL_CLOCK_H enum { FL_ANALOG_CLOCK, FL_DIGITAL_CLOCK }; #define FL_CLOCK_BOXTYPE FL_UP_BOX #define FL_CLOCK_COL1 FL_INACTIVE_COL #define FL_CLOCK_COL2 FL_BOTTOM_BCOL #define FL_CLOCK_LCOL FL_BLACK #define FL_CLOCK_ALIGN FL_ALIGN_BOTTOM #define FL_CLOCK_TOPCOL FL_COL1 FL_EXPORT FL_OBJECT * fl_create_clock( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * s ); FL_EXPORT FL_OBJECT * fl_add_clock( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * s ); FL_EXPORT void fl_get_clock( FL_OBJECT * ob, int * h, int * m, int * s ); FL_EXPORT long fl_set_clock_adjustment( FL_OBJECT * ob, long offset ); FL_EXPORT void fl_set_clock_ampm( FL_OBJECT * ob, int y ); #endif /* ! defined FL_CLOCK_H */ xforms-1.0.93sp1/lib/include/tabfolder.h0000644000175000017500000001002211247055071016527 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file tabfolder.h */ #ifndef FL_FOLDER_H #define FL_FOLDER_H enum { FL_TOP_TABFOLDER, /* tab on top */ FL_BOTTOM_TABFOLDER, FL_LEFT_TABFOLDER, FL_RIGHT_TABFOLDER, FL_NORMAL_TABFOLDER = FL_TOP_TABFOLDER }; enum { FL_NO, FL_FIT, FL_ENLARGE_ONLY }; FL_EXPORT FL_OBJECT * fl_create_tabfolder( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_tabfolder( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_addto_tabfolder( FL_OBJECT * ob, const char * title, FL_FORM * form ); FL_EXPORT FL_FORM * fl_get_tabfolder_folder_bynumber( FL_OBJECT * ob, int num ); FL_EXPORT FL_FORM * fl_get_tabfolder_folder_byname( FL_OBJECT * ob, const char * name ); FL_EXPORT void fl_delete_folder( FL_OBJECT * ob, FL_FORM * form ); FL_EXPORT void fl_delete_folder_bynumber( FL_OBJECT * ob, int num ); FL_EXPORT void fl_delete_folder_byname( FL_OBJECT * ob, const char * name ); FL_EXPORT void fl_set_folder( FL_OBJECT * ob, FL_FORM * form ); FL_EXPORT void fl_set_folder_byname( FL_OBJECT * ob, const char * name ); FL_EXPORT void fl_set_folder_bynumber( FL_OBJECT * ob, int num ); FL_EXPORT FL_FORM * fl_get_folder( FL_OBJECT * ob ); FL_EXPORT int fl_get_folder_number( FL_OBJECT * ob ); FL_EXPORT const char * fl_get_folder_name( FL_OBJECT * ob ); FL_EXPORT int fl_get_tabfolder_numfolders( FL_OBJECT * ob ); FL_EXPORT FL_FORM * fl_get_active_folder( FL_OBJECT * ob ); FL_EXPORT int fl_get_active_folder_number( FL_OBJECT * ob ); FL_EXPORT const char * fl_get_active_folder_name( FL_OBJECT * ob ); FL_EXPORT void fl_get_folder_area( FL_OBJECT * ob, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ); FL_EXPORT void fl_replace_folder_bynumber( FL_OBJECT * ob, int num, FL_FORM * form ); FL_EXPORT int fl_set_tabfolder_autofit( FL_OBJECT * ob, int y ); FL_EXPORT int fl_set_default_tabfolder_corner( int n ); FL_EXPORT int fl_set_tabfolder_offset( FL_OBJECT * ob, int offset ); #endif /* ! defined FL_FOLDER_H */ xforms-1.0.93sp1/lib/include/select.h0000644000175000017500000001011111247055071016043 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file select.h */ #ifndef FL_SELECT_H #define FL_SELECT_H /* Select object types */ enum { FL_NORMAL_SELECT, FL_MENU_SELECT, FL_DROPLIST_SELECT }; /* Defaults */ #define FL_SELECT_COL1 FL_COL1 #define FL_SELECT_COL2 FL_MCOL #define FL_SELECT_LCOL FL_LCOL #define FL_SELECT_ALIGN FL_ALIGN_LEFT FL_EXPORT FL_OBJECT *fl_create_select( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); FL_EXPORT FL_OBJECT *fl_add_select( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); FL_EXPORT int fl_clear_select( FL_OBJECT * ); FL_EXPORT FL_POPUP_ENTRY *fl_add_select_items( FL_OBJECT *, const char *, ... ); FL_EXPORT FL_POPUP_ENTRY *fl_insert_select_items( FL_OBJECT *, FL_POPUP_ENTRY *, const char *, ... ); FL_EXPORT FL_POPUP_ENTRY *fl_replace_select_item( FL_OBJECT *, FL_POPUP_ENTRY *, const char *, ... ); FL_EXPORT int fl_delete_select_item( FL_OBJECT *, FL_POPUP_ENTRY * ); FL_EXPORT long fl_set_select_items( FL_OBJECT *, FL_POPUP_ITEM * ); FL_EXPORT FL_POPUP *fl_get_select_popup( FL_OBJECT * ); FL_EXPORT int fl_set_select_popup( FL_OBJECT *, FL_POPUP * ); FL_EXPORT FL_POPUP_RETURN *fl_get_select_item( FL_OBJECT * ); FL_EXPORT FL_POPUP_RETURN *fl_set_select_item( FL_OBJECT *, FL_POPUP_ENTRY * ); FL_EXPORT FL_POPUP_ENTRY *fl_get_select_item_by_value( FL_OBJECT *, long ); FL_EXPORT FL_POPUP_ENTRY *fl_get_select_item_by_label( FL_OBJECT *, const char * ); FL_EXPORT FL_POPUP_ENTRY *fl_get_select_item_by_text( FL_OBJECT *, const char * ); FL_EXPORT FL_COLOR fl_get_select_text_color( FL_OBJECT * ); FL_EXPORT FL_COLOR fl_set_select_text_color( FL_OBJECT *, FL_COLOR ); FL_EXPORT int fl_get_select_text_font( FL_OBJECT *, int *, int * ); FL_EXPORT int fl_set_select_text_font( FL_OBJECT *, int, int ); FL_EXPORT int fl_get_select_text_align( FL_OBJECT * ); FL_EXPORT int fl_set_select_text_align( FL_OBJECT *, int ); FL_EXPORT int fl_set_select_policy( FL_OBJECT *, int ); #endif /* ! defined FL_SELECT_H */ xforms-1.0.93sp1/lib/include/text.h0000644000175000017500000000332111247055071015555 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file text.h */ #ifndef FL_TEXT_H #define FL_TEXT_H enum { FL_NORMAL_TEXT }; #define FL_TEXT_BOXTYPE FL_FLAT_BOX #define FL_TEXT_COL1 FL_COL1 #define FL_TEXT_COL2 FL_MCOL #define FL_TEXT_LCOL FL_LCOL #define FL_TEXT_ALIGN FL_ALIGN_LEFT FL_EXPORT FL_OBJECT * fl_create_text( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_text( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); #endif /* ! defined FL_TEXT_H */ xforms-1.0.93sp1/lib/include/XBasic.h0000644000175000017500000006435711315731547015767 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /********************** crop here for forms.h **********************/ /** * \file XBasic.h * * X Window dependent stuff * */ #ifndef FL_XBASIC_H #define FL_XBASIC_H /* Draw mode */ enum { FL_XOR = GXxor, FL_COPY = GXcopy, FL_AND = GXand }; #define FL_MINDEPTH 1 /* FL_xxx does not do anything anymore, but kept for compatibility */ enum { FL_IllegalVisual = -1, FL_StaticGray = StaticGray, FL_GrayScale = GrayScale, FL_StaticColor = StaticColor, FL_PseudoColor = PseudoColor, FL_TrueColor = TrueColor, FL_DirectColor = DirectColor, FL_DefaultVisual = 10 /* special request */ }; enum { FL_North = NorthGravity, FL_NorthEast = NorthEastGravity, FL_NorthWest = NorthWestGravity, FL_South = SouthGravity, FL_SouthEast = SouthEastGravity, FL_SouthWest = SouthWestGravity, FL_East = EastGravity, FL_West = WestGravity, FL_NoGravity = ForgetGravity, FL_ForgetGravity = ForgetGravity }; #ifndef GreyScale #define GreyScale GrayScale #define StaticGrey StaticGray #endif #define FL_is_gray( v ) ( v == GrayScale || v == StaticGray ) #define FL_is_rgb( v ) ( v == TrueColor || v == DirectColor ) /* Internal colormap size. Not really very meaningful as fl_mapcolor * and company allow color "leakage", that is, although only FL_MAX_COLS * are kept in the internal colormap, the server might have substantially * more colors allocated */ #define FL_MAX_COLORS 1024 #define FL_MAX_COLS FL_MAX_COLORS /* FL graphics state information. Some are redundant. */ typedef struct { XVisualInfo * xvinfo; XFontStruct * cur_fnt; /* current font in default GC */ Colormap colormap; /* colormap valid for xvinfo */ Window trailblazer; /* a valid window for xvinfo */ int vclass, /* visual class and color depth */ depth; int rgb_bits; /* primary color resolution */ int dithered; /* true if dithered color */ int pcm; /* true if colormap is not shared */ GC gc[ 16 ]; /* working GC */ GC textgc[ 16 ]; /* GC used exclusively for text */ GC dimmedGC; /* A GC having a checkboard stipple */ unsigned long lut[ FL_MAX_COLS ]; /* secondary lookup table */ unsigned int rshift, rmask, rbits; unsigned int gshift, gmask, gbits; unsigned int bshift, bmask, bbits; } FL_State; #define FL_STATE FL_State /* for compatibility */ /***** Global variables ******/ FL_EXPORT Display *fl_display; FL_EXPORT int fl_screen; FL_EXPORT Window fl_root; /* root window */ FL_EXPORT Window fl_vroot; /* virtual root window */ FL_EXPORT int fl_scrh, /* screen dimension in pixels */ fl_scrw; FL_EXPORT int fl_vmode; /* Current version only runs in single visual mode */ #define fl_get_vclass( ) fl_vmode #define fl_get_form_vclass( a ) fl_vmode #define fl_get_gc( ) fl_state[ fl_vmode ].gc[ 0 ] FL_EXPORT FL_State fl_state[ ]; FL_EXPORT char *fl_ul_magic_char; FL_EXPORT int fl_mode_capable( int mode, int warn ); #define fl_default_win( ) ( fl_state[ fl_vmode ].trailblazer ) #define fl_default_window( ) ( fl_state[ fl_vmode ].trailblazer ) /* All pixmaps used by FL_OBJECT to simulate double buffering have the * following entries in the structure. FL_Coord x,y are used to shift * the origin of the drawing routines */ struct FL_pixmap_ { Pixmap pixmap; Window win; Visual * visual; FL_Coord x, y, w, h; int depth; FL_COLOR dbl_background; FL_COLOR pixel; }; /* typedef'ed to FL_pixmap in Basic.h */ /* Fonts related */ #define FL_MAX_FONTSIZES 10 typedef struct { XFontStruct * fs[ FL_MAX_FONTSIZES ]; /* cached fontstruct */ short size[ FL_MAX_FONTSIZES ]; /* cached sizes */ short nsize; /* cached so far */ char fname[ 80 ]; /* without size info */ } FL_FONT; /* Some basic drawing routines */ typedef XPoint FL_POINT; typedef XRectangle FL_RECT; /* Rectangles */ FL_EXPORT void fl_rectangle( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ); FL_EXPORT void fl_rectbound( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ); #define fl_rectf( x, y, w, h, c) fl_rectangle( 1, x, y, w, h, c ) #define fl_rect( x, y, w, h, c ) fl_rectangle( 0, x, y, w, h, c ) /* Rectangle with rounded-corners */ FL_EXPORT void fl_roundrectangle( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ); #define fl_roundrectf( x, y, w, h, c ) fl_roundrectangle( 1, x, y, w, h, c ) #define fl_roundrect( x, y, w, h, c ) fl_roundrectangle( 0, x, y, w, h, c ) /* General polygon and polylines */ FL_EXPORT void fl_polygon( int fill, FL_POINT * xp, int n, FL_COLOR col ); #define fl_polyf( p, n, c ) fl_polygon( 1, p, n, c ) #define fl_polyl( p, n, c ) fl_polygon( 0, p, n, c ) #define fl_polybound( p, n, c ) \ do { fl_polygon( 1, p, n, c ); \ fl_polygon( 0, p, n, FL_BLACK ); \ } while( 0 ) FL_EXPORT void fl_lines( FL_POINT * xp, int n, FL_COLOR col ); FL_EXPORT void fl_line( FL_Coord xi, FL_Coord yi, FL_Coord xf, FL_Coord yf, FL_COLOR c ); FL_EXPORT void fl_point( FL_Coord x, FL_Coord y, FL_COLOR c ); FL_EXPORT void fl_points( FL_POINT * p, int np, FL_COLOR c ); #define fl_simple_line fl_line FL_EXPORT void fl_dashedlinestyle( const char * dash, int ndash ); FL_EXPORT void fl_update_display( int block ); #define fl_diagline( x, y, w, h, c ) \ fl_line( x, y, ( x ) + ( w ) - 1, ( y ) + ( h ) - 1, c ) /* Line attributes */ enum { FL_SOLID = LineSolid, FL_USERDASH = LineOnOffDash, FL_USERDOUBLEDASH = LineDoubleDash, FL_DOT, FL_DOTDASH, FL_DASH, FL_LONGDASH }; FL_EXPORT void fl_linewidth( int n ); FL_EXPORT void fl_linestyle( int n ); FL_EXPORT void fl_drawmode( int request ); FL_EXPORT int fl_get_linewidth( void ); FL_EXPORT int fl_get_linestyle( void ); FL_EXPORT int fl_get_drawmode( void ); #define fl_set_linewidth fl_linewidth #define fl_set_linestyle fl_linestyle #define fl_set_drawmode fl_drawmode /** Ellipses **/ FL_EXPORT void fl_oval( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ); FL_EXPORT void fl_ovalbound( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ); FL_EXPORT void fl_ovalarc( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int t0, int dt, FL_COLOR col ); #define fl_ovalf( x, y, w, h, c ) fl_oval( 1, x, y, w, h, c ) #define fl_ovall( x, y, w, h, c ) fl_oval( 0, x, y, w, h, c ) #define fl_oval_bound fl_ovalbound #define fl_circf( x, y, r, col ) \ fl_oval( 1, ( x ) - ( r ), ( y ) - ( r ), 2 * ( r ), 2 * ( r ), col ) #define fl_circ( x, y, r, col ) \ fl_oval( 0, ( x ) - ( r ), ( y ) - ( r ), 2 * ( r ), 2 * ( r ), col ) /* Arcs */ FL_EXPORT void fl_pieslice( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int a1, int a2, FL_COLOR col ); #define fl_arcf( x, y, r, a1, a2, c ) \ fl_pieslice( 1, ( x ) - ( r ), ( y ) - ( r ), \ 2 * ( r ), 2 * ( r ), a1, a2, c ) #define fl_arc( x, y, r, a1, a2, c ) \ fl_pieslice( 0, ( x ) - ( r ), ( y ) - ( r ), \ 2 * ( r ), 2 * ( r ), a1, a2, c ) /* High level drawing routines */ FL_EXPORT void fl_drw_frame( int style, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int bw ); FL_EXPORT void fl_drw_checkbox( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col, int bw ); /* * Interfaces */ FL_EXPORT XFontStruct *fl_get_fontstruct( int style, int size ); #define fl_get_font_struct fl_get_fontstruct #define fl_get_fntstruct fl_get_font_struct FL_EXPORT Window fl_get_mouse( FL_Coord * x, FL_Coord * y, unsigned int * keymask ); FL_EXPORT void fl_set_mouse( FL_Coord mx, FL_Coord my ); FL_EXPORT Window fl_get_win_mouse( Window win, FL_Coord * x, FL_Coord * y, unsigned int * keymask ); FL_EXPORT Window fl_get_form_mouse( FL_FORM * fm, FL_Coord * x, FL_Coord * y, unsigned int * keymask ); FL_EXPORT FL_FORM * fl_win_to_form( Window win ); FL_EXPORT void fl_set_form_icon( FL_FORM * form, Pixmap p, Pixmap m ); FL_EXPORT int fl_get_decoration_sizes( FL_FORM * form, int * top, int * right, int * bottom, int * left ); FL_EXPORT void fl_raise_form( FL_FORM * form ); FL_EXPORT void fl_lower_form( FL_FORM * form ); FL_EXPORT void fl_set_foreground( GC gc, FL_COLOR color ); FL_EXPORT void fl_set_background( GC gc, FL_COLOR color ); /* General windowing support */ FL_EXPORT Window fl_wincreate( const char * label ); FL_EXPORT Window fl_winshow( Window win ); FL_EXPORT Window fl_winopen( const char * label ); FL_EXPORT void fl_winhide( Window win ); FL_EXPORT void fl_winclose( Window win ); FL_EXPORT void fl_winset( Window win ); FL_EXPORT int fl_winreparent( Window win, Window new_parent ); FL_EXPORT void fl_winfocus( Window win ); FL_EXPORT Window fl_winget( void ); FL_EXPORT int fl_iconify( Window win ); FL_EXPORT void fl_winresize( Window win, FL_Coord neww, FL_Coord newh ); FL_EXPORT void fl_winmove( Window win, FL_Coord dx, FL_Coord dy ); FL_EXPORT void fl_winreshape( Window win, FL_Coord dx, FL_Coord dy, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_winicon( Window win, Pixmap p, Pixmap m ); FL_EXPORT void fl_winbackground( Window win, FL_COLOR bk ); FL_EXPORT void fl_winstepsize( Window win, FL_Coord dx, FL_Coord dy ); FL_EXPORT int fl_winisvalid( Window win ); FL_EXPORT void fl_wintitle( Window win, const char * title ); FL_EXPORT void fl_winicontitle( Window win, const char * title ); FL_EXPORT void fl_winposition( FL_Coord x, FL_Coord y ); #define fl_pref_winposition fl_winposition #define fl_win_background fl_winbackground #define fl_winstepunit fl_winstepsize #define fl_set_winstepunit fl_winstepsize FL_EXPORT void fl_winminsize( Window win, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_winmaxsize( Window win, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_winaspect( Window win, FL_Coord x, FL_Coord y ); FL_EXPORT void fl_reset_winconstraints( Window win ); FL_EXPORT void fl_winsize( FL_Coord w, FL_Coord h ); FL_EXPORT void fl_initial_winsize( FL_Coord w, FL_Coord h ); #define fl_pref_winsize fl_winsize FL_EXPORT void fl_initial_winstate( int state ); FL_EXPORT Colormap fl_create_colormap( XVisualInfo * xv, int nfill ); FL_EXPORT void fl_wingeometry( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ); #define fl_pref_wingeometry fl_wingeometry FL_EXPORT void fl_initial_wingeometry( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_noborder( void ); FL_EXPORT void fl_transient( void ); FL_EXPORT void fl_get_winsize( Window win, FL_Coord * w, FL_Coord * h ); FL_EXPORT void fl_get_winorigin( Window win, FL_Coord * x, FL_Coord * y ); FL_EXPORT void fl_get_wingeometry( Window win, FL_Coord * x, FL_Coord * y, FL_Coord * w, FL_Coord * h ); /* For compatibility */ #define fl_get_win_size fl_get_winsize #define fl_get_win_origin fl_get_winorigin #define fl_get_win_geometry fl_get_wingeometry #define fl_initial_winposition fl_pref_winposition #define fl_get_display( ) fl_display #define FL_FormDisplay( form ) fl_display #define FL_ObjectDisplay( object ) fl_display #define FL_IS_CANVAS( o ) \ ( ( o )->objclass == FL_CANVAS || ( o )->objclass == FL_GLCANVAS ) /* The window an object belongs to - for drawing */ #define FL_ObjWin( o ) \ ( FL_IS_CANVAS( o ) ? fl_get_canvas_id( o ) : ( o )->form->window ) FL_EXPORT Window fl_get_real_object_window( FL_OBJECT * ob ); #define FL_OBJECT_WID FL_ObjWin /* All registerable events, including Client Message */ #define FL_ALL_EVENT ( KeyPressMask \ | KeyReleaseMask \ | ButtonPressMask \ | ButtonReleaseMask \ | EnterWindowMask \ | LeaveWindowMask \ | ButtonMotionMask \ | PointerMotionMask ) /* Replacements for X functions that access the event queue */ FL_EXPORT int fl_XNextEvent( XEvent * xev ); FL_EXPORT int fl_XPeekEvent( XEvent * xev ); FL_EXPORT int fl_XEventsQueued( int mode ); FL_EXPORT void fl_XPutBackEvent( XEvent * xev ); FL_EXPORT const XEvent *fl_last_event( void ); typedef int ( * FL_APPEVENT_CB )( XEvent *, void * ); FL_EXPORT FL_APPEVENT_CB fl_set_event_callback( FL_APPEVENT_CB callback, void * user_data ); FL_EXPORT FL_APPEVENT_CB fl_set_idle_callback( FL_APPEVENT_CB callback, void * user_data ); FL_EXPORT long fl_addto_selected_xevent( Window win, long mask ); FL_EXPORT long fl_remove_selected_xevent( Window win, long mask ); #define fl_add_selected_xevent fl_addto_selected_xevent FL_EXPORT void fl_set_idle_delta( long delta ); FL_EXPORT FL_APPEVENT_CB fl_add_event_callback( Window win, int ev, FL_APPEVENT_CB wincb, void * user_data ); FL_EXPORT void fl_remove_event_callback( Window win, int ev ); FL_EXPORT void fl_activate_event_callbacks( Window win ); FL_EXPORT XEvent *fl_print_xevent_name( const char * where, const XEvent * xev ); FL_EXPORT void fl_XFlush( void ); #define metakey_down( mask ) ( ( mask ) & Mod1Mask ) #define shiftkey_down( mask ) ( ( mask ) & ShiftMask ) #define controlkey_down( mask ) ( ( mask ) & ControlMask ) #define button_down( mask ) ( ( ( mask ) & Button1Mask ) \ || ( ( mask ) & Button2Mask ) \ || ( ( mask ) & Button3Mask ) \ || ( ( mask ) & Button4Mask ) \ || ( ( mask ) & Button5Mask ) ) #define fl_keypressed fl_keysym_pressed /****************** Resources ***************/ typedef enum { FL_NONE, FL_SHORT = 10, FL_BOOL, FL_INT, FL_LONG, FL_FLOAT, FL_STRING } FL_RTYPE; typedef struct { const char * res_name; /* resource name */ const char * res_class; /* resource class */ FL_RTYPE type; /* FL_INT, FL_FLOAT, FL_BOOL, FL_STRING */ void * var; /* address for the variable */ const char * defval; /* default setting in string form */ int nbytes; /* used only for strings */ } FL_RESOURCE; #define FL_resource FL_RESOURCE #define FL_CMD_OPT XrmOptionDescRec FL_EXPORT Display * fl_initialize( int * na, char * arg[ ], const char * appclass, FL_CMD_OPT * appopt, int nappopt ); FL_EXPORT Display * fl_init( void ); FL_EXPORT void fl_finish( void ); FL_EXPORT const char * fl_get_resource( const char * rname, const char * cname, FL_RTYPE dtype, const char * defval, void * val, int size ); FL_EXPORT void fl_set_resource( const char * str, const char * val ); FL_EXPORT void fl_get_app_resources( FL_RESOURCE * appresource, int n ); FL_EXPORT void fl_set_graphics_mode( int mode, int doublebuf ); FL_EXPORT void fl_set_visualID( long id ); FL_EXPORT int fl_keysym_pressed( KeySym k ); #define buttonLabelSize buttonFontSize #define sliderLabelSize sliderFontSize #define inputLabelSize inputFontSize /* All Form control variables. Named closely as its resource name */ typedef struct { float rgamma, ggamma, bgamma; int debug, sync; int depth, vclass, doubleBuffer; int ulPropWidth, /* underline stuff */ ulThickness; int buttonFontSize; int sliderFontSize; int inputFontSize; int browserFontSize; int menuFontSize; int choiceFontSize; int labelFontSize; /* all other labels fonts */ int pupFontSize, /* font for pop-up menus */ pupFontStyle; int privateColormap; int sharedColormap; int standardColormap; int scrollbarType; int backingStore; int coordUnit; int borderWidth; int safe; char * rgbfile; /* where RGB file is */ char vname[ 24 ]; } FL_IOPT; #define FL_PDButtonLabelSize FL_PDButtonFontSize #define FL_PDSliderLabelSize FL_PDSliderFontSize #define FL_PDInputLabelSize FL_PDInputFontSize /* Program default masks */ enum { FL_PDDepth = ( 1 << 1 ), FL_PDClass = ( 1 << 2 ), FL_PDDouble = ( 1 << 3 ), FL_PDSync = ( 1 << 4 ), FL_PDPrivateMap = ( 1 << 5 ), FL_PDScrollbarType = ( 1 << 6 ), FL_PDPupFontSize = ( 1 << 7 ), FL_PDButtonFontSize = ( 1 << 8 ), FL_PDInputFontSize = ( 1 << 9 ), FL_PDSliderFontSize = ( 1 << 10 ), FL_PDVisual = ( 1 << 11 ), FL_PDULThickness = ( 1 << 12 ), FL_PDULPropWidth = ( 1 << 13 ), FL_PDBS = ( 1 << 14 ), FL_PDCoordUnit = ( 1 << 15 ), FL_PDDebug = ( 1 << 16 ), FL_PDSharedMap = ( 1 << 17 ), FL_PDStandardMap = ( 1 << 18 ), FL_PDBorderWidth = ( 1 << 19 ), FL_PDSafe = ( 1 << 20 ), FL_PDMenuFontSize = ( 1 << 21 ), FL_PDBrowserFontSize = ( 1 << 22 ), FL_PDChoiceFontSize = ( 1 << 23 ), FL_PDLabelFontSize = ( 1 << 24 ) }; #define FL_PDButtonLabel FL_PDButtonLabelSize FL_EXPORT void fl_set_defaults( unsigned long mask, FL_IOPT * cntl ); FL_EXPORT void fl_set_tabstop( const char * s ); FL_EXPORT void fl_get_defaults( FL_IOPT * cntl ); FL_EXPORT int fl_get_visual_depth( void ); FL_EXPORT const char * fl_vclass_name( int n ); FL_EXPORT int fl_vclass_val( const char * v ); FL_EXPORT void fl_set_ul_property( int prop, int thickness ); FL_EXPORT void fl_set_clipping( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_set_gc_clipping( GC gc, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_unset_gc_clipping( GC gc ); FL_EXPORT void fl_set_clippings( FL_RECT * xrect, int n ); FL_EXPORT void fl_unset_clipping( void ); FL_EXPORT void fl_set_text_clipping( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ); FL_EXPORT void fl_unset_text_clipping( void ); /* How we pack and unpack colors */ #ifndef FL_PCBITS typedef unsigned char FL_PCTYPE; /* primary color type */ #define FL_PCBITS 8 /* primary color bits */ #define FL_PCMAX ( ( 1 << FL_PCBITS ) - 1 ) #define FL_PCCLAMP( a ) \ ( ( a ) > ( FL_PCMAX ) ? ( FL_PCMAX ) : ( ( a ) < 0 ? 0 : ( a ) ) ) typedef unsigned int FL_PACKED4; #define FL_PACKED FL_PACKED4 #define FL_RMASK 0x000000ff #define FL_RSHIFT 0 #define FL_GMASK 0x0000ff00 #define FL_GSHIFT 8 #define FL_BMASK 0x00ff0000 #define FL_BSHIFT 16 #define FL_AMASK 0xff000000 #define FL_ASHIFT 24 /* If PCBITS is not 8, we need to apply the RGBmask */ #define FL_GETR( packed ) ( ( ( packed ) >> FL_RSHIFT ) & FL_RMASK ) #define FL_GETG( packed ) ( ( ( packed ) >> FL_GSHIFT ) & FL_PCMAX ) #define FL_GETB( packed ) ( ( ( packed ) >> FL_BSHIFT ) & FL_PCMAX ) #define FL_GETA( packed ) ( ( ( packed ) >> FL_ASHIFT ) & FL_PCMAX ) #define FL_PACK3( r, g, b ) \ ( ( ( r ) << FL_RSHIFT ) | ( ( g ) << FL_GSHIFT ) | ( ( b ) << FL_BSHIFT ) ) #define FL_PACK FL_PACK3 #define FL_PACK4( r, g, b, a ) ( FL_PACK3( r, g, b ) | ( ( a ) << FL_ASHIFT ) ) #define FL_UNPACK( p, r, g, b ) \ do { r = FL_GETR( p ); \ g = FL_GETG( p ), \ b = FL_GETB( p ); \ } while( 0 ) #define FL_UNPACK3 FL_UNPACK #define FL_UNPACK4( p, r, g, b, a ) \ do { FL_UNPACK3( p, r, g, b ); \ a = FL_GETA( p ); \ } while( 0 ) #endif typedef struct { unsigned int rshift, rmask, rbits; unsigned int gshift, gmask, gbits; unsigned int bshift, bmask, bbits; int bits_per_rgb; int colormap_size; } FL_RGB2PIXEL_; #define FL_RGB2PIXEL FL_RGB2PIXEL_ #endif /* ! defined FL_XBASIC_H */ xforms-1.0.93sp1/lib/scrollbar.c0000644000175000017500000004003211375324002015117 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file scrollbar.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Scrollbar */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pscrollbar.h" static void get_geom( FL_OBJECT * ); static void attrib_change( FL_OBJECT * ); #define IsVThin( t ) ( t == FL_VERT_THIN_SCROLLBAR \ || t == FL_VERT_PLAIN_SCROLLBAR ) #define IsHThin( t ) ( t == FL_HOR_THIN_SCROLLBAR \ || t == FL_HOR_PLAIN_SCROLLBAR ) #define IsThin( t ) ( IsVThin( t ) || IsHThin( t ) ) /*************************************** ***************************************/ static int handle_scrollbar( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { switch ( event ) { case FL_ATTRIB : case FL_RESIZED : attrib_change( obj ); get_geom( obj ); break; case FL_DRAW : if ( IsThin( obj->type ) ) fl_drw_box( obj->boxtype, obj->x, obj->y, obj->w, obj->h, obj->col1, obj->bw ); /* fall through */ case FL_DRAWLABEL : if ( obj->label && *obj->label ) fl_draw_object_label_outside( obj ); break; case FL_FREEMEM : /* children will take care of themselves */ fl_free( obj->spec ); break; } return FL_RETURN_NONE; } #define IS_HORIZ( o ) ( ( o )->type & FL_HOR_FLAG ) /*************************************** ***************************************/ static void attrib_change( FL_OBJECT * obj ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; sp->slider->col1 = obj->col1; sp->slider->col2 = obj->col2; sp->up->col1 = sp->down->col1 = obj->col1; sp->up->col2 = sp->down->col2 = obj->col2; sp->up->boxtype = sp->down->boxtype = sp->slider->boxtype = obj->boxtype; fl_notify_object( sp->slider, FL_ATTRIB ); } /*************************************** ***************************************/ static void get_geom( FL_OBJECT * obj ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; FL_OBJECT *up = sp->up, *down = sp->down, *slider = sp->slider; int x = obj->x, y = obj->y, w = obj->w, h = obj->h; int absbw = FL_abs( obj->bw ); int t = obj->type; if ( IS_HORIZ( obj ) ) { down->x = x; up->x = x + w - h; up->y = down->y = y; down->h = up->h = h; down->w = up->w = FL_min( w, h ); slider->x = x + h; slider->y = y; slider->h = h; if ( ( slider->w = w - 2 * up->w ) < 0 ) { slider->w = up->w / 3; slider->x = x + up->w / 3; } } else { up->x = down->x = x; up->y = y; up->w = down->w = w; up->h = down->h = FL_min( w, h ); slider->x = x; slider->y = y + up->h; slider->w = w; if ( ( slider->h = h - 2 * up->h ) < 0 ) { slider->h = h / 3; slider->y = y + up->h / 3; } down->y = y + h - down->h; } up->bw = obj->bw; down->bw = obj->bw; slider->bw = obj->bw; if ( absbw > 2 ) absbw--; if ( obj->bw > 0 ) up->bw = down->bw = absbw; else up->bw = down->bw = -absbw; if ( IsThin( t ) ) { absbw = IS_FLATBOX( obj->boxtype ) ? 1 : absbw; up->boxtype = down->boxtype = FL_NO_BOX; up->bw = down->bw = absbw; /* Due to slider double buffering we have to be completely clear of the scrollbar bounding box, otherwise the slider will wipe out the scrollbars bounding box */ if ( IsVThin( t ) ) { slider->x += absbw + 1; slider->w -= 2 * absbw + 2; slider->y -= absbw + ( absbw > 1 ); slider->h += 2 * absbw + ( absbw > 1 ); } else { slider->y += absbw + 1; slider->h -= 2 * absbw + 2; slider->x -= absbw + ( absbw > 1 ); slider->w += 2 * absbw + ( absbw > 1 ); } } fl_notify_object( slider, FL_RESIZED ); } /*************************************** * Callback for the slider in the scrollbar ***************************************/ static void slider_cb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_SCROLLBAR_SPEC *sp = obj->parent->spec; if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; if ( obj->parent->how_return & FL_RETURN_END_CHANGED && obj->returned & FL_RETURN_END ) { double nval = fl_get_slider_value( obj ); if ( nval != sp->old_val ) obj->parent->returned |= FL_RETURN_CHANGED; sp->old_val = nval; } else if ( obj->returned & FL_RETURN_CHANGED ) obj->parent->returned |= FL_RETURN_CHANGED; } /*************************************** * Callback for the buttons of the scrollbar ***************************************/ static void button_cb( FL_OBJECT * obj, long data ) { FLI_SCROLLBAR_SPEC *sp = obj->parent->spec; double ival = fl_get_slider_value( sp->slider ), nval = ival, slmax, slmin; /* Update the slider and get the new value */ if ( obj->returned == FL_RETURN_TRIGGERED ) obj->returned = FL_RETURN_END | FL_RETURN_CHANGED; if ( obj->returned & FL_RETURN_CHANGED ) { fl_get_slider_bounds( sp->slider, &slmin, &slmax ); if ( slmax > slmin ) nval = ival + data * sp->increment; else nval = ival - data * sp->increment; fl_set_slider_value( sp->slider, nval ); nval = fl_get_slider_value( sp->slider ); } if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; /* If we're supposed to return only on end and change check if the slider value changed since interaction started, if we have to return on everty change check if if it changed this time round */ if ( obj->parent->how_return & FL_RETURN_END_CHANGED && obj->returned & FL_RETURN_END ) { if ( nval != sp->old_val ) { obj->parent->returned |= FL_RETURN_CHANGED; sp->old_val = nval; } } else if ( ival != nval ) obj->parent->returned |= FL_RETURN_CHANGED; } /*************************************** ***************************************/ FL_OBJECT * fl_create_scrollbar( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { FLI_SCROLLBAR_SPEC *sp; FL_OBJECT *obj; obj = fl_make_object( FL_SCROLLBAR, type, x, y, w, h, l, handle_scrollbar ); obj->spec = sp = fl_calloc( 1, sizeof *sp ); obj->col1 = FL_COL1; obj->col2 = FL_COL1; obj->align = FL_ALIGN_BOTTOM; obj->set_return = fl_set_scrollbar_return; if ( IsThin( type ) ) obj->boxtype = FL_DOWN_BOX; else if ( type == FL_HOR_NICE_SCROLLBAR || type == FL_VERT_NICE_SCROLLBAR ) obj->boxtype = FL_FRAME_BOX; else obj->boxtype = FL_UP_BOX; if ( IS_HORIZ( obj ) ) { fl_set_object_resize( obj, FL_RESIZE_X ); sp->up = fl_create_scrollbutton( FL_TOUCH_BUTTON, 1, 1, 1, 1, "6" ); sp->down = fl_create_scrollbutton( FL_TOUCH_BUTTON, 1, 1, 1, 1, "4" ); fl_set_object_callback( sp->up, button_cb, 1 ); fl_set_object_resize( sp->up, FL_RESIZE_NONE ); fl_set_object_callback( sp->down, button_cb, -1 ); fl_set_object_resize( sp->down, FL_RESIZE_NONE ); if ( type == FL_HOR_SCROLLBAR ) sp->slider = fl_create_slider( FL_HOR_BROWSER_SLIDER2, 1, 1, 1, 1, "" ); else if ( type == FL_HOR_THIN_SCROLLBAR ) sp->slider = fl_create_slider( FL_HOR_THIN_SLIDER, 1, 1, 1, 1, "" ); else if ( type == FL_HOR_PLAIN_SCROLLBAR ) sp->slider = fl_create_slider( FL_HOR_BASIC_SLIDER, 1, 1, 1, 1, "" ); else if ( type == FL_HOR_NICE_SCROLLBAR ) sp->slider = fl_create_slider( FL_HOR_NICE_SLIDER2, 1, 1, 1, 1, "" ); fl_set_object_resize( sp->slider, FL_RESIZE_NONE ); } else { fl_set_object_resize( obj, FL_RESIZE_Y ); sp->up = fl_create_scrollbutton( FL_TOUCH_BUTTON, 1, 1, 1, 1, "8" ); sp->down = fl_create_scrollbutton( FL_TOUCH_BUTTON, 1, 1, 1, 1, "2" ); fl_set_object_callback( sp->up, button_cb, -1 ); fl_set_object_resize( sp->up, FL_RESIZE_NONE ); fl_set_object_callback( sp->down, button_cb, 1 ); fl_set_object_resize( sp->down, FL_RESIZE_NONE ); if ( type == FL_VERT_SCROLLBAR ) sp->slider = fl_create_slider( FL_VERT_BROWSER_SLIDER2, 1, 1, 1, 1, "" ); else if ( type == FL_VERT_THIN_SCROLLBAR ) sp->slider = fl_create_slider( FL_VERT_THIN_SLIDER, 1, 1, 1, 1, "" ); else if ( type == FL_VERT_PLAIN_SCROLLBAR ) sp->slider = fl_create_slider( FL_VERT_BASIC_SLIDER, 1, 1, 1, 1, "" ); else if ( type == FL_VERT_NICE_SCROLLBAR ) sp->slider = fl_create_slider( FL_VERT_NICE_SLIDER2, 1, 1, 1, 1, "" ); else M_err( "fl_create_scrollbar", "Unknown type %d", type ); fl_set_object_resize( sp->slider, FL_RESIZE_NONE ); } sp->increment = 0.02; fl_set_slider_increment( sp->slider, 5 * sp->increment, sp->increment ); fl_set_object_callback( sp->slider, slider_cb, 0 ); fl_set_slider_bounds( sp->slider, 0.0, 1.0 ); sp->old_val = fl_get_slider_value( sp->slider ); fl_add_child( obj, sp->slider ); fl_add_child( obj, sp->down ); fl_add_child( obj, sp->up ); /* In older versions scrollbars and browsers didn't return to the application on e.g. fl_do_forms() but still a callback associated with the object got called. To emulate the old behaviour we have to set the return policy to default to FL_RETURN_NONE and only change that to FL_RETURN_CHANGED when a callback is installed (which is done in fl_set_object_callback()) */ #if ! USE_BWC_BS_HACK fl_set_object_return( obj, FL_RETURN_CHANGED ); #else fl_set_object_return( obj, FL_RETURN_NONE ); #endif return obj; } /* * User routines */ #define ISSCROLLBAR( o ) ( ( o ) && ( o )->objclass == FL_SCROLLBAR ) /*************************************** ***************************************/ FL_OBJECT * fl_add_scrollbar( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { FL_OBJECT *obj = fl_create_scrollbar( type, x, y, w, h, l ); attrib_change( obj ); get_geom( obj ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** ***************************************/ double fl_get_scrollbar_value( FL_OBJECT * obj ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; if ( ! ISSCROLLBAR( obj ) ) { M_err( "fl_get_scrollbar_value", "%s not a scrollbar", obj ? obj->label : "Object" ); return - HUGE_VAL; } return fl_get_slider_value( sp->slider ); } /*************************************** ***************************************/ void fl_set_scrollbar_value( FL_OBJECT * obj, double val ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; if ( ! ISSCROLLBAR( obj ) ) { M_err( "fl_set_scrollbar_value", "%s not a scrollbar", obj ? obj->label : "Object" ); return; } sp->old_val = val; fl_set_slider_value( sp->slider, val ); } /*************************************** * Sets the size of the knob of the scrollbar * (the function name is a bit of misnomer) ***************************************/ void fl_set_scrollbar_size( FL_OBJECT * obj, double val ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; fl_set_slider_size( sp->slider, val ); get_geom( obj ); } /*************************************** ***************************************/ void fl_set_scrollbar_increment( FL_OBJECT * obj, double l, double r ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; fl_set_slider_increment( sp->slider, l, r ); sp->increment = r; } /*************************************** ***************************************/ void fl_get_scrollbar_increment( FL_OBJECT * obj, double * a, double * b ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; fl_get_slider_increment( sp->slider, a, b ); } /*************************************** ***************************************/ void fl_set_scrollbar_bounds( FL_OBJECT * obj, double b1, double b2 ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; if ( ! ISSCROLLBAR( obj ) ) { M_err( "fl_set_scrollbar_bounds", "%s not a scrollbar", obj ? obj->label : "Object" ); return; } fl_set_slider_bounds( sp->slider, b1, b2 ); } /*************************************** ***************************************/ void fl_get_scrollbar_bounds( FL_OBJECT * obj, double * b1, double * b2 ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; fl_get_slider_bounds( sp->slider, b1, b2 ); } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function should be regarded as for internal use * only and fl_set_object_return() should be used instead (which then * will call this function). ***************************************/ void fl_set_scrollbar_return( FL_OBJECT * obj, unsigned int when ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; if ( when & FL_RETURN_END_CHANGED ) when &= ~ ( FL_RETURN_NONE | FL_RETURN_CHANGED ); obj->how_return = when; fl_set_object_return( sp->slider, FL_RETURN_ALWAYS ); fl_set_object_return( sp->up, FL_RETURN_ALWAYS ); fl_set_object_return( sp->down, FL_RETURN_ALWAYS ); /* We may need the value of the slider at this moment in the callback function... */ sp->old_val = fl_get_slider_value( sp->slider ); } /*************************************** ***************************************/ void fl_set_scrollbar_step( FL_OBJECT * obj, double step ) { FLI_SCROLLBAR_SPEC *sp = obj->spec; fl_set_slider_step( sp->slider, step ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/chart.c0000644000175000017500000006076511320705572014261 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file chart.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * All chart objects. Absolutely needs prototypes for all * drawing functions. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "include/forms.h" #include "flinternal.h" #ifndef M_PI #define M_PI 3.14159265359 #endif #define ARCINC ( M_PI / 1800 ) #define MAX_CHART_LABEL_LEN 16 /* Object specific information */ typedef struct { float val; /* Value of the entry */ FL_COLOR col; /* Color of the entry */ FL_COLOR lcol; /* Label color of the entry */ char str[ MAX_CHART_LABEL_LEN ]; /* Label of the entry */ } ENTRY; typedef struct { float min, /* the boundaries */ max; int numb; /* number of entries */ int maxnumb; /* maximal number of entries to display */ int autosize; /* whether the x-axis should be scaled */ int lstyle, /* item label font style & size */ lsize; int x, /* drawing area */ y, w, h; FL_COLOR lcol; /* default label color */ ENTRY * entries; /* the entries */ int no_baseline; } FLI_CHART_SPEC; /*************************************** * Draws a bar chart. x,y,w,h is the bounding box, entries the array of * numb entries and min and max the boundaries. ***************************************/ static void draw_barchart( FLI_CHART_SPEC * sp, float min, float max ) { int x = sp->x, y = sp->y, w = sp->w, h = sp->h; int numb = sp->numb; int i, j, n; float bwidth; /* Width of a bar */ FL_Coord zeroh; /* Height of zero value */ FL_Coord val, xx, dx; float incr, /* Increment per unit value */ xfuzzy; float lh = fl_get_char_height( sp->lstyle, sp->lsize, &i, &j ); ENTRY *e, *es, *entries = sp->entries; int lbox; float fx; incr = h / ( max - min ); zeroh = y + h + min * incr; if ( -min * incr < lh ) { incr = ( h - lh ) / max; zeroh = y + h - lh; } bwidth = ( double ) w / ( sp->autosize ? numb : sp->maxnumb ); /* base line */ if( ! sp->no_baseline ) fl_line( x, zeroh + 0.5, x + w, zeroh + 0.5, FL_BLACK ); if ( min == 0.0 && max == 0.0 ) return; /* Nothing else to draw */ /* Draw the bars */ n = 1; if ( ( xfuzzy = bwidth - ( FL_Coord ) bwidth ) != 0.0 ) n = 1.0 / xfuzzy + 2; for ( e = entries, xx = x, i = 0, es = e + numb; e < es; e++, i++ ) { dx = bwidth + ( i % n ) * xfuzzy; if ( e->val != 0.0 ) { val = e->val * incr; fl_rectbound( xx, zeroh - val, dx, val, e->col ); } xx += dx; } /* Draw the labels */ lbox = 0.8 * bwidth; for ( e = entries, es = e + numb, fx = x; e < es; fx += bwidth, e++ ) fl_drw_text_beside( FL_ALIGN_BOTTOM, fx + 0.5 * ( bwidth - lbox ), zeroh - lbox, lbox, lbox, e->lcol, sp->lstyle, sp->lsize, e->str ); } /*************************************** * Draws a horizontal bar chart. x,y,w,h is the bounding box, entries the * array of numb entries and min and max the boundaries. ***************************************/ static void draw_horbarchart( FLI_CHART_SPEC * sp, float min, float max ) { int x = sp->x, y = sp->y, w = sp->w, h = sp->h; int numb = sp->numb; float bwidth; /* Width of a bar */ float incr; /* Increment per unit value */ FL_Coord lw, /* Label width & Position of zero value */ zeroh, dy, yy; int i, l, n; float yfuzzy; char *s; ENTRY *e, *entries = sp->entries; int lbox; /* Compute maximal label width */ for ( lw = 0, i = 0; i < numb; i++ ) { s = entries[ i ].str; l = fl_get_string_width( sp->lstyle, sp->lsize, s, strlen( s ) ); if ( l > lw ) lw = l; } if ( lw > 0.0 ) lw = lw + 4.0; incr = ( float ) w / ( max - min ); zeroh = x - min * incr + 0.1; if ( -min * incr < lw ) { zeroh = x + lw; incr = ( w - lw ) / max; } bwidth = ( float ) h / ( sp->autosize ? numb : sp->maxnumb ); /* Draw base line */ if ( ! sp->no_baseline ) fl_line( zeroh + 0.5, y, zeroh + 0.5, y + h, FL_BLACK ); if ( min == 0.0 && max == 0.0 ) return; /* Nothing else to draw */ /* Draw the bars. Need to take care of round-off errors */ yy = y; dy = bwidth; n = 2; if ( ( yfuzzy = bwidth - dy ) != 0 ) n = 1.0 / yfuzzy + 2; for ( e = entries + numb - 1, i = 0; i < numb; i++, e-- ) { dy = bwidth + ( i % n ) * yfuzzy; if ( e->val != 0.0 ) fl_rectbound( zeroh, yy, e->val * incr, dy, e->col ); yy += dy; } /* Draw the labels */ lbox = 0.8 * bwidth; for ( e = entries + numb - 1, i = 0; i < numb; i++, e-- ) fl_drw_text_beside( FL_ALIGN_LEFT, zeroh, y + i * bwidth + 0.5 * ( bwidth - lbox ), lbox, lbox, e->lcol, sp->lstyle, sp->lsize, e->str ); } /*************************************** * Draws a line chart ***************************************/ static void draw_linechart( int type, FLI_CHART_SPEC * sp, float min, float max ) { int x = sp->x, y = sp->y, w = sp->w, h = sp->h; int i, numb = sp->numb; float ttt; float bwidth; /* distance between points */ float zeroh; /* Height of zero value */ float incr; /* Increment per unit value */ float lh = fl_get_char_height( sp->lstyle, sp->lsize, 0, 0 ); ENTRY *e, *es, *entries = sp->entries; float xx, /* tmp vars */ val1, val2, val3; int lbox; incr = ( h - 2 * lh ) / ( max - min ); zeroh = ( y + h ) - ( lh - min * incr ); bwidth = ( float ) w / ( sp->autosize ? numb : sp->maxnumb ); /* Draw the values */ for ( i = 0; i < numb; i++ ) { val3 = entries[ i ].val * incr; if ( type == FL_SPIKE_CHART ) { val1 = ( i + 0.5 ) * bwidth; fli_reset_vertex( ); fl_color( entries[ i ].col ); fli_add_float_vertex( x + val1, zeroh ); fli_add_float_vertex( x + val1, zeroh - val3 ); fli_endline( ); } else if ( type == FL_LINE_CHART && i != 0 ) { e = entries + i - 1; fli_reset_vertex( ); fl_color( e->col ); fli_add_float_vertex( x + ( i - 0.5 ) * bwidth, zeroh - e->val * incr ); fli_add_float_vertex( x + ( i + 0.5 ) * bwidth, zeroh - val3 ); fli_endline( ); } else if ( type == FL_FILLED_CHART && i != 0 ) { e = entries + i - 1; val1 = ( i - 0.5 ) * bwidth; val2 = ( i + 0.5 ) * bwidth; fli_reset_vertex( ); fl_color( e->col ); fli_add_float_vertex( x + val1, zeroh ); fli_add_float_vertex( x + val1, zeroh - e->val * incr ); if ( ( e->val > 0.0 && entries[ i ].val < 0.0 ) || ( e->val < 0.0 && entries[ i ].val > 0.0 ) ) { ttt = e->val / ( e->val - entries[ i ].val ); fli_add_float_vertex( x + ( i - 0.5 + ttt ) * bwidth, zeroh ); fli_add_float_vertex( x + ( i - 0.5 + ttt ) * bwidth, zeroh ); } fli_add_float_vertex( x + val2, zeroh - val3 ); fli_add_float_vertex( x + val2, zeroh ); fli_endpolygon( ); fli_reset_vertex( ); fl_color( FL_BLACK ); fli_add_float_vertex( x + val1, zeroh - e->val * incr ); fli_add_float_vertex( x + val2, zeroh - val3 ); fli_endline( ); } } /* Draw base line */ if ( ! sp->no_baseline ) fl_line( x, zeroh + 0.5, x + w, zeroh + 0.5, FL_BLACK ); /* Draw the labels */ lbox = 0.8 * bwidth; xx = x + 0.5 * ( bwidth - lbox ); for ( e = entries, es = e + numb; e < es; e++, xx += bwidth ) { if ( e->val < 0.0 ) fl_drw_text_beside( FL_ALIGN_TOP, xx, zeroh - e->val * incr + 12, lbox, lbox, e->lcol, sp->lstyle, sp->lsize, e->str ); else fl_drw_text_beside( FL_ALIGN_BOTTOM, xx, zeroh - e->val * incr - 12 - lbox, lbox, lbox, e->lcol, sp->lstyle, sp->lsize, e->str ); } } /*************************************** * Draws a pie chart. x,y,w,h is the bounding box, entries the array of * numb entries ***************************************/ static void draw_piechart( FLI_CHART_SPEC * sp, int special ) { int x = sp->x, y = sp->y, w = sp->w, h = sp->h; int i, numb = sp->numb; float xc, /* center and radius */ yc, rad; float tot; /* sum of values */ float incr; /* increment in angle */ float curang; /* current angle we are drawing */ float xl, /* label position */ yl; float txc, /* temporary center */ tyc; float lh = fl_get_char_height( sp->lstyle, sp->lsize, 0, 0 ); int lbox; ENTRY *e, *entries = sp->entries; /* compute center and radius */ xc = x + w / 2; yc = y + h / 2; rad = h / 2 - lh; if ( special ) { yc += 0.1 * rad; rad = 0.9 * rad; } /* compute sum of values */ for ( tot = 0.0f, i = 0; i < numb; i++ ) if ( entries[ i ].val > 0.0 ) tot += entries[ i ].val; if ( tot == 0.0 ) return; incr = 3600.0 / tot; /* Draw the pie */ curang = 0.0; for ( e = entries, i = 0; i < numb; i++, e++ ) if ( e->val > 0.0 ) { float tt = incr * e->val; txc = xc; tyc = yc; /* Correct for special pies */ if ( special && i == 0 ) { txc += 0.2 * rad * cos( ARCINC * ( curang + tt * 0.5 ) ); tyc -= 0.2 * rad * sin( ARCINC * ( curang + tt * 0.5 ) ); } tt += curang; fl_arcf( txc, tyc, rad, curang, tt, e->col ); fl_arc( txc, tyc, rad, curang, tt, FL_BLACK ); fli_reset_vertex( ); fli_add_float_vertex( txc, tyc ); fli_add_float_vertex( txc + rad * cos( ARCINC * curang ), tyc - rad * sin( ARCINC * curang ) ); fli_endline( ); curang += 0.5 * incr * e->val; lbox = 16; /* draw the label */ xl = txc + 1.1 * rad * cos( ARCINC * curang ); yl = tyc - 1.1 * rad * sin( ARCINC * curang ); if ( xl < txc ) fl_drw_text_beside( FL_ALIGN_LEFT, xl, yl - 0.5 * lbox, lbox, lbox, e->lcol, sp->lstyle, sp->lsize, e->str ); else fl_drw_text_beside( FL_ALIGN_RIGHT, xl - lbox, yl - 0.5 * lbox, lbox, lbox, e->lcol, sp->lstyle, sp->lsize, e->str ); curang += 0.5 * incr * e->val; fli_reset_vertex( ); fli_add_float_vertex( txc, tyc ); fli_add_float_vertex( txc + rad * cos( ARCINC * curang ), tyc - rad * sin( ARCINC * curang ) ); fli_endline( ); } } /*************************************** * Draws a chart object ***************************************/ static void draw_chart( FL_OBJECT * ob ) { FLI_CHART_SPEC *sp = ob->spec; FL_Coord absbw = FL_abs( ob->bw ); float min = sp->min, max = sp->max; int i; /* Find bounding box */ sp->x = ob->x + 3 + 2 * absbw; sp->y = ob->y + 3 + 2 * absbw; sp->w = ob->w - 6 - 4 * absbw; sp->h = ob->h - 6 - 4 * absbw; /* Find bounds */ if ( min == max ) { min = max = sp->numb ? sp->entries[ 0 ].val : 0.0; for ( i = 0; i < sp->numb; i++ ) { if ( sp->entries[ i ].val < min ) min = sp->entries[ i ].val; if ( sp->entries[ i ].val > max ) max = sp->entries[ i ].val; } } /* min can equal to max if only one entry */ if ( min == max ) { min -= 1.0; max += 1.0; } /* Do the drawing */ fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); if ( sp->numb == 0 ) { fl_drw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); return; } fl_set_clipping( sp->x - 1, sp->y - 1, sp->w + 2, sp->h + 2 ); switch ( ob->type ) { case FL_BAR_CHART: draw_barchart( sp, min, max ); break; case FL_HORBAR_CHART: draw_horbarchart( sp, min, max ); break; case FL_PIE_CHART: draw_piechart( sp, 0 ); break; case FL_SPECIALPIE_CHART: draw_piechart( sp, 1 ); break; default: draw_linechart( ob->type, sp, min, max ); break; } fl_unset_clipping( ); } /*************************************** * Handles an event, returns whether value has changed ***************************************/ static int handle_chart( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { #if FL_DEBUG >= ML_DEBUG M_info( "handle_chart", fli_event_name( event ) ); #endif switch ( event ) { case FL_DRAW: draw_chart( ob ); /* fall through */ case FL_DRAWLABEL: fl_draw_object_label( ob ); break; case FL_FREEMEM: if ( ( ( FLI_CHART_SPEC * ) ob->spec )->entries ) fl_free( ( ( FLI_CHART_SPEC * ) ob->spec )->entries ); fl_free( ob->spec ); break; } return FL_RETURN_NONE; } /*************************************** * creates a chart object ***************************************/ FL_OBJECT * fl_create_chart( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_CHART_SPEC *sp; int i; obj = fl_make_object( FL_CHART, type, x, y, w, h, label, handle_chart ); obj->boxtype = FL_CHART_BOXTYPE; obj->col1 = FL_CHART_COL1; obj->col2 = FL_CHART_COL1; obj->align = FL_CHART_ALIGN; obj->lcol = FL_CHART_LCOL; obj->active = 0; sp = obj->spec = fl_calloc( 1, sizeof *sp ); sp->maxnumb = 512; sp->entries = fl_calloc( sp->maxnumb + 1, sizeof *sp->entries ); for ( i = 0; i <= sp->maxnumb; i++ ) sp->entries[ i ].val = 0.0; sp->autosize = 1; sp->min = sp->max = 0.0; sp->lsize = FL_TINY_SIZE; sp->lstyle = FL_NORMAL_STYLE; sp->lcol = FL_BLACK; return obj; } /*************************************** * Adds a chart object ***************************************/ FL_OBJECT * fl_add_chart( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_chart( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** ***************************************/ void fl_set_chart_lsize( FL_OBJECT * ob, int lsize ) { FLI_CHART_SPEC *sp = ob->spec; if ( sp->lsize != lsize ) { sp->lsize = lsize; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_chart_lstyle( FL_OBJECT * ob, int lstyle ) { FLI_CHART_SPEC *sp = ob->spec; if ( sp->lstyle != lstyle ) { sp->lstyle = lstyle; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_chart_lcolor( FL_OBJECT * ob, FL_COLOR lcol ) { FLI_CHART_SPEC *sp = ob->spec; if ( sp->lcol != lcol ) sp->lcol = lcol; } /*************************************** * Clears the contents of a chart ***************************************/ void fl_clear_chart( FL_OBJECT * ob ) { ( ( FLI_CHART_SPEC * ) ob->spec )->numb = 0; fl_redraw_object( ob ); } /*************************************** * Add an item to the chart. ***************************************/ void fl_add_chart_value( FL_OBJECT * ob, double val, const char * str, FL_COLOR col ) { FLI_CHART_SPEC *sp = ob->spec; int i; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_CHART ) ) { M_err( "fl_add_chart_value", "%s not a chart", ob ? ob->label : "" ); return; } #endif /* Shift entries if required */ if ( sp->numb == sp->maxnumb ) { for ( i = 0; i < sp->numb - 1; i++ ) sp->entries[ i ] = sp->entries[ i + 1 ]; sp->numb--; } /* Fill in the new entry */ sp->entries[ sp->numb ].val = val; sp->entries[ sp->numb ].col = col; sp->entries[ sp->numb ].lcol = sp->lcol; if ( str ) fli_sstrcpy( sp->entries[sp->numb ].str, str, MAX_CHART_LABEL_LEN ); else *sp->entries[sp->numb ].str = '\0'; sp->numb++; fl_redraw_object( ob ); } /*************************************** * Inserts an item before indx to the chart. ***************************************/ void fl_insert_chart_value( FL_OBJECT * ob, int indx, double val, const char * str, FL_COLOR col ) { FLI_CHART_SPEC *sp = ob->spec; int i; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_CHART ) ) { M_err( "fl_insert_chart_value", "%s not a chart", ob ? ob->label : "" ); return; } #endif if ( indx < 1 || indx > sp->numb + 1 ) return; /* Shift entries */ for ( i = sp->numb; i >= indx; i-- ) sp->entries[ i ] = sp->entries[ i - 1 ]; if ( sp->numb < sp->maxnumb ) sp->numb++; /* Fill in the new entry */ sp->entries[ indx - 1 ].val = val; sp->entries[ indx - 1 ].col = col; if ( str != NULL ) fli_sstrcpy( sp->entries[ indx - 1 ].str, str, MAX_CHART_LABEL_LEN ); else *sp->entries[ indx - 1 ].str = '\0'; fl_redraw_object( ob ); } /*************************************** * Replaces an item in the chart. ***************************************/ void fl_replace_chart_value( FL_OBJECT * ob, int indx, double val, const char * str, FL_COLOR col ) { FLI_CHART_SPEC *sp = ob->spec; if ( indx < 1 || indx > sp->numb ) return; sp->entries[ indx - 1 ].val = val; sp->entries[ indx - 1 ].col = col; if ( str ) fli_sstrcpy( sp->entries[ indx - 1 ].str, str, MAX_CHART_LABEL_LEN ); else *sp->entries[ indx - 1 ].str = '\0'; fl_redraw_object( ob ); } /*************************************** * Sets the boundaries in the value for the object ***************************************/ void fl_set_chart_bounds( FL_OBJECT * ob, double min, double max ) { FLI_CHART_SPEC *sp; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_CHART ) ) { M_err( "fl_set_chart_bounds", "%s not a chart", ob ? ob->label : "" ); return; } #endif sp = ob->spec; if ( sp->min != min || sp->max != max ) { sp->min = min; sp->max = max; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_get_chart_bounds( FL_OBJECT * ob, double * min, double * max ) { FLI_CHART_SPEC *sp = ob->spec; *min = sp->min; *max = sp->max; } /*************************************** * Sets the maximal number of values displayed in the chart ***************************************/ void fl_set_chart_maxnumb( FL_OBJECT * ob, int maxnumb ) { FLI_CHART_SPEC *sp = ob->spec; int i, curmax; /* Fill in the new number */ if ( maxnumb < 0 ) { M_err( "fl_set_chart_maxnum", "Invalid maxnumb value" ); return; } if ( maxnumb == sp->maxnumb ) return; curmax = sp->maxnumb; if ( maxnumb > FL_CHART_MAX ) sp->maxnumb = FL_CHART_MAX; else sp->maxnumb = maxnumb; if ( sp->maxnumb > curmax ) { sp->entries = fl_realloc( sp->entries, ( sp->maxnumb + 1 ) * sizeof *sp->entries ); for ( i = curmax; i <= sp->maxnumb; i++ ) sp->entries[ i ].val = 0.0; } if ( ! sp->entries ) { sp->maxnumb = curmax; sp->entries = fl_calloc( curmax + 1, sizeof *sp->entries ); for ( i = 0; i <= curmax; i++ ) sp->entries[ i ].val = 0.0; return; } /* Shift entries if required */ if ( sp->numb > sp->maxnumb ) { for ( i = 0; i < maxnumb; i++ ) sp->entries[ i ] = sp->entries[ i + sp->numb - maxnumb ]; sp->numb = sp->maxnumb; fl_redraw_object( ob ); } } /*************************************** * Sets whether the chart should autosize along the x-axis ***************************************/ void fl_set_chart_autosize( FL_OBJECT * ob, int autosize ) { if ( ( ( FLI_CHART_SPEC * ) ob->spec )->autosize != autosize ) { ( ( FLI_CHART_SPEC * ) ob->spec )->autosize = autosize; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_chart_baseline( FL_OBJECT * ob, int iYesNo ) { if ( ( ( FLI_CHART_SPEC * ) ob->spec )->no_baseline != !iYesNo ) { ( ( FLI_CHART_SPEC * ) ob->spec )->no_baseline = !iYesNo; fl_redraw_object( ob ); } } /*************************************** ***************************************/ #if 0 void fl_get_chart_area( FL_OBJECT * ob, int * x, int * y, int * w, int * h ) { FLI_CHART_SPEC *sp = ob->spec; *x = sp->x; *y = sp->y; *w = sp->w; *h = sp->h; } #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/forms.c0000644000175000017500000016140311375424625014304 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file forms.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Main event dispatcher. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" #define PointToPixel( a ) FL_crnd( ( a ) * fli_dpi / 72.0 ) #define MMToPixel( a ) FL_crnd( ( a ) * fli_dpi / 25.4 ) #define CMMToPixel( a ) FL_crnd( ( a ) * fli_dpi / 2540.0 ) #define CPointToPixel( a ) FL_crnd( ( a ) * fli_dpi / 7200.0 ) static FL_FORM * create_new_form( FL_Coord, FL_Coord ); static void force_visible( FL_FORM * ); static void set_form_property( FL_FORM *, unsigned int ); static FL_FORM *fli_mainform; static int nomainform; static int reopened_group; int fli_fast_free_object = 0; /* exported to objects.c */ static int has_initial; /*************************************** * Returns the index of a form in the list of visible forms * (or -1 if the form isn't in this list) ***************************************/ int fli_get_visible_forms_index( FL_FORM * form ) { int i; for ( i = 0; i < fli_int.formnumb; i++ ) if ( fli_int.forms[ i ] == form ) return i; return -1; } /*************************************** * Returns the index of a form in the list of hidden forms * (or -1 if the form isn't in this list) ***************************************/ static int get_hidden_forms_index( FL_FORM * form ) { int i; for ( i = fli_int.formnumb; i < fli_int.formnumb + fli_int.hidden_formnumb; i++ ) if ( fli_int.forms[ i ] == form ) return i; return -1; } /*************************************** * Extend the list of forms by one element and append the * new forms address (thus listing it as invisible) ***************************************/ static void add_form_to_hidden_list( FL_FORM * form ) { fli_int.forms = realloc( fli_int.forms, ( fli_int.formnumb + fli_int.hidden_formnumb + 1 ) * sizeof *fli_int.forms ); fli_int.forms[ fli_int.formnumb + fli_int.hidden_formnumb++ ] = form; } /*************************************** * Moves a form from the list of hidden forms * to the list of visible forms ***************************************/ static int move_form_to_visible_list( FL_FORM * form ) { int i; /* Find the index of the hidden form */ if ( fli_int.hidden_formnumb == 0 || ( i = get_hidden_forms_index( form ) ) < 0 ) { M_err( "move_form_to_visble_list", "Form not in hidden list" ); return -1; } /* If it's not at the very start of the hidden list exchange it with the one at the start */ if ( i != fli_int.formnumb ) { fli_int.forms[ i ] = fli_int.forms[ fli_int.formnumb ]; fli_int.forms[ fli_int.formnumb ] = form; } fli_int.hidden_formnumb--; if ( form->num_auto_objects > 0 ) fli_int.auto_count++; return ++fli_int.formnumb; } /*************************************** * Moves a form from the list of visible forms * to the list of hidden forms ***************************************/ static int move_form_to_hidden_list( FL_FORM * form ) { int i; /* Find the index of the form to be moved to the hidden list */ if ( fli_int.formnumb == 0 || ( i = fli_get_visible_forms_index( form ) ) < 0 ) { M_err( "move_form_to_hidden_list", "Form not in visible list" ); return -1; } /* Unless the form is the last in the visible list exchange it with the form at the end of the visible list */ if ( i != --fli_int.formnumb ) { fli_int.forms[ i ] = fli_int.forms[ fli_int.formnumb ]; fli_int.forms[ fli_int.formnumb ] = form; } fli_int.hidden_formnumb++; if ( form->num_auto_objects > 0 ) { if ( fli_int.auto_count == 0 ) M_err( "move_form_to_hidden_list", "Bad auto count" ); else fli_int.auto_count--; } return fli_int.formnumb; } /*************************************** * Removes a form from the list of hidden forms, * shortening the list in the process ***************************************/ int remove_form_from_hidden_list( FL_FORM * form ) { int i; /* Find the index of the form to be removed completely from the hidden list */ if ( fli_int.hidden_formnumb == 0 || ( i = get_hidden_forms_index( form ) ) < 0 ) { M_err( "remove_form_from_hidden_list", "Form not in hidden list" ); return -1; } /* If it's not the form at the end of the hidden list exchange it with the one at the end */ if ( i != fli_int.formnumb + --fli_int.hidden_formnumb ) fli_int.forms[ i ] = fli_int.forms[ fli_int.formnumb + fli_int.hidden_formnumb ]; /* Shorten the list of visible and hidden forms by one element */ fli_int.forms = fl_realloc( fli_int.forms, ( fli_int.formnumb + fli_int.hidden_formnumb ) * sizeof *fli_int.forms ); return fli_int.formnumb; } /*************************************** * Returns the form that's shown in 'win' ***************************************/ FL_FORM * fl_win_to_form( Window win ) { int i; if ( win == None ) return NULL; for ( i = 0; i < fli_int.formnumb; i++ ) if ( fli_int.forms[ i ]->window == win ) return fli_int.forms[ i ]; return NULL; } /*************************************** * Creates a new, empty form ***************************************/ static FL_FORM * create_new_form( FL_Coord w, FL_Coord h ) { FL_FORM *form; form = fl_calloc( 1, sizeof *form ); /* Convert non-pixel unit into pixles */ switch ( fli_cntl.coordUnit ) { case FL_COORD_PIXEL : break; case FL_COORD_MM : w = MMToPixel( w ); h = MMToPixel( h ); break; case FL_COORD_POINT : w = PointToPixel( w ); h = PointToPixel( h ); break; case FL_COORD_centiPOINT : w = CPointToPixel( w ); h = CPointToPixel( h ); break; case FL_COORD_centiMM : w = CMMToPixel( w ); h = CMMToPixel( h ); break; default : M_err( "create_new_form", "Unknown unit: %d, using pixel", fli_cntl.coordUnit ); fli_cntl.coordUnit = FL_COORD_PIXEL; } /* Initialize pointers and non-zero defaults */ form->w_hr = form->w = w; form->h_hr = form->h = h; form->handle_dec_x = 0; form->handle_dec_y = 0; form->num_auto_objects = 0; form->deactivated = 1; form->form_callback = NULL; form->compress_mask = ExposureMask | ButtonMotionMask | PointerMotionMask; form->key_callback = NULL; form->push_callback = NULL; form->crossing_callback = NULL; form->focusobj = NULL; form->first = NULL; form->last = NULL; form->hotx = form->hoty = -1; form->use_pixmap = fli_cntl.doubleBuffer; form->label = NULL; form->flpixmap = NULL; form->u_vdata = NULL; form->close_callback = NULL; form->close_data = NULL; form->icon_pixmap = form->icon_mask = None; form->no_tooltip = 0; return form; } /*************************************** * Starts a form definition ***************************************/ FL_FORM * fl_bgn_form( int type, FL_Coord w, FL_Coord h ) { if ( ! fli_no_connection && ! flx->display ) { M_err( "fl_bgn_form", "Missing or failed call of fl_initialize()" ); exit( 1 ); } /* Check that we're not already in a form definition - an error actually is serious and can't be fixed easily as it might be due to a bad recursion */ if ( fl_current_form ) { M_err( "fl_bgn_form", "You forgot to call fl_end_form" ); exit( 1 ); } /* Create a new form */ fl_current_form = create_new_form( w, h ); /* Add it to the list of still hidden forms */ add_form_to_hidden_list( fl_current_form ); /* Each form has an empty box, covering the whole form as its first object */ fl_add_box( type, 0, 0, w, h, "" ); return fl_current_form; } /*************************************** * Ends a form definition ***************************************/ void fl_end_form( void ) { if ( ! fl_current_form ) M_err( "fl_end_form", "No current form" ); if ( fli_current_group ) { M_err( "fl_end_form", "You forgot to call fl_end_group." ); fl_end_group( ); } fl_current_form = NULL; } /*************************************** * Reopens a form for adding further objects ***************************************/ FL_FORM * fl_addto_form( FL_FORM * form ) { if ( ! form ) { M_err( "fl_addto_form", "NULL form" ); return NULL; } /* We can't open a form for adding objects when another form has already been opened for the same purpose */ if ( fl_current_form && fl_current_form != form ) { M_err( "fl_addto_form", "You forgot to call fl_end_form" ); return NULL; } if ( fl_current_form ) M_warn( "fl_addto_form", "Form was never closed." ); return fl_current_form = form; } /*************************************** * Starts a group definition ***************************************/ FL_OBJECT * fl_bgn_group( void ) { static int id = 1; if ( ! fl_current_form ) { M_err( "fl_bgn_group", "NULL form" ); return NULL; } if ( fli_current_group ) { M_err( "fl_bgn_group", "You forgot to call fl_end_group." ); fl_end_group( ); } fli_current_group = fl_make_object( FL_BEGIN_GROUP, 0, 0, 10, 10, 0, "", NULL ); fli_current_group->group_id = id++; /* Temporarily set the object class to something invalid since fl_add_object() will not add objects of class FL_BEGIN_GROUP */ fli_current_group->objclass = FL_INVALID_CLASS; fl_add_object( fl_current_form, fli_current_group ); fli_current_group->objclass = FL_BEGIN_GROUP; return fli_current_group; } /*************************************** * Ends a group definition ***************************************/ FL_OBJECT * fli_end_group( void ) { FL_OBJECT *obj; int id; if ( ! fl_current_form ) { M_err( "fl_end_group", "NULL form" ); return NULL; } if ( ! fli_current_group ) { M_err( "fl_end_group", "NULL group." ); return NULL; } obj = fli_current_group; id = obj->group_id; fli_current_group = NULL; if ( ! reopened_group ) { obj = fl_make_object( FL_END_GROUP, 0, 0, 0, 0, 0, "", NULL ); obj->group_id = id; /* Temporarily set the object class to something invalid since fl_add_object() will not add objects of class FL_END_GROUP */ obj->objclass = FL_INVALID_CLASS; fl_add_object( fl_current_form, obj ); obj->objclass = FL_END_GROUP; } if ( reopened_group == 3 ) fl_end_form( ); reopened_group = 0; return obj; } /*************************************** * Necessary since the public interface function for ending a group * doesn't have a return value ***************************************/ void fl_end_group( void ) { fli_end_group( ); } /*************************************** * "Freezes" all (shown) forms ***************************************/ void fl_freeze_all_forms( void ) { int i; for ( i = 0; i < fli_int.formnumb; i++ ) fl_freeze_form( fli_int.forms[ i ] ); } /*************************************** * "Unfreezes" all (shown) forms ***************************************/ void fl_unfreeze_all_forms( void ) { int i; for ( i = 0; i < fli_int.formnumb; i++ ) fl_unfreeze_form( fli_int.forms[ i ] ); } /*************************************** * Corrects the shape of the form based on the shape of its window ***************************************/ static void reshape_form( FL_FORM * form ) { FL_Coord w, h, dummy; int top, right, bottom, left; if ( ( ! form->handle_dec_x && ! form->handle_dec_y ) || form->wm_border == FL_NOBORDER ) { fl_get_wingeometry( form->window, &form->x, &form->y, &w, &h ); fl_set_form_size( form, w, h ); return; } fl_get_decoration_sizes( form, &top, &right, &bottom, &left ); if ( form->handle_dec_x && ! form->handle_dec_y ) { fl_get_wingeometry( form->window, &dummy, &form->y, &w, &h ); form->x -= left; } else if ( ! form->handle_dec_x && form->handle_dec_y ) { fl_get_wingeometry( form->window, &form->x, &dummy, &w, &h ); form->y -= bottom; } else { fl_get_wingeometry( form->window, &dummy, &dummy, &w, &h ); form->x -= left; form->y -= bottom; } XMoveWindow( flx->display, form->window, form->x, form->y ); fl_set_form_size( form, w, h ); } /*************************************** * Scale a form with the given scaling factors and take care of object * gravity. This one differs from fl_scale_form() in the fact that we * don't reshape the window in any way. Most useful as a follow up to * ConfigureNotify event ***************************************/ void fli_scale_form( FL_FORM * form, double xsc, double ysc ) { FL_OBJECT *obj; double neww = form->w_hr * xsc, newh = form->h_hr * ysc; if ( FL_abs( neww - form->w ) < 1 && FL_abs( newh - form->h ) < 1 ) return; form->w_hr = neww; form->h_hr = newh; form->w = FL_crnd( neww ); form->h = FL_crnd( newh ); if ( form->hotx >= 0 || form->hoty >= 0 ) { form->hotx = form->hotx * xsc; form->hoty = form->hoty * ysc; } /* Need to handle different resizing request */ for ( obj = form->first; obj; obj = obj->next ) { double oldw = obj->fl2 - obj->fl1; double oldh = obj->ft2 - obj->ft1; /* Special case to keep the center of gravity of objects that have no gravity set and aren't to be resized */ if ( obj->resize == FL_RESIZE_NONE && obj->segravity == FL_NoGravity && obj->nwgravity == FL_NoGravity ) { obj->fl1 += ( xsc - 1 ) * ( obj->fl1 + 0.5 * oldw ); obj->ft1 += ( ysc - 1 ) * ( obj->ft1 + 0.5 * oldh ); obj->fr1 = neww - obj->fl1; obj->fb1 = newh - obj->ft1; obj->fl2 = obj->fl1 + oldw; obj->ft2 = obj->ft1 + oldh; obj->fr2 = neww - obj->fl2; obj->fb2 = newh - obj->ft2; } else { /* In all other cases we recalculate the position of the upper left hand and the lower right hand corner of the object relative to all the borders of the form enclosing it, taking gravity and resizing setting into account. The results sometimes can be unexpected but hopefully are logically correct;-) */ if ( ULC_POS_LEFT_FIXED( obj ) ) obj->fr1 = neww - obj->fl1; else if ( ULC_POS_RIGHT_FIXED( obj ) ) obj->fl1 = neww - obj->fr1; if ( LRC_POS_LEFT_FIXED( obj ) ) obj->fr2 = neww - obj->fl2; else if ( LRC_POS_RIGHT_FIXED( obj ) ) obj->fl2 = neww - obj->fr2; if ( ! HAS_FIXED_HORI_ULC_POS( obj ) ) { if ( HAS_FIXED_HORI_LRC_POS( obj ) ) { if ( obj->resize & FL_RESIZE_X ) obj->fl1 = obj->fl2 - xsc * oldw; else obj->fl1 = obj->fl2 - oldw; } else obj->fl1 *= xsc; obj->fr1 = neww - obj->fl1; } if ( ! HAS_FIXED_HORI_LRC_POS( obj ) ) { if ( obj->resize & FL_RESIZE_X ) obj->fl2 = obj->fl1 + xsc * oldw; else obj->fl2 = obj->fl1 + oldw; obj->fr2 = neww - obj->fl2; } if ( ULC_POS_TOP_FIXED( obj ) ) obj->fb1 = newh - obj->ft1; else if ( ULC_POS_BOTTOM_FIXED( obj ) ) obj->ft1 = newh - obj->fb1; if ( LRC_POS_TOP_FIXED( obj ) ) obj->fb2 = newh - obj->ft2; else if ( LRC_POS_BOTTOM_FIXED( obj ) ) obj->ft2 = newh - obj->fb2; if ( ! HAS_FIXED_VERT_ULC_POS( obj ) ) { if ( HAS_FIXED_VERT_LRC_POS( obj ) ) { if ( obj->resize & FL_RESIZE_Y ) obj->ft1 = obj->ft2 - ysc * oldh; else obj->ft1 = obj->ft2 - oldh; } else obj->ft1 *= ysc; obj->fb1 = newh - obj->ft1; } if ( ! HAS_FIXED_VERT_LRC_POS( obj ) ) { if ( obj->resize & FL_RESIZE_Y ) obj->ft2 = obj->ft1 + ysc * oldh; else obj->ft2 = obj->ft1 + oldh; obj->fb2 = newh - obj->ft2; } } obj->x = FL_crnd( obj->fl1 ); obj->y = FL_crnd( obj->ft1 ); obj->w = FL_crnd( obj->fl2 - obj->fl1 ); obj->h = FL_crnd( obj->ft2 - obj->ft1 ); if ( fli_inverted_y ) obj->y = form->h - obj->h - obj->y; } /* Only notify objects now - parent objects might have to adjust sizes and positions of child objects and when objects get the resize notice immediately after resizing above then the parent object gets it first, sets a different size for the child, which then is overwritten */ for ( obj = form->first; obj; obj = obj->next ) fli_handle_object( obj, FL_RESIZED, 0, 0, 0, NULL, 0 ); fli_recalc_intersections( form ); } /*************************************** * Externally visible routine to scale a form. Needs to reshape the window. ***************************************/ void fl_scale_form( FL_FORM * form, double xsc, double ysc ) { if ( ! form ) { M_err( "fl_scale_form", "NULL form" ); return; } if ( FL_crnd( form->w_hr * xsc ) == form->w && FL_crnd( form->h_hr * ysc ) == form->h ) return; fli_scale_form( form, xsc, ysc ); /* Resize the window */ if ( form->visible == FL_VISIBLE ) fl_winresize( form->window, form->w, form->h ); } /*************************************** * Sets lower limits for the width and height of a form ***************************************/ void fl_set_form_minsize( FL_FORM * form, FL_Coord w, FL_Coord h ) { if ( ! form ) { M_err( "fl_set_form_minsize", "Null form" ); return; } fl_winminsize( form->window, w, h ); } /*************************************** * Sets upper limits for the width and height of a form ***************************************/ void fl_set_form_maxsize( FL_FORM * form, FL_Coord w, FL_Coord h ) { if ( ! form ) { M_err( "fl_set_form_maxsize", "NULL form" ); return; } fl_winmaxsize( form->window, w, h ); } /*************************************** ***************************************/ void fl_set_form_dblbuffer( FL_FORM * form, int y ) { if ( ! form ) { M_err( "fl_set_form_dblbuffer", "NULL form" ); return; } form->use_pixmap = y; } /*************************************** * Sets the size of a form ***************************************/ void fl_set_form_size( FL_FORM * form, FL_Coord w, FL_Coord h ) { if ( ! form ) { M_err( "fl_set_form_size", "NULL form" ); return; } if ( w != form->w || h != form->h ) fl_scale_form( form, w / form->w_hr, h / form->h_hr ); } /*************************************** * Sets the position of a form ***************************************/ void fl_set_form_position( FL_FORM * form, FL_Coord x, FL_Coord y ) { FL_Coord oldx, oldy; if ( ! form ) { M_err( "fl_set_form_position", "NULL form" ); return; } oldx = form->x; oldy = form->y; /* Negative values for x or y are interpreted as meaning that the position is that of the right or bottom side of the form relative to the right or bottom side to the screen. May have to be corrected for the right or bottom border decoration widths. */ if ( x >= 0 ) { form->x = x; form->handle_dec_x = 0; } else { form->x = fl_scrw - form->w + x; form->handle_dec_x = 1; } if ( y >= 0 ) { form->y = y; form->handle_dec_y = 0; } else { form->y = fl_scrh - form->h + y; form->handle_dec_y = 1; } /* If the form is already shown move it */ if ( form->visible == FL_VISIBLE ) { int bottom = 0, left = 0, dummy; if ( ( form->handle_dec_x || form->handle_dec_y ) && form->wm_border != FL_NOBORDER ) { fl_get_decoration_sizes( form, &dummy, &dummy, &bottom, &left ); if ( form->handle_dec_x ) form->x -= left; if ( form->handle_dec_y ) form->y -= bottom; } form->handle_dec_x = form->handle_dec_y = 0; if ( oldx != form->x || oldy != form->y ) XMoveWindow( flx->display, form->window, form->x, form->y ); } } /*************************************** * Sets the position of the hotspot of a form ***************************************/ void fl_set_form_hotspot( FL_FORM * form, FL_Coord x, FL_Coord y ) { if ( ! form ) { M_err( "fl_set_form_hotspot", "NULL form" ); return; } form->hotx = x; form->hoty = y; } /*************************************** * Sets the position of the hotspot of a form * to the center of one of its objects ***************************************/ void fl_set_form_hotobject( FL_FORM * form, FL_OBJECT * obj ) { if ( ! form ) { M_err( "fl_set_form_hotobject", "NULL form" ); return; } if ( ! obj ) { M_err( "fl_set_form_hotobject", "NULL object" ); return; } if ( obj->form != form ) { M_err( "fl_set_form_hotobject", "Object not part of form" ); return; } fl_set_form_hotspot( form, obj->x + obj->w / 2, obj->y + obj->h / 2 ); } /*************************************** * Try to make sure a form is completely visible on the screen ***************************************/ static void force_visible( FL_FORM * form ) { if ( form->x > fl_scrw - form->w ) form->x = fl_scrw - form->w; if ( form->x < 0 ) form->x = 0; if ( form->y > fl_scrh - form->h ) form->y = fl_scrh - form->h; if ( form->y < 0 ) form->y = 0; } /*************************************** * Sets the name (label) of the form and. if the * form is shown, the form's window title ***************************************/ void fl_set_form_title( FL_FORM * form, const char * name ) { if ( ! form ) { M_err( "fl_set_form_title", "NULL form" ); return; } if ( form->label != name ) { if ( form->label ) fl_free( form->label ); form->label = fl_strdup( name ? name : "" ); } if ( form->window ) fl_wintitle( form->window, form->label ); } /*************************************** * Creates the window for a form (but doesn't show it yet, use * fl_show_form_window() for that), returns the window handle ***************************************/ Window fl_prepare_form_window( FL_FORM * form, int place, int border, const char * name ) { long screenw, screenh, dont_fix_size = 0; FL_Coord mx, my, nmx, nmy; if ( border == 0 ) border = FL_FULLBORDER; if ( fl_current_form ) { M_err( "fl_prepare_form_window", "You forgot to call fl_end_form %s", name ? name : "" ); fl_current_form = NULL; } if ( ! form ) { M_err( "fl_prepare_form", "NULL form" ); return None; } if ( form->visible != FL_INVISIBLE ) return form->window; /* Try to move the form from the part of the list for hidden forms to that at the start for visible forms */ move_form_to_visible_list( form ); if ( form->label != name ) { if ( form->label ) fl_free( form->label ); form->label = fl_strdup( name ? name : "" ); } if ( border == FL_NOBORDER ) fli_int.unmanaged_count++; form->wm_border = border; form->deactivated = 0; screenw = fl_scrw; screenh = fl_scrh; fl_get_mouse( &mx, &my, &fli_int.keymask ); if ( ( dont_fix_size = place & FL_FREE_SIZE ) ) place &= ~ FL_FREE_SIZE; if ( place == FL_PLACE_SIZE ) fl_pref_winsize( form->w, form->h ); else if ( place == FL_PLACE_ASPECT ) fl_winaspect( 0, form->w, form->h ); else if ( place == FL_PLACE_POSITION ) { fl_pref_winposition( form->x, form->y ); fl_initial_winsize( form->w, form->h ); } else if ( place != FL_PLACE_FREE ) { switch ( place ) { case FL_PLACE_CENTER: case FL_PLACE_FREE_CENTER: form->x = ( screenw - form->w ) / 2; form->y = ( screenh - form->h ) / 2; break; case FL_PLACE_MOUSE: form->x = mx - form->w / 2; form->y = my - form->h / 2; break; case FL_PLACE_FULLSCREEN: form->x = 0; form->y = 0; fl_set_form_size( form, screenw, screenh ); break; case FL_PLACE_HOTSPOT: if ( form->hotx < 0 || form->hoty < 0 ) /* not set */ { form->hotx = form->w / 2; form->hoty = form->h / 2; } nmx = mx; nmy = my; form->x = mx - form->hotx; form->y = my - form->hoty; force_visible( form ); nmx = form->x + form->hotx; nmy = form->y + form->hoty; if ( nmx != mx || nmy != my ) fl_set_mouse( nmx, nmy ); break; case FL_PLACE_GEOMETRY : if ( form->x < 0 ) { form->x = screenw - form->w + form->x; form->handle_dec_x = 1; } if ( form->y < 0 ) { form->y = screenh - form->h + form->y; form->handle_dec_y = 1; } break; } /* Final check. Make sure form is visible */ if ( place != FL_PLACE_GEOMETRY ) force_visible( form ); if ( dont_fix_size && place != FL_PLACE_GEOMETRY ) fl_initial_wingeometry( form->x, form->y, form->w, form->h ); else fl_pref_wingeometry( form->x, form->y, form->w, form->h ); } else if ( place == FL_PLACE_FREE ) { fl_initial_winsize( form->w, form->h ); if ( has_initial ) fl_initial_wingeometry( form->x, form->y, form->w, form->h ); } else { M_err( "fl_prepare_form_window", "Unknown requests: %d", place ); fl_initial_wingeometry( form->x, form->y, form->w, form->h ); } /* Window managers typically do not allow dragging transient windows */ if ( border != FL_FULLBORDER ) { if ( place == FL_PLACE_ASPECT || place == FL_PLACE_FREE ) { form->x = mx - form->w / 2; form->y = my - form->h / 2; force_visible( form ); fl_initial_winposition( form->x, form->y ); } if ( border == FL_NOBORDER ) fl_noborder( ); else fl_transient( ); } if ( place == FL_PLACE_ICONIC ) fl_initial_winstate( IconicState ); if ( form->icon_pixmap ) fl_winicon( 0, form->icon_pixmap, form->icon_mask ); has_initial = 0; fli_init_colormap( fl_vmode ); form->window = fli_create_window( fl_root, fli_colormap( fl_vmode ), name ); fl_winicontitle( form->window, name ); if ( border == FL_FULLBORDER || form->prop & FLI_COMMAND_PROP ) set_form_property( form, FLI_COMMAND_PROP ); return form->window; } /*************************************** * Maps (displays) a form's window created with fl_prepare_form_window() ***************************************/ Window fl_show_form_window( FL_FORM * form ) { FL_OBJECT *obj; if ( ! form ) { M_err( "fl_show_form_window", "NULL form" ); return None; } if ( form->window == None || form->visible != FL_INVISIBLE ) return form->window; fl_winshow( form->window ); form->visible = FL_VISIBLE; reshape_form( form ); fl_redraw_form( form ); /* TODO: somehow formbrowser objects get drawn incorrectly the first time round so, for the time being, we redraw it once again... */ for ( obj = form->first; obj; obj = obj->next ) if ( obj->objclass == FL_FORMBROWSER ) fl_redraw_object( obj ); if ( ! form->focusobj ) for ( obj = form->first; obj; obj = obj->next ) if ( obj->input && obj->active ) { fl_set_focus_object( form, obj ); break; } return form->window; } /*************************************** * Makes a new form visible by creating a window for it * and mapping it. Returns the form's window handle. ***************************************/ Window fl_show_form( FL_FORM * form, int place, int border, const char * name ) { if ( ! form ) { M_err( "fl_show_form", "NULL form" ); return None; } fl_prepare_form_window( form, place, border, name ); return fl_show_form_window( form ); } /*************************************** * Hides a particular form by unmapping and destroying its window ***************************************/ static void close_form_window( Window win ) { XEvent xev; XUnmapWindow( flx->display, win ); XDestroyWindow( flx->display, win ); XSync( flx->display, 0 ); while ( XCheckWindowEvent( flx->display, win, AllEventsMask, &xev ) ) fli_xevent_name( "Eaten", &xev ); /* Give subwindows a chance to handle destroy event promptly, take care the window of the form doesn't exist anymore! */ while ( XCheckTypedEvent( flx->display, DestroyNotify, &xev ) ) { FL_FORM *form; if ( ( form = fli_find_event_form( &xev ) ) ) { form->window = None; fl_hide_form( form ); } else fl_XPutBackEvent( &xev ); } } /*************************************** ***************************************/ static FL_FORM * property_set( unsigned int prop ) { int i; for ( i = 0; i < fli_int.formnumb; i++ ) if ( fli_int.forms[ i ]->prop & prop && fli_int.forms[ i ]->prop & FLI_PROP_SET ) return fli_int.forms[ i ]; return NULL; } /*************************************** ***************************************/ static void set_form_property( FL_FORM * form, unsigned int prop ) { if ( ! form ) { M_err( "set_form_property", "NULL form" ); return; } if ( property_set( prop ) ) return; if ( ! ( prop & FLI_COMMAND_PROP ) ) { M_err( "set_form_property", "Unknown form property request %u", prop ); return; } if ( form->window ) { fli_set_winproperty( form->window, FLI_COMMAND_PROP ); form->prop |= FLI_PROP_SET; } form->prop |= FLI_COMMAND_PROP; fli_mainform = form; } /*************************************** ***************************************/ void fl_hide_form( FL_FORM * form ) { Window owin; FL_OBJECT *o; if ( ! form ) { M_err( "fl_hide_form", "NULL form" ); return; } if ( fli_get_visible_forms_index( form ) < 0 ) { M_err( "fl_hide_form", "Hiding unknown form" ); return; } if ( form->visible == FL_BEING_HIDDEN ) { M_err( "fl_hide_form", "Recursive call?" ); return; } form->visible = FL_BEING_HIDDEN; fli_set_form_window( form ); /* Checking mouseobj->form is necessary as it might be deleted from a form */ if ( fli_int.mouseobj && fli_int.mouseobj->form == form ) { fli_handle_object( fli_int.mouseobj, FL_LEAVE, 0, 0, 0, NULL, 1 ); fli_int.mouseobj = NULL; } if ( fli_int.pushobj && fli_int.pushobj->form == form ) { fli_handle_object( fli_int.pushobj, FL_RELEASE, 0, 0, 0, NULL, 1 ); fli_int.pushobj = NULL; } if ( form->focusobj ) { fli_handle_object( form->focusobj, FL_UNFOCUS, 0, 0, 0, NULL, 0 ); form->focusobj = NULL; } /* Get canvas objects to unmap their windows (but only for those that aren't childs, those will be dealt with by their parents) */ for ( o = form->first; o; o = o->next ) if ( ( o->objclass == FL_CANVAS || o->objclass == FL_GLCANVAS ) && ! o->parent ) fli_unmap_canvas_window( o ); #ifdef DELAYED_ACTION fli_object_qflush( form ); #endif /* Free backing store pixmap but keep the pointer */ fli_free_flpixmap( form->flpixmap ); if ( fli_int.mouseform && fli_int.mouseform->window == form->window ) fli_int.mouseform = NULL; form->deactivated = 1; form->visible = FL_INVISIBLE; owin = form->window; form->window = None; fli_hide_tooltip( ); /* If the forms window is None it already has been closed */ if ( owin ) close_form_window( owin ); if ( flx->win == owin ) flx->win = None; /* Move the form from the part of the list for visible forms to the part of hidden forms at the end of the array */ move_form_to_hidden_list( form ); if ( form->wm_border == FL_NOBORDER ) { fli_int.unmanaged_count--; if ( fli_int.unmanaged_count < 0 ) { M_err( "fl_hide_form", "Bad unmanaged count" ); fli_int.unmanaged_count = 0; } } /* Need to re-establish command property */ if ( fli_int.formnumb && form->prop & FLI_COMMAND_PROP ) set_form_property( *fli_int.forms, FLI_COMMAND_PROP ); if ( form == fli_int.keyform ) fli_int.keyform = NULL; } /*************************************** * Frees the memory used by a form, together with all its objects. ***************************************/ void fl_free_form( FL_FORM * form ) { /* Check whether ok to free */ if ( ! form ) { M_err( "fl_free_form", "NULL form" ); return; } if ( form->visible == FL_VISIBLE ) { M_warn( "fl_free_form", "Freeing visible form" ); fl_hide_form( form ); } if ( get_hidden_forms_index( form ) < 0 ) { M_err( "fl_free_form", "Freeing unknown form" ); return; } /* Free all objects of the form */ fli_fast_free_object = 1; while ( form->first ) fl_free_object( form->first ); fli_fast_free_object = 0; if ( form->flpixmap ) { fli_free_flpixmap( form->flpixmap ); fl_free( form->flpixmap ); } if ( form->label ) { fl_free( form->label ); form->label = NULL; } if ( form == fli_mainform ) fli_mainform = NULL; /* Free the form and remove it from the list of existing forms */ fl_free( form ); remove_form_from_hidden_list( form ); } /*************************************** * Activates a form (form only becomes activated if this function has * been called as many times as fl_deactive_form()). ***************************************/ void fl_activate_form( FL_FORM * form ) { if ( ! form ) { M_err( "fl_activate_form", "NULL form" ); return; } if ( form->deactivated ) { form->deactivated--; if ( ! form->deactivated && form->activate_callback ) form->activate_callback( form, form->activate_data ); } if ( form->child ) fl_activate_form( form->child ); } /*************************************** * Deactivates a form (re-activation requires as many calls of * fl_activate_form() as there were calls of fl_deactivate_form()). ***************************************/ void fl_deactivate_form( FL_FORM * form ) { if ( ! form ) { M_err( "fl_deactivate_form", "NULL form" ); return; } if ( ! form->deactivated && fli_int.mouseobj && fli_int.mouseobj->form == form ) fli_handle_object( fli_int.mouseobj, FL_LEAVE, 0, 0, 0, NULL, 1 ); if ( ! form->deactivated && form->deactivate_callback ) form->deactivate_callback( form, form->deactivate_data ); form->deactivated++; if ( form->child ) fl_deactivate_form( form->child ); } /*************************************** * Installs handler to be called at (final) re-activation of the form ***************************************/ FL_FORM_ATACTIVATE fl_set_form_atactivate( FL_FORM * form, FL_FORM_ATACTIVATE cb, void * data ) { FL_FORM_ATACTIVATE old = NULL; if ( ! form ) { M_err( "fl_set_form_atactivate", "NULL form" ); return NULL; } old = form->activate_callback; form->activate_callback = cb; form->activate_data = data; return old; } /*************************************** * Installs handler to be called at (first) deactivation of the form ***************************************/ FL_FORM_ATDEACTIVATE fl_set_form_atdeactivate( FL_FORM * form, FL_FORM_ATDEACTIVATE cb, void * data ) { FL_FORM_ATDEACTIVATE old = NULL; if ( ! form ) { M_err( "fl_set_form_atdeactivate", "NULL form" ); return NULL; } old = form->deactivate_callback; form->deactivate_callback = cb; form->deactivate_data = data; return old; } /*************************************** * Activates all forms ***************************************/ void fl_activate_all_forms( void ) { int i; for ( i = 0; i < fli_int.formnumb; i++ ) fl_activate_form( fli_int.forms[ i ] ); } /*************************************** * Deactivates all forms ***************************************/ void fl_deactivate_all_forms( void ) { int i; for ( i = 0; i < fli_int.formnumb; i++ ) fl_deactivate_form( fli_int.forms[ i ] ); } /*************************************** * Installs handler to be called at close of the form ***************************************/ FL_FORM_ATCLOSE fl_set_form_atclose( FL_FORM * form, FL_FORM_ATCLOSE fmclose, void * data ) { FL_FORM_ATCLOSE old; if ( ! form ) { M_err( "fl_set_form_atclose", "NULL form" ); return NULL; } old = form->close_callback; form->close_callback = fmclose; form->close_data = data; return old; } /*************************************** ***************************************/ FL_FORM_ATCLOSE fl_set_atclose( FL_FORM_ATCLOSE fmclose, void * data ) { FL_FORM_ATCLOSE old = fli_context->atclose; fli_context->atclose = fmclose; fli_context->close_data = data; return old; } /*************************************** ***************************************/ void fl_set_form_geometry( FL_FORM * form, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { fl_set_form_position( form, x, y ); fl_set_form_size( form, w, h ); /* This alters the windowing defaults */ fl_initial_wingeometry( form->x, form->y, form->w, form->h ); has_initial = 1; } /*************************************** * Register pre-emptive event handlers ***************************************/ FL_RAW_CALLBACK fl_register_raw_callback( FL_FORM * form, unsigned long mask, FL_RAW_CALLBACK rcb ) { FL_RAW_CALLBACK old_rcb = NULL; int valid = 0; if ( ! form ) { M_err( "fl_register_raw_callback", "Null form" ); return NULL; } if ( ( mask & FL_ALL_EVENT ) == FL_ALL_EVENT ) { old_rcb = form->all_callback; form->evmask = mask; form->all_callback = rcb; return old_rcb; } if ( mask & ( KeyPressMask | KeyReleaseMask ) ) { form->evmask |= mask & ( KeyPressMask | KeyReleaseMask ); old_rcb = form->key_callback; form->key_callback = rcb; valid = 1; } if ( mask & ( ButtonPressMask | ButtonReleaseMask ) ) { form->evmask |= mask & ( ButtonPressMask | ButtonReleaseMask ); old_rcb = form->push_callback; form->push_callback = rcb; valid = 1; } if ( mask & ( EnterWindowMask | LeaveWindowMask ) ) { form->evmask |= mask & ( EnterWindowMask | LeaveWindowMask ); old_rcb = form->crossing_callback; form->crossing_callback = rcb; valid = 1; } if ( mask & ( ButtonMotionMask | PointerMotionMask ) ) { form->evmask |= mask & ( ButtonMotionMask | PointerMotionMask ); old_rcb = form->motion_callback; form->motion_callback = rcb; valid = 1; } if ( ! valid ) /* unsupported mask */ M_err( "fl_register_raw_callback", "Unsupported mask 0x%x", mask ); return old_rcb; } /*************************************** ***************************************/ void fl_set_form_event_cmask( FL_FORM * form, unsigned long cmask ) { if ( form ) form->compress_mask = cmask; } /*************************************** ***************************************/ unsigned long fl_get_form_event_cmask( FL_FORM * form ) { return form ? form->compress_mask : 0UL; } /*************************************** * Sets the callback routine for the form ***************************************/ void fl_set_form_callback( FL_FORM * form, FL_FORMCALLBACKPTR callback, void * d ) { if ( ! form ) { M_err( "fl_set_form_callback", "NULL form" ); return; } form->form_callback = callback; form->form_cb_data = d; } /*************************************** ***************************************/ void fl_set_form_icon( FL_FORM * form, Pixmap p, Pixmap m ) { if ( ! form ) return; form->icon_pixmap = p; form->icon_mask = m; if ( form->window ) fl_winicon( form->window, p, m ); } /*************************************** ***************************************/ void fl_set_app_mainform( FL_FORM * form ) { fli_mainform = form; set_form_property( form, FLI_COMMAND_PROP ); } /*************************************** ***************************************/ FL_FORM * fl_get_app_mainform( void ) { return nomainform ? NULL : fli_mainform; } /*************************************** ***************************************/ void fl_set_app_nomainform( int flag ) { nomainform = flag; } /*************************************** * Does a rescale of a form without taking into * account object gravity or resize settings ***************************************/ static void simple_form_rescale( FL_FORM * form, double scale ) { FL_OBJECT *obj; form->w_hr *= scale; form->h_hr *= scale; form->w = FL_crnd( form->w_hr ); form->h = FL_crnd( form->h_hr ); for ( obj = form->first; obj; obj = obj->next ) if ( obj->objclass != FL_BEGIN_GROUP && obj->objclass != FL_END_GROUP ) fl_scale_object( obj, scale, scale ); fl_redraw_form( form ); } /*************************************** * Checks if the label of an object fits into it (after x- and * y-margin have been added). If not, all objects and the form * are enlarged by the necessary factor (but never by more than * a factor of 1.5). ***************************************/ void fl_fit_object_label( FL_OBJECT * obj, FL_Coord xmargin, FL_Coord ymargin ) { int sw, sh, osize; double factor, xfactor, yfactor; if ( fli_no_connection ) return; fl_get_string_dimension( obj->lstyle, obj->lsize, obj->label, strlen( obj->label ), &sw, &sh ); if ( sw <= obj->w - 2 * ( FL_abs( obj->bw ) + xmargin ) && sh <= obj->h - 2 * ( FL_abs( obj->bw ) + ymargin ) ) return; if ( ( osize = obj->w - 2 * ( FL_abs( obj->bw ) + xmargin ) ) <= 0 ) osize = 1; xfactor = ( double ) sw / osize; if ( ( osize = obj->h - 2 * ( FL_abs( obj->bw ) + ymargin ) ) <= 0 ) osize = 1; yfactor = ( double ) sh / osize; factor = FL_max( xfactor, yfactor ); if ( factor > 1.5 ) factor = 1.5; /* Scale all objects without taking care of gravity etc. */ simple_form_rescale( obj->form, factor ); } /*************************************** ***************************************/ void fli_recount_auto_objects( void ) { int i; for ( fli_int.auto_count = i = 0; i < fli_int.formnumb; i++ ) if ( fli_int.forms[ i ]->num_auto_objects > 0 ) fli_int.auto_count++; } /*************************************** * Reopens a group to allow addition of further objects ***************************************/ FL_OBJECT * fl_addto_group( FL_OBJECT * group ) { if ( ! group ) { M_err( "fl_addto_group", "NULL group." ); return NULL; } if ( group->objclass != FL_BEGIN_GROUP ) { M_err( "fl_addto_group", "Parameter is not a group object." ); return NULL; } if ( fl_current_form && fl_current_form != group->form ) { M_err( "fl_addto_group", "Can't switch to a group on a different form" ); return NULL; } if ( fli_current_group && fli_current_group != group ) { M_err( "fl_addto_group", "You forgot to call fl_end_group" ); return NULL; } if ( fli_current_group ) M_warn( "fl_addto_group", "Group was never closed" ); reopened_group = 1; reopened_group += fl_current_form ? 0 : 2; fl_current_form = group->form; return fli_current_group = group; } /*************************************** * Returns if a form is visible ***************************************/ int fl_form_is_visible( FL_FORM * form ) { if ( ! form ) { M_warn( "fl_form_is_visible", "NULL form" ); return FL_INVISIBLE; } return form->window ? form->visible : FL_INVISIBLE; } /*************************************** * Similar to fit_object_label(), but will do it for all objects and * has a smaller maximum magnification factor (1.25 instead of 1.5). * Mainly intended for compensation for font size variations. ***************************************/ double fl_adjust_form_size( FL_FORM * form ) { FL_OBJECT *obj; double xfactor, yfactor, max_factor, factor; int sw, sh, osize; double xm = 0.5, ym = 0.5; int bw; if ( fli_no_connection ) return 1.0; max_factor = factor = 1.0; for ( obj = form->first; obj; obj = obj->next ) { if ( ( obj->align == FL_ALIGN_CENTER || obj->align & FL_ALIGN_INSIDE || obj->objclass == FL_INPUT ) && ! obj->parent && *obj->label && *obj->label != '@' && obj->boxtype != FL_NO_BOX && ( obj->boxtype != FL_FLAT_BOX || obj->objclass == FL_MENU ) ) { fl_get_string_dimension( obj->lstyle, obj->lsize, obj->label, strlen( obj->label ), &sw, &sh ); bw = ( obj->boxtype == FL_UP_BOX || obj->boxtype == FL_DOWN_BOX ) ? FL_abs( obj->bw ) : 1; if ( obj->objclass == FL_BUTTON && ( obj->type == FL_RETURN_BUTTON || obj->type == FL_MENU_BUTTON ) ) sw += FL_min( 0.6 * obj->h, 0.6 * obj->w ) - 1; if ( obj->objclass == FL_BUTTON && obj->type == FL_LIGHTBUTTON ) sw += FL_LIGHTBUTTON_MINSIZE + 1; if ( sw <= obj->w - 2 * ( bw + xm ) && sh <= obj->h - 2 * ( bw + ym ) ) continue; if ( ( osize = obj->w - 2 * ( bw + xm ) ) <= 0 ) osize = 1; xfactor = ( double ) sw / osize; if ( ( osize = obj->h - 2 * ( bw + ym ) ) <= 0 ) osize = 1; yfactor = ( double ) sh / osize; if ( obj->objclass == FL_INPUT ) { xfactor = 1.0; yfactor = ( sh + 1.6 ) / osize; } if ( ( factor = FL_max( xfactor, yfactor ) ) > max_factor ) max_factor = factor; } } if ( max_factor <= 1.0 ) return 1.0; max_factor = 0.01 * ( int ) ( max_factor * 100.0 ); if ( max_factor > 1.25 ) max_factor = 1.25; /* Scale all objects without taking care of gravity etc. */ simple_form_rescale( form, max_factor ); return max_factor; } /*************************************** ***************************************/ void fl_raise_form( FL_FORM * form ) { if ( form && form->window ) XRaiseWindow( fl_display, form->window ); else M_err( "fl_raise_form", "NULL form or form window not shown" ); } /*************************************** ***************************************/ void fl_lower_form( FL_FORM * form ) { if ( form && form->window ) XLowerWindow( fl_display, form->window ); else M_err( "fl_lower_form", "NULL form or forn window not shown" ); } /*************************************** * Returns the sizes of the "decorations" the window manager puts around * a forms window. Returns 0 on success and 1 if the form isn't visible * or it's a form embedded into another form. * This first tries to use the "_NET_FRAME_EXTENTS" atom which window * manager in principle should set for windows that have decorations. * For those window managers that don't have that atom we try it with the * old trick of searching up for the parent window that's either Null or * is a direct child of the root window and using this windows geometry * (but note: this doesn't work with window managers that don't reparent * the windows they manage, but we can't recognize that). ***************************************/ int fl_get_decoration_sizes( FL_FORM * form, int * top, int * right, int * bottom, int * left ) { Atom a; if ( ! form || ! form->window || form->visible != FL_VISIBLE || form->parent ) return 1; *top = *right = *bottom = *left = 0; /* If the window manager knows about '_NET_FRAME_EXTENTS' ask for the settings for the forms window (if there are none the window probably has no decorations) */ if ( ( a = XInternAtom( fl_get_display( ), "_NET_FRAME_EXTENTS", True ) ) != None ) { Atom actual_type; int actual_format; unsigned long nitems; unsigned long bytes_after; static unsigned char *prop; XGetWindowProperty( fl_get_display( ), form->window, a, 0, 4, False, XA_CARDINAL, &actual_type, &actual_format, &nitems, &bytes_after, &prop ); if ( actual_type == XA_CARDINAL && actual_format == 32 && nitems == 4 ) { *top = ( ( long * ) prop )[ 2 ]; *right = ( ( long * ) prop )[ 1 ]; *bottom = ( ( long * ) prop )[ 3 ]; *left = ( ( long * ) prop )[ 0 ]; } } else { /* The window manager doesn't have the _NET_FRAME_EXTENDS atom so we have to try the traditional method (which assumes that the window manager reparents the windows it manages) */ Window cur_win = form->window; Window root; Window parent; Window *childs = NULL; XWindowAttributes win_attr; XWindowAttributes frame_attr; Window wdummy; unsigned int udummy; /* Get the coordinates and size of the form's window */ XGetWindowAttributes( fl_get_display( ), cur_win, &win_attr ); /* Check try to get its parent window */ XQueryTree( fl_get_display( ), cur_win, &root, &parent, &childs, &udummy ); if ( childs ) { XFree( childs ); childs = NULL; } /* If there's no parent or the parent window is the root window itself we've got to assume that there are no decorations */ if ( ! parent || parent == root ) return 0; /* Now translate the form window's coordiates (that are relative to its parent) to that relative to the root window and then find the top-most parent that isn't the root window itself */ XTranslateCoordinates( fl_get_display( ), parent, root, win_attr.x, win_attr.y, &win_attr.x, &win_attr.y, &wdummy ); while ( parent && parent != root ) { cur_win = parent; XQueryTree( fl_get_display( ), cur_win, &root, &parent, &childs, &udummy ); if ( childs ) { XFree( childs ); childs = NULL; } } /* Get the cordinates and sizes of that top-most window... */ XGetWindowAttributes( fl_get_display( ), cur_win, &frame_attr ); /* ...and finally calculate the decoration sizes */ *top = win_attr.y - frame_attr.y; *left = win_attr.x - frame_attr.x; *bottom = frame_attr.height - win_attr.height - *top; *right = frame_attr.width - win_attr.width - *left; } return 0; } /*************************************** * Returns if a forms window is in iconified state ***************************************/ int fl_form_is_iconified( FL_FORM * form ) { XWindowAttributes xwa; if ( ! form ) { M_err( "fl_form_is_iconified", "NULL form" ); return 0; } if ( ! form->window || form->visible == FL_INVISIBLE ) return 0; XGetWindowAttributes( fl_get_display( ), form->window, &xwa ); return xwa.map_state != IsViewable; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/read4msb.c0000644000175000017500000000314611247055071014647 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file read4msb.c * * Copyright(c) 1993,1994 by T.C. Zhao * All rights reserved. * * Read 4bytes MSB first */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" #include "ulib.h" /*************************************** ***************************************/ int fli_fget4MSBF( FILE * fp ) { int ret = getc(fp); ret = ( ret << 8 ) | getc( fp ); ret = ( ret << 8 ) | getc( fp ); ret = ( ret << 8 ) | getc( fp ); return ret; } /*************************************** ***************************************/ int fli_fput4MSBF( int n, FILE * fp ) { putc( ( n >> 24 ) & 0xff, fp ); putc( ( n >> 16 ) & 0xff, fp ); putc( ( n >> 8 ) & 0xff, fp ); putc( n & 0xff, fp ); return n; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/checkbut.c0000644000175000017500000000707411253417223014740 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file checkbut.c *. * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /************************************************************************** * Draws a check button **********************************************************************{*/ static void draw_checkbutton( FL_OBJECT * ob ) { FL_Coord xx, yy, ww, hh, bw = FL_abs( ob->bw ); FL_BUTTON_STRUCT *sp = ob->spec; if ( sp->event == FL_ENTER || sp->event == FL_LEAVE ) return; fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); ww = hh = 0.6 * FL_min( ob->w, ob->h ); xx = ob->x + 4.5; yy = ob->y + ( ob->h - hh ) / 2; if ( sp->val ) fl_drw_checkbox( FL_DOWN_BOX, xx, yy, ww, hh, ob->col2, bw ); else fl_drw_checkbox( FL_UP_BOX, xx, yy, ww, hh, ob->col1, bw ); if ( ob->align == FL_ALIGN_CENTER ) fl_drw_text( FL_ALIGN_LEFT, xx + ww + 1, ob->y, ob->w - ww - 3, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else fl_drw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); if ( ob->type == FL_RETURN_BUTTON ) fl_drw_text( 0, ob->x + ob->w - 0.8f * ob->h, ob->y + 0.2f * ob->h, 0.6f * ob->h, 0.6f * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } /*************************************** ***************************************/ FL_OBJECT * fl_create_checkbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; fl_add_button_class( FL_CHECKBUTTON, draw_checkbutton, 0 ); obj = fl_create_generic_button( FL_CHECKBUTTON, type, x, y, w, h, label ); obj->boxtype = FL_CHECKBUTTON_BOXTYPE; obj->col1 = FL_CHECKBUTTON_COL1; obj->col2 = FL_CHECKBUTTON_COL2; obj->align = FL_CHECKBUTTON_ALIGN; obj->lcol = FL_CHECKBUTTON_LCOL; return obj; } /*************************************** ***************************************/ FL_OBJECT * fl_add_checkbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_checkbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/fselect.c0000644000175000017500000010732111314666140014573 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fselect.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Comprehensive interactive file selector. The actual directory reading * code is isolated in listdir.c */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" #include /******************** Limits ***************************/ #define FL_FLEN 256 #define MAXFL ( FL_PATH_MAX + FL_FLEN ) static int dirmarker = 'D'; /* directory marker */ static int bdevmarker = 'b'; /* special file marker */ static int cdevmarker = 'c'; /* special file marker */ static int fifomarker = 'p'; /* pipe marker */ static int sockmarker = 's'; /* socket marker */ static int listdirfirst = 1; /* list directory first */ extern int fli_sort_method; /* form listdir.c */ /******* GUI parameters ********/ /* Misc. buttons configurable from application program */ #define MAX_APPBUTT 3 typedef struct { /* Due to FD_FSELECTOR, the order of these objects are important. maybe put them in a union ? */ FL_FORM * fselect; void * vdata; char * cdata; long ldata; FL_OBJECT * browser, * input, * prompt, * resbutt; FL_OBJECT * patbutt, * dirbutt, * cancel, * ready; FL_OBJECT * dirlabel, * patlabel; FL_OBJECT * appbutt[ MAX_APPBUTT ]; FL_OBJECT * appbuttgrp; FL_FSCB fselect_cb; void * callback_data; char applabel[ MAX_APPBUTT ][ 32 ]; void ( * appcb[ MAX_APPBUTT ] )( void * ); void * appdata[ MAX_APPBUTT ]; FL_COLOR fg; FL_COLOR brcol; FL_COLOR brselcol; int rescan; /* if update dir cache */ int disabled_cache; int border, place; char retname[ MAXFL ]; /* complete filename */ char dname[ MAXFL ]; /* current path */ char filename[ FL_FLEN ]; /* bare filename */ char pattern[ FL_FLEN ]; /* patterns */ int last_len; int last_line; } FD_fselect; static FD_fselect * create_form_fselect( void ); static FD_fselect *fd_fselector[ FL_MAX_FSELECTOR ] = { 0 }, *fs; /*************************************** ***************************************/ static void allocate_fselector( int a ) { if ( ! fd_fselector[ a ] ) { fs = fd_fselector[ a ] = fl_calloc( 1, sizeof *fs ); fs->fg = FL_COL1; fs->brcol = FL_COL1; fs->brselcol = FL_TOP_BCOL; fs->border = FL_TRANSIENT; fs->place = FL_PLACE_FREE_CENTER; strcpy( fs->dname, "." ); strcpy( fs->pattern, "*" ); create_form_fselect( ); fl_set_form_title( fs->fselect, "FileSelector" ); fl_set_object_resize( fs->appbuttgrp, FL_RESIZE_NONE ); fl_set_object_gravity( fs->appbuttgrp, EastGravity, EastGravity ); } fs = fd_fselector[ a ]; } /*************************************** ***************************************/ void fli_free_fselectors( void ) { int i; for ( i = 0; i < FL_MAX_FSELECTOR; i++ ) fl_safe_free( fd_fselector[ i ] ); } /*************************************** ***************************************/ int fl_use_fselector( int n ) { if ( n < 0 || n >= FL_MAX_FSELECTOR ) return -1; allocate_fselector( n ); return n; } /*************************************** ***************************************/ void fl_add_fselector_appbutton( const char * label, void ( * cb )( void * ), void * data ) { int ok, i; if ( ! label || ! *label || ! cb ) return; if ( ! fs ) allocate_fselector( 0 ); for ( ok = i = 0; ! ok && i < MAX_APPBUTT; i++ ) if ( ! fs->appcb[ i ] || ! fs->applabel[ i ][ 0 ] ) { ok = i + 1; fs->appcb[ i ] = cb; fs->appdata[ i ] = data; fli_sstrcpy( fs->applabel[ i ], label, 32 ); } if ( ! ok ) M_err( "fl_add_fselector_appbutton", "Only %d allowd. %s ignored", MAX_APPBUTT, label ); } /*************************************** ***************************************/ void fl_remove_fselector_appbutton( const char * label ) { int i; if ( ! label || ! *label ) return; for ( i = 0; i < MAX_APPBUTT; i++ ) if ( strcmp( label, fs->applabel[ i ] ) == 0 ) { fs->appcb[ i ] = NULL; *fs->applabel[ i ] = '\0'; fl_hide_object( fs->appbutt[ i ] ); } } /*************************************** * Just a fake to get the prototypes right ***************************************/ static void appbutton_cb( FL_OBJECT * ob FL_UNUSED_ARG, long arg ) { if ( fs->appcb[ arg ] ) ( fs->appcb[ arg ] )( fs->appdata[ arg ] ); } /*************************************** ***************************************/ void fl_disable_fselector_cache( int yes ) { if ( ! fs ) allocate_fselector( 0 ); fs->disabled_cache = yes; } static int fill_entries( FL_OBJECT *, const char *, int ); static const char * contract_dirname( const char *, int ); /*************************************** ***************************************/ static char * append_slash( char * d ) { int n = strlen( d ); if ( d[ n - 1 ] != '/' ) { d[ n++ ] = '/'; d[ n ] = '\0'; } return d; } /*************************************** * Combine directory and file name to form a complete name ***************************************/ static char * cmplt_name( void ) { const char *f = fl_get_input( fs->input ); if ( f && *f ) { fli_sstrcpy( fs->filename, f, FL_FLEN ); if ( *f != '/' ) append_slash( strcpy( fs->retname, fs->dname ) ); else *fs->retname = '\0'; return strcat( fs->retname, f ); } else { *fs->filename = '\0'; return fs->filename; } } /*************************************** ***************************************/ static char * fli_del_tail_slash( char * d ) { int i = strlen( d ) - 1; if ( d[ i ] == '/' ) d[ i ] = '\0'; return d; } /*************************************** * Callback for selection of a file name. On double click on a directory * we change to that directory, whiel for a double click on a normal file * the return button gets triggered/ ***************************************/ static void select_cb( FL_OBJECT * ob, long isdblclick ) { char seltext[ FL_PATH_MAX ]; int thisline; FD_fselect *lfs = ob->form->fdui; if ( ( thisline = fl_get_browser( ob ) ) <= 0 ) return; fli_sstrcpy( seltext, fl_get_browser_line( ob, thisline ), sizeof seltext ); lfs->last_len = strlen( seltext + 2 ); lfs->last_line = thisline; memmove( seltext, seltext + 2, lfs->last_len + 1 ); if ( seltext[ 0 ] == dirmarker && seltext[ 1 ] == ' ' ) /* directory */ { if ( isdblclick ) { strcat( append_slash( lfs->dname ), seltext ); fl_fix_dirname( lfs->dname ); if ( fill_entries( lfs->browser, 0, 0 ) < 0 ) fli_del_tail_slash( lfs->dname ); *seltext = '\0'; } fl_set_input( lfs->input, seltext ); } else /* normal file */ { fl_set_input( lfs->input, seltext ); strcpy( lfs->filename, seltext ); if ( isdblclick ) { if ( lfs->fselect_cb ) lfs->fselect_cb( cmplt_name( ), lfs->callback_data ); else fl_trigger_object( lfs->ready ); } } } /*************************************** ***************************************/ int fl_set_directory( const char * p ) { char tmpdir[ FL_PATH_MAX + 2 ]; if ( ! fs ) allocate_fselector( 0 ); if ( p == NULL ) { M_err( "fl_set_directory", "invalid NULL argument" ); return 1; } fli_sstrcpy( tmpdir, p, sizeof tmpdir ); fli_de_space_de( tmpdir ); if ( strcmp( tmpdir, fs->dname ) == 0 ) return 0; fl_fix_dirname( tmpdir ); if ( ! fl_is_valid_dir( tmpdir ) ) { M_err( "fl_set_directory", "invalid directory: %s", tmpdir ); return 1; } strcpy( fs->dname, tmpdir ); if ( fill_entries( fs->browser, 0, 1 ) < 0 ) fli_del_tail_slash( fs->dname ); else fl_set_object_label( fs->dirbutt, contract_dirname( fs->dname, 38 ) ); return 0; } /*************************************** ***************************************/ static void directory_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { const char *p; FD_fselect *savefs = fs; fs = ob->form->fdui; if ( ! ( p = fl_show_input( "Enter New Directory:", fs->dname ) ) ) return; fl_set_directory( p ); fs = savefs; } /*************************************** ***************************************/ void fl_set_pattern( const char * s ) { if ( ! fs ) allocate_fselector( 0 ); if ( s && strcmp( fs->pattern, s ) ) { fli_sstrcpy( fs->pattern, s, sizeof fs->pattern ); fl_set_object_label( fs->patbutt, fs->pattern ); fill_entries( fs->browser, fs->filename, 1 ); } } /*************************************** ***************************************/ static void pattern_cb( FL_OBJECT * ob, long q FL_UNUSED_ARG ) { const char *s = fl_show_input( "New Pattern", fs->pattern ); FD_fselect *savefs = fs; fs = ob->form->fdui; if ( s ) fl_set_pattern( s ); fs = savefs; } /*************************************** * Show all files in directory dname that match selection pattern. * Note: fn indicates if we should highlight the current selection. ***************************************/ static int fill_entries( FL_OBJECT * br, const char * fn, int show ) { const FL_Dirlist *dirlist, *dl; char tt[ FL_FLEN ]; int n, i; FD_fselect *lfs = br->form->fdui; if ( br->form->visible ) { fl_set_cursor( br->form->window, XC_watch ); fl_update_display( 0 ); } if ( ! ( dirlist = fl_get_dirlist( lfs->dname, lfs->pattern, &n, lfs->rescan || lfs->disabled_cache ) ) ) { char tmpbuf[ 256 ], *p; fl_snprintf( tmpbuf, sizeof tmpbuf, "Can't read %s", lfs->dname ); tmpbuf[ sizeof tmpbuf - 1 ] = '\0'; fl_show_alert( "ReadDir", tmpbuf, fli_get_syserror_msg( ), 0 ); M_err( "fill_entries", "Can't read %s", lfs->dname ); /* Backup */ if ( ( p = strrchr( lfs->dname, '/' ) ) ) *p = '\0'; if ( br->form->window ) fl_reset_cursor( br->form->window ); return -1; } fl_freeze_form( lfs->fselect ); fl_set_object_label( lfs->dirbutt, contract_dirname( lfs->dname, 38 ) ); fl_clear_browser( br ); /* List directories first */ if ( listdirfirst ) { for ( dl = dirlist; dl->name; dl++ ) { if ( dl->type == FT_DIR ) { fl_snprintf( tt, sizeof tt, "%c %s", dirmarker, dl->name ); fl_add_browser_line( br, tt ); } } } for ( i = 0, dl = dirlist; dl->name; i++, dl++ ) { if ( dl->type == FT_DIR ) { if ( ! listdirfirst ) { fl_snprintf( tt, sizeof tt, "%c %s", dirmarker, dl->name ); fl_add_browser_line( br, tt ); } } else if ( dl->type == FT_FIFO ) { fl_snprintf( tt, sizeof tt, "%c %s", fifomarker, dl->name ); fl_add_browser_line( br, tt ); } else if ( dl->type == FT_SOCK ) { fl_snprintf( tt, sizeof tt, "%c %s", sockmarker, dl->name ); fl_add_browser_line( br, tt ); } else if ( dl->type == FT_BLK ) { fl_snprintf( tt, sizeof tt, "%c %s", bdevmarker, dl->name ); fl_add_browser_line( br, tt ); } else if ( dl->type == FT_CHR ) { fl_snprintf( tt, sizeof tt, "%c %s", cdevmarker, dl->name ); fl_add_browser_line( br, tt ); } else { fl_snprintf( tt, sizeof tt," %s", dl->name ); fl_add_browser_line( br, tt ); if ( fn && strcmp( dl->name, fn ) == 0 ) { int k = fl_get_browser_maxline( br ); fl_select_browser_line( br, k ); if ( show ) { int top = fl_get_browser_topline( br ); int total = fl_get_browser_screenlines( br ); if ( k < top || k > top + total - 1 ) fl_set_browser_topline( br, k - total / 2 ); } } } } fl_unfreeze_form( lfs->fselect ); if ( br->form->window ) fl_reset_cursor( br->form->window ); lfs->last_line = 0; lfs->last_len = 0; return 0; } /*************************************** * Handles changes of the input object the user can enter a file name * in. Tries to find a name in the browser that matches the input and * select it if it exists. ***************************************/ static void input_cb( FL_OBJECT * obj, long arg FL_UNUSED_ARG ) { FD_fselect *lfs = obj->form->fdui; const char *ip = fl_get_input( obj ); int len; int num_lines; int i; int dir; /* 1: forward, 0: backward */ if ( ! *ip ) { lfs->last_line = 0; lfs->last_len = 0; return; } len = strlen( ip ); num_lines = fl_get_browser_maxline( lfs->browser ); /* If the entries aren't sorted in alphabetical order we can't use any tricks to shorten the search, we have to run over all entries and pick the first one that matches */ if ( fli_sort_method != FL_ALPHASORT && fli_sort_method != FL_RALPHASORT ) { lfs->last_line = 0; for ( i = 1; i <= num_lines; i++ ) { const char *line = fl_get_browser_line( lfs->browser, i ); int cmp; if ( line[ 1 ] == '\0' ) continue; if ( ! ( cmp = strncmp( line + 2, ip, len ) ) ) { fl_select_browser_line( lfs->browser, i ); fl_show_browser_line( lfs->browser, i ); return; } } return; } /* Otherwise we start at the entry found last time and search forward from there if the string in the input field got longer (or we haven't a stored match) and search backwards if it got shorter */ dir = len > lfs->last_len || lfs->last_line == 0; lfs->last_len = len; /* First check if the last matched entry still matches */ if ( lfs->last_line > 0 && dir && ! strncmp( fl_get_browser_line( lfs->browser, lfs->last_line ) + 2, ip, len ) ) return; if ( dir ) for ( i = lfs->last_line + 1; i <= num_lines; i++ ) { const char *line = fl_get_browser_line( lfs->browser, i ); int cmp; if ( line[ 1 ] == '\0' ) continue; if ( ! ( cmp = strncmp( line + 2, ip, len ) ) ) { fl_select_browser_line( lfs->browser, i ); fl_show_browser_line( lfs->browser, i ); lfs->last_line = i; return; } if ( ( ( fli_sort_method == FL_ALPHASORT && cmp > 0 ) || ( fli_sort_method == FL_RALPHASORT && cmp < 0 ) ) && ( ( listdirfirst && *line != dirmarker ) || ! listdirfirst ) ) return; } else { int found = 0; for ( i = lfs->last_line - 1; i > 0; i-- ) { const char *line = fl_get_browser_line( lfs->browser, i ); int cmp; if ( line[ 1 ] == '\0' ) continue; if ( ! ( cmp = strncmp( line + 2, ip, len ) ) ) found = i; if ( ( ( fli_sort_method == FL_ALPHASORT && cmp < 0 ) || ( fli_sort_method == FL_RALPHASORT && cmp > 0 ) ) && ( ( listdirfirst && *line == dirmarker ) || ! listdirfirst ) ) break; } if ( found ) { fl_select_browser_line( lfs->browser, found ); fl_show_browser_line( lfs->browser, found ); lfs->last_line = found; } } } /*************************************** ***************************************/ void fl_set_fselector_callback( FL_FSCB fscb, void * data ) { double dy; FL_OBJECT *o; if ( ! fs ) allocate_fselector( 0 ); fs->fselect_cb = fscb; fs->callback_data = data; /* Force creation if not already exists */ fl_get_fselector_form( ); dy = fs->input->y + fs->input->h - fs->browser->y - fs->browser->h; if ( fscb ) { if ( strncmp( fs->ready->label, "Ready", 5 ) == 0 ) { fl_set_object_label( fs->ready, "Dismiss" ); fl_hide_object( fs->prompt ); fl_hide_object( fs->input ); o = fs->fselect->first; o->h -= dy; o->fb1 -= dy; o->ft2 -= dy; o = o->next; o->h -= dy; o->fb1 -= dy; o->ft2 -= dy; for ( o = o->next; o; o = o->next ) { if ( ! o->visible || o->objclass == FL_BEGIN_GROUP || o->objclass == FL_END_GROUP ) continue; o->fb1 -= dy; o->fb2 -= dy; } fs->fselect->h_hr -= dy; fs->fselect->h = FL_crnd( fs->fselect->h_hr ); fl_set_form_minsize( fs->fselect, fs->fselect->w, fs->fselect->h ); } } else { if ( strncmp( fs->ready->label, "Dismiss", 7 ) == 0 ) { fl_set_object_label( fs->ready, "Ready" ); o = fs->fselect->first; o->h += dy; o->fb1 += dy; o->ft2 += dy; o = o->next; o->h += dy; o->fb1 += dy; o->ft2 += dy; for ( o = o->next; o; o = o->next ) { if ( ! o->visible || o->objclass == FL_BEGIN_GROUP || o->objclass == FL_END_GROUP ) continue; o->fb1 += dy; o->fb2 += dy; } fs->fselect->h_hr += dy; fs->fselect->h = FL_crnd( fs->fselect->h_hr ); fl_show_object( fs->prompt ); fl_show_object( fs->input ); fl_set_form_minsize( fs->fselect, fs->fselect->w, fs->fselect->h ); } } } /*************************************** ***************************************/ void fl_set_fselector_placement( int place ) { if ( ! fs ) allocate_fselector( 0 ); fs->place = place; } /*************************************** ***************************************/ void fl_set_fselector_border( int b ) { if ( ! fs ) allocate_fselector( 0 ); fs->border = b; } /*************************************** ***************************************/ void fl_invalidate_fselector_cache( void ) { if ( ! fs ) allocate_fselector( 0 ); fs->rescan = 1; } /*************************************** ***************************************/ FL_FORM * fl_get_fselector_form( void ) { if ( ! fs ) allocate_fselector( 0 ); return fs->fselect; } /*************************************** ***************************************/ FD_FSELECTOR * fl_get_fselector_fdstruct( void ) { if ( ! fs ) allocate_fselector( 0 ); return ( FD_FSELECTOR * ) fs; } /*************************************** ***************************************/ void fl_hide_fselector( void ) { FD_FSELECTOR *fd = fl_get_fselector_fdstruct( ); if ( fd->fselect && fd->fselect->visible ) fl_trigger_object( fd->cancel ); } /*************************************** ***************************************/ static void pre_attach( FL_FORM * form ) { FD_fselect *savefs = fs; fs = form->fdui; if ( ! form->attach_data ) form->attach_data = "FileName"; fl_show_fselector( form->attach_data, 0, 0, 0 ); fs = savefs; } /*************************************** ***************************************/ const char * fl_show_fselector( const char * message, const char * dir, const char * pat, const char * fname ) { FL_OBJECT *obj; int i; fl_get_fselector_form( ); /* Update directory only if requested dir is valid. This way, passing NULL for dir has the effect of keeping us where we were the last time */ if ( fl_is_valid_dir( dir ) ) strcpy( fs->dname, dir ); fl_fix_dirname( fs->dname ); *fs->filename = '\0'; if ( pat && *pat ) fli_sstrcpy( fs->pattern, pat, sizeof fs->pattern ); if ( fname && *fname ) fli_sstrcpy( fs->filename, fname, sizeof fs->filename ); for ( i = 0; i < MAX_APPBUTT; i++ ) { if ( fs->appcb[ i ] && fs->applabel[ i ][ 0 ] ) { fl_set_object_label( fs->appbutt[ i ], fs->applabel[ i ] ); fl_set_object_callback( fs->appbutt[ i ], appbutton_cb, i ); fl_show_object( fs->appbutt[ i ] ); } else fl_hide_object( fs->appbutt[ i ] ); } /* Check cache settings */ fl_fit_object_label( fs->resbutt, 1, 1 ); /* If selection call back exists, cancel has no meaning as whenver a file is selected callback is executed and there is no backing out */ if ( fs->fselect_cb || fs->fselect->attached ) fl_hide_object( fs->cancel ); else { fl_show_object( fs->cancel ); fl_deactivate_all_forms( ); fs->fselect->sort_of_modal = 1; } fl_set_object_label( fs->prompt, message ); fl_set_input( fs->input, fs->filename ); fl_set_object_label( fs->patbutt, fs->pattern ); fl_set_object_label( fs->dirbutt, contract_dirname( fs->dname, 38 ) ); /* Fill the browser */ fill_entries( fs->browser, fs->filename, 1 ); if ( fs->cancel->lsize != FL_DEFAULT_SIZE ) fl_fit_object_label( fs->cancel, 16, 1 ); /* If attached to another form, don't show the form. The parent * will handle it */ if ( fs->fselect->attached ) return ""; if ( ! fs->fselect->visible ) { fl_set_form_minsize( fs->fselect, fs->fselect->w, fs->fselect->w ); fl_show_form( fs->fselect, fs->place, fs->border, fs->fselect->label ); } else fl_redraw_form( fs->fselect ); do { const char *tmp; obj = fl_do_only_forms( ); if ( obj == fs->ready && ( tmp = fl_get_input( fs->input ) ) && *tmp ) { if ( *tmp != '/' && *tmp != '~' ) { strncat( append_slash( fs->dname ), tmp, sizeof fs->dname ); fs->dname[ sizeof fs->dname - 1 ] = '\0'; fl_fix_dirname( fs->dname ); } else { fli_sstrcpy( fs->dname, tmp, sizeof fs->dname ); fl_fix_dirname( fs->dname ); } if ( fl_is_valid_dir( fs->dname ) ) { fill_entries( fs->browser, 0, 1 ); fl_set_input( fs->input, "" ); fl_set_focus_object( fs->input->form, fs->input ); obj = NULL; } else { char *p; while ( ( p = strrchr( fs->dname, '/' ) ) ) { *p = '\0'; if ( fl_is_valid_dir( fs->dname ) ) break; } } } } while ( obj != fs->cancel && obj != fs->ready ); fl_hide_form( fs->fselect ); if ( ! fs->fselect_cb && ! fs->fselect->attached ) { fl_activate_all_forms( ); fs->fselect->sort_of_modal = 0; } /* Do we really want to remove the fselect_cb ? Previous version did, so keep the way it was */ fl_set_fselector_callback( NULL, NULL ); fs->place = FL_PLACE_FREE_CENTER; return ( obj == fs->cancel || fs->fselect_cb ) ? NULL : cmplt_name( ); } /*************************************** ***************************************/ const char * fl_get_directory( void ) { if ( ! fs ) allocate_fselector( 0 ); return fs->dname; } /*************************************** ***************************************/ const char * fl_get_pattern( void ) { if ( ! fs ) allocate_fselector( 0 ); return fs->pattern; } /*************************************** ***************************************/ const char * fl_get_filename( void ) { if ( ! fs ) allocate_fselector( 0 ); return fs->filename; } /*************************************** ***************************************/ static void rescan_cb( FL_OBJECT * ob, long arg FL_UNUSED_ARG ) { FD_fselect *lfs = ob->form->fdui; lfs->rescan = 1; fill_entries( lfs->browser, lfs->filename, 1 ); lfs->rescan = 0; } /*************************************** ***************************************/ void fl_refresh_fselector( void ) { rescan_cb( fs->resbutt, 0 ); } /****************************************************************** * Contract dirname from /usr/people/xxx to ~/ to save some length. * Also replace the middle part of a path with X if the path is longer * than limit. Useful when indicator is of limited length ******************************************************************/ static void pat_replace( char str[ ], const char * pat, const char * rep ) { char *t, *d; if ( ! ( t = strstr( str, pat ) ) ) return; d = fl_strdup( t + strlen( pat ) ); *t = '\0'; strcat( str, rep ); strcat( str, d ); fl_free( d ); } /*************************************** ***************************************/ static const char * contract_dirname( const char * dir, int limit ) { static char buf[ FL_PATH_MAX ]; const char *home = getenv( "HOME" ); char *p, *q; FL_OBJECT *ob = fs->dirbutt; int l, len; if ( fl_get_string_width( ob->lstyle, ob->lsize, dir, strlen( dir ) ) < ob->w - 4 ) return dir; strcpy( buf, dir ); if ( home ) pat_replace( buf, home, "~" ); if ( fl_get_string_width( ob->lstyle, ob->lsize, buf, strlen( buf ) ) < ob->w ) return buf; /* Replace middle components with ... */ if ( ( l = strlen( buf ) ) > limit ) { int k = limit / 3 - 3; p = strchr( buf + k, '/' ); q = buf + l - k; while ( *q != '/' && q != buf ) q--; if ( q > p + 3 ) { /* Replace whatever in between with X */ *++p = '.'; *++p = '.'; *++p = '.'; *++p = '\0'; strcpy( p, q ); } } /* Final checks */ if ( strlen( buf ) > ( size_t ) limit ) { p = buf + limit - 3; *p++ = '.'; *p++ = '.'; *p++ = '.'; *p = '\0'; } len = strlen( buf ); while ( len > 0 && fl_get_string_width( ob->lstyle, ob->lsize, buf, len ) > ob->w - 2 ) { buf[ len - 1 ] = '\0'; len--; } return buf; } /*************************************** ***************************************/ static FD_fselect * create_form_fselect( void ) { FL_OBJECT *obj; int oldy = fli_inverted_y; int oldunit = fl_get_coordunit( ); fli_inverted_y = 0; fl_set_coordunit( FL_COORD_PIXEL ); fs->fselect = fl_bgn_form( FL_NO_BOX, 305, 330 ); fl_add_box( FL_UP_BOX, 0, 0, 305, 330, "" ); fs->dirlabel = obj = fl_add_text( FL_NORMAL_TEXT, 12, 15, 64, 24, "D\010irectory" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_lalign( obj, FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthWest ); fs->dirbutt = obj = fl_add_button( FL_NORMAL_BUTTON, 76, 15, 217, 24, "" ); fl_set_button_shortcut( obj, "#D#d", 1 ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_lalign( obj, FL_ALIGN_LEFT | FL_ALIGN_INSIDE ); fl_set_object_resize( obj, FL_RESIZE_X ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthEast ); fl_set_object_callback( obj, directory_cb, 0 ); fs->patlabel = obj = fl_add_text( FL_NORMAL_TEXT, 12, 41, 64, 24, "P\010attern" ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_lalign( obj, FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthWest ); fs->patbutt = obj = fl_add_button( FL_NORMAL_BUTTON, 76, 41, 217, 24, "" ); fl_set_button_shortcut( obj, "#P#p", 1 ); fl_set_object_boxtype( obj, FL_FRAME_BOX ); fl_set_object_resize( obj, FL_RESIZE_X ); fl_set_object_gravity( obj, FL_NorthWest, FL_NorthEast ); fl_set_object_callback( obj, pattern_cb, 0 ); fs->resbutt = obj = fl_add_button( FL_NORMAL_BUTTON, 210, 80, 83, 28, "Rescan" ); fl_set_button_shortcut( obj, "#R#r", 1 ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_NorthEast, FL_NorthEast ); fl_set_object_callback( obj, rescan_cb, 0 ); fs->cancel = obj = fl_add_button( FL_NORMAL_BUTTON, 210, 203, 83, 28, "Cancel" ); fl_set_button_shortcut( obj, "#C#c^[", 1 ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fs->ready = obj = fl_add_button( FL_RETURN_BUTTON, 210, 233, 83, 28, "Ready" ); fl_set_object_color( obj, FL_COL1, FL_GREEN ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fs->prompt = obj = fl_add_text( FL_NORMAL_TEXT, 20, 270, 264, 18, "File name:" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT | FL_ALIGN_INSIDE ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthWest, FL_SouthWest ); fs->input = obj = fl_add_input( FL_NORMAL_INPUT, 30, 290, 235, 27, "" ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_set_object_resize( obj, FL_RESIZE_X ); fl_set_object_gravity( obj, FL_SouthWest, FL_SouthEast ); fl_set_object_callback( obj, input_cb, 0 ); fl_set_object_return( obj, FL_RETURN_CHANGED ); fs->browser = obj = fl_add_browser( FL_HOLD_BROWSER, 15, 80, 185, 180, "" ); fl_set_object_callback( obj, select_cb, 0 ); fl_set_browser_dblclick_callback( obj, select_cb, 1 ); fl_set_object_resize( obj, FL_RESIZE_ALL ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); obj->click_timeout = FL_CLICK_TIMEOUT; fs->appbuttgrp = fl_bgn_group( ); fs->appbutt[ 0 ] = fl_add_button( FL_NORMAL_BUTTON, 210, 114, 83, 28, "" ); fs->appbutt[ 1 ] = fl_add_button( FL_NORMAL_BUTTON, 210, 142, 83, 28, "" ); fs->appbutt[ 2 ] = fl_add_button( FL_NORMAL_BUTTON, 210, 170, 83, 28, "" ); fl_end_group( ); fl_end_form( ); fs->fselect->fdui = fs; fs->fselect->pre_attach = pre_attach; fl_set_form_atclose( fs->fselect, fl_goodies_atclose, fs->cancel ); fli_inverted_y = oldy; fl_set_coordunit( oldunit ); /* These labels sometimes don't fit the above set sizes, so we resize the whole file selector box to make them fit */ fl_fit_object_label( fs->dirlabel, 0, 0 ); fl_fit_object_label( fs->resbutt, 0, 0 ); return fs; } /*************************************** ***************************************/ void fl_set_fselector_filetype_marker( int dir, int fifo, int sock, int cdev, int bdev ) { dirmarker = dir; fifomarker = fifo; cdevmarker = cdev; bdevmarker = bdev; sockmarker = sock; } /*************************************** ***************************************/ void fl_set_fselector_fontsize( int fsize ) { int i; if ( ! fs ) allocate_fselector( 0 ); fl_freeze_form( fs->fselect ); fl_set_object_lsize( fs->input, fsize ); fl_set_object_lsize( fs->prompt, fsize ); fl_set_object_lsize( fs->patbutt, fsize ); fl_set_object_lsize( fs->dirbutt, fsize ); fl_set_object_lsize( fs->resbutt, fsize ); fl_set_object_lsize( fs->cancel, fsize ); fl_set_object_lsize( fs->dirlabel, fsize ); fl_set_object_lsize( fs->patlabel, fsize ); fl_set_object_lsize( fs->ready, fsize ); fl_set_browser_fontsize( fs->browser, fsize ); for ( i = 0; i < MAX_APPBUTT; i++ ) fl_set_object_lsize( fs->appbutt[ i ], fsize ); fl_fit_object_label( fs->dirlabel, 0, 0 ); fl_fit_object_label( fs->resbutt, 0, 0 ); fl_unfreeze_form( fs->fselect ); } /*************************************** ***************************************/ void fl_set_fselector_fontstyle( int fstyle ) { int i; if ( ! fs ) allocate_fselector( 0 ); fl_freeze_form( fs->fselect ); fl_set_object_lstyle( fs->input, fstyle ); fl_set_object_lstyle( fs->prompt, fstyle ); fl_set_object_lstyle( fs->patbutt, fstyle ); fl_set_object_lstyle( fs->dirbutt, fstyle ); fl_set_object_lstyle( fs->resbutt, fstyle ); fl_set_object_lstyle( fs->cancel, fstyle ); fl_set_object_lstyle( fs->dirlabel, fstyle ); fl_set_object_lstyle( fs->patlabel, fstyle ); fl_set_object_lstyle( fs->ready, fstyle ); fl_set_browser_fontstyle( fs->browser, fstyle ); for ( i = 0; i < MAX_APPBUTT; i++ ) fl_set_object_lstyle( fs->appbutt[ i ], fstyle ); fl_fit_object_label( fs->dirlabel, 0, 0 ); fl_fit_object_label( fs->resbutt, 0, 0 ); fl_unfreeze_form( fs->fselect ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/display.c0000644000175000017500000000412611247055071014612 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file display.c * * We need this so files that reference fl_display don't * have to in pull other files. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include Display *fl_display; /*************************************** * given a mask for RGB, find the shifts and number of bits ***************************************/ void fli_rgbmask_to_shifts( unsigned long mask, unsigned int * shift, unsigned int * bits ) { unsigned int val; if ( mask == 0 ) { *shift = *bits = 0; return; } *shift = 0; while ( ! ( ( 1 << *shift ) & mask ) ) ( *shift )++; val = mask >> *shift; *bits = 0; while ( ( 1 << *bits ) & val ) ( *bits )++; } /*************************************** ***************************************/ void fli_xvisual2flstate( FL_State * s, XVisualInfo * xvinfo ) { s->rgb_bits = xvinfo->bits_per_rgb; s->rmask = xvinfo->red_mask; s->gmask = xvinfo->green_mask; s->bmask = xvinfo->blue_mask; fli_rgbmask_to_shifts( s->rmask, &s->rshift, &s->rbits ); fli_rgbmask_to_shifts( s->gmask, &s->gshift, &s->gbits ); fli_rgbmask_to_shifts( s->bmask, &s->bshift, &s->bbits ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/round3d.c0000644000175000017500000001021211247055071014514 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file round3d.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /*************************************** * Draws a round button ***************************************/ static void draw_round3dbutton( FL_OBJECT * ob ) { int c1; FL_Coord xx, yy, rr, bw = FL_abs( ob->bw ); FL_BUTTON_STRUCT *sp = ob->spec; if ( ob->boxtype == FL_NO_BOX && ( sp->event == FL_ENTER || sp->event == FL_LEAVE ) ) return; c1 = ob->belowmouse ? FL_ROUND3DBUTTON_MCOL : FL_ROUND3DBUTTON_TOPCOL; fl_drw_box(ob->boxtype, ob->x, ob->y, ob->w, ob->h, c1, ob->bw); rr = 0.3 * FL_min( ob->w, ob->h ) + 0.5; // xx = ob->x + 1.5 * ( bw < 2 ? 2 : bw ) + rr + 1.1; xx = ob->x + rr + 4.1; yy = ob->y + 0.5 * ob->h; if ( rr < bw / 2 ) rr = bw / 2 + 1; #if 1 fl_drw_box( FL_OVAL3D_DOWNBOX, xx - rr, yy - rr, 2 * rr, 2 * rr, ob->col1, ob->bw ); #else olw = fl_get_linewidth( ); fl_linewidth( bw ); fl_arc( xx, yy, rr - bw / 2, 450, 2250, FL_BOTTOM_BCOL ); fl_arc( xx, yy, rr - bw / 2, 0, 450, FL_TOP_BCOL ); fl_arc( xx, yy, rr - bw / 2, 2250, 3600, FL_TOP_BCOL ); fl_linewidth( olw ); if ( fli_dithered( fl_vmode ) ) fl_arc( xx, yy, rr - bw / 2, 0, 3600, FL_BLACK ); #endif if ( sp->val ) fl_circf( xx, yy, ( int ) FL_max( 1, 0.85 * rr - 1.0 - 0.5 * bw ), ob->col2 ); if ( ob->align == FL_ALIGN_CENTER ) fl_drw_text( FL_ALIGN_LEFT, xx + rr + 1, ob->y, 0, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); else fl_drw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); if ( ob->type == FL_RETURN_BUTTON ) fl_drw_text( 0, ob->x + ob->w - 0.8 * ob->h, ob->y + 0.2 * ob->h, 0.6 * ob->h, 0.6 * ob->h, ob->lcol, 0, 0, "@returnarrow" ); } /*************************************** * creates an object ***************************************/ FL_OBJECT * fl_create_round3dbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; fl_add_button_class( FL_ROUND3DBUTTON, draw_round3dbutton, 0 ); ob = fl_create_generic_button( FL_ROUND3DBUTTON, type, x, y, w, h, label ); ob->boxtype = FL_ROUND3DBUTTON_BOXTYPE; ob->col1 = FL_ROUND3DBUTTON_COL1; ob->col2 = FL_ROUND3DBUTTON_COL2; ob->align = FL_ROUND3DBUTTON_ALIGN; ob->lcol = FL_ROUND3DBUTTON_LCOL; return ob; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_round3dbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_round3dbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/labelbut.c0000644000175000017500000000632011253416644014741 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file labelbut.c * * This file is part of the XForms library package. * Copyright (c) 1997-2002 T.C. Zhao * All rights reserved. * * All Buttons. Additional button class can be added via * fl_add_button_class and fl_create_generic_button */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /********** DRAWING *************/ /*************************************** * Draws the object ***************************************/ static void draw_labelbutton( FL_OBJECT * ob ) { FL_COLOR scol = ob->lcol; FL_COLOR col = ob->lcol; FL_Coord dh, dw, ww, absbw = FL_abs( ob->bw ); if ( ob->belowmouse ) col = ob->col1; if ( ( ( FL_BUTTON_STRUCT * ) ob->spec )->val ) col = ob->col2; ob->lcol = col; dh = 0.6 * ob->h; dw = FL_min( 0.6 * ob->w, dh ); ww = 0.75 * ob->h; if ( ww < dw + absbw + 1 + ( ob->bw > 0 ) ) ww = dw + absbw + 1 + ( ob->bw > 0 ); if ( ob->type == FL_RETURN_BUTTON ) fl_drw_text( 0, ob->x + ob->w - ww, ob->y + 0.2 * ob->h, dw, dh, ob->lcol, 0, 0, "@returnarrow" ); fl_draw_object_label( ob ); ob->lcol = scol; } /*************************************** * Creates a labelbutton object ***************************************/ FL_OBJECT * fl_create_labelbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label) { FL_OBJECT *obj; fl_add_button_class( FL_LABELBUTTON, draw_labelbutton, NULL ); obj = fl_create_generic_button( FL_LABELBUTTON, type, x, y, w, h, label ); obj->boxtype = FL_FLAT_BOX; obj->col1 = FL_RED; obj->col2 = FL_BLUE; obj->align = FL_LIGHTBUTTON_ALIGN; obj->lcol = FL_LIGHTBUTTON_LCOL; return obj; } /*************************************** * Adds a labelbutton object ***************************************/ FL_OBJECT * fl_add_labelbutton( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label) { FL_OBJECT *obj = fl_create_labelbutton( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/xsupport.c0000644000175000017500000003151311375777672015075 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file xsupport.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Form initialization and Windowing support. * * Further isolation of dependencies of FORMS on underlining window * systems. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" /*************************************** * For debugging only ***************************************/ void fli_check_key_focus( const char * s, Window win ) { int r; Window w; if ( fli_cntl.debug > 1 ) { XGetInputFocus( flx->display, &w, &r ); M_info( "fli_check_key_focus", "%s:%s FWin = %lu ReqW = %lu", s ? s : "", w == win ? "OK" : "Wrong", w, win ); } } /***************************************************************** * Pointer query routines ***********************************************************{*****/ /*************************************** * Return the window ID mouse currently is in and sets the mouse location * relative to root ***************************************/ Window fl_get_mouse( FL_Coord * x, FL_Coord * y, unsigned int * keymask ) { Window rjunk, childwin; int cx, cy, xx, yy; XQueryPointer( flx->display, fl_root, &rjunk, &childwin, &xx, &yy, &cx, &cy, keymask ); *x = xx; *y = yy; return childwin; } /*************************************** * Find the mouse position relative to win and return the child win * the mouse is currently in ***************************************/ Window fl_get_win_mouse( Window win, FL_Coord * x, FL_Coord * y, unsigned int * keymask ) { Window rjunk, childwin; int dummy, ix, iy; XQueryPointer( flx->display, win, &rjunk, &childwin, &dummy, &dummy, &ix, &iy, keymask ); *x = ix; *y = iy; return childwin; } /*************************************** ***************************************/ Window fl_get_form_mouse( FL_FORM * form, FL_Coord * x, FL_Coord * y, unsigned int * keymask ) { Window win = None; if ( fli_get_visible_forms_index( form ) >= 0 ) { FL_pixmap *flp = form->flpixmap; win = ( flp && flp->win != None ) ? flp->win : form->window; fl_get_win_mouse( win, x, y, keymask ); } return win; } /*************************************** * warp mouse to (mx, my) relative to root window ***************************************/ void fl_set_mouse( FL_Coord mx, FL_Coord my ) { XWarpPointer( flx->display, None, fl_root, 0, 0, 0, 0, mx, my ); } /*** End of pointer query routines ******************/ Pixmap fli_gray_pattern[ 3 ] = { None, None, None }; GC fli_bwgc[ 3 ]; GC fli_whitegc; GC fl_drawgc[ 18 ]; static unsigned char gray40_bits[] = { 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb }; static unsigned char gray50_bits[] = { 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55 }; static unsigned char gray60_bits[] = { 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44 }; /*************************************** ***************************************/ void fli_init_stipples( void ) { if ( ! fli_gray_pattern[ 0 ] ) { fli_gray_pattern[ 0 ] = XCreateBitmapFromData( flx->display, fl_root, ( char * ) gray40_bits, 8, 8 ); fli_gray_pattern[ 1 ] = XCreateBitmapFromData( flx->display, fl_root, ( char * ) gray50_bits, 8, 8 ); fli_gray_pattern[ 2 ] = XCreateBitmapFromData( flx->display, fl_root, ( char * ) gray60_bits, 8, 8 ); } } /*************************************** * Must NOT allow object pixmap and form pixmap active at the * same time ***************************************/ static void change_object_drawable( FL_pixmap * p, FL_OBJECT * obj ) { p->x = obj->x; p->y = obj->y; p->win = FL_ObjWin( obj ); obj->form->window = p->pixmap; obj->x = 0; obj->y = 0; fl_winset( p->pixmap ); } /*************************************** ***************************************/ static void change_form_drawable( FL_pixmap * p, FL_FORM * form ) { p->x = form->x; p->y = form->y; p->win = form->window; form->window = p->pixmap; form->x = 0; form->y = 0; fl_winset( p->pixmap ); } /*************************************** ***************************************/ static int fl_xerror_handler( Display * d FL_UNUSED_ARG, XErrorEvent * xev ) { if ( xev->error_code == BadAlloc ) M_err( "fl_xerror_handler", "XError: can't allocate - ignored " ); else M_err( "fl_xerror_handler", "XError: %d", xev->error_code ); return 0; } /* non-square box can't be double buffered */ #define NON_SQB( a ) ( ( a )->boxtype == FL_NO_BOX ) /* Pixmap support */ /*************************************** ***************************************/ void fli_create_object_pixmap( FL_OBJECT * obj ) { Window root; unsigned int junk; FL_pixmap *p = obj->flpixmap; int i; int ( * oldhandler )( Display *, XErrorEvent * ); /* Check to see if we need to create a pixmap. None-square boxes can't be used as it is not easy to figure out the object color beneath the object we are trying to paint. It also makes no sense to draw to on a special pixmap for the object if we're already been directed to draw to a pixmap for the form itself. */ if ( ! obj->use_pixmap || obj->w <= 0 || obj->h <= 0 || NON_SQB( obj ) || ( obj->form->flpixmap && obj->form->flpixmap->win ) ) return; /* If we already got a pixmap that fits the objects properties just switch to it */ if ( p && p->pixmap && p->w == obj->w && p->h == obj->h && p->depth == fli_depth( fl_vmode ) && p->visual == fli_visual( fl_vmode ) && p->dbl_background == obj->dbl_background && p->pixel == fl_get_pixel( obj->dbl_background ) ) { change_object_drawable( p, obj ); fl_rectf( 0, 0, obj->w, obj->h, obj->dbl_background ); return; } if ( ! p ) p = obj->flpixmap = fl_calloc( 1, sizeof *p ); else if ( p->pixmap ) XFreePixmap( flx->display, p->pixmap ); oldhandler = XSetErrorHandler( fl_xerror_handler ); p->pixmap = XCreatePixmap( flx->display, FL_ObjWin( obj ), obj->w, obj->h, fli_depth( fl_vmode ) ); /* Make sure it succeeds by forcing a two way request */ if ( fli_cntl.safe && ! XGetGeometry( flx->display, p->pixmap, &root, &i, &i, &junk, &junk, &junk, &junk ) ) { M_err( "fli_create_object_pixmap", "Can't create" ); p->pixmap = None; XSetErrorHandler( oldhandler ); return; } XSetErrorHandler( oldhandler ); p->w = obj->w; p->h = obj->h; p->depth = fli_depth( fl_vmode ); p->visual = fli_visual( fl_vmode ); p->dbl_background = obj->dbl_background; p->pixel = fl_get_pixel( obj->dbl_background ); change_object_drawable( p, obj ); fl_rectf( 0, 0, obj->w, obj->h, obj->dbl_background ); } /*************************************** ***************************************/ void fli_show_object_pixmap( FL_OBJECT * obj ) { FL_pixmap *p = obj->flpixmap; if ( ! p || ! p->pixmap || ! p->win || NON_SQB( obj ) ) return; XCopyArea( flx->display, p->pixmap, p->win, flx->gc, 0, 0, p->w, p->h, p->x, p->y ); obj->x = p->x; obj->y = p->y; obj->form->window = p->win; p->win = None; fl_winset( obj->form->window ); } /*************************************** ***************************************/ void fli_free_flpixmap( FL_pixmap * p ) { if ( p && p->pixmap ) { XFreePixmap( flx->display, p->pixmap ); p->pixmap = None; } } /*************************************** ***************************************/ static int form_pixmapable( FL_FORM * form ) { /* Check to see if we can use a pixmap. None-square boxes can't be used as it is not easy to figure out the object color beneath the form we're trying to paint. Take care, sometimes a form can have a fake NO_BOX as the first object */ return form->use_pixmap && ( form->first && ( ! NON_SQB( form->first ) || ( form->first->next && ! NON_SQB( form->first->next ) ) ) ); } /*************************************** ***************************************/ void fli_create_form_pixmap( FL_FORM * form ) { Window root; int ijunk; unsigned int uijunk; FL_pixmap *p = form->flpixmap; int ( * oldhandler )( Display *, XErrorEvent * ); if ( form->w <= 0 || form->h <= 0 || ! form_pixmapable( form ) ) return; if ( p && p->pixmap && p->w == form->w && p->h == form->h && p->depth == fli_depth( fl_vmode ) && p->visual == fli_visual( fl_vmode ) ) { change_form_drawable( p, form ); return; } if ( ! p ) p = form->flpixmap = fl_calloc( 1, sizeof *p ); else if ( p->pixmap ) XFreePixmap( flx->display, p->pixmap ); oldhandler = XSetErrorHandler( fl_xerror_handler ); p->pixmap = XCreatePixmap( flx->display, form->window, form->w, form->h, fli_depth( fl_vmode ) ); /* Make sure it succeeds by forcing a two way request */ if ( ! XGetGeometry( flx->display, p->pixmap, &root, &ijunk, &ijunk, &uijunk, &uijunk, &uijunk, &uijunk ) ) { M_warn( "fli_create_form_pixmap", "Can't create pixmap" ); p->pixmap = None; XSetErrorHandler( oldhandler ); return; } XSetErrorHandler( oldhandler ); p->w = form->w; p->h = form->h; p->depth = fli_depth( fl_vmode ); p->visual = fli_visual( fl_vmode ); change_form_drawable( p, form ); } /*************************************** ***************************************/ void fli_show_form_pixmap( FL_FORM * form ) { FL_pixmap *p = form->flpixmap; if ( ! form_pixmapable( form ) || ! p || ! p->pixmap || ! p->win || p->w <= 0 || p->h <= 0 ) return; XCopyArea( flx->display, p->pixmap, p->win, flx->gc, 0, 0, p->w, p->h, 0, 0 ); form->x = p->x; form->y = p->y; form->window = p->win; p->win = None; fl_winset( form->window ); } /******** VisualClass name **************/ #define VN( a ) { a, #a } static FLI_VN_PAIR xvclass[ ] = { VN( PseudoColor ), VN( TrueColor ), VN( DirectColor ), VN( StaticColor ), VN( GrayScale ), VN( GreyScale ), VN( StaticGray ), VN( StaticGrey ), { FL_DefaultVisual, "DefaultVisual" }, { FL_DefaultVisual, "default" }, { FL_DefaultVisual, "Default" }, { FL_IllegalVisual, "XInvalidClass" }, { -1, NULL } }; /*************************************** ***************************************/ const char * fl_vclass_name( int n ) { const char *cn = fli_get_vn_name( xvclass, n ); return cn ? cn : fli_get_vn_name( xvclass, FL_IllegalVisual ); } /*************************************** * fli_get_vn_val can't be used. caller relies on the returning * of FL_IllegalVisual ***************************************/ int fl_vclass_val( const char * v ) { FLI_VN_PAIR *vn; if ( ! v ) return FL_IllegalVisual; for ( vn = xvclass; vn->name; vn++ ) if ( ! strcmp( vn->name, v ) ) return vn->val; return FL_IllegalVisual; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/cursor.c0000644000175000017500000002137411247055071014466 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file cursor.c *. * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Cursor routines * * name is one of the standard symbolic cursor names (XC_watch etc) or * the constants defined by XFORMS (FL_INVISIBLE_CURSOR etc) * * Cursor is the cursor usable in XDefineCursor(win, cursor) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "extern.h" #define MAX_CURSORS 64 /* max. number of bitmap cursors */ #define MAX_SEQ 24 /* max. number cursors per animation */ /* Cursor cache */ typedef struct { int name; int ncursor; int cur_cursor; Window win; int timeout_id; int timeout; Cursor cur[ MAX_SEQ ]; } CurStruct; /* Pre-built cursors */ static CurStruct prebuilt[ ] = { { XC_watch, 0, 0, 0, 0, 0, { 0 } }, { XC_sb_right_arrow, 0, 0, 0, 0, 0, { 0 } }, { XC_hand2, 0, 0, 0, 0, 0, { 0 } }, { XC_top_left_arrow, 0, 0, 0, 0, 0, { 0 } }, { XC_tcross, 0, 0, 0, 0, 0, { 0 } }, { XC_pirate, 0, 0, 0, 0, 0, { 0 } } }; static CurStruct *cursors = NULL; static int fl_default_curname = XC_top_left_arrow; /* xforms' default */ #ifndef XC_num_glyphs #define XC_num_glyphs 255 #endif static int user_cur_name = XC_num_glyphs; static CurStruct *find_timeout( Window win ); /*************************************** ***************************************/ static CurStruct * add_cursor( int name, Cursor cur ) { CurStruct *c = cursors; static int warned; while ( c->name && c->name != name ) c++; if ( c < cursors + MAX_CURSORS ) { c->name = name; c->cur[ c->ncursor++ ] = cur; } else if ( ! warned ) { M_err( "add_cursor", "too many cursors" ); warned = 1; } return c; } /*************************************** ***************************************/ static Cursor create_bitmap_cursor( const char * source, const char * mask, int w, int h, int hotx, int hoty ) { Pixmap s, m = None; XColor fg, bg; Cursor cur; Window win = fl_root; s = XCreateBitmapFromData( flx->display, win, source, w, h ); if ( mask ) m = XCreateBitmapFromData( flx->display, win, mask, w, h ); fg.red = fg.green = fg.blue = 0; bg.red = bg.green = bg.blue = 0xffff; cur = XCreatePixmapCursor( flx->display, s, m, &fg, &bg, hotx, hoty ); return cur; } /*************************************** ***************************************/ static void init_cursors( void ) { static int ok; CurStruct *c; static char c_bits[ ] = { 0x00 }; if ( ok ) return; ok = 1; if ( ! cursors ) { cursors = fl_calloc( MAX_CURSORS, sizeof *c ); memcpy( cursors, prebuilt, sizeof prebuilt ); } for ( c = cursors; c->name; c++ ) c->cur[ c->ncursor++ ] = XCreateFontCursor( flx->display, c->name ); /* Create an invisible cursor */ add_cursor( FL_INVISIBLE_CURSOR, create_bitmap_cursor( c_bits, c_bits, 1, 1, 0, 0 ) ); /* Add the default cursor */ add_cursor( FL_DEFAULT_CURSOR, XCreateFontCursor( flx->display, fl_default_curname ) ); } /*************************************** ***************************************/ void fli_free_cursors( void ) { fl_safe_free( cursors ); } /*************************************** ***************************************/ static void animate_cursor( int id FL_UNUSED_ARG, void * data ) { CurStruct *cur = data; cur->timeout_id = 0; fl_set_cursor( cur->win, cur->name ); } /*************************************** * Set cursor for win to name. Name is either the standard XC_ or * Form defined ***************************************/ void fl_set_cursor( Window win, int name ) { CurStruct *c = cursors; init_cursors( ); if ( win == 0 ) { M_err( "fl_set_cursor", "Bad Window" ); return; } for ( ; c->name; c++ ) { if ( c->name == name ) { if ( c->ncursor > 1 ) { int n = c->cur_cursor % c->ncursor; XDefineCursor( flx->display, win, c->cur[ n ] );; c->cur_cursor++; c->win = win; if ( c->timeout_id == 0 ) c->timeout_id = fl_add_timeout( c->timeout, animate_cursor, c ); } else { CurStruct *cur = find_timeout( win ); if ( cur && cur->timeout_id ) { fl_remove_timeout( cur->timeout_id ); cur->timeout_id = 0; } XDefineCursor( flx->display, win, c->cur[ 0 ] );; } return; } } XDefineCursor( flx->display, win, fl_get_cursor_byname( name ) ); } /*************************************** * To be used in XDefineCursor ***************************************/ Cursor fl_get_cursor_byname( int name ) { CurStruct *c; Cursor cur = 0; init_cursors( ); for ( c = cursors; c->name; c++ ) { if ( c->name == name ) { int n = c->cur_cursor % c->ncursor; c->cur_cursor++; return c->cur[ n ]; } } /* Take a wild shot: since we can generate the default X cursor on the fly we don't have to always save them to the cursor structure */ if ( name < XC_num_glyphs - 1 ) { static int nn; cur = XCreateFontCursor( flx->display, name ); if ( nn < 10 ) { add_cursor( name, cur ); nn++; } } else { M_err( "fl_get_cursor_byname", "Unknown cursor: %d\n", name ); cur = fl_get_cursor_byname( FL_DEFAULT_CURSOR ); /* recursion */ } return cur; } /*************************************** ***************************************/ void fl_set_cursor_color( int name, FL_COLOR fg, FL_COLOR bg ) { XColor xfg, xbg; int r, g, b; Cursor cur = fl_get_cursor_byname( name ); fl_getmcolor( fg, &r, &g, &b ); xfg.red = ( r << 8 ) | 0xff; xfg.green = ( g << 8 ) | 0xff; xfg.blue = ( b << 8 ) | 0xff; fl_getmcolor( bg, &r, &g, &b ); xbg.red = ( r << 8 ) | 0xff; xbg.green = ( g << 8 ) | 0xff; xbg.blue = ( b << 8 ) | 0xff; XRecolorCursor( flx->display, cur, &xfg, &xbg ); } /*************************************** ***************************************/ int fl_create_bitmap_cursor( const char * source, const char * mask, int w, int h, int hotx, int hoty ) { Cursor cur; init_cursors( ); cur = create_bitmap_cursor( source, mask, w, h, hotx, hoty ); add_cursor( user_cur_name, cur ); return user_cur_name++; } /*************************************** * cursor animation ***************************************/ int fl_create_animated_cursor( int * cur_names, int timeout ) { int *n = cur_names, k = MAX_SEQ; CurStruct *c = 0; for ( ; *n >= 0 && --k >= 0; n++ ) c = add_cursor( user_cur_name, fl_get_cursor_byname( *n ) ); if ( c ) c->timeout = timeout > 0 ? timeout : 20; return user_cur_name++; } /*************************************** ***************************************/ static CurStruct * find_timeout( Window win ) { CurStruct *c = cursors; for ( ; c->name; c++ ) if ( c->win == win && c->timeout_id ) return c; return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/nmenu.c0000644000175000017500000005077411317764307014310 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pnmenu.h" static int handle_nmenu( FL_OBJECT *, int, FL_Coord, FL_Coord, int , void * ); static void draw_menu( FL_OBJECT * ); #define IS_TOUCH_NMENU( o ) \ ( ( o )->type == FL_NORMAL_TOUCH_NMENU \ || ( o )->type == FL_BUTTON_TOUCH_NMENU ) #define IS_BUTTON_NMENU( o ) \ ( ( o )->type == FL_BUTTON_NMENU \ || ( o )->type == FL_BUTTON_TOUCH_NMENU ) /*************************************** * Create a nmenu object ***************************************/ FL_OBJECT * fl_create_nmenu( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_NMENU_SPEC *sp; obj = fl_make_object( FL_NMENU, type, x, y, w, h, label, handle_nmenu ); obj->boxtype = FL_FLAT_BOX; obj->col1 = FL_COL1; obj->col2 = IS_BUTTON_NMENU( obj ) ? FL_MCOL : FL_BOTTOM_BCOL; obj->lcol = FL_LCOL; obj->lstyle = FL_NORMAL_STYLE; obj->align = FL_ALIGN_CENTER | FL_ALIGN_INSIDE; sp = obj->spec = fl_malloc( sizeof *sp ); sp->popup = NULL; sp->sel = NULL; sp->hl_color = IS_BUTTON_NMENU( obj ) ? FL_LCOL : FL_WHITE; fl_set_object_return( obj, FL_RETURN_END_CHANGED ); return obj; } /*************************************** * Add a nmenu object ***************************************/ FL_OBJECT * fl_add_nmenu( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; obj = fl_create_nmenu( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); /* Popup can only be created after the object has been added to its form, otherwise we don't know which window is its parent window... */ ( ( FLI_NMENU_SPEC * ) obj->spec )->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_add_nmenu" ); return obj; } /*************************************** * Remove all items from nmenu objects popup ***************************************/ int fl_clear_nmenu( FL_OBJECT * obj ) { FLI_NMENU_SPEC *sp; if ( obj == NULL ) { M_err( "fl_clear_nmenu_popup", "NULL object" ); return -1; } sp = obj->spec; /* Remove all existing entries and reset the popups internal counter */ if ( sp->popup != NULL ) { while ( sp->popup->entries != NULL ) fl_popup_entry_delete( sp->popup->entries ); fli_popup_reset_counter( sp->popup ); } else sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_clear_nmenu" ); sp->sel = NULL; fl_redraw_object( obj ); return 0; } /*************************************** * Add (append) item(s) to the nmenu object ***************************************/ FL_POPUP_ENTRY * fl_add_nmenu_items( FL_OBJECT * obj, const char * items, ... ) { FLI_NMENU_SPEC *sp; FL_POPUP_ENTRY *new_entries; va_list ap; if ( obj == NULL ) { M_err( "fl_add_nmenu_items", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_add_nmenu_items" ); /* Create and append the new entries to the popup */ va_start( ap, items ); new_entries = fli_popup_add_entries( sp->popup, items, ap, "fl_add_nmenu_items", 0 ); va_end( ap ); return new_entries; } /*************************************** * Insert item(s) into the nmenu object after an already existing item ***************************************/ FL_POPUP_ENTRY * fl_insert_nmenu_items( FL_OBJECT * obj, FL_POPUP_ENTRY * after, const char * items, ... ) { FLI_NMENU_SPEC *sp; FL_POPUP_ENTRY *new_entries; va_list ap; if ( obj == NULL ) { M_err( "fl_add_nmenu_items", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_insert_nmenu_items" ); if ( after != NULL && fli_check_popup_entry_exists( after ) != 0 ) { M_err( "fl_add_nmenu_items", "Item to insert after doesn't exist" ); return NULL; } va_start( ap, items ); new_entries = fli_popup_insert_entries( sp->popup, after, items, ap, "fl_insert_nmenu_items", 0 ); va_end( ap ); return new_entries; } /*************************************** * Replace an item by new item(s) ***************************************/ FL_POPUP_ENTRY * fl_replace_nmenu_item( FL_OBJECT * obj, FL_POPUP_ENTRY * old_item, const char * items, ... ) { FLI_NMENU_SPEC *sp; FL_POPUP_ENTRY *new_entries; va_list ap; if ( obj == NULL ) { M_err( "fl_replace_nmenu_items", "NULL object" ); return NULL; } if ( ! items || ! *items ) { M_err( "fl_replace_nmenu_item", "Items string NULL or empty" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_replace_nmenu_items" ); /* Test if the item we're supposed to replace exists */ if ( fli_check_popup_entry_exists( old_item ) ) { M_err( "fl_replace_nmenu_item", "Item to replace doesn't exist" ); return NULL; } /* Add the new item(s) after the one to replaced */ va_start( ap, items ); new_entries = fli_popup_insert_entries( sp->popup, old_item, items, ap, "fl_replace_nmenu_item", 0 ); va_end( ap ); /* If the insert worked out ok delete the old item (and check if we have to set a new displayed item) */ if ( new_entries != NULL ) { if ( sp->sel != NULL && sp->sel->entry == old_item ) sp->sel = NULL; fl_popup_entry_delete( old_item ); } return new_entries; } /*************************************** * Delete an item of a nmenu object ***************************************/ int fl_delete_nmenu_item( FL_OBJECT * obj, FL_POPUP_ENTRY * item ) { FLI_NMENU_SPEC *sp; if ( obj == NULL ) { M_err( "fl_delete_nmenu_item", "NULL object" ); return -1; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_delete_nmenu_items" ); if ( fli_check_popup_entry_exists( item ) != 0 ) { M_err( "fl_delete_nmenu_item", "Item doesnt exist" ); return -1; } /* Delete the entry */ fl_popup_entry_delete( item ); if ( item == sp->sel->entry ) sp->sel = NULL; return 0; } /*************************************** * (Re)polulate a nmenu objects popup via an array of FL_POPUP_ITEM structures ***************************************/ FL_POPUP_ENTRY * fl_set_nmenu_items( FL_OBJECT * obj, FL_POPUP_ITEM * items ) { FLI_NMENU_SPEC *sp; if ( obj == NULL ) { M_err( "fl_set_nmenu_items", "NULL object" ); return NULL; } sp = obj->spec; /* If no popup exists yet create it, otherwise remove all entries */ if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_set_nmenu_items" ); else { while ( sp->popup->entries != NULL ) fl_popup_entry_delete( sp->popup->entries ); fli_popup_reset_counter( sp->popup ); } sp->sel = NULL; return fli_popup_insert_items( sp->popup, NULL, items, "fl_set_nmenu_items" ); } /*************************************** * Add (append) item(s) to the nmenu object from a list of FL_POPUP_ITEM * structures ***************************************/ FL_POPUP_ENTRY * fl_add_nmenu_items2( FL_OBJECT * obj, FL_POPUP_ITEM * items ) { FLI_NMENU_SPEC *sp; FL_POPUP_ENTRY *after; FL_POPUP_ENTRY *new_entries; if ( obj == NULL ) { M_err( "fl_add_nmenu_items2", "NULL object" ); return NULL; } if ( ! items || ! items->text ) { M_err( "fl_add_nmenu_items2", "Items list NULL or empty" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_add_nmenu_items2" ); /* Determine the last existing entry in the nmenu's popup */ after = sp->popup->entries; while ( after != NULL && after->next != NULL ) after = after->next; /* Create and append the new entries to the popup */ new_entries = fli_popup_insert_items( sp->popup, after, items, "fl_add_nmenu_items2" ); return new_entries; } /*************************************** * Insert item(s) into the nmenu object from a list of FL_POPUP_ITEM * structures after an already existing item ***************************************/ FL_POPUP_ENTRY * fl_insert_nmenu_items2( FL_OBJECT * obj, FL_POPUP_ENTRY * after, FL_POPUP_ITEM * items ) { FLI_NMENU_SPEC *sp; FL_POPUP_ENTRY *new_entries; if ( obj == NULL ) { M_err( "fl_add_nmenu_items2", "NULL object" ); return NULL; } if ( ! items || ! items->text ) { M_err( "fl_insert_nmenu_items2", "Items list NULL or empty" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_insert_nmenu_items2" ); if ( after != NULL && fli_check_popup_entry_exists( after ) != 0 ) { M_err( "fl_add_nmenu_items2", "Item to insert after doesn't exist" ); return NULL; } new_entries = fli_popup_insert_items( sp->popup, after, items, "fl_insert_nmenu_items2" ); return new_entries; } /*************************************** * Replace an item by new item(s) from a list of FL_POPUP_ITEM structures ***************************************/ FL_POPUP_ENTRY * fl_replace_nmenu_items2( FL_OBJECT * obj, FL_POPUP_ENTRY * old_item, FL_POPUP_ITEM * items ) { FLI_NMENU_SPEC *sp; FL_POPUP_ENTRY *new_entries; if ( obj == NULL ) { M_err( "fl_replace_nmenu_items2", "NULL object" ); return NULL; } if ( ! items || ! items->text ) { M_err( "fl_replace_nmenu_items2", "Items list NULL or empty" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_replace_nmenu_items2" ); /* Test if the item we're supposed to replace exists */ if ( fli_check_popup_entry_exists( old_item ) ) { M_err( "fl_replace_nmenu_item2", "Item to replace doesn't exist" ); return NULL; } /* Add the new item(s) after the one to replaced */ new_entries = fli_popup_insert_items( sp->popup, old_item, items, "fl_replace_nmenu_item2" ); /* If the insert worked out ok delete the old item (and check if we have to set a new displayed item) */ if ( new_entries != NULL ) { if ( sp->sel != NULL && sp->sel->entry == old_item ) sp->sel = NULL; fl_popup_entry_delete( old_item ); } return new_entries; } /*************************************** * Returns the popup of a nmenu object ***************************************/ FL_POPUP * fl_get_nmenu_popup( FL_OBJECT * obj ) { FLI_NMENU_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_nmenu_popup", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_get_nmenu_popup" ); return sp->popup; } /*************************************** * Set a (new) popup for a nmenu object ***************************************/ int fl_set_nmenu_popup( FL_OBJECT * obj, FL_POPUP * popup ) { FLI_NMENU_SPEC *sp; FL_POPUP *old_popup; /* We need a valid object */ if ( obj == NULL ) { M_err( "fl_set_nmenu_popup", "NULL object" ); return -1; } sp = obj->spec; /* The popup must exist */ if ( fli_check_popup_exists( popup ) ) { M_err( "fl_set_nmenu_popup", "Popup doesn't exist" ); return -1; } /* The popup can't be a sub-popup */ if ( popup->parent != NULL ) { M_err( "fl_set_nmenu_popup", "Popup is a sub-popup" ); return -1; } /* Delete a popup already associated with the nmenu object */ old_popup = ( ( FLI_NMENU_SPEC * ) obj->spec )->popup; if ( old_popup != NULL ) fl_popup_delete( old_popup ); /* Set the new popup as the nmenu objects popup and redraw */ sp->popup = popup; sp->sel = NULL; fl_redraw_object( obj ); return 1; } /*************************************** * Sets how the popup of the object behaves ***************************************/ int fl_set_nmenu_policy( FL_OBJECT * obj, int policy ) { FLI_NMENU_SPEC *sp; int old_policy; if ( obj == NULL ) { M_err( "fl_set_nmenu_policy", "NULL object" ); return INT_MIN; } if ( policy < FL_POPUP_NORMAL_SELECT || policy > FL_POPUP_DRAG_SELECT ) { M_err( "fl_set_nmenu_policy", "Invalid policy argument" ); return -1; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_set_select_policy" ); old_policy = fl_popup_get_policy( sp->popup ); fl_popup_set_policy( sp->popup, policy ); return old_policy; } /*************************************** * Return last selected item ***************************************/ FL_POPUP_RETURN * fl_get_nmenu_item( FL_OBJECT * obj ) { if ( obj == NULL ) { M_err( "fl_get_nmenu_item", "NULL object" ); return NULL; } return ( ( FLI_NMENU_SPEC * ) obj->spec )->sel; } /*************************************** ***************************************/ FL_POPUP_ENTRY * fl_get_nmenu_item_by_value( FL_OBJECT * obj, long int val ) { FLI_NMENU_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_nmenu_item_by_value", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_get_nmenu_item_by_value" ); return fl_popup_entry_get_by_value( sp->popup, val ); } /*************************************** ***************************************/ FL_POPUP_ENTRY * fl_get_nmenu_item_by_label( FL_OBJECT * obj, const char * label ) { FLI_NMENU_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_nmenu_item_by_label", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_get_nmenu_item_by_label" ); return fl_popup_entry_get_by_label( sp->popup, label ); } /*************************************** ***************************************/ FL_POPUP_ENTRY * fl_get_nmenu_item_by_text( FL_OBJECT * obj, const char * text ) { FLI_NMENU_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_nmenu_item_by_text", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_get_nmenu_item_by_text" ); return fl_popup_entry_get_by_text( sp->popup, text ); } /*************************************** ***************************************/ FL_COLOR fl_set_nmenu_hl_text_color(FL_OBJECT * obj, FL_COLOR color ) { FLI_NMENU_SPEC *sp; FL_COLOR old_color; if ( obj == NULL ) { M_err( "fl_set_nmenu_hl_text_color", "NULL object" ); return FL_MAX_COLORS; } if ( color >= FL_MAX_COLORS ) { M_err( "fl_set_nmenu_hl_text_color", "Invalid color argument" ); return FL_MAX_COLORS; } sp = obj->spec; old_color = sp->hl_color; sp->hl_color = color; fl_redraw_object( obj ); return old_color; } /*************************************** * Central routine for interaction with nmenu object ***************************************/ static int handle_nmenu( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_NMENU_SPEC *sp = obj->spec; unsigned int w, h; int ret = FL_RETURN_NONE; switch ( event ) { case FL_DRAW : draw_menu( obj ); break; case FL_ENTER : if ( ! IS_TOUCH_NMENU( obj ) ) break; /* fall through */ case FL_SHORTCUT : case FL_PUSH : if ( ! sp->popup || ! sp->popup->entries ) break; obj->pushed = 1; fl_redraw_object( obj ); fl_popup_get_size( sp->popup, &w, &h ); if ( obj->form->y + obj->y + obj->h + h < ( unsigned int ) fl_scrh ) fl_popup_set_position( sp->popup, obj->form->x + obj->x, obj->form->y + obj->y + obj->h ); else fl_popup_set_position( sp->popup, obj->form->x + obj->x, obj->form->y + obj->y - h ); sp->sel = fl_popup_do( sp->popup ); obj->pushed = 0; fl_redraw_object( obj ); if ( sp->sel != NULL ) ret |= FL_RETURN_CHANGED | FL_RETURN_END; break; case FL_FREEMEM : if ( sp && sp->popup ) fl_popup_delete( sp->popup ); fl_safe_free( obj->spec ); break; } return ret; } /*************************************** ***************************************/ static void draw_menu( FL_OBJECT * obj ) { if ( ! obj->pushed ) { fl_drw_box( obj->boxtype, obj->x, obj->y, obj->w, obj->h, obj->col1, obj->bw ); obj->align |= FL_ALIGN_INSIDE; fl_drw_text( obj->align, obj->x, obj->y, obj->w, obj->h, obj->lcol, obj->lstyle, obj->lsize, obj->label ); } else { FLI_NMENU_SPEC *sp = obj->spec; fl_drw_box( ( IS_BUTTON_NMENU( obj ) && obj->boxtype == FL_FLAT_BOX ) ? FL_UP_BOX : obj->boxtype, obj->x, obj->y, obj->w, obj->h, obj->col2, obj->bw ); obj->align |= FL_ALIGN_INSIDE; fl_drw_text( obj->align, obj->x, obj->y, obj->w, obj->h, sp->hl_color, obj->lstyle, obj->lsize, obj->label ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/oneliner.c0000644000175000017500000000635011247055071014761 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file oneliner.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Show message in a top-level unmanaged window. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" static int fntstyle = FL_NORMAL_STYLE, fntsize = FL_DEFAULT_SIZE; static FL_COLOR background = FL_YELLOW, textcolor = FL_BLACK; static FL_FORM *oneliner; static FL_OBJECT *text; /*************************************** ***************************************/ static void create_it( void ) { if ( oneliner ) return; oneliner = fl_bgn_form( FL_NO_BOX, 5, 5 ); text = fl_add_box( FL_BORDER_BOX, 0, 0, 5, 5, "" ); fl_set_object_lstyle( text, fntstyle ); fl_set_object_lsize( text, fntsize ); fl_set_object_lcol( text, textcolor ); fl_set_object_color( text, background, background ); fl_end_form( ); } /*************************************** ***************************************/ void fl_show_oneliner( const char * s, FL_Coord x, FL_Coord y ) { int w, h; if ( ! s ) return; create_it( ); fl_get_string_dimension( fntstyle, fntsize, s, strlen( s ), &w, &h ); w += ( 2 * fntsize ) / 3; h += ( 2 * fntsize ) / 3; fl_freeze_form( oneliner ); fl_set_form_geometry( oneliner, x, y, w, h ); fl_set_object_label( text, s ); fl_unfreeze_form( oneliner ); if ( oneliner->visible == FL_INVISIBLE ) fl_show_form( oneliner, FL_PLACE_GEOMETRY | FL_FREE_SIZE, FL_NOBORDER, "OneLiner" ); fl_update_display( 1 ); } /*************************************** ***************************************/ void fl_hide_oneliner( void ) { if ( oneliner && oneliner->visible ) fl_hide_form( oneliner ); } /*************************************** ***************************************/ void fl_set_oneliner_color( FL_COLOR tc, FL_COLOR bc ) { create_it( ); fl_set_object_lcol( text, textcolor = tc ); background = bc; fl_set_object_color( text, background, background ); } /*************************************** ***************************************/ void fl_set_oneliner_font( int style, int size ) { create_it( ); fl_set_object_lstyle( text, fntstyle = style ); fl_set_object_lsize( text, fntsize = size ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/xforms.man0000644000175000017500000000716111264174517015024 0ustar jensjens.\" .\" Man page for XFORMS. .\" Use the following command to generate viewable man page .\" .\" tbl xforms.5 | {nt}roff -man .\" .\" ul | more -fsk to view .\" .\" .TH XFORMS 5 "October 2009" "Version 1.0.92" "Forms Library" .SH NAME xforms \- A GUI Toolkit for X Window Systems .\" .\" setup .de Cr .ie n (c) .el \(co .. .SH SYNOPSIS .B Forms Library for X (xforms) is a GUI toolkit and builder for the X Window Systems and runs on all major UNIX platforms as well as OpenVMS and OS2. .B Forms Library is too complex to be described in the "man" page format. Ask your system administrator for the location of the HTML, PDF or PostScript document or follow the links on the .BR "Forms Library" 's home page for an online version of the documentation. .SH DESCRIPTION .B Forms Library is a graphical user interface toolkit based on Xlib for X Window Systems. It comes with a rich set of objects such as buttons, browsers, sliders and menus integrated into an elegant event/object callback execution model that allows fast and easy construction of X applications. In addition, the library has support for image read and write, format conversion and simple image processing. The library consists of a flexible set of C-routines that can be used in C and C++ programs (As of this writing, perl, ada95, pascal, scheme and Fortran bindings to the .B Forms Library are in beta.) The library is efficient and portable and runs on all major Unix platforms, including Sun, SGI, HP, DEC Alpha/OSF, IBM RS6000, Convex, Cray, Linux, FreeBSD, NetBSD, SCO, Unixware, OpenBSD , BSDi, DecSystem(mips)/Ultrix and others. Non-unix platforms include OpenVMS, OS/2, and Window/NT. Bundled with the library is also a Form designer, .I fdesign, which can be used to build interaction forms in a WYSIWYG (what you see is what you get) way and to generate the corresponding C (or any of the binding languages) code for you. 50+ demos in source code are distributed with the library. .SH OPTIONS All programs written using the .B Forms Library recognize the following command line options .TP 6 .BI \-display " host:dpy" specifies the server to connect to. .TP .BI \-bw " borderwidth" specifies the border width to use for built-in objects. .TP .B \-flversion prints the xforms version information. .TP .BI \-visual " visualName" requests a visual by name such as TrueColor etc. By default the .B Forms Library always selects the visual that has the most depth. .TP .BI \-depth " depth" requests a specific depth. .TP .BI \-fldebug " level" generates some info about the state of the .B XForms. where .I level is an integer between 1-5 and controls the amount of information to output. Depending on the options used when the .B Forms Library was built, a level more than 3 might not be available. .TP .B \-sync runs the application in synchronous mode with debug level set to 4. .TP .B \-private requests a private colormap for the application. .TP .B \-shared requests a shared colormap even if the application needs more colors than available. For those colors that can't be allocated in the shared colormap, substitutions are made so the closest matching color is used. .TP .B \-stdcmap requests a standard colormap. .TP .B \-name " newname" specifies the application name under which resources are to be obtained, rather than the default executable file name. .B .SH SEE ALSO fdesign(1L), fd2ps(1L) .SH AUTHOR Copyright .Cr 1996-2002 T.C. Zhao, Mark Overmars and Steve Lamont .br Since 2002: GNU Lesser General Public License .br Maintainers: Jean-Marc Lasgouttes, Angus Leeming and Jens Thoms Toerring .SH HOME PAGE http://xforms-toolkit.org .br http://savannah.nongnu.org/projects/xforms/ xforms-1.0.93sp1/lib/sysdep.c0000644000175000017500000001303511250705730014451 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sysdep.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * X independent but system (SysV, BSD) or OS dependent utilities. * * listdir.c contains another part of the system dependent stuff, * namely the directory structure of the system. * * check out local.h, which defines some flags that might affect * this file */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include #include #include #ifndef FL_WIN32 #include #include #include #else #include #include #endif #include "local.h" /*********************************************************** * fl_whoami() returns the username **********************************************************/ #ifndef FL_WIN32 const char * fl_whoami( void ) { #ifndef __VMS struct passwd *passwd = getpwuid( getuid( ) ); const char *name = passwd ? passwd->pw_name : "Unknown"; endpwent( ); #else const char *name = getenv( "USER" ); #endif return name ? name : "unknown"; } #else /* WIN/NT platform */ const char * fl_whoami( void ) { static char buf[ 32 ]; int len = 32; return GetUserName( buf, &len ) ? buf : "unknown"; } #endif /*************************************************** * fl_now() returns today's (local) date in ASCII format ***************************************************/ const char * fl_now( void ) { time_t t = time( 0 ); static char buf[ 64 ]; fli_sstrcpy( buf, asctime( localtime( &t ) ), sizeof buf ); if ( buf[ strlen( buf ) - 1 ] == '\n' ) buf[ strlen( buf ) - 1 ] = '\0'; return buf; } /***************************************************************** * fl_msleep() is similar to sleep(), but with milli-second argument ******************************************************************/ #ifdef __VMS #include int fl_msleep( unsigned long msec ) { float wait_time = 1.0e-3 * msec; ( void ) lib$wait( &wait_time ); return 0; } #else /*************************************** * Yielding the processor for msec milli-seconds ***************************************/ int fl_msleep( unsigned long msec ) { #ifdef __EMX__ _sleep2( msec ); /* more accurate than select/sleep in OS2 */ return 0; #else #ifdef FL_WIN32 _sleep( msec ); return 0; #else #ifdef HAVE_NANOSLEEP struct timespec timeout; timeout.tv_nsec = 1000000 * ( msec % 1000 ); timeout.tv_sec = msec / 1000; return nanosleep( &timeout, NULL ); #else #ifdef HAVE_USLEEP return usleep( msec * 1000 ); #else /* seems everybody has select these days */ struct timeval timeout; timeout.tv_usec = 1000 * ( msec % 1000 ); timeout.tv_sec = msec / 1000; return select( 0, NULL, NULL, NULL, &timeout ); #endif #endif #endif #endif } #endif /* VMS */ /******* End of fl_msleep() ***************************/ #if defined __VMS && __VMS_VER < 70000000 /*************************************** * Thanks to David Mathog (mathog@seqaxp.bio.caltech.edu) for * stealing it from the X11KIT distribution * * gettimeofday(2) - Returns the current time * * NOTE: The timezone portion is useless on VMS. * Even on UNIX, it is only provided for backwards * compatibilty and is not guaranteed to be correct. ***************************************/ #include int gettimeofday( struct timeval * tv, struct timezone * tz ) { timeb_t tmp_time; ftime( &tmp_time ); if ( tv != NULL ) { tv->tv_sec = tmp_time.time; tv->tv_usec = tmp_time.millitm * 1000; } if ( tz != NULL ) { tz->tz_minuteswest = tmp_time.timezone; tz->tz_dsttime = tmp_time.dstflag; } return 0; } /*** End gettimeofday() ***/ #endif /* defined __VMS && __VMS_VER < 70000000 */ /************************************************************* * Return the system time since a fixed point in time (On unix * systems, this point is typically 01/01/70). * Most useful for elapsed time. ************************************************************/ void fl_gettime( long * sec, long * usec ) { #ifndef FL_WIN32 static struct timeval tp; #ifdef opennt static unsigned long tzp; #else static struct timezone tzp; #endif gettimeofday( &tp, &tzp ); *sec = tp.tv_sec; *usec = tp.tv_usec; #else struct _timeb _gtodtmp; _ftime( &_gtodtmp ); *sec = _gtodtmp.time; *usec = _gtodtmp.millitm * 1000; #endif } /*************************************** ***************************************/ long fli_getpid( void ) { return getpid( ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/formbrowser.c0000644000175000017500000007236011316735212015520 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file formbrowser.c * * This file is part of the XForms library package. * * Copyright (c) 1997 By T.C. Zhao and Mark Overmars * Copyright (c) 1998 By Steve Lamont of the National Center for * Microscopy and Imaging Research * Copyright (c) 1999-2002 by T.C. Zhao and Steve Lamont * All rights reserved. * * form browser. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pformbrowser.h" static void check_scrollbar( FL_OBJECT * ob ); static int canvas_cleanup( FL_OBJECT * ob ); static int canvas_handler( FL_OBJECT * ob, Window win, int w, int h, XEvent * ev, void * data ); static void delete_form( FLI_FORMBROWSER_SPEC * sp, int f ); static void display_forms( FLI_FORMBROWSER_SPEC * sp ); static void form_cb( FL_OBJECT * ob, void * data ); static int handle_formbrowser( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key, void * ev ); static void hcb( FL_OBJECT * ob, long data ); static void parentize_form( FL_FORM * form, FL_OBJECT * ob ); static void set_form_position( FL_FORM * form, int x, int y ); static void vcb( FL_OBJECT * ob, long data ); static void set_formbrowser_return( FL_OBJECT * obj, unsigned int when ); /*************************************** ***************************************/ FL_OBJECT * fl_create_formbrowser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_FORMBROWSER_SPEC *sp; int absbw, oldu = fl_get_coordunit( ); int D; ob = fl_make_object( FL_FORMBROWSER, type, x, y, w, h, label, handle_formbrowser ); fl_set_coordunit( FL_COORD_PIXEL ); ob->boxtype = FL_FORMBROWSER_BOXTYPE; ob->align = FL_FORMBROWSER_ALIGN; ob->col1 = FL_FORMBROWSER_COL1; ob->col2 = FL_BLACK; ob->set_return = set_formbrowser_return; ob->spec = sp = fl_calloc( 1, sizeof *sp ); absbw = FL_abs( ob->bw ); sp->form = NULL; sp->parent = ob; sp->scroll = FL_SMOOTH_SCROLL; sp->vw_def = sp->hh_def = D = fli_get_default_scrollbarsize( ob ); sp->canvas = fl_create_canvas( FL_CANVAS, ob->x + absbw, ob->y + absbw, ob->w - 2 * absbw - sp->vw_def, ob->h - 2 * absbw - sp->hh_def, label ); sp->canvas->u_vdata = sp; fl_modify_canvas_prop( sp->canvas, NULL, NULL, canvas_cleanup ); fl_set_object_color( sp->canvas, ob->col1, ob->col2 ); fl_set_object_bw( sp->canvas, ob->bw ); fl_set_object_boxtype( sp->canvas, fli_boxtype2frametype( ob->boxtype ) ); fl_add_canvas_handler( sp->canvas, Expose, canvas_handler, NULL ); sp->v_pref = sp->h_pref = FL_AUTO; sp->hsl = fl_create_scrollbar( FL_HOR_THIN_SCROLLBAR, ob->x, y + h - D, w - D, D, "" ); fl_set_scrollbar_value( sp->hsl, sp->old_hval = 0.0 ); fl_set_object_boxtype( sp->hsl, ob->boxtype ); sp->hsl->visible = sp->h_pref == FL_ON; sp->hsl->resize = FL_RESIZE_X; fl_set_object_callback( sp->hsl, hcb, 0 ); sp->vsl = fl_create_scrollbar( FL_VERT_THIN_SCROLLBAR, x + w - D, y, D, h - D, "" ); fl_set_object_boxtype( sp->vsl, ob->boxtype ); sp->vsl->visible = sp->v_pref == FL_ON; fl_set_scrollbar_value( sp->vsl, sp->old_hval = 0.0 ); sp->vsl->resize = FL_RESIZE_Y; fl_set_object_callback( sp->vsl, vcb, 0 ); fl_add_child( ob, sp->canvas ); fl_add_child( ob, sp->hsl ); fl_add_child( ob, sp->vsl ); fl_set_coordunit( oldu ); /* Set default return policy for the object */ fl_set_object_return( ob, FL_RETURN_NONE ); return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_formbrowser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj = fl_create_formbrowser( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); return obj; } /*************************************** ***************************************/ FL_FORM * fl_get_formbrowser_topform( FL_OBJECT * ob ) { int topline = 0; FLI_FORMBROWSER_SPEC *sp = ob->spec; if ( ! IsFormBrowserClass( ob ) ) M_err( "fl_get_formbrowser_topform", "%s not a formbrowser", ob ? ob->label : "null" ); else topline = sp->top_form + 1; return topline ? sp->form[ topline - 1 ] : 0; } /*************************************** ***************************************/ int fl_set_formbrowser_topform( FL_OBJECT * ob, FL_FORM * form ) { int n = fl_find_formbrowser_form_number( ob, form ); if ( n > 0 ) fl_set_formbrowser_topform_bynumber( ob, n ); return n; } /*************************************** ***************************************/ FL_FORM * fl_set_formbrowser_topform_bynumber( FL_OBJECT * ob, int n ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; FL_FORM *form = NULL; if ( n > 0 && n <= sp->nforms ) { int h, f; sp->top_form = n - 1; sp->top_edge = 0; form = sp->form[ sp->top_form ]; display_forms( sp ); for ( h = f = 0; f < sp->top_form; f++ ) h += sp->form[ f ]->h; sp->old_vval = ( double ) h / ( sp->max_height - sp->canvas->h ); fl_set_scrollbar_value( sp->vsl, sp->old_vval ); } return form; } /*************************************** ***************************************/ int fl_addto_formbrowser( FL_OBJECT * ob, FL_FORM * form ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; if ( ! IsFormBrowserClass( ob ) ) { M_err( "fl_addto_formbrowser", "%s not a formbrowser", ob ? ob->label : "null" ); return 0; } else if ( ! form ) { M_err( "fl_addto_formbrowser", "Invalid argument" ); return 0; } else if ( form->attached ) { M_err( "fl_addto_formbrowser", "Already attached ?" ); return 0; } if ( form->visible == FL_VISIBLE ) fl_hide_form( form ); if ( ! form->form_callback ) fl_set_form_callback( form, form_cb, NULL ); parentize_form( form, ob ); sp->form = fl_realloc( sp->form, ( sp->nforms + 1 ) * sizeof *sp->form ); sp->form[ sp->nforms++ ] = form; form->attached = 1; if ( form->pre_attach ) form->pre_attach( form ); if ( sp->max_width < form->w ) sp->max_width = form->w; sp->max_height += form->h; display_forms( sp ); return sp->nforms; } /*************************************** ***************************************/ int fl_find_formbrowser_form_number( FL_OBJECT * ob, FL_FORM * candidate_form ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; int f; FL_FORM **form = sp->form; int nforms = sp->nforms; int num = 0; if ( ! IsFormBrowserClass( ob ) ) { M_err( "fl_find_formbrowser_form_number", "%s not a formbrowser", ob ? ob->label : "null" ); return 0; } else if ( ! candidate_form ) { M_err( "fl_find_formbrowser_form_number", "Invalid argument" ); return 0; } for ( f = 0; f < nforms; f++ ) { if ( form[ f ] == candidate_form ) { num = f + 1; break; } } return num; } /*************************************** ***************************************/ int fl_delete_formbrowser( FL_OBJECT * ob, FL_FORM * candidate_form ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; int f = fl_find_formbrowser_form_number( ob, candidate_form ); if ( ! IsFormBrowserClass( ob ) ) { M_err( "fl_delete_formbrowser", "%s not a formbrowser", ob ? ob->label : "null" ); return -1; } else if ( ! candidate_form ) { M_err( "fl_delete_formbrowser", "Invalid argument" ); return -1; } if ( f ) delete_form( sp, f - 1 ); return sp ? sp->nforms : -1; } /*************************************** ***************************************/ #if 0 FL_FORM * fl_get_formbrowser_parent_form( FL_OBJECT * ob ) { return ob->form->parent; } #endif /*************************************** ***************************************/ FL_FORM * fl_delete_formbrowser_bynumber( FL_OBJECT * ob, int num ) { FL_FORM *form = NULL; FLI_FORMBROWSER_SPEC *sp = ob->spec; if ( ! IsFormBrowserClass( ob ) ) { M_err( "fl_delete_formbrowser_bynumber", "%s not a formbrowser", ob ? ob->label : "null" ); return NULL; } else if ( num <= 0 || num > sp->nforms ) { M_err( "fl_delete_formbrowser_bynumber", "Invalid argument -- %d not between 1 and %d", num, sp->nforms ); return NULL; } form = sp->form[ --num ]; delete_form( sp, num ); return form; } /*************************************** ***************************************/ FL_FORM * fl_replace_formbrowser( FL_OBJECT * ob, int num, FL_FORM * form ) { FL_FORM *old_form = NULL; FLI_FORMBROWSER_SPEC *sp = ob->spec; int i = num - 1; if ( ! IsFormBrowserClass( ob ) ) { M_err( "fl_replace_formbrowser", "%s not a formbrowser", ob ? ob->label : "null" ); return NULL; } else if ( num <= 0 || num > sp->nforms ) { M_err( "fl_replace_formbrowser", "Invalid argument -- %d not between 1 and %d", num, sp->nforms ); return NULL; } old_form = sp->form[ i ]; fl_hide_form( old_form ); sp->form[ i ] = form; display_forms( sp ); return old_form; } /*************************************** ***************************************/ int fl_get_formbrowser_area( FL_OBJECT * ob, int * x, int * y, int * w, int * h ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; if ( ! IsFormBrowserClass( ob ) ) { M_err( "fl_get_formbrowser_area", "%s not a formbrowser", ob ? ob->label : "null" ); return 0; } *x = sp->canvas->x; *y = sp->canvas->y; *w = sp->canvas->w; *h = sp->canvas->h; return 1; } /*************************************** ***************************************/ int fl_insert_formbrowser( FL_OBJECT * ob, int line, FL_FORM * new_form ) { int status = -1; FLI_FORMBROWSER_SPEC *sp = ob->spec; int nforms = sp->nforms; FL_FORM **form = sp->form; int n = line - 1; if ( ! IsFormBrowserClass( ob ) ) { M_err( "fl_insert_formbrowser", "%s not a formbrowser", ob ? ob->label : "null" ); return -1; } if ( line <= 0 || line > nforms ) { M_err( "fl_insert_formbrowser", "Invalid argument" ); return -1; } form = fl_realloc( form, ( nforms + 1 ) * sizeof *form ); parentize_form( new_form, ob ); if ( n != nforms ) memmove( form + n + 1, form + n, sizeof *form * ( nforms - n ) ); form[ n ] = new_form; status = sp->nforms = nforms + 1; sp->form = form; status = sp->nforms; display_forms( sp ); return status; } /*************************************** ***************************************/ void fl_set_formbrowser_hscrollbar( FL_OBJECT * ob, int how ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; if ( sp->h_pref != how ) { sp->h_pref = how; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_formbrowser_vscrollbar( FL_OBJECT * ob, int how ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; if ( sp->v_pref != how ) { sp->v_pref = how; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_formbrowser_scroll( FL_OBJECT * ob, int how ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; if ( sp->scroll != how ) { if ( ( sp->scroll = how ) == FL_JUMP_SCROLL ) sp->top_edge = 0; fl_redraw_object( ob ); } } /*************************************** ***************************************/ int fl_set_formbrowser_xoffset( FL_OBJECT * ob, int offset ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; int current; if ( ! IsFormBrowserClass( ob ) ) M_err( "fl_set_formbrowser_xoffset", "%s not a formbrowser", ob ? ob->label : "null" ); current = sp->left_edge; if ( sp->max_width < sp->canvas->w ) offset = 0; if ( offset < 0 ) offset = 0; if ( offset > sp->max_width - sp->canvas->w ) offset = sp->max_width - sp->canvas->w; sp->left_edge = offset; sp->old_hval = ( double ) sp->left_edge / ( sp->max_width - sp->canvas->w ); fl_set_scrollbar_value( sp->hsl, sp->old_hval ); return current; } /*************************************** ***************************************/ int fl_get_formbrowser_xoffset( FL_OBJECT * ob ) { if ( ! IsFormBrowserClass( ob ) ) M_err( "fl_get_formbrowser_xoffset", "%s not a formbrowser", ob ? ob->label : "null" ); return ( ( FLI_FORMBROWSER_SPEC * ) ob->spec )->left_edge; } /*************************************** ***************************************/ int fl_set_formbrowser_yoffset( FL_OBJECT * ob, int offset ) { FLI_FORMBROWSER_SPEC *sp; int current; int h, f; if ( ! IsFormBrowserClass( ob ) ) M_err( "fl_set_formbrowser_yoffset", "%s not a formbrowser", ob ? ob->label : "null" ); sp = ob->spec; if ( sp->max_height < sp->canvas->h ) offset = 0; if ( offset < 0 ) offset = 0; if ( offset > sp->max_height - sp->canvas->h ) offset = sp->max_height - sp->canvas->h; current = fl_get_formbrowser_yoffset( ob ); h = sp->max_height; for ( f = sp->nforms - 1; f >= 0 && offset < h; f-- ) h -= sp->form[ f ]->h; sp->top_form = ++f; sp->top_edge = offset - h; sp->old_vval = ( double ) offset / ( sp->max_height - sp->canvas->h ); fl_set_scrollbar_value( sp->vsl, sp->old_vval ); return current; } /*************************************** ***************************************/ int fl_get_formbrowser_yoffset( FL_OBJECT * ob ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; int h, f; if ( ! IsFormBrowserClass( ob ) ) M_err( "fl_get_formbrowser_yoffset", "%s not a formbrowser", ob ? ob->label : "null" ); for ( h = f = 0; f < sp->top_form; f++ ) h += sp->form[ f ]->h; return h + sp->top_edge; } /*************************************** ***************************************/ int fl_get_formbrowser_numforms( FL_OBJECT * ob ) { if ( ! IsFormBrowserClass( ob ) ) { M_err( "fl_get_formbrowser_numforms", "%s not a formbrowser", ob ? ob->label : "null" ); return -1; } return ( ( FLI_FORMBROWSER_SPEC * ) ob->spec )->nforms; } /*************************************** ***************************************/ FL_FORM * fl_get_formbrowser_form( FL_OBJECT * ob, int n ) { FL_FORM *form = NULL; if ( ! IsFormBrowserClass( ob ) ) M_err( "fl_get_formbrowser_form", "%s not a formbrowser", ob ? ob->label : "null" ); else { FLI_FORMBROWSER_SPEC *sp = ob->spec; int nforms = sp->nforms; if ( n >= 1 && n <= nforms ) form = sp->form[ n - 1 ]; else M_err( "fl_get_formbrowser_form", "%d is not an allowable form number", n ); } return form; } /* Internals */ /*************************************** ***************************************/ static void display_forms( FLI_FORMBROWSER_SPEC * sp ) { int f; int y_pos; FL_OBJECT *canvas = sp->canvas; FL_FORM **form = sp->form; int nforms = sp->nforms; int top_form = sp->top_form; int left_edge = - sp->left_edge; int height = canvas->h; /* - (2 * absbw); */ if ( ! FL_ObjWin( sp->canvas ) ) return; fli_inherit_attributes( sp->parent, sp->canvas ); for ( f = 0; f < top_form; f++ ) if ( form[ f ]->visible ) fl_hide_form( form[ f ] ); y_pos = 0; fli_inherit_attributes( sp->parent, sp->vsl ); fli_inherit_attributes( sp->parent, sp->hsl ); /* I prefer to keep scrollbar unresizable */ sp->vsl->resize = sp->hsl->resize = FL_RESIZE_NONE; y_pos = sp->scroll == FL_JUMP_SCROLL ? 0 : -sp->top_edge; for ( f = top_form; y_pos < height && f < nforms; f++ ) { if ( form[ f ]->visible ) set_form_position( form[ f ], left_edge, y_pos ); else { fl_prepare_form_window( form[ f ], 0, FL_NOBORDER, "Formbrowser" ); form[ f ]->parent_obj = sp->parent; XReparentWindow( fl_get_display( ), form[ f ]->window, FL_ObjWin( sp->canvas ), left_edge, y_pos ); fl_show_form_window( form[ f ] ); } y_pos += form[ f ]->h; } for ( ; f < nforms; f++ ) if ( form[ f ]->visible ) fl_hide_form( form[ f ] ); } /*************************************** ***************************************/ static int handle_formbrowser( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; switch ( event ) { case FL_DRAW : fl_set_object_boxtype( sp->canvas, fli_boxtype2frametype( ob->boxtype ) ); sp->processing_destroy = 0; check_scrollbar( ob ); if ( ! sp->in_draw && FL_ObjWin( sp->canvas ) ) { sp->in_draw = 1; display_forms( sp ); sp->in_draw = 0; } break; case FL_FREEMEM : fl_free( sp ); break; } return FL_RETURN_NONE; } /*************************************** * Canvas expose handler. ***************************************/ static int canvas_handler( FL_OBJECT * ob, Window win FL_UNUSED_ARG, int w FL_UNUSED_ARG, int h FL_UNUSED_ARG, XEvent * ev FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { display_forms( ( FLI_FORMBROWSER_SPEC * ) ob->u_vdata ); return 0; } /*************************************** * Before canvas is destroyed, this routine will be called. * we need to close the form that is attached to this canvas ***************************************/ static int canvas_cleanup( FL_OBJECT * ob ) { FLI_FORMBROWSER_SPEC *sp = ob->u_vdata; int i; sp->processing_destroy = 1; sp->h_on = FL_OFF; sp->v_on = FL_OFF; for ( i = 0; i < sp->nforms; i++ ) if ( sp->form[ i ]->visible ) fl_hide_form( sp->form[ i ] ); return 0; } /*************************************** * Dummy ***************************************/ static void form_cb( FL_OBJECT * ob FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { } /*************************************** ***************************************/ static void hcb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_FORMBROWSER_SPEC *sp = obj->parent->spec; double nval = fl_get_scrollbar_value( sp->hsl ); int old_left_edge = sp->left_edge; sp->left_edge = ( sp->max_width - sp->canvas->w ) * nval; if ( old_left_edge != sp->left_edge ) { fl_freeze_form( obj->form ); display_forms( sp ); fl_unfreeze_form( obj->form ); } if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; if ( nval != sp->old_hval ) obj->parent->returned |= FL_RETURN_CHANGED; if ( obj->parent->how_return & FL_RETURN_END_CHANGED && ! ( obj->parent->returned & FL_RETURN_CHANGED && obj->parent->returned & FL_RETURN_END ) ) obj->parent->returned = FL_RETURN_NONE; if ( obj->parent->returned & FL_RETURN_END ) sp->old_hval = nval; } /*************************************** ***************************************/ static void vcb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_FORMBROWSER_SPEC *sp = obj->parent->spec; double nval = fl_get_scrollbar_value( sp->vsl ); if ( sp->scroll == FL_JUMP_SCROLL ) sp->top_form = ( sp->nforms - 1 ) * nval; else { /* do pixel based scrolling */ int pos = ( sp->max_height - sp->canvas->h ) * nval; int h = 0, f; for ( f = 0; h <= pos && f < sp->nforms; f++ ) h += sp->form[ f ]->h; sp->top_form = f ? ( f - 1 ) : f; sp->top_edge = sp->form[ sp->top_form ]->h - h + pos; } fl_freeze_form( obj->form ); display_forms( sp ); fl_unfreeze_form( obj->form ); if ( obj->returned & FL_RETURN_END ) obj->parent->returned |= FL_RETURN_END; if ( nval != sp->old_vval ) obj->parent->returned |= FL_RETURN_CHANGED; if ( obj->parent->how_return & FL_RETURN_END_CHANGED && ! ( obj->parent->returned & FL_RETURN_CHANGED && obj->parent->returned & FL_RETURN_END ) ) obj->parent->returned = FL_RETURN_NONE; if ( obj->parent->returned & FL_RETURN_END ) sp->old_vval = nval; } /*************************************** ***************************************/ static void set_form_position( FL_FORM * form, int x, int y ) { XMoveWindow( fl_get_display( ), form->window, x, y ); } /*************************************** ***************************************/ static void delete_form( FLI_FORMBROWSER_SPEC * sp, int f ) { fl_hide_form( sp->form[ f ] ); sp->form[ f ]->attached = 0; sp->nforms--; sp->max_height -= sp->form[ f ]->h; for ( ; f < sp->nforms; f++ ) sp->form[ f ] = sp->form[ f + 1 ]; sp->form = fl_realloc( sp->form, sizeof *sp->form * sp->nforms ); display_forms( sp ); } /*************************************** ***************************************/ static void parentize_form( FL_FORM * form, FL_OBJECT * ob ) { form->parent = ob->form; /* This is probably the wrong way to do it. */ } /*************************************** ***************************************/ static void check_scrollbar( FL_OBJECT * ob ) { FLI_FORMBROWSER_SPEC *sp = ob->spec; int absbw = FL_abs( ob->bw ); int h_on = sp->h_on, v_on = sp->v_on; /* Inherit the boxtype of parent */ sp->hsl->boxtype = ob->boxtype; sp->vsl->boxtype = ob->boxtype; /* Gravity/resize may screwup the ratios. Recompute */ sp->canvas->x = ob->x + absbw; sp->canvas->y = ob->y + absbw; sp->canvas->w = ob->w - 2 * absbw; sp->canvas->h = ob->h - 2 * absbw; sp->h_on = sp->canvas->w - 2 * absbw - sp->vw_def > 0 && sp->canvas->h - 2 * absbw - sp->hh_def > 0 && ( sp->h_pref == FL_ON || ( sp->h_pref != FL_OFF && sp->canvas->w < sp->max_width ) ); sp->v_on = sp->canvas->w - 2 * absbw - sp->vw_def > 0 && sp->canvas->h - 2 * absbw - sp->hh_def > 0 && ( sp->v_pref == FL_ON || ( sp->v_pref != FL_OFF && sp->canvas->h < sp->max_height ) ); if ( sp->v_on ) { sp->vw = sp->vw_def; sp->vsl->x = ob->x + ob->w - sp->vw; sp->vsl->y = ob->y; sp->vsl->w = sp->vw; sp->vsl->visible = 1; fl_notify_object( sp->vsl, FL_RESIZED ); } else { sp->vsl->visible = 0; sp->vw = 0; } if ( sp->h_on ) { sp->hh = sp->hh_def; sp->hsl->x = ob->x; sp->hsl->y = ob->y + ob->h - sp->hh; sp->hsl->h = sp->hh; sp->hsl->visible = 1; fl_notify_object( sp->hsl, FL_RESIZED ); } else { sp->hh = 0; sp->hsl->visible = 0; } /* Recheck vertical */ if ( ! sp->v_on && sp->canvas->w - 2 * absbw - sp->vw_def > 0 && sp->canvas->h - 2 * absbw - sp->hh_def > 0 && sp->v_pref != FL_OFF && sp->canvas->h < sp->max_height ) { sp->v_on = 1; sp->vw = sp->vw_def; sp->vsl->x = ob->x + ob->w - sp->vw; sp->vsl->y = ob->y; sp->canvas->w = ob->w - 2 * absbw - sp->vw; } sp->canvas->w = ob->w - 2 * absbw - ( sp->v_on ? 2 * absbw + sp->vw_def : 0 ); sp->canvas->h = ob->h - 2 * absbw - ( sp->h_on ? 2 * absbw + sp->hh_def : 0 ); sp->hsl->w = sp->canvas->w + 2 * absbw; sp->vsl->h = sp->canvas->h + 2 * absbw; /* If scrollbars get turned off due since the canvas is large enough, adjust the offsets. */ if ( ! sp->v_on && v_on && sp->canvas->h >= sp->max_height ) { sp->top_edge = 0; sp->top_form = 0; fl_set_scrollbar_value( sp->vsl, sp->old_vval = 0.0 ); } if ( ! sp->h_on && h_on && sp->canvas->w >= sp->max_width ) { sp->left_edge = 0; fl_set_scrollbar_value( sp->hsl, sp->old_hval = 0.0 ); } sp->vsl->visible = sp->v_on; sp->hsl->visible = sp->h_on; if ( sp->h_on ) { fl_set_scrollbar_size( sp->hsl, ( double ) sp->canvas->w / sp->max_width ); fl_set_formbrowser_xoffset( ob, fl_get_formbrowser_xoffset( ob ) ); fl_redraw_object( sp->hsl ); } if ( sp->v_on ) { fl_set_scrollbar_size( sp->vsl, ( double ) sp->canvas->h / sp->max_height ); fl_set_formbrowser_yoffset( ob, fl_get_formbrowser_yoffset( ob ) ); fl_redraw_object( sp->vsl ); } if ( sp->canvas->w > 0 && sp->canvas->h > 0 ) fl_winresize( FL_ObjWin( sp->canvas ), sp->canvas->w, sp->canvas->h ); } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function is for interal use only, the user * must call fl_set_object_return() (which then will call this * function). ***************************************/ static void set_formbrowser_return( FL_OBJECT * obj, unsigned int when ) { FLI_FORMBROWSER_SPEC *sp = obj->spec; if ( when & FL_RETURN_END_CHANGED ) when &= ~ ( FL_RETURN_NONE | FL_RETURN_CHANGED ); obj->how_return = when; if ( when == FL_RETURN_NONE || when == FL_RETURN_CHANGED ) { fl_set_scrollbar_return( sp->vsl, FL_RETURN_CHANGED ); fl_set_scrollbar_return( sp->hsl, FL_RETURN_CHANGED ); } else { fl_set_scrollbar_return( sp->vsl, FL_RETURN_ALWAYS ); fl_set_scrollbar_return( sp->hsl, FL_RETURN_ALWAYS ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/spline.c0000644000175000017500000001464711376221351014447 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file spline.c * * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * interpolate_spline interpolates one-dimensional, non-uniform * tabulated data onto a working grid, using cubic splines. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /* NOTE: In the two functions memory gets allocated that is never deallocated, not even on fl_finish(). */ /*************************************** * The input x-coordinate should be monotonically increasing ***************************************/ int fl_spline_interpolate( const float * wx, const float * wy, int nin, float * x, float * y, double grid ) { int i, j, k, jo, ih, im, nout; double sig, p, h, a, b; static int nwork = 0; static double *y2 = NULL, *u = NULL; if ( nin <= 3 ) { M_warn( "fl_spline_interpolate", "too few points (less than 4) for interpolation" ); return -1; } if ( nwork < nin ) { y2 = fl_realloc( y2, nin * sizeof *y2 ); u = fl_realloc( u, nin * sizeof *u ); nwork = nin; } /* Compute the second derivative */ y2[ 0 ] = u[ 0 ] = 0.0; for ( i = 1; i < nin - 1; i++ ) { sig = ( double ) ( wx[ i ] - wx[ i - 1 ] ) / ( wx[ i + 1 ] - wx[ i - 1 ] ); p = sig * y2[ i - 1 ] + 2.0; y2[ i ] = ( sig - 1.0 ) / p; u[ i ] = ( double ) ( wy[ i + 1 ] - wy[ i ] ) / ( wx[ i + 1 ] - wx[ i ] ) - ( double ) ( wy[ i ] - wy[ i - 1 ] ) / ( wx[ i ] - wx[ i - 1 ] ); u[ i ] = ( 6.0 * u[i] / ( wx[ i + 1 ] - wx[ i - 1 ] ) - sig * u[ i - 1 ] ) / p; } y2[ nin - 1 ] = 0.0; for ( k = nin - 2; k >= 0; k-- ) y2[ k ] = y2[ k ] * y2[ k + 1 ] + u[ k ]; /* Outputs */ nout = ( int ) ( ( wx[ nin - 1 ] - wx[ 0 ] ) / grid + 1.01); x[ 0 ] = wx[ 0 ]; y[ 0 ] = wy[ 0 ]; /* Start the main loop */ for ( jo = 0, i = 1; i < nout; i++ ) { /* Better than x[i] = x[i-1] + grid; */ x[ i ] = x[ 0 ] + i * grid; /* Center */ j = jo; ih = nin; while ( ih - j > 1 ) { im = ( ih + j ) / 2; if ( x[ i ] > wx[ im ] ) j = im; else ih = im; } jo = j; /* Interpolate */ h = wx[ ih ] - wx[ j ]; a = ( wx[ ih ] - x[ i ] ) / h; b = ( x[ i ] - wx[ j ] ) / h; y[i] = a * wy[ j ] + b * wy[ ih ] + ( ( a * a * a - a ) * y2[ j ] + ( b * b * b - b ) * y2[ ih ] ) * ( h * h ) / 6.0; } x[ nout - 1 ] = wx[ nin - 1 ]; y[ nout - 1 ] = wy[ nin - 1 ]; return nout; } /*************************************** * Specialized for image processing ***************************************/ int fl_spline_int_interpolate( const int * wx, const int * wy, int nin, int grid, int * y ) { int i, j, k, jo, ih, im, nout; double sig, p, h, a, b, x; static int nwork = 0; static double *y2 = NULL, *u = NULL; if ( nin <= 3 ) { M_warn( "fl_spline_int_interpolate", "too few points (less than 4) for interpolation" ); return -1; } if ( nwork < nin ) { y2 = fl_realloc( y2, nin * sizeof *y2 ); u = fl_realloc( u, nin * sizeof *u ); nwork = nin; } y2[ 0 ] = u[ 0 ] = 0.0; for ( i = 1; i < nin - 1; i++ ) { sig = ( double ) ( wx[ i ] - wx[ i - 1 ] ) / ( wx[ i + 1 ] - wx[ i - 1 ] ); p = sig * y2[ i - 1 ] + 2.0; y2[ i ] = ( sig - 1.0 ) / p; u[ i ] = ( double ) ( wy[ i + 1 ] - wy[ i ] ) / ( wx[ i + 1 ] - wx[ i ] ) - ( double ) ( wy[ i ] - wy[ i - 1 ] ) / ( wx[ i ] - wx[ i - 1 ] ); u[ i ] = ( 6.0 * u[ i ] / ( wx[ i + 1 ] - wx[ i - 1 ] ) - sig * u[ i - 1 ] ) / p; } y2[ nin - 1 ] = 0.0; for ( k = nin - 2; k >= 0; k-- ) y2[ k ] = y2[ k ] * y2[ k + 1 ] + u[ k ]; /* Outputs */ nout = ( int ) ( ( wx[ nin - 1 ] - wx[ 0 ] ) / grid + 1.01 ); y[ 0 ] = wy[ 0 ]; /* Start the main loop */ for ( jo = 0, i = 1; i < nout; i++ ) { x = wx[ 0 ] + i * grid; /* Center */ j = jo; ih = nin - 1; while ( ih - j > 1 ) { im = ( ih + j ) / 2; if ( x > wx[ im ] ) j = im; else ih = im; } jo = j; /* Interpolate */ h = wx[ ih ] - wx[ j ]; a = ( wx[ ih ] - x ) / h; b = ( x - wx[ j ] ) / h; y[i] = ( a * wy[ j ] + b * wy[ ih ] + ( ( a * a * a - a ) * y2[ j ] + ( b * b * b - b ) * y2[ ih ] ) * ( h * h ) / 6.0 ) + 0.1; /* Clamp */ if ( y[ i ] < 0 ) y[ i ] = 0; else if ( y[ i ] > FL_PCMAX ) y[ i ] = FL_PCMAX; } y[ nout - 1 ] = wy[ nin - 1 ]; return nout; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/select.c0000644000175000017500000007661311342200364014427 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pselect.h" static void timeout_cb( int, void * ); static int handle_select( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); static int handle_push( FL_OBJECT *, int ); static FL_POPUP_RETURN * find_first_item( FL_OBJECT * ); static FL_POPUP_RETURN * find_last_item( FL_OBJECT * ); static FL_POPUP_RETURN * find_next_item( FL_OBJECT * ); static FL_POPUP_RETURN * find_prev_item( FL_OBJECT * ); static void draw_select( FL_OBJECT * ); static void draw_droplist( FL_OBJECT * ); #define IS_ACTIVATABLE( e ) \ ( ( e )->type != FL_POPUP_LINE \ && ! ( ( e ) ->state & ( FL_POPUP_HIDDEN | FL_POPUP_DISABLED ) ) ) /*************************************** * Create a select object ***************************************/ FL_OBJECT * fl_create_select( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_SELECT_SPEC *sp; obj = fl_make_object( FL_SELECT, type, x, y, w, h, label, handle_select ); obj->boxtype = type == FL_NORMAL_SELECT ? FL_ROUNDED_BOX : FL_UP_BOX; obj->col1 = FL_SELECT_COL1; obj->col2 = FL_SELECT_COL2; obj->lcol = FL_SELECT_LCOL; obj->align = FL_SELECT_ALIGN; obj->want_update = 1; sp = obj->spec = fl_malloc( sizeof *sp ); sp->popup = NULL; sp->sel = NULL; sp->align = FL_ALIGN_CENTER; sp->style = FL_NORMAL_STYLE; sp->size = FL_NORMAL_SIZE; sp->color = FL_BLACK; sp->timeout_id = -1; sp->repeat_ms = 500; fl_set_object_return( obj, FL_RETURN_CHANGED ); return obj; } /*************************************** * Add a select object ***************************************/ FL_OBJECT * fl_add_select( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; obj = fl_create_select( type, x, y, w, h, label ); fl_add_object( fl_current_form, obj ); /* Popup can only be created after the object has been added to its form, otherwise we don't know which window is its parent window... */ ( ( FLI_SELECT_SPEC * ) obj->spec )->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_add_select" ); return obj; } /*************************************** * Remove all items from select objects popup ***************************************/ int fl_clear_select( FL_OBJECT * obj ) { FLI_SELECT_SPEC *sp; if ( obj == NULL ) { M_err( "fl_clear_select_popup", "NULL object" ); return -1; } sp = obj->spec; /* Remove all existing entries and reset the popups internal counter */ if ( sp->popup != NULL ) { while ( sp->popup->entries != NULL ) fl_popup_entry_delete( sp->popup->entries ); fli_popup_reset_counter( sp->popup ); } else sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_clear_select" ); sp->sel = NULL; fl_redraw_object( obj ); return 0; } /*************************************** * Add item(s) to the select object ***************************************/ FL_POPUP_ENTRY * fl_add_select_items( FL_OBJECT * obj, const char * items, ... ) { FLI_SELECT_SPEC *sp; FL_POPUP_ENTRY *new_entries; va_list ap; if ( obj == NULL ) { M_err( "fl_add_select_items", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_add_select_items" ); /* Create and append the new entries to the popup */ va_start( ap, items ); new_entries = fli_popup_add_entries( sp->popup, items, ap, "fl_add_select_items", 1 ); va_end( ap ); /* If there's no currently selected entry try to find one */ if ( sp->sel == NULL ) sp->sel = find_first_item( obj ); fl_redraw_object( obj ); return new_entries; } /*************************************** * Insert item(s) into the select object after an already existing item ***************************************/ FL_POPUP_ENTRY * fl_insert_select_items( FL_OBJECT * obj, FL_POPUP_ENTRY * after, const char * items, ... ) { FLI_SELECT_SPEC *sp; FL_POPUP_ENTRY *new_entries; va_list ap; if ( obj == NULL ) { M_err( "fl_add_select_items", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_insert_select_items" ); if ( after != NULL && fli_check_popup_entry_exists( after ) != 0 ) { M_err( "fl_add_select_items", "Item to insert after doesn't exist" ); return NULL; } va_start( ap, items ); new_entries = fli_popup_insert_entries( sp->popup, after, items, ap, "fl_insert_select_items", 1 ); va_end( ap ); /* If there's no currently selected entry try to find one */ if ( sp->sel == NULL ) sp->sel = find_first_item( obj ); fl_redraw_object( obj ); return new_entries; } /*************************************** * Replace an item by new item(s) ***************************************/ FL_POPUP_ENTRY * fl_replace_select_item( FL_OBJECT * obj, FL_POPUP_ENTRY * old_item, const char * items, ... ) { FLI_SELECT_SPEC *sp; FL_POPUP_ENTRY *new_entries; va_list ap; if ( obj == NULL ) { M_err( "fl_replace_select_items", "NULL object" ); return NULL; } if ( ! items || ! *items ) { M_err( "fl_replace_select_items", "Items string NULL or empty" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_replace_select_items" ); /* Test if the item we're supposed to replace exists */ if ( fli_check_popup_entry_exists( old_item ) ) { M_err( "fl_replace_select_items", "Item to replace doesn't exist" ); return NULL; } /* Add the new item(s) after the one to replaced */ va_start( ap, items ); new_entries = fli_popup_insert_entries( sp->popup, old_item, items, ap, "fl_replace_select_items", 1 ); va_end( ap ); /* If the insert worked out ok delete the old item (and check if we have to set a new displayed item) */ if ( new_entries != NULL ) { if ( sp->sel != NULL && sp->sel->entry == old_item ) sp->sel = find_next_item( obj ); fl_popup_entry_delete( old_item ); if ( sp->sel->entry == old_item ) sp->sel = find_first_item( obj ); } else sp->sel = NULL; fl_redraw_object( obj ); return new_entries; } /*************************************** * Delete an item of a select object ***************************************/ int fl_delete_select_item( FL_OBJECT * obj, FL_POPUP_ENTRY * item ) { FLI_SELECT_SPEC *sp; if ( obj == NULL ) { M_err( "fl_delete_select_item", "NULL object" ); return -1; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_delete_select_items" ); if ( fli_check_popup_entry_exists( item ) != 0 ) { M_err( "fl_delete_select_item", "Item doesn't exist" ); return -1; } /* Delete the entry */ fl_popup_entry_delete( item ); /* Check if we have to change the currently selected item */ if ( item == sp->sel->entry ) sp->sel = find_next_item( obj ); fl_redraw_object( obj ); return 0; } /*************************************** * (Re)populate a select object's popup via an * array of FL_POPUP_ITEM structures ***************************************/ long fl_set_select_items( FL_OBJECT * obj, FL_POPUP_ITEM * items ) { FLI_SELECT_SPEC *sp; FL_POPUP_ENTRY *e; long count; if ( obj == NULL ) { M_err( "fl_set_select_items", "NULL object" ); return -1; } sp = obj->spec; /* If no popup exists yet create it, otherwise remove all entries */ if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_set_select_items" ); else { while ( sp->popup->entries != NULL ) fl_popup_entry_delete( sp->popup->entries ); fli_popup_reset_counter( sp->popup ); } /* Now add the new ones */ for ( count = 0; items && items->text != NULL; count++, items++ ) { size_t i = 9; char *txt; char *t = ( char * ) items->text; /* Figure out how many chars we need fot the text */ while ( ( t = strchr( t, '%' ) ) != NULL ) if ( *++t != 'S' ) i++; t = txt = fl_malloc( i ); strcpy( txt, items->text ); while ( ( t = strchr( t, '%' ) ) != NULL ) { if ( *++t == 'S' ) continue; memmove( t + 1, t, strlen( t ) + 1 ); *t++ = '%'; } if ( items->state & FL_POPUP_DISABLED ) strcat( txt, "%d" ); if ( items->state & FL_POPUP_HIDDEN ) strcat( txt, "%h" ); strcat( txt, "%f%s" ); e = fl_popup_add_entries( sp->popup, txt, items->callback, items->shortcut ); fl_free( txt ); fl_safe_free( e->text ); e->text = fl_strdup( items->text ); } if ( count > 0 ) sp->sel = find_first_item( obj ); return count; } /*************************************** * Returns the popup of a select object ***************************************/ FL_POPUP * fl_get_select_popup( FL_OBJECT * obj ) { return ( ( FLI_SELECT_SPEC * ) obj->spec )->popup; } /*************************************** * Set a (new) popup for a select object ***************************************/ int fl_set_select_popup( FL_OBJECT * obj, FL_POPUP * popup ) { FLI_SELECT_SPEC *sp; FL_POPUP *old_popup; FL_POPUP_ENTRY *e; /* We need a valid object */ if ( obj == NULL ) { M_err( "fl_set_select_popup", "NULL object" ); return -1; } sp = obj->spec; /* The popup must exist */ if ( fli_check_popup_exists( popup ) ) { M_err( "fl_set_select_popup", "Popup doesn't exist" ); return -1; } /* The popup can't be a sub-popup nor may it contain any entries that are not "normal" entries */ if ( popup->parent != NULL ) { M_err( "fl_set_select_popup", "Popup is a sub-popup" ); return -1; } for ( e = popup->entries; e != NULL; e = e->next ) if ( e->type != FL_POPUP_NORMAL ) { M_err( "fl_set_select_popup", "Invalid entries in popup" ); return -1; } /* Delete a popup already associated with the select object */ old_popup = ( ( FLI_SELECT_SPEC * ) obj->spec )->popup; if ( old_popup != NULL ) fl_popup_delete( old_popup ); /* Set the new popup as the select pbjects popup and redraw */ sp->popup = popup; sp->sel = find_first_item( obj ); fl_redraw_object( obj ); return 1; } /*************************************** * Return currently selected item ***************************************/ FL_POPUP_RETURN * fl_get_select_item( FL_OBJECT * obj ) { if ( obj == NULL ) { M_err( "fl_get_select_item", "NULL object" ); return NULL; } return ( ( FLI_SELECT_SPEC * ) obj->spec )->sel; } /*************************************** * Set a new item as currently selected ***************************************/ FL_POPUP_RETURN * fl_set_select_item( FL_OBJECT * obj, FL_POPUP_ENTRY * entry ) { FL_POPUP_ENTRY *e; FLI_SELECT_SPEC *sp; FL_POPUP_RETURN *r; if ( obj == NULL ) { M_err( "fl_get_select_item", "NULL object" ); return NULL; } if ( entry == NULL ) { M_err( "fl_set_select_item", "NULL entry" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_set_select_items" ); for ( e = sp->popup->entries; e != NULL; e = e->next ) if ( e == entry ) break; if ( e == NULL ) { M_err( "fl_set_select_item", "Entry does not exist" ); return NULL; } if ( ! IS_ACTIVATABLE( entry ) ) { M_err( "fl_set_select_item", "Entry can't be set as selected" ); return NULL; } r = fli_set_popup_return( entry ); fl_redraw_object( obj ); return r; } /*************************************** ***************************************/ FL_POPUP_ENTRY * fl_get_select_item_by_value( FL_OBJECT * obj, long int val ) { FLI_SELECT_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_select_item_by_value", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_get_select_item_by_value" ); return fl_popup_entry_get_by_value( sp->popup, val ); } /*************************************** ***************************************/ FL_POPUP_ENTRY * fl_get_select_item_by_label( FL_OBJECT * obj, const char * label ) { FLI_SELECT_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_select_item_by_label", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_get_select_item_by_label" ); return fl_popup_entry_get_by_label( sp->popup, label ); } /*************************************** ***************************************/ FL_POPUP_ENTRY * fl_get_select_item_by_text( FL_OBJECT * obj, const char * text ) { FLI_SELECT_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_select_item_by_text", "NULL object" ); return NULL; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_get_select_item_by_text" ); return fl_popup_entry_get_by_text( sp->popup, text ); } /*************************************** * Returns one of the different colors set for the object and its popup ***************************************/ FL_COLOR fl_get_select_text_color( FL_OBJECT * obj ) { FLI_SELECT_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_select_color", "NULL object" ); return FL_MAX_COLORS; } sp = obj->spec; return sp->color; } /*************************************** * Set one of the different colors of the object ***************************************/ FL_COLOR fl_set_select_text_color( FL_OBJECT * obj, FL_COLOR color ) { FLI_SELECT_SPEC *sp; FL_COLOR old_color; if ( obj == NULL ) { M_err( "fl_set_select_color", "NULL object" ); return FL_MAX_COLORS; } if ( color >= FL_MAX_COLORS ) { M_err( "fl_select_set_color", "Invalid color argument" ); return FL_MAX_COLORS; } sp = obj->spec; old_color = sp->color; sp->color = color; fl_redraw_object( obj ); return old_color; } /*************************************** * Returns style and size of the fonts used for the text on the object ***************************************/ int fl_get_select_text_font( FL_OBJECT * obj, int * style, int * size ) { FLI_SELECT_SPEC *sp; if ( obj == NULL ) { M_err( "fl_get_select_font", "NULL object" ); return -1; } sp = obj->spec; if ( style != NULL ) *style = sp->style; if ( size != NULL ) *size = sp->size; return 0; } /*************************************** * Sets style and size of the fonts used for the text on the object ***************************************/ int fl_set_select_text_font( FL_OBJECT * obj, int style, int size ) { FLI_SELECT_SPEC *sp; if ( obj == NULL ) { M_err( "fl_set_select_font", "NULL object" ); return -1; } sp = obj->spec; sp->style = style; sp->size = size; fl_redraw_object( obj ); return 0; } /*************************************** * Gets the alignment of the text within the box of the object ***************************************/ int fl_get_select_text_align( FL_OBJECT * obj ) { if ( obj == NULL ) { M_err( "fl_set_select_text_align", "NULL object" ); return -1; } return ( ( FLI_SELECT_SPEC * ) obj->spec )->align; } /*************************************** * Sets the alignment of the text within the box of the object ***************************************/ int fl_set_select_text_align( FL_OBJECT * obj, int align ) { FLI_SELECT_SPEC *sp; int old_align; if ( obj == NULL ) { M_err( "fl_set_select_text_align", "NULL object" ); return -1; } if ( ! ( align & FL_ALIGN_INSIDE ) ) { M_warn( "fl_set_select_text_align", "Adding FL_ALIGN_INSIDE flag" ); align |= FL_ALIGN_INSIDE; } if ( align < ( FL_ALIGN_CENTER | FL_ALIGN_INSIDE ) || align > ( FL_ALIGN_RIGHT_BOTTOM | FL_ALIGN_INSIDE ) ) { M_err( "fl_set_select_text_align", "Invalid value for align" ); return -1; } sp = obj->spec; old_align = sp->align; sp->align = align; fl_redraw_object( obj ); return old_align; } /*************************************** * Sets how the popup of the object behaves ***************************************/ int fl_set_select_policy( FL_OBJECT * obj, int policy ) { FLI_SELECT_SPEC *sp; int old_policy; if ( obj == NULL ) { M_err( "fl_set_select_policy", "NULL object" ); return INT_MIN; } if ( policy < FL_POPUP_NORMAL_SELECT || policy > FL_POPUP_DRAG_SELECT ) { M_err( "fl_set_select_policy", "Invalid policy argument" ); return -1; } sp = obj->spec; if ( sp->popup == NULL ) sp->popup = fli_popup_add( FL_ObjWin( obj ), NULL, "fl_set_select_policy" ); old_policy = fl_popup_get_policy( sp->popup ); fl_popup_set_policy( sp->popup, policy ); return old_policy; } /*************************************** * Callback for timeout used when mouse buttons 2 or 3 are kept pressed down ***************************************/ static void timeout_cb( int val FL_UNUSED_ARG, void * data ) { ( ( FLI_SELECT_SPEC * ) data )->timeout_id = -1; } /*************************************** * Central routine for interaction with object ***************************************/ static int handle_select( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key, void * ev FL_UNUSED_ARG ) { FLI_SELECT_SPEC *sp = obj->spec; FL_POPUP_RETURN *ret = NULL; unsigned int w, h; int sret = FL_RETURN_NONE; switch ( event ) { case FL_DRAW : if ( obj->type != FL_DROPLIST_SELECT ) draw_select( obj ); else draw_droplist( obj ); /* fall through */ case FL_DRAWLABEL : obj->align &= ~ FL_ALIGN_INSIDE; fl_drw_text_beside( obj->align & ~ FL_ALIGN_INSIDE, obj->x, obj->y, obj->w, obj->h, obj->lcol, obj->lstyle, obj->lsize, obj->label ); break; case FL_ENTER : case FL_LEAVE : fl_redraw_object( obj ); break; case FL_SHORTCUT : obj->pushed = 1; key = FL_MBUTTON1; fl_popup_get_size( sp->popup, &w, &h ); fl_popup_set_position( sp->popup, obj->form->x + obj->x + ( obj->w - w ) / 2, obj->form->y + obj->y + obj->h ); sret |= FL_RETURN_END; /* fall through */ case FL_PUSH : if ( handle_push( obj, key ) ) sret |= FL_RETURN_CHANGED; break; case FL_RELEASE : if ( key != FL_MBUTTON2 && key != FL_MBUTTON3 ) break; if ( sp->timeout_id != -1 ) { fl_remove_timeout( sp->timeout_id ); sp->timeout_id = -1; } fl_redraw_object( obj ); sret |= FL_RETURN_END; break; case FL_UPDATE: if ( ( key == FL_MBUTTON2 || key == FL_MBUTTON3 ) && sp->timeout_id == -1 ) { const FL_POPUP_ENTRY *old_entry = sp->sel ? sp->sel->entry : NULL; ret = ( key == FL_MBUTTON2 ? find_prev_item : find_next_item )( obj ); if ( ret != NULL && ret->entry != old_entry && ret->entry->callback && ret->entry->callback( ret ) == FL_IGNORE ) ret = NULL; fl_redraw_object( obj ); sp->timeout_id = fl_add_timeout( sp->repeat_ms, timeout_cb, sp ); if ( ret != NULL ) sret |= FL_RETURN_CHANGED; } break; case FL_FREEMEM : if ( sp && sp->popup ) fl_popup_delete( sp->popup ); fl_safe_free( obj->spec ); break; } return sret; } /*************************************** * Deals with pushes on the select object ***************************************/ static int handle_push( FL_OBJECT * obj, int key ) { FLI_SELECT_SPEC *sp = obj->spec; FL_POPUP_RETURN *ret = NULL; const FL_POPUP_ENTRY *old_entry = sp->sel ? sp->sel->entry : NULL; unsigned int w, h; if ( key == FL_MBUTTON1 ) { fl_redraw_object( obj ); if ( obj->type == FL_DROPLIST_SELECT ) { fl_popup_get_size( sp->popup, &w, &h ); if ( obj->w >= 2 ) fl_popup_set_position( sp->popup, obj->form->x + obj->x + obj->w - w, obj->form->y + obj->y + obj->h ); else fl_popup_set_position( sp->popup, obj->form->x + obj->x + ( obj->w - w ) / 2, obj->form->y + obj->y + obj->h ); } if ( ( ret = fl_popup_do( sp->popup ) ) != NULL ) sp->sel = ret; obj->pushed = 0; } else if ( key == FL_MBUTTON2 || key == FL_MBUTTON3 ) { sp->timeout_id = fl_add_timeout( sp->repeat_ms, timeout_cb, sp ); fl_redraw_object( obj ); ret = ( key == FL_MBUTTON2 ? find_prev_item : find_next_item )( obj ); if ( ret != NULL && ret->entry != old_entry && ret->entry->callback && ret->entry->callback( ret ) == FL_IGNORE ) ret = NULL; } else if ( key == FL_MBUTTON4 || key == FL_MBUTTON5 ) { obj->pushed = 0; ret = ( key == FL_MBUTTON4 ? find_prev_item : find_next_item )( obj ); if ( ret != NULL && ret->entry != old_entry && ret->entry->callback && ret->entry->callback( ret ) == FL_IGNORE ) ret = NULL; } fl_redraw_object( obj ); return ret != NULL; } /*************************************** * Returns the first "activatable" entry of a select object ***************************************/ static FL_POPUP_RETURN * find_first_item( FL_OBJECT * obj ) { FL_POPUP_ENTRY *e = ( ( FLI_SELECT_SPEC * ) obj->spec )->popup->entries; for ( ; e != NULL; e = e->next ) if ( IS_ACTIVATABLE( e ) ) return fli_set_popup_return( e ); return NULL; } /*************************************** * Returns the last "activatable" entry of a select object ***************************************/ static FL_POPUP_RETURN * find_last_item( FL_OBJECT * obj ) { FL_POPUP_ENTRY *ec = ( ( FLI_SELECT_SPEC * ) obj->spec )->popup->entries, *e = ec->next; for ( ; e != NULL; e = e->next ) if ( IS_ACTIVATABLE( e ) ) ec = e; if ( ec != NULL ) return fli_set_popup_return( ec ); return NULL; } /*************************************** * Returns the next "activatable" entry of a select object after the * currently selected entry ***************************************/ static FL_POPUP_RETURN * find_next_item( FL_OBJECT * obj ) { FL_POPUP_ENTRY *e; FLI_SELECT_SPEC *sp = obj->spec; for ( e = sp->sel->entry->next; e != NULL; e = e->next ) if ( IS_ACTIVATABLE( e ) ) return fli_set_popup_return( e ); return find_first_item( obj );; } /*************************************** * Returns the previous "activatable" entry of a select object before the * currently selected entry ***************************************/ static FL_POPUP_RETURN * find_prev_item( FL_OBJECT * obj ) { FL_POPUP_ENTRY *e; FLI_SELECT_SPEC *sp = obj->spec; for ( e = sp->sel->entry->prev; e != NULL; e = e->prev ) if ( IS_ACTIVATABLE( e ) ) return fli_set_popup_return( e ); return find_last_item( obj ); } /*************************************** * Draws select objects of type FL_NORMAL_SELECT and FL_MENU_SELECT ***************************************/ static void draw_select( FL_OBJECT * obj ) { FL_COLOR color; FLI_SELECT_SPEC *sp = obj->spec; int bw = FL_abs( obj->bw ) + ( obj->bw > 0 ); int box_w = 0; color = ( obj->belowmouse && sp->popup ) ? obj->col2 : obj->col1; /* Draw the box of the object, possibly lowered if the object is pushed */ if ( FL_IS_UPBOX( obj->boxtype ) && obj->pushed ) fl_drw_box( FL_TO_DOWNBOX( obj->boxtype ), obj->x, obj->y, obj->w, obj->h, color, obj->bw ); else fl_drw_box( obj->boxtype, obj->x, obj->y, obj->w, obj->h, color, obj->bw ); /* The FL_MENU_SELECT type has a small raised box on the right hand side */ if ( obj->type == FL_MENU_SELECT ) { int box_x, box_y, box_h = FL_max( 6 + ( obj->bw > 0 ), 0.1 * obj->h ), box_bw = - FL_max( bw - ( obj->bw > 0 ), 1 ); box_w = FL_max( 0.11 * obj->w, 13 ); if ( box_w <= obj->w - 2 * bw && box_h <= obj->h - 2 * bw && box_w >= 2 * box_bw && box_h >= 2 * box_bw ) { box_x = obj->x + obj->w -box_w - bw - 2; box_y = obj->y + ( obj->h - box_h ) / 2; fl_drw_box( FL_UP_BOX, box_x, box_y, box_w, box_h, obj->col1, box_bw ); box_w += 3; } } if ( sp->sel && sp->sel->label && *sp->sel->label ) { fl_set_text_clipping( obj->x + bw, obj->y + bw, obj->w - box_w - 2 * bw, obj->h - 2 * bw ); fl_drw_text( sp->align, obj->x + bw, obj->y + bw, obj->w - box_w - 2 * bw, obj->h - 2 * bw, sp->color, sp->style, sp->size, sp->sel->label ); fl_unset_text_clipping( ); } } /*************************************** * Draws select objects of type FL_DROPLIST_SELECT ***************************************/ static void draw_droplist( FL_OBJECT * obj ) { int box_x = obj->x, box_y = obj->y, box_w, box_h, button_x, button_y, button_w, button_h; FL_COLOR color; FLI_SELECT_SPEC *sp = obj->spec; int bw = FL_abs( obj->bw ) + ( obj->bw > 0 ); /* Calculate the size of the box with the arrow - if the object is higher than wide place it below the text of the currently selected item */ if ( obj->w >= obj->h ) { button_x = obj->x + obj->w - obj->h; button_y = obj->y; button_w = button_h = obj->h; box_w = obj->w - obj->h; box_h = obj->h; } else { button_x = obj->x; button_y = obj->y + obj->h - obj->w; button_w = button_h = obj->w; box_w = obj->w; box_h = obj->h - obj->w; } color = ( obj->belowmouse && sp->popup ) ? obj->col2 : obj->col1; /* Draw the box for the text of the selected item */ fl_drw_box( obj->boxtype, box_x, box_y, box_w, box_h, obj->col1, obj->bw ); /* Draw the box for the arrow button, possibly lowered if the object is pushed */ if ( FL_IS_UPBOX( obj->boxtype ) && obj->pushed ) fl_drw_box( FL_TO_DOWNBOX( obj->boxtype ), button_x, button_y, button_w, button_h, color, obj->bw ); else fl_drw_box( obj->boxtype, button_x, button_y, button_w, button_h, color, obj->bw ); /* Draw the arrow */ fl_drw_text( FL_ALIGN_CENTER, button_x + bw, button_y + bw, button_w - 2 * bw, button_h - 2 * bw, sp->color, 0, 0, "@#2->" ); /* Draw the text of the currently selected item */ if ( sp->sel && sp->sel->label && *sp->sel->label ) { fl_set_text_clipping( box_x + bw, box_y + bw, box_w - 2 * bw, box_h - 2 * bw ); fl_drw_text( sp->align, box_x + bw, box_y + bw, box_w - 2 * bw, box_h - 2 * bw, sp->color, sp->style, sp->size, sp->sel->label ); fl_unset_text_clipping( ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/interpol.c0000644000175000017500000000561211376221254015003 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file interpol.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * interpol1 interpolates a one-dimensional non-uniform * tabulated data onto a working grid, grid, using * nth order Lagrangian polynomial */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" /*************************************** ***************************************/ int fl_interpolate( const float * wx, const float * wy, int nin, float * x, float * y, double grid, int ndeg ) { int i, j, k, l, jo, ih, im, idm, nout; double term, accum; if ( nin <= ndeg ) { M_warn( "fl_interpolate", "too few points in interpol\n" ); return -1; } nout = ( wx[ nin - 1 ] - wx[ 0 ] ) / grid + 1.01; x[ 0 ] = wx[ 0 ]; y[ 0 ] = wy[ 0 ]; /* Start the main loop */ jo = 0; for ( i = 1; i < nout; i++ ) { /* Better than x[i] = x[i-1] + grid; */ x[ i ] = x[ 0 ] + i * grid; /* Center */ j = jo; ih = nin; while ( ih - j > 1 ) { im = ( ih + j ) / 2; if ( x[ i ] > wx[ im ] ) j = im; else ih = im; } jo = j; j = j - ndeg / 2; if ( j < 0 ) j = 0; if ( j > nin - ndeg - 1 ) j = nin - ndeg - 1; /* Interpolate */ accum = 0.0; idm = j + ndeg; for ( l = j; l <= idm; l++ ) { term = wy[ l ]; for ( k = j; k <= idm; k++ ) { if ( l != k ) term *= ( double ) ( x[ i ] - wx[ k ] ) / ( wx[ l ] - wx[ k ] ); } accum += term; } y[ i ] = accum; } /* Make sure the ends are free of numerical errors */ x[ nout - 1 ] = wx[ nin - 1 ]; y[ nout - 1 ] = wy[ nin - 1 ]; return nout; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/combo.c0000644000175000017500000000474111247055071014247 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file combo.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * All Buttons. Additional button class can be added via * fl_add_button_class and fl_create_generic_button */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "flinternal.h" typedef struct { FL_OBJECT * input; FL_OBJECT * browser; } SPEC; /*************************************** ***************************************/ static int handle( FL_OBJECT * ob FL_UNUSED_ARG, int ev FL_UNUSED_ARG, int mx FL_UNUSED_ARG, int my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * xev FL_UNUSED_ARG ) { return 0; } /*************************************** * creates an object ***************************************/ FL_OBJECT * fl_create_combobox( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_make_object(FL_COMBOBOX, type, x, y, w, h, label, handle); return ob; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_combobox( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_create_combobox(type, x, y, w, h, label); fl_add_object(fl_current_form, ob); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/goodie_alert.c0000644000175000017500000001576011253012732015602 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file goodie_alert.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" /****************** Alert dialog ********************{**/ typedef struct { FL_FORM * form; FL_OBJECT * str; FL_OBJECT * but; FL_OBJECT * title; } FD_alert; static FD_alert *fd_alert; /*************************************** ***************************************/ static FD_alert * create_alert( const char * title, const char * msg ) { FD_alert *fdui = fl_calloc( 1, sizeof *fdui ); int oldy = fli_inverted_y; int oldu = fl_get_coordunit( ); int style, size; int w_tit = 0, h_tit = 0, w_msg = 0, h_msg = 0, w_but = 0, h_but; int box_w, box_h, but_w; FL_OBJECT *ob; char but_text[ 256 ] = "Dismiss"; fli_inverted_y = 0; fl_set_coordunit( FL_COORD_PIXEL ); fli_get_goodies_font( &style, &size ); if ( title ) fl_get_string_dimension( FL_BOLD_STYLE, FL_NORMAL_SIZE, title, strlen( title ), &w_tit, &h_tit ); if ( msg ) fl_get_string_dimension( style, size, msg, strlen( msg ), &w_msg, &h_msg ); fl_get_resource( FLAlertDismissLabel, NULL, FL_STRING, NULL, but_text, 256 ); fl_get_string_dimension( style, size, but_text, strlen( but_text ), &w_but, &h_but ); but_w = FL_max( 90, w_but + 20 ); box_w = FL_max( 400, FL_max( FL_max( w_tit, w_msg ), but_w ) + 80 ); box_h = FL_max( h_tit + 20, 30 ) + 5 + h_msg + 30 + h_but + 20; fdui->form = fl_bgn_form( FL_NO_BOX, box_w, box_h ); fl_set_form_title( fdui->form, "Alert" ); fli_get_goodie_title( fdui->form, FLAlertTitle ); ob = fl_add_box( FL_UP_BOX, 0, 0, box_w, box_h, "" ); fdui->title = fl_add_box( FL_FLAT_BOX, 60, 10, box_w - 80, h_tit, title ? title : "" ); fl_set_object_lstyle( fdui->title, FL_BOLD_STYLE ); fl_set_object_lsize( fdui->title, FL_NORMAL_SIZE ); fli_add_warn_icon( 8, h_tit + 20 - 15, 35, 35 ); fl_add_box( FL_FLAT_BOX, 50, h_tit + 20, box_w - 60, 5, "@DnLine" ); fdui->str = fl_add_text( FL_FLAT_BOX, 60, h_tit + 35, box_w - 80, h_msg + 10, msg ? msg : "" ); fl_set_object_lalign( fdui->str, FL_ALIGN_CENTER ); fl_set_object_lstyle( fdui->str, style ); fl_set_object_lsize( fdui->str, size ); fdui->but = fl_add_button( FL_RETURN_BUTTON, ( box_w - but_w ) / 2, box_h - h_but - 20, but_w, h_but + 10, but_text ); fl_set_object_lstyle( fdui->but, style ); fl_set_object_lsize( fdui->but, size ); fl_set_form_hotobject( fdui->form, fdui->but ); fl_end_form( ); fl_register_raw_callback( fdui->form, FL_ALL_EVENT, fli_goodies_preemptive ); fl_set_form_atclose( fdui->form, fl_goodies_atclose, fdui->but ); fdui->form->fdui = fdui; fli_inverted_y = oldy; fl_set_coordunit( oldu ); return fdui; } /*************************************** ***************************************/ static void show_it( const char * title, const char * msg, int c ) { if ( fd_alert ) { fl_hide_form( fd_alert->form ); fl_free_form( fd_alert->form ); fd_alert = NULL; } fl_deactivate_all_forms( ); fd_alert = create_alert( title, msg ); fl_show_form( fd_alert->form, c ? FL_PLACE_CENTER : FL_PLACE_HOTSPOT, FL_TRANSIENT, fd_alert->form->label ); fl_update_display( 1 ); while ( fl_do_only_forms( ) != fd_alert->but ) /* empty */ ; fl_hide_form( fd_alert->form ); fl_free_form( fd_alert->form ); fl_safe_free( fd_alert ); fl_activate_all_forms( ); } /*************************************** * Show a simple message with an alert icon and a dismiss button ***************************************/ void fl_show_alert( const char * title, const char * str1, const char * str2, int c ) { char *buf; buf= fl_malloc( ( str1 ? strlen( str1 ) : 0 ) + 1 + ( str2 ? strlen( str2 ) : 0 ) + 1 ); sprintf( buf,"%s\n%s", str1 ? str1 : "", str2 ? str2 : "" ); show_it( title, buf, c ); fl_free( buf ); } /*************************************** ***************************************/ void fl_show_alert2( int c, const char * fmt, ... ) { char *buf, *p; int len; int written; va_list ap; if ( ! fmt || ! * fmt ) { M_warn( "fl_show_msg", "NULL or empty format string" ); return; } /* Try to come up with an estimate of the length required for the whole string */ len = strlen( fmt ) + 1; for ( p = strchr( fmt, '%' ); p; p = strchr( ++p, '%' ) ) len += 15; buf = fl_malloc( len ); while ( 1 ) { va_start( ap, fmt ); written = fl_vsnprintf( buf, len, fmt, ap ); va_end( ap ); /* Take care: e.g. in older libc versions a negative value got returned if the buffer wasn't large enough while newer ones follow C99 and return the length of the string that would be needed (but without the trailing '\0') */ if ( written > -1 && written < len ) break; len = written < 0 ? ( 2 * len ) : ( written + 1 ); buf = fl_realloc( buf, len ); } p = strchr( buf, '\f' ); if ( p ) *p++ = '\0'; else p = NULL; show_it( buf, p, c ); } /*************************************** ***************************************/ void fl_hide_alert( void ) { if ( fd_alert && fd_alert->form->visible ) fl_trigger_object( fd_alert->but ); else M_warn( "fl_hide_alert", "No alert box is shown" ); } /*************************************** ***************************************/ void fli_alert_cleanup( void ) { fl_safe_free( fd_alert ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/input.c0000644000175000017500000021713311376175157014323 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file input.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * XForms Class FL_INPUT * handle normal user inputs and exchange data with other * applications via the X Selection machnism. * * Data structure is grossly wrong and very inefficient. * Need to complete overhaul this someday. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include #include #include #define H_PAD ( sp->charh ) /* how much to scroll each time */ #define FL_VALIDATE FL_INPUTVALIDATOR enum { COMPLETE, PARTIAL, VSLIDER, HSLIDER = 4 }; /* Extra information need for input boxes. */ typedef struct { char * str; /* the input text */ FL_COLOR textcol; /* text color */ FL_COLOR curscol; /* cursor color */ int position; /* cursor position (in chars) */ int beginrange; /* start of the range */ int endrange; /* end of the range */ int size; /* size of the string */ int changed; /* whether the field has changed */ int drawtype; /* if to draw text with background */ int noscroll; /* true if no scrollis allowed */ int maxchars; /* limit for normal_input */ int attrib1; int attrib2; FL_VALIDATE validate; /* scroll stuff. */ FL_OBJECT * dummy; /* only for the size of composite */ FL_OBJECT * hscroll; FL_OBJECT * vscroll; FL_OBJECT * input; int xoffset; int yoffset; int screenlines; int topline; int lines; /* total number of lines in the field */ int xpos, /* current cursor position in char,line */ ypos; int cur_pixels; /* current line length in pixels */ int max_pixels; /* max length of all lines */ int max_pixels_line; int charh; /* character height */ int h, /* text area */ w; double hsize, vsize; double hval, vval; double hinc1, hinc2; double vinc1, vinc2; int h_pref, /* scrollbar preference */ v_pref; int vw, vw_def; int hh, hh_def; int h_on, v_on; int dead_area, attrib; int no_cursor; int field_char; } FLI_INPUT_SPEC; static void correct_topline( FLI_INPUT_SPEC *, int * ); static void redraw_scrollbar( FL_OBJECT * ); static int make_line_visible( FL_OBJECT *, int ); static int make_char_visible( FL_OBJECT *, int ); static void copy_attributes( FL_OBJECT *, FL_OBJECT * ); static void make_cursor_visible( FL_OBJECT *, int, int ); static int date_validator( FL_OBJECT *, const char *, const char *, int ); static int float_int_validator( FL_OBJECT *, const char *, const char *, int ); enum { NORMAL_SELECT, WORD_SELECT, LINE_SELECT }; /*************************************** ***************************************/ static void get_margin( int btype, int bw, FL_Coord * xm, FL_Coord * ym ) { if ( btype == FL_FLAT_BOX || btype == FL_NO_BOX || btype == FL_FRAME_BOX || btype == FL_EMBOSSED_BOX ) { *xm = bw + 1; *ym = 0.7 * bw + 1; } else { *xm = 2 * bw + ( bw == 1 ); *ym = bw + 1 + ( bw == 1 ); } } /*************************************** * Check the size of scrollbars and input field. No drawing is allowed ***************************************/ static void check_scrollbar_size( FL_OBJECT * obj ) { FLI_INPUT_SPEC *sp = obj->spec; FL_Coord xmargin, ymargin; int bw = FL_abs( obj->bw ); int delta; int h_on = sp->h_on, v_on = sp->v_on; int max_pixels = sp->max_pixels + H_PAD; if ( sp->input->type != FL_MULTILINE_INPUT ) return; /* Compute the real input box size */ sp->input->x = sp->dummy->x; sp->input->y = sp->dummy->y; get_margin( sp->input->boxtype, bw, &xmargin, &ymargin ); sp->charh = fl_get_char_height( sp->input->lstyle, sp->input->lsize, 0, 0 ); /* See how many (potential) lines we can have */ sp->screenlines = ( sp->dummy->h - 2.0 * ymargin ) / sp->charh + 0.001; sp->v_on = sp->v_pref == FL_ON || ( sp->screenlines && sp->screenlines < sp->lines && sp->v_pref != FL_OFF ); if ( sp->v_on ) { sp->vw = sp->vw_def; sp->vscroll->x = sp->input->x + sp->dummy->w - sp->vw; sp->vscroll->y = sp->input->y; sp->vscroll->w = sp->vw; fli_set_object_visibility( sp->vscroll, FL_VISIBLE ); } else { sp->vw = 0; fli_set_object_visibility( sp->vscroll, FL_INVISIBLE ); } sp->input->w = sp->dummy->w - sp->vw; sp->h_on = sp->h_pref == FL_ON || ( max_pixels > sp->w && sp->h_pref != FL_OFF ); if ( sp->h_on ) { sp->h_on = 1; sp->hh = sp->hh_def; sp->hscroll->x = sp->input->x; sp->hscroll->y = sp->input->y + sp->dummy->h - sp->hh; sp->hscroll->h = sp->hh; fli_set_object_visibility( sp->hscroll, FL_VISIBLE ); if ( ( delta = max_pixels - sp->w ) > 0 ) { sp->hsize = ( double ) sp->w / max_pixels; sp->hval = ( double ) sp->xoffset / delta; sp->hinc1 = 8.0 * sp->charh / delta; sp->hinc2 = ( sp->charh - 2.0 ) / delta; } else sp->hsize = 1.0; } else { sp->hh = 0; fli_set_object_visibility( sp->hscroll, FL_INVISIBLE ); } sp->input->h = sp->dummy->h - sp->hh; sp->h = sp->input->h - 2 * ymargin; sp->screenlines = ( double ) sp->h / sp->charh + 0.001; if ( ! sp->v_on && sp->screenlines < sp->lines && sp->h_pref != FL_OFF ) { sp->v_on = 1; sp->vw = sp->vw_def; sp->vscroll->x = sp->input->x + sp->dummy->w - sp->vw; sp->vscroll->y = sp->input->y; sp->vscroll->visible = 1; sp->input->w = sp->dummy->w - sp->vw; } if ( sp->v_on && ( delta = sp->lines - sp->screenlines ) > 0 ) { sp->vval = ( sp->topline - 1.0 ) / delta; sp->vsize = ( double ) sp->screenlines / sp->lines; sp->vinc1 = ( sp->screenlines - 0.99 ) / delta; sp->vinc2 = 1.01 / delta; } else sp->vsize = 1.0; sp->hscroll->w = sp->input->w; fl_notify_object( sp->hscroll, FL_RESIZED ); sp->vscroll->h = sp->input->h; fl_notify_object( sp->vscroll, FL_RESIZED ); sp->w = sp->input->w - 2 * xmargin; if ( h_on != sp->h_on || v_on != sp->v_on ) { sp->attrib = 1; sp->dead_area = ! ( sp->h_on ^ sp->v_on ); } } /*************************************** ***************************************/ static void draw_input( FL_OBJECT * obj ) { FLI_INPUT_SPEC *sp = obj->spec; FL_COLOR col, textcol; FL_COLOR curscol = fli_dithered( fl_vmode ) ? FL_BLACK : sp->curscol; int valign; FL_Coord xmargin, ymargin; int bw = FL_abs( obj->bw ); int cx, cy; int max_pixels, max_pixels_line; static char *saved; get_margin( obj->boxtype, bw, &xmargin, &ymargin ); sp->w = sp->input->w - 2 * xmargin; sp->h = sp->input->h - 2 * ymargin; col = obj->focus ? obj->col2 : obj->col1; /* Partial means only text has changed. Internally DrawImage string will be used instead of normal string. --Unimplemented yet */ sp->drawtype = COMPLETE; if ( sp->drawtype == COMPLETE ) { fl_drw_box( obj->boxtype, sp->input->x, sp->input->y, sp->input->w, sp->input->h, col, obj->bw ); fl_draw_object_label_outside( obj ); } valign = obj->type == FL_MULTILINE_INPUT ? FL_ALIGN_TOP : FL_ALIGN_CENTER; sp->charh = fl_get_char_height( obj->lstyle, obj->lsize, 0, 0 ); textcol = sp->textcol; if ( obj->type == FL_SECRET_INPUT ) { saved = sp->str; sp->str = fl_strdup( sp->str ); memset( sp->str, sp->field_char, strlen( saved ) ); } cx = sp->input->x + xmargin; cy = sp->input->y + ymargin; fl_set_text_clipping( cx, cy, sp->w, sp->h ); max_pixels = fli_drw_string( FL_ALIGN_LEFT, valign, /* Align left cent. */ cx - sp->xoffset, /* Bounding box */ cy - sp->yoffset, sp->w + sp->xoffset, sp->h + sp->yoffset, -1, /* Do clipping */ col, textcol, curscol, obj->lstyle, obj->lsize, sp->no_cursor ? -1 : sp->position, sp->beginrange, sp->endrange, sp->str, sp->drawtype != COMPLETE, sp->topline, sp->topline + sp->screenlines, 0 ); max_pixels_line = fli_get_maxpixel_line( ) + 1; if ( max_pixels > sp->max_pixels || ( sp->max_pixels_line >= sp->topline && sp->max_pixels_line <= sp->topline + sp->screenlines ) ) { sp->max_pixels = max_pixels; sp->max_pixels_line = max_pixels_line; } fl_unset_text_clipping( ); if ( obj->type == FL_SECRET_INPUT ) { fl_safe_free( sp->str ); sp->str = saved; } sp->drawtype = COMPLETE; } #define DELIM( c ) ( c == ' ' || c == ',' || c == '.' || c == '\n' ) /*************************************** * figures out selection region of mouse. Returns whether anything changed ***************************************/ static int handle_select( FL_Coord mx, FL_Coord my, FL_OBJECT * obj, int mouse, int what ) { FLI_INPUT_SPEC *sp = obj->spec; int thepos, valign, n; int oldpos = sp->position, oldbeg = sp->beginrange, oldend = sp->endrange; int bw = FL_abs( obj->bw ); FL_Coord xmargin, ymargin; if ( obj->type == FL_HIDDEN_INPUT ) return 0; /* Compute the mouse position in the string */ valign = obj->type == FL_MULTILINE_INPUT ? FL_ALIGN_TOP : FL_ALIGN_CENTER; get_margin( obj->boxtype, bw, &xmargin, &ymargin ); thepos = fli_get_pos_in_string( FL_ALIGN_LEFT, valign, sp->input->x + xmargin - sp->xoffset, sp->input->y + ymargin - sp->yoffset, sp->w + sp->xoffset, sp->h + sp->yoffset, obj->lstyle, obj->lsize, mx, my, sp->str, &sp->xpos, &sp->ypos ); if ( what == WORD_SELECT ) { if ( sp->str[ thepos ] == ' ' ) return 0; for ( n = thepos; sp->str[ n ] && ! DELIM( sp->str[ n ] ); n++ ) /* empty */ ; sp->endrange = n; for ( n = thepos; n >= 0 && ! DELIM( sp->str[ n ] ); n-- ) /* empty */ ; sp->beginrange = n + 1; } else if ( what == LINE_SELECT ) { for ( n = thepos; sp->str[ n ] && sp->str[ n ] != '\n'; n++ ) /* empty */ ; sp->endrange = n; for ( n = thepos; n >= 0 && sp->str[ n ] != '\n'; n-- ) /* empty */ ; sp->beginrange = n + 1; } else { /* Adapt the range */ if ( mouse ) { fl_freeze_form( obj->form ); make_line_visible( obj, sp->ypos ); make_char_visible( obj, sp->xpos ); fl_unfreeze_form( obj->form ); if ( thepos < sp->position ) { sp->endrange = sp->position; sp->beginrange = thepos; } else { sp->beginrange = sp->position; sp->endrange = thepos; } } else { sp->position = sp->beginrange = thepos; sp->endrange = -1; } } if ( sp->beginrange == sp->endrange ) sp->endrange = -1; if ( sp->beginrange < 0 ) sp->beginrange = 0; return oldpos != sp->position || oldbeg != sp->beginrange || oldend != sp->endrange; } /*************************************** * This is not XCUTBUFFER. It is generated by ^K and can be * recalled by ^Y ***************************************/ #define MAXCBLEN 512 static char cutbuf[ MAXCBLEN ]; /*************************************** * Delete a single char. dir =1 for next, dir -1 for prev ***************************************/ static void delete_char( FLI_INPUT_SPEC * sp, int dir, int slen ) { int i = sp->position - ( dir < 0 ); if ( sp->str[ i ] == '\n' ) { sp->lines--; sp->ypos -= dir < 0; } memmove( sp->str + i, sp->str + i + 1, slen - i ); sp->position -= dir < 0; } /*************************************** * Removes a piece of the string ***************************************/ static void delete_piece( FL_OBJECT * obj, int start, int end ) { FLI_INPUT_SPEC *sp = obj->spec; memmove( sp->str + start, sp->str + end + 1, strlen( sp->str + end ) ); sp->position = start; /* this can be expensive TODO */ sp->lines = fl_get_input_numberoflines( obj ); fl_get_input_cursorpos( obj, &sp->xpos, &sp->ypos ); } /*************************************** * Returns the width of the substring of the input field ***************************************/ #if 1 #define get_substring_width( o, b, e ) \ fl_get_string_width( ( o )->lstyle, ( o )->lsize, \ ( ( FLI_INPUT_SPEC * ) ( o )->spec )->str + ( b ), \ ( e ) - ( b ) ) #else static int get_substring_width( FL_OBJECT * obj, int startpos, int endpos ) { FLI_INPUT_SPEC *sp = obj->spec; char *str = sp->str + startpos; char tmpch = sp->str[endpos]; /* Save end position */ int wid; /* The required width */ sp->str[ endpos ] = '\0'; wid = fl_get_string_width( obj->lstyle, obj->lsize, str, endpos - startpos ); sp->str[ endpos ] = tmpch; /* Restore end position */ return wid; } #endif #define IsRegular( k ) ( ( k ) == '\n' \ || ( key >= 32 && key <= 255 && key != 127 ) ) /*************************************** * Editing command. Need 4 bytes. Byte1 for normal ASCII, byte2 for * special keysyms, such as PageUP etc. Byte 3 is used by Latin3 etc. * Byte 4 will be used to indicate modifiers. ***************************************/ #define METAMASK FL_ALT_MASK static FL_EditKeymap kmap; static int paste_it( FL_OBJECT *, const unsigned char *, int ); static void set_default_keymap( int ); #define set_to_eol( p ) while ( ( p ) < slen && sp->str[ p ] != '\n' ) ( p )++ /*************************************** * cursor moved. No editing. ***************************************/ static void handle_movement( FL_OBJECT * obj, int key, int slen, int startpos, int kmask ) { FLI_INPUT_SPEC *sp = obj->spec; int ready, width, i, oldwidth, tt; if ( IsHome( key ) ) { fl_set_input_topline( obj, 1 ); sp->position = 0; sp->xoffset = 0; sp->ypos = 1; } else if ( IsPageDown( key ) ) fl_set_input_topline( obj, sp->topline + sp->screenlines ); else if ( IsHalfPageDown( key ) ) fl_set_input_topline( obj, sp->topline + sp->screenlines / 2 ); else if ( Is1LineDown( key ) ) fl_set_input_topline( obj, sp->topline + 1 ); else if ( IsPageUp( key ) ) fl_set_input_topline( obj, sp->topline - sp->screenlines ); else if ( IsHalfPageUp( key ) ) fl_set_input_topline( obj, sp->topline - sp->screenlines / 2 ); else if ( Is1LineUp( key ) ) fl_set_input_topline( obj, sp->topline - 1 ); else if ( key == '\t' || key == 12 ) /* empty */ ; else if ( IsEnd( key ) ) { fl_set_input_topline( obj, sp->lines ); sp->position = slen; fl_get_input_cursorpos( obj, &sp->xpos, &sp->ypos ); } else if ( IsLeft( key ) ) /* Left key */ { if ( shiftkey_down( kmask ) ) { sp->position = startpos; sp->xoffset = 0; } else if ( sp->position > 0 ) sp->position--; if ( sp->str[ sp->position ] == '\n' ) { sp->ypos--; /* Compute starting position of current line */ startpos = sp->position; while ( startpos > 0 && sp->str[ startpos - 1 ] != '\n' ) startpos--; } make_cursor_visible( obj, startpos, -1 ); } else if ( IsRight( key ) || key == kmap.moveto_eol ) { if ( shiftkey_down( kmask ) || key == kmap.moveto_eol ) set_to_eol( sp->position ); else if ( sp->position < slen ) { if ( sp->str[ sp->position ] == '\n' ) { sp->ypos++; sp->xoffset = 0; startpos = sp->position + 1; } sp->position++; } make_cursor_visible( obj, startpos, 1 ); } else if ( IsUp( key ) ) /* Up key */ { if ( startpos != 0 ) { width = get_substring_width( obj, startpos, sp->position ); i = startpos - 1; while ( i > 0 && sp->str[ i - 1 ] != '\n' ) i--; oldwidth = 0.0; sp->position = i; ready = sp->str[ sp->position ] == '\n'; while ( ! ready ) { tt = get_substring_width( obj, i, sp->position + 1 ); ready = 0.5 * ( oldwidth + tt ) >= width; oldwidth = tt; if ( ! ready ) sp->position++; if ( sp->str[ sp->position ] == '\n' ) ready = 1; } if ( --sp->ypos < 1 ) sp->ypos = 1; } } else if ( IsDown( key ) ) /* Down key */ { width = get_substring_width( obj, startpos, sp->position ); i = sp->position + 1; while ( i < slen && sp->str[ i - 1 ] != '\n' ) i++; if ( i < slen ) { oldwidth = 0.0; sp->position = i; ready = sp->position == slen || sp->str[ sp->position ] == '\n'; while ( ! ready ) { tt = get_substring_width( obj, i, sp->position + 1 ); ready = 0.5 * ( oldwidth + tt ) >= width; oldwidth = tt; if ( ! ready ) sp->position++; if ( sp->position == slen || sp->str[ sp->position ] == '\n' ) ready = 1; } } else { sp->position = slen; sp->xoffset = 0; } if ( ++sp->ypos > sp->lines ) sp->ypos = sp->lines; } else if ( key == kmap.moveto_bol ) { sp->position = startpos; sp->xoffset = 0; } else if ( key == kmap.moveto_prev_word ) { if ( sp->position > 0 ) sp->position--; while ( sp->position > 0 && ( sp->str[ sp->position ] == ' ' || sp->str[ sp->position ] == '\n' ) ) { if ( sp->str[ sp->position ] == '\n' ) sp->ypos--; sp->position--; } while ( sp->position > 0 && sp->str[ sp->position ] != ' ' && sp->str[ sp->position ] != '\n' ) sp->position--; if ( sp->position > 0 ) sp->position++; } else if ( key == kmap.moveto_next_word ) { i = sp->position; while ( i < slen && ( sp->str[ i ] == ' ' || sp->str[ i ] == '\n' ) ) { if ( sp->str[ i ] == '\n' ) sp->ypos++; i++; } while ( i < slen && sp->str[ i ] != ' ' && sp->str[ i ] != '\n' ) i++; sp->position = i; } } /*************************************** * Editing ***************************************/ static int handle_edit( FL_OBJECT * obj, int key, int slen, int startpos ) { FLI_INPUT_SPEC *sp = obj->spec; int ret = FL_RETURN_CHANGED, i, j; int prev = 1; if ( key == kmap.del_prev_char || key == kmap.backspace ) { prev = -1; if ( sp->endrange >= 0 ) delete_piece( obj, sp->beginrange, sp->endrange - 1 ); else if ( sp->position > 0 ) delete_char( sp, -1, slen ); else ret = FL_RETURN_NONE; } else if ( key == kmap.del_next_char ) { if ( sp->endrange >= 0 ) delete_piece( obj, sp->beginrange, sp->endrange - 1 ); else if ( sp->position < slen ) delete_char( sp, 1, slen ); else ret = FL_RETURN_NONE; } else if ( key == kmap.del_next_word ) { i = sp->position; while ( i < slen && ( sp->str[ i ] == ' ' || sp->str[ i ] == '\n' ) ) i++; while ( i < slen && sp->str[ i ] != ' ' && sp->str[ i ] != '\n' ) i++; delete_piece( obj, sp->position, i - 1 ); } else if ( key == kmap.del_prev_word ) { prev = -1; j = sp->position; if ( sp->position > 0 ) sp->position--; while ( sp->position > 0 && ( sp->str[ sp->position ] == ' ' || sp->str[ sp->position ] == '\n' ) ) sp->position--; while ( sp->position > 0 && sp->str[ sp->position ] != ' ' && sp->str[ sp->position ] != '\n' ) sp->position--; if ( sp->position != j ) delete_piece( obj, sp->position, j - 1 ); else ret = FL_RETURN_NONE; } else if ( key == kmap.clear_field ) { prev = 0; sp->xoffset = 0; if ( slen > 0 ) delete_piece( obj, 0, slen - 1 ); else ret = FL_RETURN_NONE; } else if ( key == kmap.del_to_eol ) { if ( slen > sp->position ) { if ( sp->str[ sp->position ] != '\n' ) for ( i = sp->position; i < slen && sp->str[ i ] != '\n'; i++ ) /* empty */ ; else i = sp->position + 1; /* Save buffer */ if ( i - sp->position > 1 ) fli_sstrcpy( cutbuf, sp->str + sp->position, FL_min( i - sp->position, MAXCBLEN ) ); delete_piece( obj, sp->position, i - 1 ); } else ret = FL_RETURN_NONE; } else if ( key == kmap.paste ) { paste_it( obj, ( unsigned char * ) cutbuf, strlen( cutbuf ) ); } else if ( key == kmap.transpose ) { if ( sp->position > 0 ) { char t; if ( sp->position < slen && sp->str[ sp->position ] != '\n' ) { t = sp->str[ sp->position - 1 ]; sp->str[ sp->position - 1 ] = sp->str[ sp->position ]; sp->str[ sp->position ] = t; sp->position++; } else { t = sp->str[ sp->position - 2 ]; sp->str[ sp->position - 2 ] = sp->str[ sp->position - 1 ]; sp->str[ sp->position - 1 ] = t; } } } make_cursor_visible( obj, startpos, prev ); return ret; } /*************************************** * Handles a key press, returns whether something has changed ***************************************/ static int handle_key( FL_OBJECT * obj, int key, unsigned int kmask ) { int ret = FL_RETURN_NONE; FLI_INPUT_SPEC *sp = obj->spec; int slen; /* length of the string */ int startpos; /* position of start of current line */ int oldy = sp->ypos; int oldl = sp->lines; int oldx = sp->xoffset; int oldmax = sp->max_pixels; /* Extend field size if required */ slen = strlen( sp->str ); if ( sp->size == slen + 1 ) { sp->size += 8; sp->str = fl_realloc( sp->str, sp->size ); } if ( obj->type == FL_MULTILINE_INPUT && key == '\r' ) key = '\n'; /* Compute starting position of current line */ startpos = sp->position; while ( startpos > 0 && sp->str[ startpos - 1 ] != '\n' ) startpos--; if ( controlkey_down( kmask ) && key > 255 ) key |= FL_CONTROL_MASK; if ( metakey_down( kmask ) ) key |= METAMASK; if ( shiftkey_down( kmask ) ) { if ( key == XK_Up ) key = XK_Home; else if ( key == XK_Down ) key = XK_End; } /* Translate all move key to cursor keys so we can distinguish edit/move keys more easily */ if ( key == kmap.moveto_next_line ) key = XK_Down; else if ( key == kmap.moveto_prev_line ) key = XK_Up; else if ( key == kmap.moveto_prev_char ) key = XK_Left; else if ( key == kmap.moveto_next_char ) key = XK_Right; else if ( key == kmap.moveto_bof ) key = XK_Home; else if ( key == kmap.moveto_eof ) key = XK_End; else if ( key == kmap.moveto_next_page ) key = XK_PageDn; else if ( key == kmap.moveto_prev_page ) key = XK_PageUp; if ( IsRegular( key ) ) /* Normal keys and new line */ { int ok = FL_VALID; char *tmpbuf = 0; int tmppos = 0, tmpxoffset = 0; if ( sp->endrange >= 0 ) { delete_piece( obj, sp->beginrange, sp->endrange - 1 ); slen = strlen( sp->str ); } if ( sp->maxchars > 0 && slen >= sp->maxchars ) { fl_ringbell( 0 ); return FL_RETURN_NONE; } if ( sp->validate ) { tmpbuf = fl_strdup( sp->str ); tmppos = sp->position; tmpxoffset = sp->xoffset; } /* Merge the new character */ memmove( sp->str + sp->position + 1, sp->str + sp->position, slen - sp->position + 1 ); sp->str[ sp->position++ ] = key; if ( key == '\n' ) { sp->lines++; sp->ypos++; sp->xoffset = 0; } else { int tmp = get_substring_width( obj, startpos, sp->position ); /* The extra 4 are there to have enough space for the cursor when it's at the end of the line */ if ( tmp - sp->xoffset > sp->w - 4 ) sp->xoffset = tmp - sp->w + 4 + H_PAD; } ret = FL_RETURN_CHANGED; if ( sp->validate ) { ok = sp->validate( obj, tmpbuf, sp->str, key ); if ( ( ok & ~ FL_RINGBELL ) != FL_VALID ) { ret = FL_RETURN_NONE; strcpy( sp->str, tmpbuf ); sp->position = tmppos; sp->xoffset = tmpxoffset; if ( key == '\n' ) { sp->lines--; sp->ypos--; } } if ( ok & FL_RINGBELL ) fl_ringbell( 0 ); fl_free( tmpbuf ); } } else if ( IsCursorKey( key ) || key == kmap.moveto_eol || key == kmap.moveto_bol || key == kmap.moveto_prev_word || key == kmap.moveto_next_word || Is1LineUp( key ) || Is1LineDown( key ) || IsHalfPageUp( key ) || IsHalfPageDown( key ) ) handle_movement( obj, key, slen, startpos, kmask ); else ret = handle_edit( obj, key, slen, startpos ); sp->endrange = -1; if ( ret != FL_RETURN_NONE ) { int junk; fl_get_string_dimension( obj->lstyle, obj->lsize, sp->str, strlen( sp->str ), &sp->max_pixels, &junk ); } if ( sp->noscroll ) { sp->xoffset = sp->yoffset = 0; sp->topline = sp->ypos = 1; oldmax = sp->max_pixels; } fl_freeze_form( obj->form ); if ( oldl != sp->lines || oldy != sp->ypos || oldx != sp->xoffset || oldmax != sp->max_pixels ) { check_scrollbar_size( obj ); make_line_visible( obj, sp->ypos ); redraw_scrollbar( obj ); } fl_redraw_object( sp->input ); fl_unfreeze_form( obj->form ); return ret; } /*************************************** * Given nb bytes of stuff, paste it into the input field. ***************************************/ static int paste_it( FL_OBJECT * obj, const unsigned char * thebytes, int nb ) { int status = FL_RETURN_NONE; FLI_INPUT_SPEC *sp = obj->spec; int slen; unsigned char *p; /* For non-text input we must check each individual character */ if ( obj->type == FL_FLOAT_INPUT || obj->type == FL_INT_INPUT || sp->maxchars > 0 ) for ( ; nb; nb-- ) status |= handle_key( obj, *thebytes++, 0 ); else { /* Must not allow single line input field contain tab or newline */ if ( obj->type == FL_NORMAL_INPUT || obj->type == FL_SECRET_INPUT ) { if ( ( p = ( unsigned char * ) strchr( ( char * ) thebytes, '\t' ) ) ) nb = p - thebytes; if ( ( p = ( unsigned char * ) strchr( ( char * ) thebytes, '\n' ) ) && p - thebytes < nb ) nb = p - thebytes; } /* Increase the buffer if necessary */ slen = strlen( sp->str ); if ( sp->size <= slen + nb + 1 ) { sp->size = slen + nb + 8; sp->str = fl_realloc( sp->str, sp->size ); } /* Shift text after cursor position and then insert the new text */ memmove( sp->str + sp->position + nb, sp->str + sp->position, slen - sp->position + 1 ); memcpy( sp->str + sp->position, thebytes, nb ); sp->position += nb; sp->lines = fl_get_input_numberoflines( obj ); fl_get_input_cursorpos( obj, &sp->xpos, &sp->ypos ); fl_get_string_dimension( obj->lstyle, obj->lsize, sp->str, slen + nb, &sp->max_pixels, &status ); fl_freeze_form( obj->form ); check_scrollbar_size( obj ); make_line_visible( obj, sp->ypos ); fl_redraw_object( sp->input ); redraw_scrollbar( obj ); fl_unfreeze_form( obj->form ); status = FL_RETURN_CHANGED; } return status; } /*************************************** * Callback that gets called when a selection is handled. * It might be called only after handling the input object * is done and in that case we have to insert the object * into the onject queue manually... ***************************************/ /* handle X cut & paste ******************************* */ static int selection_hack = 0; static int gotit_cb( FL_OBJECT * obj, long type FL_UNUSED_ARG, const void * buf, long nb ) { FLI_INPUT_SPEC *sp = obj->spec; sp->changed |= paste_it( obj, ( unsigned char * ) buf, nb ); fl_update_display( 0 ); if ( selection_hack && sp->changed ) { selection_hack = sp->changed = 0; obj->returned = FL_RETURN_CHANGED; fli_object_qenter( obj ); } return 0; } /*************************************** * Paste request is handled here. If we do not own the selection, * this will result in an SelectionNotify event that gets handled * by handle_clipboard_event(). And in that case we can't report * the object to have changed back to the application since all * that will happen some time later. Thus we set 'selection_hack' * to indicate to the getit_cb() function to artificially enter * the object into the object queue. ***************************************/ static int do_XPaste( FL_OBJECT * obj ) { int ret = fl_request_clipboard( obj, XA_STRING, gotit_cb ); if ( ret == -1 && obj->how_return == FL_RETURN_CHANGED ) selection_hack = 1; return ret > 0 ? FL_RETURN_CHANGED : FL_RETURN_NONE; } /*************************************** ***************************************/ static int lose_selection( FL_OBJECT * obj, long type FL_UNUSED_ARG ) { FLI_INPUT_SPEC *sp = obj->spec; sp->beginrange = sp->endrange = -1; if ( ! obj->focus ) sp->position = -1; else if ( sp->position < 0 ) sp->position = sp->str ? strlen( sp->str ) : 0; fl_redraw_object( sp->input ); fl_update_display( 0 ); return 0; } /*************************************** ***************************************/ static void do_XCut( FL_OBJECT * obj, int beginrange, int endrange ) { FLI_INPUT_SPEC *sp = obj->spec; char *buff; int nc = endrange - beginrange + 1; if ( nc <= 0 ) return; buff = fl_malloc( nc + 1 ); strncpy( buff, sp->str + beginrange, nc ); buff[ nc ] = '\0'; fl_stuff_clipboard( obj, XA_STRING, buff, nc, lose_selection ); fl_free( buff ); } /*************************************** * Handles an event ***************************************/ static int handle_input( FL_OBJECT * obj, int event, FL_Coord mx, FL_Coord my, int key, void * ev ) { FLI_INPUT_SPEC *sp = obj->spec; static int motion, lx, ly, paste; int ret = FL_RETURN_NONE, val; if ( ( key == FL_MBUTTON4 || key == FL_MBUTTON5 ) && ! fli_handle_mouse_wheel( &event, &key, ev ) ) return ret; switch ( event ) { case FL_ATTRIB : case FL_RESIZED : check_scrollbar_size( obj ); break; case FL_DRAW: /* We always force label outside */ if ( sp->input->type != FL_MULTILINE_INPUT ) { if ( sp->dummy != obj ) /* this can only happen with fdesign */ sp->dummy = sp->input = obj; } sp->dummy->align &= ~FL_ALIGN_INSIDE; copy_attributes( sp->input, sp->dummy ); if ( event == FL_DRAW && sp->input->type != FL_HIDDEN_INPUT ) draw_input( sp->input ); /* fall through */ case FL_DRAWLABEL: if ( sp->input->type != FL_MULTILINE_INPUT ) fl_draw_object_label_outside( sp->input ); else fl_drw_text_beside( sp->dummy->align, sp->input->x, sp->input->y, sp->input->w + sp->vw, sp->input->h + sp->hh, sp->input->lcol, sp->input->lstyle, sp->input->lsize, sp->dummy->label ); break; case FL_FOCUS: if ( obj->type == FL_MULTILINE_INPUT ) sp->dummy->focus = 1; if ( sp->str ) { if ( sp->position < 0 ) sp->position = - sp->position - 1; if ( sp->position > ( int ) strlen( sp->str ) ) sp->position = strlen( sp->str ); } else sp->position = 0; sp->changed = 0; fl_redraw_object( sp->input ); break; case FL_UNFOCUS: if ( ! sp ) break; if ( obj->type == FL_MULTILINE_INPUT ) sp->dummy->focus = 0; if ( sp->position >= 0 ) sp->position = - sp->position - 1; sp->endrange = -1; fl_redraw_object( sp->input ); /* If the event is set to NULL don't validate or report any changes - the call came from either closing the form or from the user changing the focus with the fl_set_focus_object() function. */ if ( ev ) ret = ( sp->changed ? FL_RETURN_CHANGED : FL_RETURN_NONE ) | FL_RETURN_END; break; case FL_MOTION: case FL_UPDATE: motion = ( mx != lx || my != ly ) && ! paste; if ( motion && handle_select( mx, my, obj, 1, NORMAL_SELECT ) ) fl_redraw_object( sp->input ); break; case FL_PUSH: paste = 0; lx = mx; ly = my; if ( key == FL_MBUTTON2 && ( sp->changed = do_XPaste( obj ) ) ) { if ( obj->how_return == FL_RETURN_CHANGED ) sp->changed = 0; ret = FL_RETURN_CHANGED; paste = 1; } else if ( handle_select( mx, my, obj, 0, NORMAL_SELECT ) ) fl_redraw_object( sp->input ); break; case FL_RELEASE: if ( key == FL_MBUTTON1 && motion ) do_XCut( obj, sp->beginrange, sp->endrange - 1 ); motion = 0; break; case FL_DBLCLICK: case FL_TRPLCLICK: if ( handle_select( mx, my, obj, 0, event == FL_DBLCLICK ? WORD_SELECT : LINE_SELECT ) ) { fl_redraw_object( sp->input ); do_XCut( obj, sp->beginrange, sp->endrange ); } break; case FL_KEYPRESS: if ( ( ret = handle_key( obj, key, ( ( XKeyEvent * ) ev )->state ) ) ) { sp->changed = 1; if ( obj->how_return == FL_RETURN_CHANGED ) sp->changed = 0; } break; case FL_FREEMEM: fl_safe_free( ( ( FLI_INPUT_SPEC * ) obj->spec )->str ); fl_safe_free( obj->spec ); break; } if ( ret && sp && sp->validate && event == FL_UNFOCUS && ( val = sp->validate( obj, sp->str, sp->str, 0 ) ) != FL_VALID ) { ret = FL_RETURN_NONE; if ( val & FL_RINGBELL ) { fl_ringbell( 0 ); fl_reset_focus_object( obj ); } } return ret; } /*************************************** * Callback for the vertical scrollbar of multi-line input objects ***************************************/ static void vsl_cb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_INPUT_SPEC *sp = obj->parent->spec; double val = fl_get_scrollbar_value( obj ); int top = val * ( sp->lines - sp->screenlines ) + 1.01; sp->drawtype = VSLIDER; fl_set_input_topline( sp->input, top ); } /*************************************** * Callback for the horizontal scrollbar of multi-line input objects ***************************************/ static void hsl_cb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { FLI_INPUT_SPEC *sp = obj->parent->spec; double val = fl_get_scrollbar_value( obj ); int xoff = val * ( sp->max_pixels - sp->w ) + 0.1; sp->drawtype = HSLIDER; fl_set_input_xoffset( sp->input, xoff ); } /*************************************** * Pre- and post- handlers ***************************************/ static int input_pre( FL_OBJECT * obj, int ev, FL_Coord mx, FL_Coord my, int key, void * xev ) { FL_OBJECT *ext = obj->parent; return ( ext && ext->prehandle ) ? ext->prehandle( ext, ev, mx, my, key, xev ) : 0; } /*************************************** ***************************************/ static int input_post( FL_OBJECT * obj, int ev, FL_Coord mx, FL_Coord my, int key, void * xev ) { FL_OBJECT *ext = obj->parent; return ( ext && ext->posthandle ) ? ext->posthandle( ext, ev, mx, my, key, xev ) : 0; } /*************************************** ***************************************/ static void input_cb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { obj->parent->returned = obj->returned; } /*************************************** * Creates an input object ***************************************/ FL_OBJECT * fl_create_input( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_INPUT_SPEC *sp; set_default_keymap( 0 ); obj = fl_make_object( FL_INPUT, type, x, y, w, h, label, handle_input ); obj->boxtype = FL_INPUT_BOXTYPE; obj->col1 = FL_INPUT_COL1; obj->col2 = FL_INPUT_COL2; obj->align = FL_INPUT_ALIGN; obj->lcol = FL_INPUT_LCOL; obj->lsize = fli_cntl.inputFontSize ? fli_cntl.inputFontSize : FL_DEFAULT_SIZE; obj->set_return = fl_set_input_return; fl_set_object_prehandler( obj, input_pre ); fl_set_object_posthandler( obj, input_post ); obj->wantkey = obj->type == FL_MULTILINE_INPUT ? FL_KEY_ALL : FL_KEY_NORMAL; obj->want_update = 1; obj->input = 1; obj->click_timeout = FL_CLICK_TIMEOUT; obj->spec = sp = fl_calloc( 1, sizeof *sp ); sp->textcol = FL_INPUT_TCOL; sp->curscol = FL_INPUT_CCOL; sp->position = -1; sp->endrange = -1; sp->size = 8; sp->lines = sp->ypos = 1; sp->str = fl_malloc( sp->size ); *sp->str = '\0'; switch ( obj->type ) { case FL_DATE_INPUT : sp->maxchars = 10; break; case FL_SECRET_INPUT : sp->maxchars = 16; break; default : sp->maxchars = 0; } sp->dummy = obj; sp->dummy->spec = sp; sp->input = obj; sp->field_char = ' '; /* Can't remember why validated input return is set to RETURN_END but probably with some reason. Wait until 1.0 to reset it */ if ( obj->type == FL_FLOAT_INPUT || obj->type == FL_INT_INPUT ) { sp->validate = float_int_validator; obj->how_return = FL_RETURN_END; } else if ( obj->type == FL_DATE_INPUT ) { fl_set_input_format( obj, FL_INPUT_MMDD, '/' ); sp->validate = date_validator; obj->how_return = FL_RETURN_END; } fl_set_object_dblbuffer( obj, type != FL_HIDDEN_INPUT ); return obj; } /*************************************** ***************************************/ static int fake_handle( FL_OBJECT * obj, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_INPUT_SPEC *sp = obj->spec; switch ( event ) { case FL_ATTRIB: if ( sp->dummy != obj ) /* this can only happen with fdesign */ sp->dummy = obj; copy_attributes( sp->input, sp->dummy ); /* fall through */ case FL_DRAW: case FL_DRAWLABEL: check_scrollbar_size( obj ); break; } return 0; } /*************************************** * Adds an input object ***************************************/ FL_OBJECT * fl_add_input( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_INPUT_SPEC *sp; int oldu = fl_get_coordunit( ); obj = fl_create_input( type, x, y, w, h, label ); sp = obj->spec; fl_set_coordunit( FL_COORD_PIXEL ); x = obj->x; y = obj->y; w = obj->w; h = obj->h; if ( obj->type == FL_MULTILINE_INPUT ) { fl_set_object_label( obj, NULL ); sp->dummy = fl_create_box( FL_NO_BOX, x, y, w, h, label ); sp->dummy->objclass = FL_INPUT; sp->dummy->type = FL_MULTILINE_INPUT; copy_attributes( sp->dummy, obj ); sp->dummy->handle = fake_handle; sp->dummy->spec = sp; sp->dummy->set_return = fl_set_input_return; fl_add_child( sp->dummy, obj ); sp->hh_def = sp->vw_def = fli_get_default_scrollbarsize( obj ); sp->h_pref = sp->v_pref = FL_AUTO; sp->vscroll = fl_create_scrollbar( fli_context->vscb, x + w - sp->vw_def, y, sp->vw_def, h, NULL ); fl_set_scrollbar_value( sp->vscroll, 0.0 ); fl_set_object_callback( sp->vscroll, vsl_cb, 0 ); fl_set_object_resize( sp->vscroll, FL_RESIZE_NONE ); fl_add_child( sp->dummy, sp->vscroll ); sp->hscroll = fl_create_scrollbar( fli_context->hscb, x, y + h - sp->hh_def, w, sp->hh_def, NULL ); fl_set_scrollbar_value( sp->hscroll, 0.0 ); fl_set_object_callback( sp->hscroll, hsl_cb, 0 ); fl_set_object_resize( sp->hscroll, FL_RESIZE_NONE ); fl_add_child( sp->dummy, sp->hscroll ); fl_set_object_callback( sp->input, input_cb, 0 ); } fl_add_object( fl_current_form, sp->dummy ); fl_set_coordunit( oldu ); /* Set default return policy for the new object */ fl_set_object_return( obj, FL_RETURN_END_CHANGED ); return sp->dummy; } /*************************************** * Sets the particular input string. No checks for validity ***************************************/ void fl_set_input( FL_OBJECT * obj, const char * str ) { FLI_INPUT_SPEC *sp = obj->spec; int len; char *p; if ( ! str ) str = ""; len = strlen( str ); if ( sp->size < len + 1 ) { sp->size = len + 9; sp->str = fl_realloc( sp->str, sp->size ); } strcpy( sp->str, str ); if ( obj->type != FL_MULTILINE_INPUT && ( p = strchr( sp->str, '\n' ) ) ) { *p = '\0'; len = strlen( sp->str ); } /* Set position of cursor in string to the end (if object doesn't has focus must be negative of length of strig minus one) */ if ( sp->position >= 0 ) sp->position = len; else sp->position = - len - 1; sp->endrange = -1; sp->lines = fl_get_input_numberoflines( obj ); fl_get_input_cursorpos( obj, &sp->xpos, &sp->ypos ); /* Get max string width - it's possible that fl_set_input() is used before the form is show, draw_object is a no-op, thus we end up with a wrong string size */ fl_get_string_dimension( obj->lstyle, obj->lsize, sp->str, len, &sp->max_pixels, &len ); if ( obj->form ) fl_freeze_form( obj->form ); check_scrollbar_size( obj ); make_line_visible( obj, sp->ypos ); fl_redraw_object( sp->input ); sp->xoffset = 0; check_scrollbar_size( obj ); if ( sp->v_on || sp->h_on ) redraw_scrollbar( obj ); if ( obj->form ) fl_unfreeze_form( obj->form ); } /*************************************** * Sets the color of the input string ***************************************/ void fl_set_input_color( FL_OBJECT * obj, FL_COLOR textcol, FL_COLOR curscol ) { FLI_INPUT_SPEC *sp = obj->spec; sp->textcol = textcol; sp->curscol = curscol; fl_redraw_object( sp->input ); } /*************************************** * Returns the color of the input string ***************************************/ void fl_get_input_color( FL_OBJECT * obj, FL_COLOR * textcol, FL_COLOR * curscol ) { FLI_INPUT_SPEC *sp = obj->spec; *textcol = sp->textcol; *curscol = sp->curscol; } /*************************************** ***************************************/ int fl_set_input_fieldchar( FL_OBJECT * obj, int fchar ) { FLI_INPUT_SPEC *sp = obj->spec; int ochar = sp->field_char; if ( obj->objclass != FL_INPUT ) { M_err( "fl_set_input_fieldchar", "%s isn't an input object", obj ? obj->label : "null" ); return 0; } sp->field_char = fchar; return ochar; } /*************************************** * Returns a pointer to the text string ***************************************/ const char * fl_get_input( FL_OBJECT * obj ) { return ( ( FLI_INPUT_SPEC * ) obj->spec )->str; } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function should be regarded as for internal use * only and fl_set_object_return() should be used instead (which then * will call this function). ***************************************/ void fl_set_input_return( FL_OBJECT * obj, unsigned int when ) { FLI_INPUT_SPEC *sp = obj->spec; if ( when & FL_RETURN_END_CHANGED ) when &= ~ ( FL_RETURN_END | FL_RETURN_CHANGED ); obj->how_return = sp->input->how_return = when; fl_set_object_return( sp->vscroll, FL_RETURN_CHANGED ); fl_set_object_return( sp->hscroll, FL_RETURN_CHANGED ); } /*************************************** ***************************************/ void fl_set_input_scroll( FL_OBJECT * obj, int yes ) { ( ( FLI_INPUT_SPEC * ) obj->spec )->noscroll = ! yes; } /*************************************** * Makes a part of an input string selected or deselected ***************************************/ void fl_set_input_selected_range( FL_OBJECT * obj, int begin, int end ) { FLI_INPUT_SPEC *sp = obj->spec; int len; if ( obj->type == FL_HIDDEN_INPUT ) return; len = strlen( sp->str ); if ( begin < 0 ) sp->beginrange = 0; else if ( begin > len ) sp->beginrange = len; else sp->beginrange = begin; if ( end < 0 ) sp->endrange = -1; else if ( end > len ) sp->endrange = len; else sp->endrange = end; /* move cursor to the head */ sp->position = sp->beginrange; fl_redraw_object( sp->input ); } /*************************************** ***************************************/ const char * fl_get_input_selected_range( FL_OBJECT * obj, int * begin, int * end ) { FLI_INPUT_SPEC *sp = obj->spec; static char *selbuf; static int nselbuf; int n; n = sp->endrange - sp->beginrange; if ( n < 1 ) { if ( begin ) *begin = -1; if ( end ) *end = -1; return NULL; } if ( begin ) *begin = sp->beginrange; if ( end ) *end = sp->endrange; if ( n > nselbuf ) { selbuf = fl_realloc( selbuf, n + 1 ); nselbuf = n; } fli_sstrcpy( selbuf, sp->str + sp->beginrange, n ); return selbuf; } /*************************************** * Selects the current input programmatically without moving * the cursor ***************************************/ void fl_set_input_selected( FL_OBJECT * obj, int yes ) { FLI_INPUT_SPEC *sp = obj->spec; if ( obj->type == FL_HIDDEN_INPUT ) return; if ( yes ) { sp->position = sp->endrange = strlen( sp->str ); sp->beginrange = 0; } else sp->endrange = -1; fl_redraw_object( sp->input ); } /*************************************** * Given an (x,y) location returns the string position in chars ***************************************/ static int xytopos( FLI_INPUT_SPEC * sp, int xpos, int ypos, int len ) { int y; char *s = sp->str, *se = s + len; for ( y = 1; y < ypos && s < se; s++ ) if ( *s == '\n' ) y++; return ( s - sp->str ) + xpos; } /*************************************** * Move cursor within the input field, cursor position is measured in chars ***************************************/ void fl_set_input_cursorpos( FL_OBJECT * obj, int xpos, int ypos ) { FLI_INPUT_SPEC *sp = obj->spec; int newp, len; if ( obj->type == FL_HIDDEN_INPUT ) return; if ( ypos < 1 ) ypos = 1; else if ( ypos > sp->lines ) ypos = sp->lines; if ( xpos < 0 ) xpos = 0; len = strlen( sp->str ); newp = xytopos( sp, xpos, ypos, len ); if ( newp > len ) newp = len; if ( newp != sp->position ) { sp->position = newp; if ( ! make_line_visible( obj, sp->ypos ) ) fl_redraw_object( sp->input ); } } /*************************************** ***************************************/ int fl_get_input_cursorpos( FL_OBJECT * obj, int * x, int * y ) { FLI_INPUT_SPEC *sp = obj->spec; int i, j; char *s = sp->str; for ( i = 1, j = 0; s && *s && sp->position > s - sp->str; s++ ) { j++; if ( *s == '\n' ) { i++; j = 0; } } *x = sp->position >= 0 ? j : -1; *y = i; return sp->position; } #define Control( c ) ( ( c ) - 'a' + 1 ) #define Meta( c ) ( ( c ) | METAMASK ) /*************************************** * Really should let the user have a chance to override any of the * defaults here. _TODO_ ***************************************/ static void set_default_keymap( int force ) { static int initialized; if ( ! force && initialized ) return; initialized = 1; /* Emacs defaults */ kmap.moveto_next_char = Control( 'f' ); kmap.moveto_prev_char = Control( 'b' ); kmap.moveto_next_line = Control( 'n' ); kmap.moveto_prev_line = Control( 'p' ); kmap.moveto_prev_word = Meta( 'b' ); kmap.moveto_next_word = Meta( 'f' ); kmap.moveto_bof = Meta( '<' ); kmap.moveto_eof = Meta( '>' ); kmap.moveto_bol = Control( 'a' ); kmap.moveto_eol = Control( 'e' ); kmap.del_prev_char = 127; kmap.del_prev_word = Meta( 127 ); kmap.del_next_char = Control( 'd' ); kmap.del_next_word = Meta( 'd' ); kmap.del_to_eol = Control( 'k' ); kmap.del_to_eos = Meta( 'k' ); kmap.backspace = Control( 'h' ); kmap.transpose = Control( 't' ); kmap.paste = Control( 'y' ); kmap.clear_field = Control( 'u' ); } /*************************************** ***************************************/ void fl_set_input_maxchars( FL_OBJECT * obj, int maxchars ) { ( ( FLI_INPUT_SPEC * ) obj->spec )->maxchars = maxchars; } /*************************************** ***************************************/ FL_VALIDATE fl_set_input_filter( FL_OBJECT * obj, FL_VALIDATE validate ) { FLI_INPUT_SPEC *sp = obj->spec; FL_VALIDATE old = sp->validate; sp->validate = validate; return old; } /*************************************** ***************************************/ void fl_set_input_format( FL_OBJECT * obj, int fmt, int sep ) { FLI_INPUT_SPEC *sp = obj->spec; if ( ! isprint( sep ) || isdigit( sep ) ) sep = '/'; sp->attrib1 = fmt; sp->attrib2 = sep; } /*************************************** ***************************************/ void fl_get_input_format( FL_OBJECT * obj, int * fmt, int * sep ) { FLI_INPUT_SPEC *sp = obj->spec; *fmt = sp->attrib1; *sep = sp->attrib2; } /*************************************** ***************************************/ int fl_validate_input( FL_OBJECT *obj ) { FLI_INPUT_SPEC *sp = obj->spec; return ( ! sp->validate || sp->validate( obj, sp->str, sp->str, 0 ) == FL_VALID ) ? FL_VALID : FL_INVALID; } /*************************************** * Validators for specialized inputs ***************************************/ #define IS_LEAP_YEAR( y ) \ ( ( y ) % 4 == 0 && ( ( y ) % 100 != 0 || ( y ) % 400 == 0 ) ) static int date_validator( FL_OBJECT * obj, const char * oldstr FL_UNUSED_ARG, const char * newstr, int newc ) { char *val, *s, sepsep[ 4 ]; char ssep[ ] = { 0, 0 }; int i, len, ival[ ] = { 1, 1, 1 }; int fmt, sep; int invalid = FL_RINGBELL | FL_INVALID; int m, d; /* Consider empty valid */ if ( ( len = strlen( newstr ) ) == 0 ) return FL_VALID; fl_get_input_format( obj, &fmt, &sep ); *ssep = sep; strcat( strcpy( sepsep, ssep ), ssep ); if ( ( newc != sep && newc != 0 && ! isdigit( newc ) ) || *newstr == sep || strstr( newstr, sepsep ) ) return invalid; s = fl_strdup( newstr ); for ( i = 0, val = strtok( s, ssep ); val; val = strtok( NULL, ssep ) ) { /* Must allow incomplete input so 12/01 does not get rejected at 0 */ if ( val[ 1 ] == '\0' && val[ 0 ] == newstr[ len - 1 ] ) { if ( newc != 0 ) { fl_free( s ); return FL_VALID; } } ival[ i++ ] = atoi( val ); } fl_free( s ); if ( i > 3 ) return invalid; if ( i != 3 && newc == 0 ) return invalid; m = fmt == FL_INPUT_MMDD ? 0 : 1; d = ! m; if ( ival[ m ] < 1 || ival[ m ] > 12 || ival[ d ] < 1 || ival[ d ] > 31 ) return invalid; if ( ( ival[ d ] > 30 && ( ival[ m ] % 2 ) == 0 && ival[ m ] < 8 ) || ( ival[ d ] > 30 && ( ival[ m ] % 2 ) != 0 && ival[ m ] > 8 ) ) return invalid; /* Take care: check for leap year can only be done when leaving */ if ( ival[ m ] == 2 && ( ival[ d ] > 29 || ( i == 3 && newc == 0 && ival[ d ] > 28 && ! IS_LEAP_YEAR( ival[ 2 ] ) ) ) ) return invalid; return FL_VALID; } /*************************************** ***************************************/ static int float_int_validator( FL_OBJECT * obj, const char * oldstr FL_UNUSED_ARG, const char * str, int newc ) { const char *lc, *llc; char *ptr = NULL; int slen, c; double dummy; /* Empty string is considered valid */ if ( ! ( slen = strlen( str ) ) ) return FL_VALID; if ( newc && ! isdigit( newc ) && newc != '-' && newc != '+' && obj->type == FL_INT_INPUT ) return FL_INVALID | FL_RINGBELL; if ( obj->type == FL_FLOAT_INPUT ) dummy = strtod( str, &ptr ); else dummy = strtol( str, &ptr, 10 ); lc = str + slen - 1; llc = lc - 1; if ( ! newc && ( ( c = tolower( ( int ) *lc ) ) == '+' || c == '-' || c == 'e' ) ) return FL_INVALID | FL_RINGBELL; /* -+eE at end can cause strtod to fail, but it is in fact valid. The check is too lenient though */ if ( * ptr && strcmp( str, "-" ) && strcmp( str, "+" ) && ( strcmp( str, "." ) || obj->type != FL_FLOAT_INPUT ) && ( ( *lc != '-' && *lc != 'e' && *lc != '+' && *lc != 'E' ) || ( *lc == '-' && *llc != 'e' && *llc != 'E' ) || ( *lc == '+' && *llc != 'e' && *llc != 'E' ) || ( *lc == 'e' && ! isdigit( ( int ) *llc ) && *llc != '.' ) || ( *lc == 'E' && ! isdigit( ( int ) *llc ) && *llc != '.' ) ) ) return FL_INVALID | FL_RINGBELL; return FL_VALID; } /*************************************** ***************************************/ void fl_set_input_xoffset( FL_OBJECT * obj, int xoff ) { FLI_INPUT_SPEC *sp = obj->spec; if ( sp->xoffset != xoff ) { sp->xoffset = xoff; if ( sp->drawtype != HSLIDER ) { check_scrollbar_size( obj ); redraw_scrollbar( obj ); } sp->drawtype = COMPLETE; fl_redraw_object( sp->input ); } } /*************************************** ***************************************/ int fl_get_input_xoffset( FL_OBJECT * obj ) { return ( ( FLI_INPUT_SPEC * ) obj->spec )->xoffset; } /*************************************** ***************************************/ static void correct_topline( FLI_INPUT_SPEC * sp, int * top ) { if ( sp->lines > sp->screenlines ) { if ( sp->lines + 1 - *top < sp->screenlines ) *top = sp->lines - sp->screenlines + 1; if ( *top < 1 ) *top = 1; } else *top = 1; } /*************************************** ***************************************/ static int count_lines( const char *s ) { int count; if ( ! s ) return 0; for ( count = 1; *s; s++ ) if ( *s == '\n' ) count++; return count; } /*************************************** ***************************************/ int fl_get_input_numberoflines( FL_OBJECT * obj ) { FLI_INPUT_SPEC *sp = obj->spec; return sp->lines = count_lines( sp->str ); } /*************************************** ***************************************/ void fl_set_input_topline( FL_OBJECT * obj, int top ) { FLI_INPUT_SPEC *sp = obj->spec; correct_topline( sp, &top ); if ( sp->topline != top ) { sp->topline = top; if ( sp->drawtype != VSLIDER ) { check_scrollbar_size( obj ); redraw_scrollbar( obj ); } sp->drawtype = COMPLETE; sp->yoffset = ( sp->topline - 1 ) * sp->charh; fl_redraw_object( sp->input ); } } /*************************************** * Line number 'n' is numbered from 1. ***************************************/ static int make_line_visible( FL_OBJECT * obj, int n ) { FLI_INPUT_SPEC *sp = obj->spec; int oldtop = sp->topline; if ( obj->type != FL_MULTILINE_INPUT ) return 0; if ( n < sp->topline ) fl_set_input_topline( obj, n ); else if ( n - sp->topline + 1 > sp->screenlines ) fl_set_input_topline( obj, n - sp->screenlines + 1 ); else if ( sp->lines + 1 - sp->topline < sp->screenlines ) fl_set_input_topline( obj, sp->lines ); return oldtop != sp->topline; } /*************************************** ***************************************/ static int make_char_visible( FL_OBJECT * obj, int n ) { FLI_INPUT_SPEC *sp = obj->spec; int startpos = sp->position; int oldxoffset = sp->xoffset; int tmp; if ( n < 0 ) return 0; while ( startpos > 0 && sp->str[ startpos - 1 ] != '\n' ) startpos--; tmp = get_substring_width( obj, startpos, n + startpos ); if ( tmp < sp->xoffset ) sp->xoffset = tmp; else if ( tmp - sp->xoffset > sp->w ) sp->xoffset = tmp - sp->w; if ( sp->xoffset != oldxoffset ) { check_scrollbar_size( obj ); redraw_scrollbar( obj ); fl_redraw_object( sp->input ); return 1; } return 0; } /*************************************** ***************************************/ void fl_set_input_vscrollbar( FL_OBJECT * obj, int pref ) { FLI_INPUT_SPEC *sp = obj->spec; if ( sp->v_pref != pref ) { sp->v_pref = pref; check_scrollbar_size( obj ); redraw_scrollbar( obj ); fl_redraw_object( sp->input ); } } /*************************************** ***************************************/ void fl_set_input_hscrollbar( FL_OBJECT * obj, int pref ) { FLI_INPUT_SPEC *sp = obj->spec; if ( sp->h_pref != pref ) { sp->h_pref = pref; check_scrollbar_size( obj ); redraw_scrollbar( obj ); fl_redraw_object( sp->input ); } } /*************************************** ***************************************/ void fl_set_input_scrollbarsize( FL_OBJECT * obj, int hh, int vw ) { FLI_INPUT_SPEC *sp = obj->spec; if ( sp->hh_def != hh || sp->vw_def != vw ) { sp->hh_def = hh; sp->vw_def = vw; check_scrollbar_size( obj ); redraw_scrollbar( obj ); fl_redraw_object( sp->input ); } } /*************************************** ***************************************/ void fl_get_input_scrollbarsize( FL_OBJECT * obj, int * hh, int * vw ) { FLI_INPUT_SPEC *sp = obj->spec; *hh = sp->hh_def; *vw = sp->vw_def; } /*************************************** ***************************************/ int fl_get_input_topline( FL_OBJECT * obj ) { return ( ( FLI_INPUT_SPEC * ) obj->spec )->topline; } /*************************************** ***************************************/ int fl_get_input_screenlines( FL_OBJECT * obj ) { return ( ( FLI_INPUT_SPEC * ) obj->spec )->screenlines; } #define SetKey( m ) if ( keymap->m ) kmap.m = keymap->m /*************************************** ***************************************/ void fl_set_input_editkeymap( const FL_EditKeymap * keymap ) { /* If keymap is Null force default */ if ( ! keymap ) { set_default_keymap( 1 ); return; } set_default_keymap( 0 ); SetKey( del_prev_char ); SetKey( del_next_char ); SetKey( del_prev_word ); SetKey( del_next_word ); SetKey( moveto_prev_char ); SetKey( moveto_next_char ); SetKey( moveto_prev_word ); SetKey( moveto_next_word ); SetKey( moveto_prev_line ); SetKey( moveto_next_line ); SetKey( moveto_bof ); SetKey( moveto_eof ); SetKey( moveto_bol ); SetKey( moveto_eol ); SetKey( backspace ); SetKey( clear_field ); SetKey( paste ); SetKey( transpose ); SetKey( del_to_eos ); SetKey( del_to_eol ); SetKey( del_to_bol ); } /*************************************** ***************************************/ static void copy_attributes( FL_OBJECT * dest, FL_OBJECT * src ) { if ( src == dest ) return; dest->col1 = src->col1; dest->col2 = src->col2; dest->align = src->align; dest->boxtype = src->boxtype; dest->lcol = src->lcol; dest->lstyle = src->lstyle; dest->lsize = src->lsize; } /*************************************** ***************************************/ static void redraw_scrollbar( FL_OBJECT * obj ) { FLI_INPUT_SPEC *sp = obj->spec; fl_freeze_form( obj->form ); if ( sp->v_on ) { fl_set_scrollbar_size( sp->vscroll, sp->vsize ); fl_set_scrollbar_value( sp->vscroll, sp->vval ); if ( sp->vsize != 1.0 ) fl_set_scrollbar_increment( sp->vscroll, sp->vinc1, sp->vinc2 ); fl_redraw_object( sp->vscroll ); } if ( sp->h_on ) { fl_set_scrollbar_size( sp->hscroll, sp->hsize ); fl_set_scrollbar_value( sp->hscroll, sp->hval ); if ( sp->hsize != 1.0 ) fl_set_scrollbar_increment( sp->hscroll, sp->hinc1, sp->hinc2 ); fl_redraw_object( sp->hscroll ); } if ( sp->attrib ) { fl_redraw_object( sp->input ); sp->attrib = 0; } if ( sp->dead_area && FL_ObjWin( obj ) ) { sp->dead_area = 0; fl_winset( FL_ObjWin( obj ) ); fl_drw_box( FL_FLAT_BOX, sp->dummy->x + sp->dummy->w - sp->vw, sp->dummy->y + sp->dummy->h - sp->hh, sp->vw, sp->hh, sp->hscroll->col1, 1 ); } fl_unfreeze_form( obj->form ); } /*************************************** ***************************************/ void fl_set_input_cursor_visible( FL_OBJECT * obj, int visible ) { FLI_INPUT_SPEC *sp = obj->spec; if ( sp->no_cursor != ! visible ) { sp->no_cursor = ! visible; fl_redraw_object( obj ); } } /*************************************** ***************************************/ static void make_cursor_visible( FL_OBJECT * obj, int startpos, int prev ) { FLI_INPUT_SPEC *sp = obj->spec; int tt = get_substring_width( obj, startpos, sp->position ); /* The extra 4 are there to have enough space for the cursor when it's at the end of the line */ if ( prev == -1 ) { if ( tt - sp->xoffset > sp->w - 4 ) sp->xoffset = tt - sp->w + 4; else if ( tt < sp->xoffset ) sp->xoffset = tt; else if ( tt == 0 ) sp->xoffset = 0; } else if ( tt - sp->xoffset > sp->w - 4 ) sp->xoffset = tt - sp->w + 4; } /*************************************** ***************************************/ int fl_input_changed( FL_OBJECT *obj ) { return ( ( FLI_INPUT_SPEC * ) obj->spec )->changed; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/local.h0000644000175000017500000000413011247055071014237 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file local.h * * This file is part of the XForms library package. * Copyright (c) 1996-1998 T.C. Zhao and Mark Overmars * All rights reserved. * * Some machine specific stuff. */ #ifndef FL_LOCAL_H #define FL_LOCAL_H #ifndef _WIN32 #include #endif #ifndef HAVE_STRCASECMP extern int strcasecmp( const char *, const char * ); #endif #if defined Lynx #define NEED_GETCWD #endif #if defined __VMS #define NEED_GETCWD #if __VMS_VER < 70000000 struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; extern int gettimeofday( struct timeval * tv, struct timezone * tz ); #endif /* ___VMS_VER */ #endif /* __VMS */ /********* End of Configurable stuff ***********/ #ifndef FL_PATH_MAX #ifdef PATH_MAX #define FL_PATH_MAX PATH_MAX #else #define FL_PATH_MAX 1024 #endif #endif /* FL_PATH_MAX */ #ifndef FL_FLEN #define FL_FLEN 256 #endif /* There are two ways to handle motion events, one is to constantly * query the server for mouse position, and the other is to use * motion events. The first way obviously is slow and expensive * if runs across network. The latter however suffers with stepping * events. */ /*#define NO_MSG_INFO */ #endif /* ifndef local.h } */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/tooltip.c0000644000175000017500000001131011247055071014630 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file tooltip.c * * This file is part of the XForms library package. * Copyright (c) 1998-2002 T.C. Zhao * All rights reserved. * * Show message in a top-level unmanaged window. Used * for tooltips */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" typedef struct { FL_FORM * tooltipper; void * vdata; char * cdata; long ldate; FL_OBJECT * text; int fntstyle; int fntsize; FL_COLOR background; FL_COLOR textcolor; int boxtype; int lalign; } TOOLTIP; static TOOLTIP *tip; /*************************************** ***************************************/ static void create_it( void ) { FL_OBJECT *text; if ( tip ) return; tip = fl_calloc( 1, sizeof *tip ); tip->fntstyle = FL_NORMAL_STYLE; tip->fntsize = FL_DEFAULT_SIZE; tip->boxtype = FL_BORDER_BOX; tip->lalign = FL_ALIGN_LEFT | FL_ALIGN_INSIDE; tip->textcolor = FL_BLACK; tip->background = FL_YELLOW; tip->tooltipper = fl_bgn_form( FL_NO_BOX, 5, 5 ); tip->text = text = fl_add_box( tip->boxtype, 0, 0, 5, 5, "" ); fl_set_object_bw( text, -1 ); fl_set_object_lstyle( text, tip->fntstyle ); fl_set_object_lsize( text, tip->fntsize ); fl_set_object_lcol( text, tip->textcolor ); fl_set_object_lalign( text, tip->lalign ); fl_set_object_color( text, tip->background, tip->background ); fl_end_form( ); } /*************************************** ***************************************/ void fl_set_tooltip_boxtype( int bt ) { create_it( ); tip->boxtype = bt; fl_set_object_boxtype( tip->text, bt ); } /*************************************** ***************************************/ void fli_show_tooltip( const char * s, int x, int y ) { int maxw = 0, maxh = 0, extra; if ( ! s ) return; create_it( ); extra = 1 + ( tip->boxtype != FL_FLAT_BOX && tip->boxtype != FL_BORDER_BOX ); fl_get_string_dimension( tip->fntstyle, tip->fntsize, s, strlen( s ), &maxw, &maxh ); maxw += 7 + extra; maxh += 7 + extra; if ( maxw > 800 ) maxw = 800; if ( maxh > 800 ) maxh = 800; fl_freeze_form( tip->tooltipper ); fl_set_form_geometry( tip->tooltipper, x, y, maxw, maxh ); fl_set_object_label( tip->text, s ); fl_unfreeze_form( tip->tooltipper ); if ( ! tip->tooltipper->visible ) fl_show_form( tip->tooltipper, FL_PLACE_GEOMETRY | FL_FREE_SIZE, FL_NOBORDER, "Tooltip" ); fl_update_display( 1 ); } /*************************************** ***************************************/ void fli_hide_tooltip( void ) { if ( tip && tip->tooltipper->visible ) fl_hide_form( tip->tooltipper ); } /*************************************** ***************************************/ int fli_is_tooltip_form( FL_FORM * form ) { return tip && tip->tooltipper == form; } /*************************************** ***************************************/ void fl_set_tooltip_color( FL_COLOR tc, FL_COLOR bc ) { create_it( ); fl_set_object_lcol( tip->text, tip->textcolor = tc ); tip->background = bc; fl_set_object_color( tip->text, tip->background, tip->background ); } /*************************************** ***************************************/ void fl_set_tooltip_font( int style, int size ) { create_it( ); fl_set_object_lstyle( tip->text, tip->fntstyle = style ); fl_set_object_lsize( tip->text, tip->fntsize = size ); } /*************************************** ***************************************/ void fl_set_tooltip_lalign( int align ) { create_it( ); fl_set_object_lalign( tip->text, tip->lalign = align ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/xpopup.c0000644000175000017500000017027611317443524014514 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file xpopup.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao * All rights reserved. * * Implementation of pop-up menus in Xlib. Not quite fit the * model of forms library, but it is needed to make other things * work. * * These functionalities should be someday rewritten using * forms construct rather than Xlib. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/flsnprintf.h" #include #include #include #include #define FL_MAXPUP 32 /* default maximum pups */ #define PADH FL_PUP_PADH /* space between items */ #define PADW 8 /* space on each side */ #define PADTITLE 14 /* extran space for title */ #define CHECKW 6 /* check box size */ #define M_TITLE 1 #define M_ERR 2 /**************************************************************** * pop up menu structure and some defaults ****************************************************************/ #define NSC 8 /* max hotkeys */ typedef struct { char * str; /* label */ FL_PUP_CB icb; /* callback */ long * shortcut; /* shortcut keys */ int subm; /* sub menu */ unsigned int mode; /* various attributes */ int ret; /* %x stuff */ short ulpos; /* hotkeys in label */ short radio; /* radio entry. 0 mean no radio */ short len; } MenuItem; typedef struct { int used; char * title; /* Menu title */ Window win; /* menu window */ Cursor cursor; /* cursor for the pup */ GC gc_active; /* GC for maintext */ GC gc_inactive; /* GC for inactive text */ MenuItem * item[ FL_MAXPUPI + 1 ]; FL_PUP_CB menu_cb; /* call back routine */ FL_PUP_ENTERCB enter_cb; /* enter callback routine */ void * enter_data; FL_PUP_ENTERCB leave_cb; /* enter callback routine */ void * leave_data; unsigned long event_mask; int x, /* origin relative to root */ y; unsigned int w, /* total dimension */ h; short titleh; short nitems; /* no. of item in menu */ short title_width; /* title width */ short maxw; short bw; short lpad; short rpad; short padh; short cellh; short isEntry; /* true if menu is setup via entry struct */ int par_y; FL_FORM * form; } PopUP; static void grab_both( PopUP * ); static void reset_radio( PopUP *, MenuItem * ); /* Resources that control the fontsize and other things */ static int pup_font_style = FL_NORMAL_STYLE; static int pup_title_font_style = FL_NORMAL_STYLE; #ifdef __sgi static int pup_font_size = FL_SMALL_SIZE, pup_title_font_size = FL_SMALL_SIZE; #else static int pup_font_size = FL_NORMAL_SIZE, pup_title_font_size = FL_NORMAL_SIZE; #endif static FL_COLOR pup_color = FL_COL1; static FL_COLOR pup_text_color = FL_BLACK; static FL_COLOR pup_checked_color = FL_BLUE; static int pup_level = 0; static int fl_maxpup = FL_MAXPUP; static int pup_bw = -1; static int pup_bw_is_set = 0; static PopUP *menu_rec = NULL; static XFontStruct *pup_font_struct = NULL; /* popup main text font */ static int pup_ascent = 0, /* font properties */ pup_desc = 0; static XFontStruct *pup_title_font_struct = NULL; /* popup title text font */ static int pup_title_ascent = 0, pup_title_desc = 0; static Cursor pup_defcursor = 0; static int pup_subreturn; static int pup_using_keys = 0; static int pup_internal_showpup_call = 0; /************ data struct maintanance ******************{**/ /*************************************** ***************************************/ static void init_pupfont( void ) { XCharStruct chs; int junk; if ( ! pup_title_font_struct ) { pup_title_font_struct = fl_get_fntstruct( pup_title_font_style, pup_title_font_size ); XTextExtents( pup_title_font_struct, "qjQb", 4, &junk, &pup_title_ascent, &pup_title_desc, &chs ); } if ( ! pup_font_struct ) { pup_font_struct = fl_get_fntstruct( pup_font_style, pup_font_size ); XTextExtents( pup_font_struct, "qjQb", 4, &junk, &pup_ascent, &pup_desc, &chs ); } } /*************************************** * initialize a particular menu ***************************************/ static void init_pup( PopUP * m ) { m->menu_cb = NULL; m->enter_cb = m->leave_cb = NULL; m->w = m->h = m->maxw = 0; m->nitems = 0; m->title_width = 0; m->win = None; m->gc_active = m->gc_inactive = None; m->bw = pup_bw; m->title = NULL; m->item[ 0 ] = NULL; m->padh = PADH; if ( ! pup_defcursor ) pup_defcursor = fl_get_cursor_byname( XC_sb_right_arrow ); m->cursor = pup_defcursor; m->lpad = m->rpad = PADW; init_pupfont( ); m->cellh = pup_ascent + pup_desc + 2 * m->padh; m->isEntry = 0; m->form = NULL; } /*************************************** ***************************************/ static int find_empty_index( Window win ) { PopUP *p; for ( p = menu_rec; p < menu_rec + fl_maxpup; p++ ) if ( ! p->used ) { init_pup( p ); p->used = 1; p->form = win != None ? fl_win_to_form( win ) : NULL; return p - menu_rec; } M_err( "find_empty_index", "Too many popups (maximum is %d)", fl_maxpup ); return -1; } static void convert_shortcut( const char *, const char *, MenuItem *, int ); static void wait_for_close( Window ); /*************************************** ***************************************/ static void reset_max_width( PopUP * m ) { int i; MenuItem **item = m->item; char *t, *b; if ( ! m->used || m->nitems <= 0 ) return; m->maxw = 0; for ( i = 0; i < m->nitems; i++ ) { b = t = fl_strdup( item[ i ]->str ); while ( ( b = strchr( b, '\b' ) ) ) memmove( b, b + 1, strlen( b ) ); m->maxw = FL_max( m->maxw, fl_get_string_widthTAB( pup_font_style, pup_font_size, t, strlen( t ) ) ); fl_free( t ); } if ( m->title && *m->title ) { b = t = fl_strdup( m->title ); while ( ( b = strchr( b, '\b' ) ) ) memmove( b, b + 1, strlen( b ) ); m->title_width = XTextWidth( pup_title_font_struct, t, strlen( t ) ); fl_free( t ); } else m->title_width = 0; m->cellh = pup_ascent + pup_desc + 2 * m->padh; } /*************************************** * Parse the menu entries ***************************************/ #define MV( d, s ) memmove( d, s, strlen( s ) + 1 ); static int parse_entry( int n, const char * str, va_list ap ) { PopUP *m = menu_rec + n; MenuItem *item; char *s, *c, *p, *e, *sc = NULL; unsigned int flags = 0; long num; if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used || ! str ) return -1; s = fl_strdup( str ); for ( c = strtok( s, "|" ); c && m->nitems < FL_MAXPUPI; c = strtok( NULL, "|" ) ) { flags = 0; m->item[ m->nitems ] = item = fl_malloc( sizeof *item ); item->str = NULL; item->icb = NULL; item->shortcut = NULL; item->subm = -1; item->mode = 0; item->ret = m->nitems + 1; item->ulpos = -1; item->radio = 0; item->len = 0; p = c; while ( ( p = strchr( p, '%' ) ) && ! ( flags & M_ERR ) ) { switch ( p[ 1 ] ) { case '%' : MV( p, p + 1 ); p = p + 1; break; case 't' : flags |= M_TITLE; MV( p, p + 2 ); break; case 'f' : item->icb = va_arg( ap, FL_PUP_CB ); MV( p, p + 2 ); break; case 'F' : m->menu_cb = va_arg( ap, FL_PUP_CB ); MV( p, p + 2 ); break; case 'm' : item->subm = va_arg( ap, int ); MV( p, p + 2 ); break; case 'l' : MV( p, p + 2 ); MV( c + 1, c ); *c = '\010'; p = p + 1; break; case 'i' : case 'd' : item->mode |= FL_PUP_GREY; MV( p, p + 2 ); break; case 'x' : num = strtol( p + 2, &e, 10 ); if ( e == p + 2 ) { flags |= M_ERR; M_err( "parse_entry", "Missing number after %%x" ); break; } if ( num <= 0 ) { flags |= M_ERR; M_err( "parse_entry", "Invalid zero or negative " "number after %%x" ); break; } item->ret = num; while ( isspace( ( int ) *e ) ) e++; MV( p, e ); break; case 'B' : item->mode |= FL_PUP_CHECK; /* fall through */ case 'b' : item->mode |= FL_PUP_BOX; MV( p, p + 2 ); break; case 'R' : item->mode |= FL_PUP_CHECK; /* fall through */ case 'r' : item->mode |= FL_PUP_BOX; num = strtol( p + 2, &e, 10 ); if ( num <= 0 ) { flags |= M_ERR; M_err( "parse_entry", "Zero or negative group number" ); break; } if ( e == p + 2 ) { flags |= M_ERR; M_err( "parse_entry", "Missing number after %%%c", p + 1 ); break; } item->radio = num; while ( isspace( ( int ) *e ) ) e++; /* if the item is to be in on state all other items belonging to the same group must be in off state */ if ( p[ 1 ] == 'R' ) { int k; for ( k = m->nitems - 1; k >= 0; k-- ) if ( m->item[ k ]->radio == item->radio ) m->item[ k ]->mode &= ~ FL_PUP_CHECK; } MV( p, e ); break; case 'h' : case 's' : sc = va_arg( ap, char * ); MV( p, p + 2 ); break; default : flags |= M_ERR; M_err( "parse_entry", "Unknown sequence %%%c", p[ 1 ] ); break; } } if ( flags & M_ERR ) { fl_free( item ); m->item[ m->nitems ] = NULL; break; } if ( sc ) { M_info( "parse_entry", "shortcut = %s for %s", sc, c ); convert_shortcut( sc, c, item, NSC ); } if ( item->mode & FL_PUP_BOX ) m->lpad = PADW + CHECKW + 2; if ( item->subm >= 0 ) m->rpad = PADW + 16; if ( flags & M_TITLE ) { char *t, *b; m->title = fl_strdup( c ); b = t = fl_strdup( c ); while ( ( b = strchr( b, '\b' ) ) ) memmove( b, b + 1, strlen( b ) ); m->title_width = XTextWidth( pup_title_font_struct, t, strlen( t ) ); fl_free( t ); fl_free( item ); m->item[ m->nitems ] = NULL; } else { char *t, *b; item->str = fl_strdup( c ); item->len = strlen( item->str ); b = t = fl_strdup( item->str ); while ( ( b = strchr( b, '\b' ) ) ) memmove( b, b + 1, strlen( b ) ); m->maxw = FL_max( m->maxw, fl_get_string_widthTAB( pup_font_style, pup_font_size, t, strlen( t ) ) ); fl_free( t ); m->nitems++; } } if ( c ) M_err( "parse_entry", "Too many menu items, max is %d", FL_MAXPUPI ); fl_free( s ); return ( flags & M_ERR ) ? -1 : 0; } /*************************************** ***************************************/ static void close_pupwin( PopUP * pup ) { if ( pup->win ) { XDestroyWindow( flx->display, pup->win ); wait_for_close( pup->win ); pup->win = None; } } /*************************************** * initialize the menu system. Must be called first. Made defpup/newpup * etc. auto call fli_init_pup (instead of letting fl_initialize to call * it) and we save about ~25k in exe size for app not using pups ***************************************/ void fli_init_pup( void ) { PopUP *mr; size_t i; if ( menu_rec ) return; menu_rec = fl_calloc( fl_maxpup, sizeof *menu_rec ); for ( mr = menu_rec; mr < menu_rec + fl_maxpup; mr++ ) { mr->used = 0; mr->title = NULL; mr->win = None; mr->cursor = None; mr->gc_active = mr->gc_inactive = None; mr->menu_cb = NULL; mr->enter_cb = mr->leave_cb = NULL; mr->enter_data = mr->leave_data = NULL; for ( i = 0; i <= FL_MAXPUPI; i++ ) mr->item[ i ] = NULL; } fl_setpup_default_fontsize( fli_cntl.pupFontSize ? fli_cntl.pupFontSize : -2 ); } /*************************************** ***************************************/ int fl_setpup_default_fontsize( int size ) { int i; int old_pup_font_size = pup_font_size; if ( size <= 0 ) return old_pup_font_size; fli_init_pup( ); pup_font_size = size; pup_title_font_size = size; pup_font_struct = pup_title_font_struct = 0; if ( ! flx->display ) return old_pup_font_size; init_pupfont( ); for ( i = 0; i < fl_maxpup; i++ ) { reset_max_width( menu_rec + i ); close_pupwin( menu_rec + i ); } return old_pup_font_size; } /*************************************** ***************************************/ int fl_setpup_default_fontstyle( int style ) { int i; int old_pup_font_style = pup_font_style; if ( ! flx->display ) return old_pup_font_style; if ( style < 0 ) return pup_font_style; fli_init_pup( ); pup_font_style = style; pup_title_font_style = style; pup_font_struct = pup_title_font_struct = NULL; init_pupfont( ); for ( i = 0; i < fl_maxpup; i++ ) reset_max_width( menu_rec + i ); return old_pup_font_style; } /*************************************** ***************************************/ void fl_setpup_default_color( FL_COLOR fg, FL_COLOR bg ) { pup_color = fg; pup_text_color = bg; } /*************************************** ***************************************/ void fl_setpup_default_pup_checked_color( FL_COLOR col ) { pup_checked_color = col; } /******************************************************************** * Public routines ****************************************************************{***/ /*************************************** * Allocate a new PopUP ID ***************************************/ int fl_newpup( Window win ) { fli_init_pup( ); if ( pup_level ) { M_warn( "fl_newpup", "Inconsistent pup_level %d", pup_level ); pup_level = 0; } if ( ! pup_bw_is_set ) { pup_bw = fli_cntl.borderWidth ? fli_cntl.borderWidth : -2; pup_bw_is_set = 1; } return find_empty_index( win == None ? fl_root : win ); } /*************************************** * Add pop-up entries ***************************************/ int fl_addtopup( int n, const char * str, ... ) { va_list ap; int ret; if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used ) return -1; va_start( ap, str ); ret = parse_entry( n, str, ap ); va_end( ap ); return ret = 0 ? n : -1; } /*************************************** * Allocate PopUP ID and optionally set all entries ***************************************/ int fl_defpup( Window win, const char * str, ... ) { int n; int ret; va_list ap; if ( ( n = fl_newpup( win ) ) < 0 ) return -1; if ( str == 0 ) return n; va_start( ap, str ); ret = parse_entry( n, str, ap ); va_end( ap ); return ret == 0 ? n : -1; } /*************************************** * Check to see if the requested value exists in popup m ***************************************/ static MenuItem * ind_is_valid( PopUP * m, int ind ) { MenuItem **is = m->item, **ise, *item = NULL; for ( ise = is + m->nitems; is < ise && !item; is++ ) { if ( ( *is )->ret == ind ) item = *is; else if ( ( *is )->subm >= 0 ) item = ind_is_valid( menu_rec + ( *is )->subm, ind ); } return item; } /*************************************** ***************************************/ static MenuItem * requested_item_is_valid( const char * where, int nm, int ni ) { if ( nm < 0 || nm >= fl_maxpup || ! menu_rec[ nm ].used ) { M_err( where, "Bad popup index %d", nm ); return NULL; } return ind_is_valid( menu_rec + nm, ni ); } /*************************************** * Change attributes of a popup item ***************************************/ int fl_setpup_mode( int nm, int ni, unsigned int mode ) { MenuItem *item; if ( ! ( item = requested_item_is_valid( "fl_setpup_mode", nm, ni ) ) ) return -1; if ( ( item->mode = mode ) & FL_PUP_CHECK ) item->mode |= FL_PUP_BOX; if ( item->mode & FL_PUP_RADIO ) { item->mode |= FL_PUP_BOX; if ( ! item->radio ) item->radio = -1; } if ( item->mode & FL_PUP_BOX ) menu_rec[ nm ].lpad = PADW + CHECKW + 2; return 0; } #define AltMask FL_ALT_MASK /*************************************** ***************************************/ static void convert_shortcut( const char * sc, const char * str, MenuItem * item, int n FL_UNUSED_ARG ) { if ( ! item->shortcut ) item->shortcut = fl_calloc( 1, NSC * sizeof *item->shortcut ); item->ulpos = fli_get_underline_pos( str, sc ) - 1; fli_convert_shortcut( sc, item->shortcut ); if ( sc[ 0 ] == '&' ) M_info( "convert_shortcut", "sc = %s keysym = %ld\n", sc, item->shortcut[ 0 ] ); } static void draw_popup( PopUP * ); static void draw_item( PopUP *, int, int ); /*************************************** ***************************************/ static void wait_for_close( Window win ) { long emask = AllEventsMask; XEvent xev; /* Drop all events for the window. We need to do sync before to be sure all events are already in the event queue */ XSync( flx->display, False ); while ( XCheckWindowEvent( flx->display, win, emask, &xev ) ) /* empty */ ; } /**************************************************************** * Global routine of doing pop-ups. Never returns unless user * does something with the pointer. For "hanging" pop-ups, a * pointer & focus grab will be activated and released upon returning. * Since requested item might be inactive, search for next active * item if current one is not ****************************************************************/ static int get_valid_entry( PopUP * m, int target, int dir ) { if ( target < 1 ) target = dir < 0 ? m->nitems : 1; if ( target > m->nitems ) target = dir < 0 ? m->nitems : 1; for ( ; target > 0 && target <= m->nitems; target += dir ) if ( ! ( m->item[ target - 1 ]->mode & FL_PUP_GREY ) ) return target; /* wrap */ if ( target < 1 ) target = dir < 0 ? m->nitems : 1; if ( target > m->nitems ) target = dir < 0 ? m->nitems : 1; for ( ; target > 0 && target <= m->nitems; target += dir ) if ( ! ( m->item[ target - 1 ]->mode & FL_PUP_GREY ) ) return target; M_err( "get_valid_entry", "No valid entries among total of %d", m->nitems ); return 0; } #define alt_down ( metakey_down( keymask ) != 0 ) /*************************************** ***************************************/ static int handle_shortcut( PopUP * m, KeySym keysym, unsigned int keymask ) { MenuItem **mi = m->item; int i, j; int sc, alt; for ( i = 0; i < m->nitems; i++ ) { if ( ! ( mi[ i ]->mode & FL_PUP_GREY ) && mi[ i ]->shortcut ) for ( j = 0; j < NSC && mi[ i ]->shortcut[ j ]; j++ ) { sc = mi[ i ]->shortcut[ j ]; alt = ( sc & AltMask ) == AltMask; sc &= ~ AltMask; if ( sc == ( int ) keysym && ! ( alt ^ alt_down ) ) return i + 1; } } return 0; } /*************************************** ***************************************/ static int handle_submenu( PopUP * m, MenuItem * item, int * val ) { if ( ! ( item->mode & ( FL_PUP_GREY | FL_INACTIVE ) ) && item->subm >= 0 ) { /* Set up the position for the new window (it should appear so that it's top line is flush with the line of the parent menu it was started from). Please note: the new window has to overlap the parent window at least in a single point - otherwise drawing artefacts often appear! */ fl_setpup_position( m->x + m->w - 3, m->y + m->cellh * ( *val - 1 ) + ( ( m->title && *m->title ) ? m->titleh - m->padh : 0 ) ); /* Draw and deal with the submenu */ if ( ( pup_subreturn = *val = fl_dopup( item->subm ) ) <= 0 ) grab_both( m ); else return 1; } return 0; } /*************************************** * keyboard. Also checks shortcut ***************************************/ static int pup_keyboard( XKeyEvent * xev, PopUP * m, int * val ) { KeySym keysym = NoSymbol; char buf[ 16 ]; int i, oldval = *val; XLookupString( xev, buf, sizeof buf, &keysym, 0 ); if ( IsHome( keysym ) ) { draw_item( m, *val, FL_FLAT_BOX ); *val = get_valid_entry( m, 1, -1 ); draw_item( m, *val, FL_UP_BOX ); } else if ( IsEnd( keysym ) ) { draw_item( m, *val, FL_FLAT_BOX ); *val = get_valid_entry( m, m->nitems, 1 ); draw_item( m, *val, FL_UP_BOX ); } else if ( IsUp( keysym ) ) { draw_item( m, *val, FL_FLAT_BOX ); *val = get_valid_entry( m, *val - 1, -1 ); draw_item( m, *val, FL_UP_BOX ); } else if ( IsDown( keysym ) ) { draw_item( m, *val, FL_FLAT_BOX ); *val = get_valid_entry( m, *val + 1, 1 ); draw_item( m, *val, FL_UP_BOX ); } else if ( IsRight( keysym ) ) { if ( *val > 0 && *val <= m->nitems && m->item[ *val - 1 ]->subm ) { oldval = *val; if ( handle_submenu( m, m->item[ *val - 1 ], val ) ) keysym = XK_Return; else *val = oldval; } } else if ( IsLeft( keysym ) ) { *val = -1; keysym = XK_Escape; } else if ( keysym == XK_Escape || keysym == XK_Cancel ) { draw_item( m, *val, FL_FLAT_BOX ); *val = -1; } else if ( keysym == XK_Return ) { if ( *val > 0 && *val <= m->nitems && m->item[ *val - 1 ]->subm ) handle_submenu( m, m->item[ *val - 1 ], val ); } else { if ( ( i = handle_shortcut( m, keysym, xev->state ) ) ) { *val = i; handle_submenu( m, m->item[ *val - 1 ], val ); keysym = XK_Return; } else pup_using_keys = 0; } if ( oldval != *val && ( m->enter_cb || m->leave_cb ) ) { if ( oldval > 0 && oldval <= m->nitems && m->leave_cb ) m->leave_cb( m->item[ oldval - 1 ]->ret, m->leave_data ); if ( *val > 0 && *val <= m->nitems && m->enter_cb ) m->enter_cb( m->item[ *val - 1 ]->ret, m->enter_data ); } return keysym == XK_Escape || keysym == XK_Return || keysym == XK_Cancel; } /*************************************** * mouse moved. val is set to the item number (not value) upon return ***************************************/ static MenuItem * handle_motion( PopUP * m, int mx, int my, int * val ) { int cval = -1; MenuItem *item = NULL; static MenuItem *lastitem = NULL; static PopUP *lastm = NULL; if ( mx >= 0 && mx <= ( int ) m->w && my >= 0 && my <= ( int ) m->h - ( FL_abs( m->bw ) > 2 ) - ( m->padh > 1 ) ) { cval = m->nitems - ( m->h - ( FL_abs( m->bw ) > 2 ) - ( m->padh > 1 ) - my ) / m->cellh; if ( cval > 0 ) item = m->item[ cval - 1 ]; } if ( cval != *val || m != lastm ) { draw_item( m, *val, FL_FLAT_BOX ); draw_item( m, cval, FL_UP_BOX ); *val = cval; } if ( item && item->mode & FL_PUP_GREY ) item = NULL; if ( lastitem && item != lastitem && m->leave_cb ) m->leave_cb( lastitem->ret, m->leave_data ); if ( item && item != lastitem && m->enter_cb ) m->enter_cb( item->ret, m->enter_data ); lastitem = item; lastm = m; return item; } /*************************************** * Interaction routine. If mouse is released on the title bar, * consider its a "hanging" pop-up request else return ***************************************/ static int pup_interact( PopUP * m ) { XEvent ev; int val = 0, done = 0, timer_cnt = 0; MenuItem *item; m->event_mask |= KeyPressMask; ev.xmotion.time = 0; /* If the new popup was opened due to a key press mark the first active entry as currently selected */ if ( pup_using_keys ) { int i; for ( i = 1; i < m->nitems; i++ ) { if ( m->item[ i - 1 ]->mode & FL_PUP_GREY ) continue; draw_item( m, i, FL_UP_BOX ); val = i; break; } } while ( ! done ) { long msec = fli_context->idle_delta; if ( fli_context->timeout_rec ) fli_handle_timeouts( &msec ); if ( ! XCheckWindowEvent( flx->display, m->win, m->event_mask, &ev ) ) { /* If the mouse button was released or pressed not within the popup's window we're through with the popup */ if ( XCheckTypedEvent( flx->display, ButtonPress, &ev ) || XCheckTypedEvent( flx->display, ButtonRelease, &ev ) ) { val = -1; break; } if ( timer_cnt++ % 10 == 0 ) { timer_cnt = 0; fli_handle_idling( &ev, msec, 1 ); fl_winset( m->win ); } continue; } timer_cnt = 0; fli_int.query_age++; switch ( ev.type ) { case Expose: draw_popup( m ); XSync( flx->display, 0 ); break; case MotionNotify: fli_compress_event( &ev, ButtonMotionMask ); /* fall through */ case ButtonPress: /* taking adv. of xbutton.x == xcrossing.x */ fli_int.mousex = ev.xmotion.x; fli_int.mousey = ev.xmotion.y; fli_int.keymask = ev.xmotion.state; fli_int.query_age = 0; pup_using_keys = 0; item = handle_motion( m, ev.xbutton.x, ev.xbutton.y, &val ); if ( item && item->subm >= 0 && ev.xbutton.x >= 0 ) { unsigned int keymask; int old_val = val; done = handle_submenu( m, item, &val ); fl_get_win_mouse( m->win, &ev.xbutton.x, &ev.xbutton.y, &keymask ); if ( ! ( done = keymask ? done : 1 ) ) draw_item( m, old_val, FL_FLAT_BOX ); } else if ( pup_level > 1 && val < 0 ) done = ev.xbutton.x < 0 && ( ev.xbutton.y <= m->par_y || ev.xbutton.y > m->par_y + m->cellh ); break; case ButtonRelease: fli_int.mousex = ev.xbutton.x; fli_int.mousey = ev.xbutton.y; fli_int.keymask = ev.xbutton.state; fli_int.query_age = 0; item = handle_motion( m, ev.xbutton.x, ev.xbutton.y, &val ); if ( item && item->subm >= 0 && val != -1 ) done = handle_submenu( m, item, &val ); else done = val != 0; break; case KeyPress: fli_int.mousex = ev.xkey.x; fli_int.mousey = ev.xkey.y; fli_int.keymask = ev.xkey.state; fli_int.query_age = 0; pup_using_keys = 1; done = pup_keyboard( ( XKeyEvent * ) &ev, m, &val ); break; case UnmapNotify: /* must be by external routine */ done = 1; val = -1; break; } } return val; } /*************************************** ***************************************/ static void grab_both( PopUP * m ) { unsigned int evmask = m->event_mask; /* Set the window we're using */ fl_winset( m->win ); /* Get rid of all non-pointer events in event_mask */ evmask &= ~ ( ExposureMask | KeyPressMask ); XSync( flx->display, 0 ); fl_msleep( 30 ); XChangeActivePointerGrab( flx->display, evmask, m->cursor, CurrentTime ); /* Do pointer and keyboard grab */ if ( XGrabPointer( flx->display, m->win, False, evmask, GrabModeAsync, GrabModeAsync, None, m->cursor, CurrentTime ) != GrabSuccess ) M_err( "grab_both", "Can't grab pointer" ); if ( XGrabKeyboard( flx->display, m->win, False, GrabModeAsync, GrabModeAsync, CurrentTime ) != GrabSuccess ) { M_err( "grab_both", "Can't grab keyboard" ); XUngrabPointer( flx->display, CurrentTime ); } } /*************************************** * Main routine for creating, doing interaction and removing a popup window ***************************************/ int fl_dopup( int n ) { PopUP *m = menu_rec + n; int val = 0; MenuItem *item = 0; XEvent xev; if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used ) { M_err( "fl_dopup", "bad pupID: %d\n", n ); return -1; } if ( pup_level == 0 ) fli_context->pup_id = n; pup_subreturn = -1; pup_level++; pup_internal_showpup_call = 1; fl_showpup( n ); /* If one opens a touch menu and is fast enough to move the mouse out of the window before the grab is active an extra EnterNotify event comes in that results in the touch menu getting opened again after closing it, so delete all such events for the form the touch menu belongs to. */ if ( m->form && m->form->window ) while ( XCheckWindowEvent( flx->display, m->form->window, EnterWindowMask, &xev ) ) /* empty */ ; /* pup_interact() returns the item number */ val = pup_interact( m ); if ( m->win ) { XUnmapWindow( flx->display, m->win ); wait_for_close( m->win ); } else M_err( "fl_dopup", "Window already closed" ); /* The following is necessary because 'save_under' may not be supported. Both the forms under the closed popup window and higher level popup window may require a redraw if the had become (partially) hidden. */ if ( pup_level > 1 && ! DoesSaveUnders( ScreenOfDisplay( flx->display, fl_screen ) ) ) { FL_FORM *form; while ( XCheckMaskEvent( flx->display, ExposureMask, &xev ) != False ) if ( ( form = fl_win_to_form( ( ( XAnyEvent * ) &xev )->window ) ) != NULL ) { fl_winset( form->window ); fl_redraw_form( form ); } else { int i; for ( i = 0; i < fl_maxpup; i++ ) if ( menu_rec[ i ].win == ( ( XAnyEvent * ) &xev )->window ) { fl_winset( menu_rec[ i ].win ); draw_popup( menu_rec + i ); } } } if ( pup_level > 1 ) { /* Need to remove all MotionNotify otherwise wrong coord */ while ( XCheckMaskEvent( flx->display, ButtonMotionMask, &xev ) ) /* empty */ ; } /* Handle callback if any */ pup_level--; if ( val > 0 && val <= m->nitems && ( pup_subreturn < 0 || ( pup_subreturn > 0 && pup_level > 0 ) ) ) { item = m->item[ val - 1 ]; /* If we ended up on a disabled item or one that points to a submenu return -1 to indicate nothing got selected */ if ( item->mode & FL_PUP_GREY || item->subm >= 0 ) { fli_context->pup_id = -1; return -1; } if ( item->radio ) reset_radio( m, item ); else if ( item->mode & FL_PUP_CHECK ) { item->mode &= ~ FL_PUP_CHECK; item->mode |= FL_PUP_BOX; } else if ( item->mode & FL_PUP_BOX ) item->mode |= FL_PUP_CHECK; val = item->ret; if ( item->icb ) val = item->icb( val ); if ( val > 0 && m->menu_cb ) val = m->menu_cb( val ); } if ( pup_level <= 0 ) fli_context->pup_id = -1; if ( pup_subreturn > 0 ) val = pup_subreturn; return val; } /*************************************** ***************************************/ void fl_freepup( int n ) { PopUP *p = menu_rec + n; int i; if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used ) return; if ( ! p->used ) { M_warn( "freepup", "freeing an unallocated/free'ed popup %d\n", n ); return; } for ( i = 0; i < p->nitems; i++ ) { if ( p->item[ i ] ) { if ( p->item[ i ]->subm >= 0 && p->isEntry ) fl_freepup( p->item[ i ]->subm ); fl_safe_free( p->item[ i ]->str ); fl_safe_free( p->item[ i ]->shortcut ); } fl_safe_free( p->item[ i ] ); } p->used = 0; if ( p->gc_active != None ) XFreeGC( flx->display, p->gc_active ); if ( p->gc_inactive != None ) XFreeGC( flx->display, p->gc_inactive ); fl_safe_free( p->title ); close_pupwin( p ); } /* * Some convenience functions */ /*************************************** ***************************************/ void fl_setpup_shortcut( int nm, int ni, const char * sc ) { MenuItem *item; if ( sc && ( item = requested_item_is_valid( "pupshortcut", nm, ni ) ) ) convert_shortcut( sc, item->str, item, NSC ); } /*************************************** * ***************************************/ FL_PUP_CB fl_setpup_menucb( int nm, FL_PUP_CB cb ) { PopUP *m; FL_PUP_CB oldcb; if ( nm < 0 || nm >= fl_maxpup || ! menu_rec[ nm ].used ) return NULL; m = menu_rec + nm; oldcb = m->menu_cb; m->menu_cb = cb; return oldcb; } /*************************************** ***************************************/ FL_PUP_ENTERCB fl_setpup_entercb( int nm, FL_PUP_ENTERCB cb, void * data ) { FL_PUP_ENTERCB oldcb; PopUP *m; int n, subm; if ( nm < 0 || nm >= fl_maxpup || ! menu_rec[ nm ].used ) return NULL; m = menu_rec + nm; oldcb = m->enter_cb; m->enter_cb = cb; m->enter_data = data; for ( n = 0; n < m->nitems; n++ ) if ( ( subm = m->item[ n ]->subm ) >= 0 && ! menu_rec[ subm ].enter_cb ) fl_setpup_entercb( subm, cb, data ); return oldcb; } /*************************************** ***************************************/ FL_PUP_LEAVECB fl_setpup_leavecb( int nm, FL_PUP_LEAVECB cb, void * data ) { FL_PUP_LEAVECB oldcb; PopUP *m; int n, subm; if ( nm < 0 || nm >= fl_maxpup || ! menu_rec[ nm ].used ) return NULL; m = menu_rec + nm; oldcb = m->leave_cb; m->leave_cb = cb; m->leave_data = data; for ( n = 0; n < m->nitems; n++ ) if ( ( subm = m->item[ n ]->subm ) >= 0 && ! menu_rec[ subm ].enter_cb ) fl_setpup_leavecb( subm, cb, data ); return oldcb; } /*************************************** ***************************************/ FL_PUP_CB fl_setpup_itemcb( int nm, int ni, FL_PUP_CB cb ) { MenuItem *item; FL_PUP_CB oldcb = NULL; if ( ( item = requested_item_is_valid( "fl_setpup_itemcb", nm, ni ) ) ) { oldcb = item->icb; item->icb = cb; } return oldcb; } /*************************************** ***************************************/ void fl_setpup_title( int nm, const char * title ) { PopUP *m = menu_rec + nm; char *t, *b; if ( nm < 0 || nm >= fl_maxpup || ! menu_rec[ nm ].used || ! title ) return; fl_safe_free( m->title ); m->title = fl_strdup( title ? title : "" ); b = t = fl_strdup( title ? title : "" ); while ( ( b = strchr( b, '\b' ) ) ) memmove( b, b + 1, strlen( b ) ); m->title_width = XTextWidth( pup_title_font_struct, t, strlen( t ) ); fl_free( t ); } /*************************************** ***************************************/ Cursor fl_setpup_cursor( int nm, int cursor ) { PopUP *m; Cursor old; if ( nm < 0 || nm >= fl_maxpup || ! menu_rec[ nm ].used ) return None; m = menu_rec + nm; old = m->cursor; m->cursor = cursor ? fl_get_cursor_byname( cursor ) : pup_defcursor; return old; } /*************************************** ***************************************/ Cursor fl_setpup_default_cursor( int cursor ) { Cursor old_defcursor = pup_defcursor; pup_defcursor = fl_get_cursor_byname( cursor ); return old_defcursor; } /*************************************** ***************************************/ void fl_setpup_pad( int n, int padw, int padh ) { PopUP *m; if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used ) return; m = menu_rec + n; m->padh = padh; m->rpad = m->lpad = padw; m->cellh = pup_ascent + pup_desc + 2 * m->padh; } /*************************************** ***************************************/ static void recurse( PopUP * m, void ( * set )( int, int ), int val ) { int i; for ( i = 0; i < m->nitems; i++ ) if ( m->item[ i ]->subm ) set( m->item[ i ]->subm, val ); } /*************************************** ***************************************/ void fl_setpup_shadow( int n, int y FL_UNUSED_ARG ) { if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used ) return; } /*************************************** ***************************************/ void fl_setpup_bw( int n, int bw ) { PopUP *m = menu_rec + n; int i; if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used ) return; m->bw = bw; for ( i = 0; i < m->nitems; i++ ) if ( m->item[ i ]->subm ) fl_setpup_bw( m->item[ i ]->subm, bw ); } /*************************************** ***************************************/ void fl_setpup_softedge( int n, int y ) { PopUP *m; if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used ) return; m = menu_rec + n; m->bw = y ? - FL_abs( m->bw ) : FL_abs( m->bw ); recurse( m, fl_setpup_softedge, y ); } /*************************************** ***************************************/ static void reset_radio( PopUP * m, MenuItem * item ) { MenuItem **ii; for ( ii = m->item; ii < m->item + m->nitems; ii++ ) if ( ( *ii )->radio == item->radio ) ( *ii )->mode &= ~ FL_PUP_CHECK; item->mode |= FL_PUP_CHECK; } /*************************************** ***************************************/ void fl_setpup_selection( int nm, int ni ) { MenuItem *item; if ( ( item = requested_item_is_valid( "fl_setpup_selection", nm, ni ) ) && item->radio ) reset_radio( menu_rec + nm, item ); } /*************************************** ***************************************/ void fl_setpup_submenu( int m, int i, int subm ) { MenuItem *item; if ( ( item = requested_item_is_valid( "fl_setpup_submenu", m, i ) ) ) { menu_rec[ m ].rpad = PADW + 16; item->subm = subm; } } /**** End of PUBLIC routines for pop-ups *******************}*/ /**** ALL drawing routines */ /*************************************** * draw item. Index starts from 1 ***************************************/ static void draw_item( PopUP * m, int i, int style ) { int j = i - 1; int bw = FL_abs( m->bw ); int x = bw, w = m->w - 2 * bw, y = m->titleh + m->cellh * j, h = m->cellh; char *str; MenuItem *item; GC gc; if ( j < 0 || j >= m->nitems ) return; item = m->item[ j ]; gc = ( item->mode & FL_PUP_GREY ) ? m->gc_inactive : m->gc_active; str = item->str; if ( ! ( item->mode & FL_PUP_GREY ) ) fl_drw_box( style, x + 1, y, w - 2, h - 1, pup_color, m->bw == -1 ? -1 : -2 ); if ( item->mode & FL_PUP_BOX && ! ( item->mode & FL_PUP_CHECK ) ) { int w = CHECKW + ( item->radio ? 0 : 2 ); int bbw = item->radio ? -2 : -1; ( item->radio ? fl_drw_checkbox : fl_drw_box ) ( FL_UP_BOX, 2 * bw + ( m->lpad - w ) / 2, y + ( h - CHECKW ) / 2 - 2, w, w, pup_color, bbw ); } if ( item->mode & FL_PUP_CHECK ) { int w = CHECKW + ( item->radio ? 0 : 2 ); int bbw = item->radio ? -3 : -2; ( item->radio ? fl_drw_checkbox : fl_drw_box ) ( FL_DOWN_BOX, 2 * bw + ( m->lpad - w ) / 2, y + ( h - CHECKW ) / 2 - 2, w, w, fli_depth( fl_vmode ) == 1 ? FL_BLACK : pup_checked_color, bbw ); } /* show text */ j = str[ 0 ] == '\010'; fli_drw_stringTAB( m->win, gc, m->lpad + 2 * bw, y + m->padh + pup_ascent, pup_font_style, pup_font_size, str + j, strlen( str ) - j, 0 ); /* do underline */ if ( item->ulpos >= 0 ) { XRectangle *xr; xr = fli_get_underline_rect( pup_font_struct, m->lpad + 2 * bw, y + m->padh + pup_ascent, str, item->ulpos ); XFillRectangle( flx->display, m->win, gc, xr->x, xr->y, xr->width, xr->height ); } if ( j ) fl_draw_symbol( "@DnLine", 2 * bw, y + h - 2, m->w - 4 * bw, 1, FL_COL1 ); if ( item->subm >= 0 ) fl_draw_symbol( ( style == FL_UP_BOX && ! ( item->mode & FL_PUP_GREY ) ) ? "@DnArrow" : "@UpArrow", m->w - 2 * bw - 9 - m->rpad / 2, y + h / 2 - 8, 16, 16, FL_BLACK ); } /*************************************** ***************************************/ static void draw_title( Display * d, Drawable w, int x, int y, char * s ) { char *t, *b; int n; if ( ! s || ! * s ) return; #if 0 fl_drw_text( FL_ALIGN_CENTER, x - 2, y - 5, XTextWidth( pup_font_struct, s, strlen( s ) ), 0, FL_SLATEBLUE, pup_title_font_size, pup_title_font_style + FL_EMBOSSED_STYLE, s ); #else b = t = fl_strdup( s ); while ( ( b = strchr( b, '\b' ) ) ) memmove( b, b + 1, strlen( b ) ); n = strlen( t ); fl_set_font( pup_title_font_style, pup_title_font_size ); fl_textcolor( pup_text_color ); XDrawString( d, w, flx->textgc, x - 1, y - 1, t, n ); XDrawString( d, w, flx->textgc, x, y - 1, t, n ); XDrawString( d, w, flx->textgc, x + 1, y - 1, t, n ); XDrawString( d, w, flx->textgc, x - 1, y, t, n ); XDrawString( d, w, flx->textgc, x + 1, y, t, n ); XDrawString( d, w, flx->textgc, x - 1, y + 1, t, n ); XDrawString( d, w, flx->textgc, x, y + 1, t, n ); XDrawString( d, w, flx->textgc, x + 1, y + 1, t, n ); fl_textcolor( FL_WHITE ); XDrawString( d, w, flx->textgc, x, y, t, n ); fl_free( t ); #endif } /*************************************** * Instead of poping up the menu at mouse location, use externally * set position. Good for programmatical pop-ups ***************************************/ static int extpos = 0; static FL_Coord extx = 0, exty = 0; void fl_setpup_position( int x, int y ) { extpos = 1; extx = x; exty = y; } /*************************************** ***************************************/ static void draw_popup( PopUP * m ) { int i; if ( m->title && *m->title ) m->titleh = pup_title_ascent + pup_title_desc + PADTITLE; else m->titleh = m->padh; /* make the popup box */ fl_drw_box( FL_UP_BOX, 0, 0, m->w, m->h, pup_color, m->bw ); /* title box */ if ( m->title && *m->title ) { fl_drw_box( FL_FRAME_BOX, 3, 3, m->w - 6, m->titleh - 6, pup_color, 1 ); draw_title( flx->display, m->win, ( m->w - m->title_width ) / 2, PADTITLE / 2 + pup_title_ascent, m->title ); } for ( i = 1; i <= m->nitems; i++ ) draw_item( m, i, FL_FLAT_BOX ); } /*************************************** ***************************************/ void fl_showpup( int n ) { PopUP *m = menu_rec + n; int req_y = exty; unsigned int dummy; if ( n < 0 || n >= fl_maxpup || ! menu_rec[ n ].used ) { M_err( "fl_showpup", "bad pupID: %d\n", n ); return; } /* Calculate the height of the title */ if ( m->title ) m->titleh = pup_title_ascent + pup_title_desc + PADTITLE; else m->titleh = m->padh; /* Calculate the total width and height of the popup */ m->maxw = FL_max( m->title_width, m->maxw ); m->w = m->maxw + m->rpad + m->lpad + 4 * FL_abs( m->bw ); m->h = m->nitems * m->cellh + m->titleh + 1 + ( m->padh > 1 ) + 2 * ( FL_abs( m->bw ) > 2 ); /* If no external coordinates are set open the popup at the mouse position, otherwise take care that negative coordinates specify the lower right hand corner of the popup */ if ( ! extpos ) fl_get_mouse( &m->x, &m->y, &dummy ); else { if ( extx >= 0 ) m->x = extx; else m->x = - extx - m->w; if ( exty >= 0 ) m->y = exty; else m->y = - exty - m->h; } /* Try to make sure the popup is within the root window */ if ( m->x + m->w > ( unsigned int ) fl_scrw ) m->x = fl_scrw - m->w; if ( m->y + m->h > ( unsigned int ) fl_scrh ) m->y = fl_scrh - m->h; /* If the root window is too small show whatever we can */ if ( m->x < 0 ) m->x = 0; if ( m->y < 0 ) m->y = 0; /* Warp the mouse to the upper left hand corner of the popup unless external coordinates are specified */ if ( ! extpos && ( m->x != extx || m->y != exty ) ) XWarpPointer( flx->display, None, fl_root, 0, 0, 0, 0, m->x + FL_abs( m->bw ), m->y + FL_abs( m->bw ) ); /* Forget that an external position had been set so it won't get reused for another popup */ extpos = 0; /* If the window doesn't exist yet create it, otherwise move it to the requested position and, if necessary, resize it */ if ( m->win == None) { XSetWindowAttributes xswa; unsigned long int vmask; m->event_mask = ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | OwnerGrabButtonMask | PointerMotionHintMask | StructureNotifyMask /* for UnmapNotify */ | EnterWindowMask | KeyPressMask; xswa.event_mask = m->event_mask; xswa.save_under = True; xswa.backing_store = WhenMapped; xswa.override_redirect = True; xswa.cursor = m->cursor; xswa.border_pixel = 0; xswa.colormap = fli_colormap( fl_vmode ); xswa.do_not_propagate_mask = ButtonPress | ButtonRelease | KeyPress; vmask = CWEventMask | CWSaveUnder | CWBackingStore | CWCursor | CWBorderPixel | CWColormap | CWDontPropagate | CWOverrideRedirect; m->win = XCreateWindow( flx->display, fl_root, m->x, m->y, m->w, m->h, 0, fli_depth( fl_vmode ), InputOutput, fli_visual( fl_vmode ), vmask, &xswa ); XSetTransientForHint( flx->display, m->win, fl_root ); XStoreName( flx->display, m->win, m->title ); if ( ! m->gc_active && ! m->gc_inactive ) { XGCValues xgcv; xgcv.foreground = fl_get_flcolor( pup_text_color ); xgcv.font = pup_font_struct->fid; xgcv.stipple = FLI_INACTIVE_PATTERN; vmask = GCForeground | GCFont | GCStipple; /* GC for main text */ m->gc_active = XCreateGC( flx->display, m->win, vmask, &xgcv ); /* GC for inactive text */ xgcv.foreground = fl_get_flcolor( FL_INACTIVE ); m->gc_inactive = XCreateGC( flx->display, m->win, vmask, &xgcv ); /* special hack for B&W */ if ( fli_dithered( fl_vmode ) ) XSetFillStyle( flx->display, m->gc_inactive, FillStippled ); } XSetWMColormapWindows( flx->display, fl_root, &m->win, 1 ); } else { Window r; int ax, ay; unsigned int aw, ah; XGetGeometry( flx->display, m->win, &r, &ax, &ay, &aw, &ah, &dummy, &dummy ); if ( m->x != ax || m->y != ay || m->w != aw || m->h != ah ) XMoveResizeWindow( flx->display, m->win, m->x, m->y, m->w, m->h ); } XMapRaised( flx->display, m->win ); /* The function gets either called directly from a user program or via the fl_dopup() function. In the first case we need to draw the pupup and then remove all events the creation of the window produced (after a sync so that we can be sure all events are already on the event queue). */ if ( ! pup_internal_showpup_call ) { XEvent ev; fl_winset( m->win ); XSync( flx->display, False ); while ( XCheckWindowEvent( flx->display, m->win, AllEventsMask, &ev) ) /* empty */ ; } else { m->par_y = m->padh + req_y - m->y; grab_both( m ); pup_internal_showpup_call = 0; } draw_popup( m ); } /*************************************** ***************************************/ void fl_hidepup( int n ) { if ( n >= 0 && n < fl_maxpup ) close_pupwin( menu_rec + n ); if ( n == fli_context->pup_id ) fli_context->pup_id = -1; } /*************************************** ***************************************/ unsigned int fl_getpup_mode( int nm, int ni ) { MenuItem *item; if ( ( item = requested_item_is_valid( "fl_getpup_mode", nm, ni ) ) ) return item->mode; return 0; } /*************************************** ***************************************/ const char * fl_getpup_text( int nm, int ni ) { MenuItem *item; if ( ( item = requested_item_is_valid( "fl_getpup_text", nm, ni ) ) ) return item->str; return NULL; } /*************************************** ***************************************/ void fli_replacepup_text( int nm, int ni, const char * nt ) { MenuItem *item; if ( ! nt ) nt = ""; if ( ( item = requested_item_is_valid( "fli_replacepup_text", nm, ni ) ) ) { fl_safe_free( item->str ); item->str = fl_strdup( nt ); } } /*************************************** ***************************************/ int fl_setpup_maxpup( int n ) { int i, j; if ( n < FL_MAXPUP ) return FL_MAXPUP; fli_init_pup( ); menu_rec = fl_realloc( menu_rec, n * sizeof *menu_rec ); for ( i = fl_maxpup; i < n; i++ ) { menu_rec[ i ].used = 0; menu_rec[ i ].title = NULL; menu_rec[ i ].win = None; menu_rec[ i ].cursor = None; menu_rec[ i ].gc_active = menu_rec[ i ].gc_inactive = None; for ( j = 0; j <= FL_MAXPUPI; j++ ) menu_rec[ i ].item[ j ] = NULL; menu_rec[ i ].menu_cb = NULL; menu_rec[ i ].enter_cb = menu_rec[ i ].leave_cb = NULL; menu_rec[ i ].enter_data = menu_rec[ i ].leave_data = NULL; } return fl_maxpup = n; } /*************************************** * Build the menu using low-level pup support ***************************************/ static int generate_menu( int n, const FL_PUP_ENTRY * pup, int top ) { static const FL_PUP_ENTRY *p = NULL; static PopUP *menu = NULL; static int val = 0; if ( top ) { val = 1; menu = menu_rec + n; menu->isEntry = 1; p = pup; } if ( ! p || ! p->text ) return n; for ( ; p && p->text; p++, val++ ) { int cnt = 0; char *t, *w; /* Count number of '%' */ for ( w = ( char * ) p->text; *w; w++ ) if ( *w == '%' ) cnt++; /* Get copy of the string with enough room for all further additions */ w = t = fl_malloc( strlen( p->text ) + cnt + 6 + log10( INT_MAX ) ); strcpy( t, p->text ); /* Double all '%' */ while ( *w && ( w = strchr( w, '%' ) ) ) { memmove( w + 1, w, strlen( w ) + 1 ); w += 2; } if ( *t != '/' ) /* regular entry */ { if ( *t == '_' ) *t = '\010'; sprintf( t + strlen( t ), "%%x%d", val ); fl_addtopup( n, t ); if ( p->mode ) fl_setpup_mode( n, val, p->mode ); if ( p->shortcut && *p->shortcut ) fl_setpup_shortcut( n, val, p->shortcut ); if ( p->callback ) fl_setpup_itemcb( n, val, p->callback ); } else /* start of submenu */ { int m = fl_newpup( menu->form ? menu->form->window : None ); if ( t[ 1 ] == '_' ) t[ 1 ] = '\010'; sprintf( t + strlen( t ), "%%x%d%%m", val ); fl_addtopup( n, t + 1, m ); if ( p->shortcut && *p->shortcut ) fl_setpup_shortcut( n, val, p->shortcut ); if ( p->mode & FL_PUP_GREY ) fl_setpup_mode( n, val, p->mode & FL_PUP_GREY ); val++; generate_menu( m, ++p, 0 ); menu_rec[ m ].isEntry = 1; } fl_free( t ); } return n; } /*************************************** ***************************************/ int fl_setpup_entries( int n, FL_PUP_ENTRY * entries ) { return generate_menu( n, entries, 1 ); } /*************************************** ***************************************/ int fl_getpup_items( int n ) { int m = 0, k, i; if ( n >= 0 && n < fl_maxpup && menu_rec[ n ].used ) { m = k = menu_rec[ n ].nitems; for ( i = 0; i < k; i++ ) if ( menu_rec[ n ].item[ i ]->subm >= 0 ) m += fl_getpup_items( menu_rec[ n ].item[ i ]->subm ); } return m; } /*************************************** ***************************************/ int fl_current_pup( void ) { return fli_context->pup_id; } /*************************************** ***************************************/ int fl_setpup_default_bw( int bw ) { int ori = pup_bw; pup_bw = bw; pup_bw_is_set = 1; return ori; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/xtext.c0000644000175000017500000006175011253143330014320 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file xtext.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * All text routines. There are rooms for speed ups. For one, font * switching can be reduced somewhat. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include static int UL_thickness = -1; static int UL_propwidth = 1; /* 1 for proportional. 0 for constant */ static void do_underline( FL_Coord, FL_Coord, const char *, int ); static void do_underline_all( FL_Coord, FL_Coord, const char *, int ); #define LINES 1024 #define LINES_INCREMENT 512 static char **lines = NULL; static int *start = NULL; /* start position of these lines */ static int *startx = NULL; /* start x-FL_coordinate of these lines */ static int *starty = NULL; /* start y-FL_coordinate of these lines */ static int *slen = NULL; static int nlines = LINES; static int max_pixelline; /*************************************** ***************************************/ static void extend_workmem( int nl ) { lines = fl_realloc( lines, nl * sizeof *lines ); start = fl_realloc( start, nl * sizeof *start ); startx = fl_realloc( startx, nl * sizeof *startx ); starty = fl_realloc( starty, nl * sizeof *starty ); slen = fl_realloc( slen, nl * sizeof *slen ); } /*************************************** ***************************************/ void fli_free_xtext_workmem( void ) { fl_safe_free( lines ); fl_safe_free( start ); fl_safe_free( startx ); fl_safe_free( starty ); fl_safe_free( slen ); } /*************************************** ***************************************/ int fli_get_maxpixel_line( void ) { return max_pixelline; } /* wrong, but looks nicer */ #define CDELTA ( flx->fdesc / 3 ) typedef int ( * DrawString )( Display *, Drawable, GC, int, int, const char *, int ); /*************************************** * Major text drawing routine * clip == 0: no clipping * clip == 1: do clipping here * clip == -1: clipping is done outside of this routine ***************************************/ int fli_drw_string( int horalign, int vertalign, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int clip, FL_COLOR backcol, FL_COLOR forecol, FL_COLOR curscol, int style, int size, int curspos, int selstart, int selend, const char * istr, int img, int topline, int endline, FL_COLOR bkcol ) { int i; int width; /* string width of the lines */ int lnumb; /* number of lines */ FL_Coord height; int slstart, slend; /* Temporary selection positions */ int xsel, wsel; /* position and width of selection area */ /* underline stuff */ char *p, newlabel[ 256 ]; int ulpos; int max_pixels = 0; int cdelta; DrawString XdrawString; char *str = fl_strdup( istr ); if ( flx->win == None ) { fl_safe_free( str ); return 0; } if ( ! startx ) extend_workmem( nlines = LINES ); /* Check whether anything has to be done */ if ( curspos != 0 && ( ! str || ! *str ) ) return max_pixels; XdrawString = img ? XDrawImageString : XDrawString; fl_set_font( style, size ); height = flx->fheight - flx->fdesc; /* Set clipping if required */ if ( clip > 0 ) fl_set_text_clipping( x, y, w, h ); /* Split string into lines */ *lines = str; *start = 0; *slen = 0; lnumb = 1; i = 0; redo: while ( str[ i ] && lnumb < nlines - 1 ) { slen[ lnumb - 1 ]++; if ( str[ i++ ] == '\n' ) { str[ i - 1 ] = '\0'; slen[ lnumb - 1 ]--; /* remove '\0'. from spl */ lines[ lnumb ] = str + i; start[ lnumb ] = i; slen[ lnumb ] = 0; lnumb++; } } if ( str[ i ] ) { extend_workmem( nlines += LINES_INCREMENT ); goto redo; } start[ lnumb ] = i + 1; if ( ( topline -= 2 ) < 0 || topline > lnumb ) topline = 0; if ( endline > lnumb || endline <= 0 ) endline = lnumb; /* using fl_fheight etc. is not theorectically correct since it is the max height. For lines that do not have desc, we are overestimating the height of the string. */ /* Calculate start FL_coordinates of lines */ cdelta = CDELTA; for ( i = topline; i < endline; i++ ) { width = XTextWidth( flx->fs, lines[ i ], slen[ i ] ); if ( width > max_pixels ) { max_pixels = width; max_pixelline = i; } if ( i < topline || i > endline ) continue; if ( horalign == FL_ALIGN_LEFT ) startx[ i ] = x; else if ( horalign == FL_ALIGN_CENTER ) startx[ i ] = x + 0.5 * ( w - width ); else if ( horalign == FL_ALIGN_RIGHT ) startx[ i ] = x + w - width; if ( vertalign == FL_ALIGN_BOTTOM ) starty[ i ] = y + h - 1 + ( i - lnumb ) * flx->fheight + height; else if ( vertalign == FL_ALIGN_CENTER ) starty[ i ] = y + 0.5 * h + ( i - 0.5 * lnumb ) * flx->fheight + height + cdelta; else if ( vertalign == FL_ALIGN_TOP ) starty[ i ] = y + i * flx->fheight + height; } fl_bk_textcolor( bkcol ); for ( i = topline; i < endline; i++ ) { /* If clipping, check whether any of the font is visible */ if ( clip != 0 && starty[ i ] - flx->fasc > y + h ) break; ulpos = -1; /* Check if have underline request */ if ( ( p = strchr( lines[ i ], *fl_ul_magic_char ) ) ) { char *q; ulpos = p - lines[ i ]; q = newlabel; for ( p = lines[ i ]; *p; p++ ) if ( *p != *fl_ul_magic_char ) *q++ = *p; *q = 0; #if FL_DEBUG >= ML_DEBUG M_info2( "fli_drw_string", "new = %s old = %s", newlabel, lines[ i ] ); #endif lines[ i ] = newlabel; slen[ i ] = strlen( lines[ i ] ); startx[ i ] += XTextWidth( flx->fs, fl_ul_magic_char, 1 ) / 2; } /* Draw it */ fl_textcolor( forecol ); XdrawString( flx->display, flx->win, flx->textgc, startx[ i ], starty[ i ], lines[ i ], slen[ i ] ); /* setup correct underline color in proper GC */ if ( ulpos > 0 ) { fl_color( forecol ); do_underline( startx[ i ], starty[ i ], lines[ i ], ulpos - 1 ); } else if ( ulpos == 0 ) { fl_color( forecol ); do_underline_all( startx[ i ], starty[ i ], lines[ i ], slen[ i ] ); } /* Draw selection area if required. */ if ( selstart < start[ i + 1 ] && selend > start[ i ] ) { size_t len; if ( selstart <= start[ i ] ) slstart = start[ i ]; else slstart = selstart; if ( selend >= start[ i + 1 ] ) slend = start[ i + 1 ] - 1; else slend = selend; xsel = startx[ i ] + XTextWidth( flx->fs, lines[ i ], slstart - start[ i ] ); len = slend - slstart; wsel = XTextWidth( flx->fs, str + slstart, len ); if ( wsel > w ) wsel = w + 1; fl_rectf( xsel, starty[ i ] - height, wsel, flx->fheight, forecol ); fl_textcolor( backcol ); XdrawString( flx->display, flx->win, flx->textgc, xsel, starty[ i ], str + slstart, len ); } } /* Draw the cursor */ if ( curspos >= 0 && w - 2 > 0 && h > 0 ) { int tt; for ( i = 0; i < lnumb && start[ i ] <= curspos; i++ ) /* empty */; i--; tt = XTextWidth( flx->fs, lines[ i ], curspos - start[ i ] ); fl_set_clipping( x, y, w - 2, h ); fl_rectf( startx[ i ] + tt, starty[ i ] - height, 2, flx->fheight, curscol ); fl_unset_clipping( ); } fl_free( str ); /* Reset clipping if required */ if ( clip > 0 ) fl_unset_text_clipping( ); return max_pixels; } /*************************************** *routine returning the position of the mouse in a string ***************************************/ int fli_get_pos_in_string( int horalign, int vertalign, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int style, int size, FL_Coord xpos, FL_Coord ypos, const char * str, int * xp, int * yp ) { int i, i0, len; int lnumb; /* number of lines */ int theline; /* number of line in which the mouse lies */ int width; /* string width of this line */ const char *line; /* line in which mouse lies */ int xstart; /* start x-FL_coordinate of this line */ double toppos; /* y-FL_coord of the top line */ /* Check whether anything has to be done */ if ( ! str || ! *str ) return 0; fl_set_font( style, size ); /* Split string into lines */ start[ 0 ] = 0; for ( lnumb = 1, i = 0; str[ i ]; i++ ) if ( str[ i ] == '\n' ) start[ lnumb++ ] = i + 1; start[ lnumb ] = i + 1; /* Calculate line in which mouse lies */ if ( vertalign == FL_ALIGN_BOTTOM ) toppos = y + h - 1; else if ( vertalign == FL_ALIGN_CENTER ) toppos = y + 0.5 * h - 0.5 * lnumb * flx->fheight + CDELTA; else if ( vertalign == FL_ALIGN_TOP ) toppos = y; else toppos = y + 0.5 * h - 0.5 * lnumb * flx->fheight; theline = ( ypos - toppos ) / flx->fheight + 0.01; if ( theline < 0 ) { *yp = 1; theline = 0; } if ( theline >= lnumb ) { theline = lnumb - 1; *yp = lnumb; } line = str + start[ theline ]; *yp = theline + 1; /* Calculate start FL_coordinate of the line */ width = XTextWidth( flx->fs, ( char * ) line, start[ theline + 1 ] - start[ theline ] ); if ( horalign == FL_ALIGN_LEFT ) xstart = x; else if ( horalign == FL_ALIGN_CENTER ) xstart = x + 0.5 * ( w - width ); else if ( horalign == FL_ALIGN_RIGHT ) xstart = x + w - width; else xstart = x; /* total pixels away from the begining of line */ xpos = xpos + 2 - xstart; /* take a guess for the char offset. Assuming char H > W */ i0 = xpos / flx->fheight + 1; len = start[ theline + 1 ] - start[ theline ]; for ( i = i0; i < len; i++ ) { if ( XTextWidth( flx->fs, line, i ) > xpos ) { *xp = i - 1; return start[ theline ] + i - 1; } } *xp = len; return start[ theline + 1 ] - 1; } /*** Misselaneous text drawing routines ***/ /*************************************** * Draws a (multi-line) text with a cursor ***************************************/ void fl_drw_text_cursor( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int style, int size, const char * str, int cc, int pos ) { int horalign, vertalign; flx->fheight = fl_get_char_height( style, size, &flx->fasc, &flx->fdesc ); fli_get_hv_align( align, &horalign, &vertalign ); fli_drw_string( horalign, vertalign, x, y, w, h, 0, FL_WHITE, c, cc, style, size, pos, 0, -1, str, 0, 0, 0, 0 ); } /*************************************** ***************************************/ static void fli_draw_text_cursor( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * str, int style, int size, FL_COLOR c, FL_COLOR bc, FL_COLOR cc, int bk, int pos ) { int horalign, vertalign; flx->fheight = fl_get_char_height( style, size, &flx->fasc, &flx->fdesc ); fli_get_hv_align( align, &horalign, &vertalign ); fli_drw_string( horalign, vertalign, x, y, w, h, 0, FL_WHITE, c, cc, style, size, pos, 0, -1, str, bk, 0, 0, bc ); } #define D( x, y, c ) \ fli_draw_text_cursor( align, x, y, w, h, str, \ style,size, c, bc, 0, bk, -1 ) /*************************************** ***************************************/ void fli_draw_text_inside( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * istr, int style, int size, FL_COLOR c, FL_COLOR bc, int bk ) { int special = 0; int xoff, yoff; char *str; int sw = w, sh = h, sx = x, sy = y; if ( ! istr || ! *istr ) return; str = fl_strdup( istr ); if ( str[ 0 ] == '@' && str[ 1 ] != '@' ) { if ( w < 5 && h < 5 ) { sw = sh = 6 + 1.1 * size; sx -= sw / 2; sy -= sh / 2; } if ( fl_draw_symbol( str, sx, sy, sw, sh, c ) ) { fl_free( str ); return; } else str[ 0 ] = ' '; } if ( str[ 0 ] == '@' ) str++; xoff = 5; yoff = 4; x += xoff; w -= 2 * xoff; y += yoff; h -= 2 * yoff; if ( special_style( style ) ) { special = ( style / FL_SHADOW_STYLE ) * FL_SHADOW_STYLE; style %= FL_SHADOW_STYLE; } /* Take care of special effects stuff */ if ( special == FL_SHADOW_STYLE ) D( x + 2, y + 2, FL_BOTTOM_BCOL ); else if ( special == FL_ENGRAVED_STYLE ) { D( x - 1, y, FL_RIGHT_BCOL ); D( x, y - 1, FL_RIGHT_BCOL ); D( x - 1, y - 1, FL_RIGHT_BCOL ); D( x + 1, y, FL_TOP_BCOL ); D( x, y + 1, FL_TOP_BCOL ); D( x + 1, y + 1, FL_TOP_BCOL ); } else if ( special == FL_EMBOSSED_STYLE ) { D( x - 1, y, FL_TOP_BCOL ); D( x, y - 1, FL_TOP_BCOL ); D( x - 1, y - 1, FL_TOP_BCOL ); D( x + 1, y, FL_RIGHT_BCOL ); D( x, y + 1, FL_RIGHT_BCOL ); D( x + 1, y + 1, FL_RIGHT_BCOL ); } fli_draw_text_cursor( align, x, y, w, h, str, style, size, c, bc, 0, special ? 0 : bk, -1 ); fl_free( str ); } /*************************************** * Draws a text inside a box. ***************************************/ void fl_drw_text( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int style, int size, const char * istr ) { fli_draw_text_inside( align, x, y, w, h, istr, style, size, c, 0, 0 ); } /*************************************** ***************************************/ #if 0 void fl_draw_text_beside( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, char * str, int len, int style, int size, FL_COLOR c, FL_COLOR bc, int bk ) { int newa, newx, newy, dx = 0, dy = 0; if ( ! str || ! *str ) return; if ( align & FL_ALIGN_INSIDE ) M_warn( "drw_text_beside", "align request is inside" ); if ( align & FL_ALIGN_LEFT ) { if ( align & FL_ALIGN_BOTTOM || align & FL_ALIGN_TOP ) dx = - 4; else dx = 1; } else if ( align & FL_ALIGN_RIGHT ) { if ( align & FL_ALIGN_BOTTOM || align & FL_ALIGN_TOP ) dx = 4; else dx = - 1; } if ( align & FL_ALIGN_BOTTOM ) dy = - 2; else if ( align & FL_ALIGN_TOP ) dy = 2; x += dx; y += dy; fli_get_outside_align( align, x, y, w, h, &newa, &newx, &newy ); fli_draw_text_inside( align, x, y, w, h, str, style, size, c, bc, bk ); } #endif /*************************************** ***************************************/ void fl_drw_text_beside( int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR c, int style, int size, const char * str ) { int newa, newx, newy, dx = 0, dy = 0; if ( ! str || ! *str || w <= 0 || h <= 0 ) return; if ( align & FL_ALIGN_INSIDE ) M_warn( "drw_text_beside", "align request is inside" ); if ( align & FL_ALIGN_LEFT ) { if ( align & FL_ALIGN_BOTTOM || align & FL_ALIGN_TOP ) dx = - 4; else dx = 1; } else if ( align & FL_ALIGN_RIGHT ) { if ( align & FL_ALIGN_BOTTOM || align & FL_ALIGN_TOP ) dx = 4; else dx = - 1; } if ( align & FL_ALIGN_BOTTOM ) dy = - 2; else if ( align & FL_ALIGN_TOP ) dy = 2; x += dx; y += dy; fli_get_outside_align( align, x, y, w, h, &newa, &newx, &newy ); fl_drw_text( newa, newx, newy, w, h, c, style, size, str ); } /*************************************** * Do underlined text, single character only * if underline width to be proportional or fixed width ***************************************/ void fl_set_ul_property( int prop, int thickness ) { UL_propwidth = prop; if ( thickness > 0 ) UL_thickness = thickness; } #define DESC( c ) ( c == 'g' || c == 'j' || c == 'q' || c == 'y' || c == 'p' ) #define NARROW( c ) ( c == 'i' || c == 'j' || c == 'l' || c == 'f' || c == '1' ) /*************************************** ***************************************/ XRectangle * fli_get_underline_rect( XFontStruct * fs, FL_Coord x, FL_Coord y, const char * cstr, int n ) { static XRectangle xr; int ul_width, ul_rwidth, xoff; unsigned long ul_pos, ul_thickness = 0; char *str = ( char * ) cstr; int ch = *( str + n ); int pre; /* stuff in front of the string, such as ^H */ if ( UL_thickness < 0 ) XGetFontProperty( flx->fs, XA_UNDERLINE_THICKNESS, &ul_thickness ); else ul_thickness = UL_thickness; if ( ul_thickness == 0 || ul_thickness > 100 ) ul_thickness = strstr( fli_curfnt, "bold" ) ? 2 : 1; if ( ! XGetFontProperty( fs, XA_UNDERLINE_POSITION, &ul_pos ) ) ul_pos = DESC( ch ) ? ( 1 + flx->fdesc ) : 1; /* if the character is narrow, use the width of g otherwise use the width of D. Of course, if UL_width == proportional, this really does not matter */ ul_width = XTextWidth( fs, NARROW( ch ) ? "h" : "D", 1 ); ul_rwidth = XTextWidth( fs, str + n, 1 ); pre = str[ 0 ] == *fl_ul_magic_char; xoff = fli_get_string_widthTABfs( fs, str + pre, n - pre ); /* try to center the underline on the correct character */ if ( UL_propwidth ) x = x + xoff; else x = x + xoff + ( ul_rwidth - ul_width ) / 2; xr.x = x; xr.y = y + ul_pos; xr.width = UL_propwidth ? ul_rwidth : ul_width; xr.height = ul_thickness; return &xr; } /*************************************** ***************************************/ static void do_underline( FL_Coord x, FL_Coord y, const char * cstr, int n ) { XRectangle *xr = fli_get_underline_rect( flx->fs, x, y, cstr, n ); if ( flx->win == None || xr->width <= 0 || xr->height <= 0 ) return; XFillRectangle( flx->display, flx->win, flx->gc, xr->x, xr->y, xr->width, xr->height ); } #define has_desc( s ) ( strchr( s, 'g' ) \ || strchr( s, 'j' ) \ || strchr( s, 'q' ) \ || strchr( s, 'y' ) \ || strchr( s, 'p' ) ) /*************************************** * Underline whole string ***************************************/ static void do_underline_all( FL_Coord x, FL_Coord y, const char * cstr, int n ) { int ul_width; unsigned long ul_pos, ul_thickness = 0; char *str = ( char * ) cstr; if ( flx->win == None ) return; if ( UL_thickness < 0 ) XGetFontProperty( flx->fs, XA_UNDERLINE_THICKNESS, &ul_thickness ); else ul_thickness = UL_thickness; if ( ul_thickness == 0 || ul_thickness > 100 ) ul_thickness = strstr( fli_curfnt, "bold" ) ? 2 : 1; if ( ! XGetFontProperty( flx->fs, XA_UNDERLINE_POSITION, &ul_pos ) ) ul_pos = has_desc( str ) ? ( 1 + flx->fdesc ) : 1; ul_width = XTextWidth( flx->fs, str, n ); /* do it */ if ( ul_width > 0 && ul_thickness > 0 ) XFillRectangle( flx->display, flx->win, flx->gc, x, y + ul_pos, ul_width, ul_thickness ); } /*************************************** * Draw a single string possibly with embedded tabs ***************************************/ int fli_drw_stringTAB( Window win, GC gc, int x, int y, int style, int size, const char * s, int len, int img ) { int w, tab; const char *p, *q; XFontStruct *fs = fl_get_font_struct( style, size ); DrawString XdrawString; if ( win == 0 ) return 0; tab = fli_get_tabpixels( fs ); XdrawString = img ? XDrawImageString : XDrawString; XSetFont( flx->display, gc, fs->fid ); for ( w = 0, q = s; *q && ( p = strchr( q, '\t' ) ) && p - s < len; q = p + 1 ) { XdrawString( flx->display, win, gc, x + w, y, ( char * ) q, p - q ); w += XTextWidth( fs, q, p - q ); w = ( w / tab + 1 ) * tab; } XdrawString( flx->display, win, gc, x + w, y, ( char * ) q, s - q + len ); return 0; /* w + XTextWidth(fs, q, len - (q - s)); */ } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/space.c0000644000175000017500000000474011247055071014242 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /* * \file space.c * * Copyright(c) 1993,1994 by T.C. Zhao * All rights reserved. * * Remove unescaped leadingi/trailing spaces from a string. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "include/forms.h" #include "flinternal.h" #include "ulib.h" /*************************************** * Remove leading space ***************************************/ char * fli_de_space( char * s ) { char *p; /* Not all isspace considers '\t' a white space */ for ( p = s; p && ( isspace( ( int ) *p ) || *p == '\t' ); p++ ) /* empty */ ; return p == s ? s : memmove( s, p, strlen( p ) + 1 ); } /*************************************** * remove trailing space ***************************************/ char * fli_space_de( char * s ) { char *p, *q; if ( ! s || ! *s ) return s; q = p = s + strlen( s ) - 1; /* maybe replace \ with space ? */ for ( q--; p >= s && isspace( ( int ) *p ) && ( q < s || *q != '\\' ); p--,q-- ) /* empty */ ; *++p = '\0'; return s; } /*************************************** * Remove space from both ends ***************************************/ char * fli_de_space_de( char * p ) { return fli_space_de( fli_de_space( p ) ); } /*************************************** * remove non-alphanumericals from string ***************************************/ char * fli_nuke_all_non_alnum( char * s ) { char *p = s, *q = s + strlen( s ), *b; char buf[ 1024 ]; for ( b = buf; p < q; p++ ) if ( isalnum( ( int ) *p ) ) *b++ = *p; *b = '\0'; return strcpy( s, buf ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/popup.c0000644000175000017500000035256511317764372014336 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include /*************************************** * Local global variables * ***************************************/ /* Head of linked list of popups */ static FL_POPUP *popups = NULL; /* Default policy (i.e. does popup get closed when the user releases the mouse button when not on an active entry or not?) */ static int popup_policy; /* Default font styles and sizes for title and entries */ static int popup_entry_font_style; static int popup_title_font_style; static int popup_entry_font_size; static int popup_title_font_size; /* Default color of popup */ static FL_COLOR popup_bg_color; /* Default color of entry the mouse is over (unless disabled) */ static FL_COLOR popup_on_color; /* Default color of title text */ static FL_COLOR popup_title_color; /* Default color of normal entrys text */ static FL_COLOR popup_text_color; /* Default color of entrys text when mouse is on the entry (unless disabled) */ static FL_COLOR popup_text_on_color; /* Default color of disabled entrys text */ static FL_COLOR popup_text_off_color; /* Default color of button for radio entries */ static FL_COLOR popup_radio_color; /* Default popup border width */ static int popup_bw; /* Default cursor type to be used */ static int popup_cursor; /*************************************** * Local functions * ***************************************/ static FL_POPUP_ENTRY *parse_entries( FL_POPUP *, char *, va_list, const char *, int ); static FL_POPUP_ENTRY * failed_add( FL_POPUP_ENTRY * ); static int check_sub( FL_POPUP_ENTRY * ); static void radio_check( FL_POPUP_ENTRY * ); static void convert_shortcut( const char *, FL_POPUP_ENTRY * ); static void recalc_popup( FL_POPUP * ); static void title_dimensions( FL_POPUP *, unsigned int *, unsigned int * ); static void entry_text_dimensions( FL_POPUP_ENTRY *, unsigned int *, unsigned int * ); static void draw_popup( FL_POPUP * ); static void draw_title( FL_POPUP * ); static void draw_entry( FL_POPUP_ENTRY * ); static void calculate_window_position( FL_POPUP * ); static void create_popup_window( FL_POPUP * ); static void grab( FL_POPUP * ); static void close_popup( FL_POPUP *, int ); static FL_POPUP_RETURN * popup_interaction( FL_POPUP * ); static int is_on_popups( FL_POPUP * pooup, int x, int y ); static FL_POPUP_RETURN * handle_selection( FL_POPUP_ENTRY * ); static FL_POPUP * handle_motion( FL_POPUP *, int, int ); static void motion_shift_window( FL_POPUP *, int *, int * ); static FL_POPUP * handle_key( FL_POPUP *, XKeyEvent *, FL_POPUP_ENTRY ** ); static void key_shift_window( FL_POPUP *, FL_POPUP_ENTRY * ); static FL_POPUP * open_subpopup( FL_POPUP_ENTRY * ); static FL_POPUP_ENTRY * handle_shortcut( FL_POPUP *, long, unsigned int ); static void enter_leave( FL_POPUP_ENTRY *, int ); static FL_POPUP * find_popup( int, int ); static FL_POPUP_ENTRY * find_entry( FL_POPUP *, int, int ); static void setup_subpopups( FL_POPUP * ); static char * cleanup_string( char * ); static void set_need_recalc( FL_POPUP * ); /*************************************** * #defines * ***************************************/ /* Inner padding is used within the title box of popups only */ #define INNER_PADDING_LEFT 3 #define INNER_PADDING_RIGHT 3 #define INNER_PADDING_TOP 3 #define INNER_PADDING_BOTTOM 3 /* Spacing around title and entries of a popup */ #define OUTER_PADDING_LEFT 3 #define OUTER_PADDING_RIGHT 3 #define OUTER_PADDING_TOP 0 #define OUTER_PADDING_BOTTOM 0 /* Vert. spacing between symbols (box, hook, triangle) and text in an entry */ #define SYMBOL_PADDING 0 /* Height of the box for separation line in popup, must be at least 3 */ #define LINE_HEIGHT 4 /* Extra offsets added by fl_drw_text() that need to be taken into account (see variables 'xoff' and 'yoff' of 'fli_draw_text_inside()' in xtext.c) */ #define STR_OFFSET_X 5 #define STR_OFFSET_Y 4 /* Amount window is shifted in horizontal direction if the popup doesn't fit on the screen in that direction and delay (in usec) between shifts (in both directions) when the user is pushing the mouse at the screen borders */ #define WINDOW_SHIFT ( fl_scrw / 10 ) #define WINDOW_SHIFT_DELAY 100000 /* Macro for testing if a popup entry can be made "active" (i.e. if it gets highlighted when under the mouse) */ #define IS_ACTIVATABLE( e ) \ ( ( e )->type != FL_POPUP_LINE \ && ! ( ( e ) ->state & ( FL_POPUP_HIDDEN | FL_POPUP_DISABLED ) ) ) /*************************************** * Create a new popup ***************************************/ FL_POPUP * fl_popup_add( Window win, const char * title ) { return fli_popup_add( win, title, "fl_popup_add" ); } /*************************************** * Internal function to create a new popup ***************************************/ FL_POPUP * fli_popup_add( Window win, const char * title, const char * caller ) { FL_POPUP *p; /* Try to get memory for the popup itself and the optional title string */ if ( ( p = fl_malloc( sizeof *p ) ) == NULL ) { M_err( caller, "Running out of memory" ); return NULL; } if ( ! title || ! *title ) p->title = NULL; else if ( ( p->title = fl_strdup( title ) ) == NULL ) { fl_free( p ); M_err( caller, "Running out of memory" ); return NULL; } /* Link the new popup into the list of popups */ p->next = NULL; if ( popups == NULL ) { popups = p; p->prev = NULL; } else { p->prev = popups; while ( p->prev->next != NULL ) p->prev = p->prev->next; p->prev->next = p; } p->parent = NULL; p->top_parent = p; /* points at itself except for sub-popups */ p->win = None; p->parent_win = win != None ? win : fl_root; p->cursor = fl_get_cursor_byname( popup_cursor ); p->entries = NULL; p->callback = NULL; p->use_req_pos = 0; p->need_recalc = 1; p->min_width = 0; p->has_subs = 0; p->has_boxes = 0; p->counter = 0; p->policy = popup_policy; fl_popup_set_title_font( p, popup_title_font_style, popup_title_font_size ); fl_popup_entry_set_font( p, popup_entry_font_style, popup_entry_font_size ); p->bw = popup_bw; p->on_color = popup_on_color; p->bg_color = popup_bg_color; p->title_color = popup_title_color; p->text_color = popup_text_color; p->text_on_color = popup_text_on_color; p->text_off_color = popup_text_off_color; p->radio_color = popup_radio_color; return p; } /*************************************** * Add (append) entries to a popup ***************************************/ FL_POPUP_ENTRY * fl_popup_add_entries( FL_POPUP * popup, const char * entries, ... ) { FL_POPUP_ENTRY *new_entries; va_list ap; va_start( ap, entries ); new_entries = fli_popup_add_entries( popup, entries, ap, "fl_popup_add_entries", 0 ); va_end( ap ); return new_entries; } /*************************************** * Internal function to add entries ***************************************/ FL_POPUP_ENTRY * fli_popup_add_entries( FL_POPUP * popup, const char * entries, va_list ap, const char * caller, int simple ) { FL_POPUP_ENTRY *new_entries, *e; char *str; /* Calling this function with no string for the entries doesn't make sense */ if ( entries == NULL ) { M_err( caller, "NULL entries argument" ); return NULL; } /* Check if the popup we're supposed to add to does exist at all */ if ( fli_check_popup_exists( popup ) ) { M_err( caller, "Popup does not exist" ); return NULL; } /* Now analyze the string with the information about the entries */ if ( ( str = fl_strdup( entries ) ) == NULL ) { M_err( caller, "Running out of memory" ); return NULL; } new_entries = parse_entries( popup, str, ap, caller, simple ); fl_free( str ); /* A return value of NULL says something went wrong (warning was altready output) */ if ( new_entries == NULL ) return NULL; /* Now all left to do is append the list of new entries to the list of already existing ones (if there are any) */ if ( popup->entries == NULL ) popup->entries = new_entries; else { for ( e = popup->entries; e->next != NULL; e = e->next ) /* empty */ ; e->next = new_entries; new_entries->prev = e; } /* Make sure all sub-popus are set up correctly */ setup_subpopups( popup ); /* Set flag that indicates that the dimension of the popup have to be recalculated */ set_need_recalc( popup ); /* Return a pointer to the first of the newly added entries */ return new_entries; } /*************************************** * Insert new entries after an entry (use NULL for inserting at the start) ***************************************/ FL_POPUP_ENTRY * fl_popup_insert_entries( FL_POPUP * popup, FL_POPUP_ENTRY * after, const char * entries, ... ) { FL_POPUP_ENTRY *new_entries; va_list ap; va_start( ap, entries ); new_entries = fli_popup_insert_entries( popup, after, entries, ap, "fl_popup_insert_entries", 0 ); va_end( ap ); return new_entries; } /*************************************** * Internal function to insert new entries after an entry ***************************************/ FL_POPUP_ENTRY * fli_popup_insert_entries( FL_POPUP * popup, FL_POPUP_ENTRY * after, const char * entries, va_list ap, const char * caller, int simple) { FL_POPUP_ENTRY *new_entries, *new_last, *e; char *str; if ( after != NULL ) { for ( e = popup->entries; e != NULL; e = e->next ) if ( e == after ) break; if ( e == NULL ) { M_err( caller, "Invalid 'after' argument" ); return NULL; } } /* Calling this function with no string for the entries doesn't make sense */ if ( entries == NULL ) { M_err( caller, "NULL entries argument" ); return NULL; } /* Check if the popup we're supposed to add to does exist at all */ if ( fli_check_popup_exists( popup ) ) { M_err( caller, "Popup does not exist" ); return NULL; } /* Now analyze the string with the information about the entries */ if ( ( str = fl_strdup( entries ) ) == NULL ) { M_err( caller, "Running out of memory" ); return NULL; } new_entries = parse_entries( popup, str, ap, "fl_popup_insert_entries", simple ); fl_free( str ); /* A return value of NULL says something went wrong (warning was already output) */ if ( new_entries == NULL ) return NULL; /* Now all left to do is insert the list of new entries into the list of already existing ones. 'after' being NULL means at the start of the list. */ for ( new_last = new_entries; new_last->next != NULL; new_last = new_last->next ) /* empty */ ; if ( after == NULL ) { if ( popup->entries != NULL ) { new_last->next = popup->entries; popup->entries->prev = new_last; } popup->entries = new_entries; } else { if ( after->next ) after->next->prev = new_last; new_last->next = after->next; new_entries->prev = after; after->next = new_entries; } /* Make sure all sub-popus are set up correctly */ setup_subpopups( popup ); /* Set flag that indicates that the dimension of the popup have to be recalculated */ set_need_recalc( popup ); /* Return a pointer to the first of the newly added entries */ return new_entries; } /*************************************** * Internal function for inserting entries into a popup after entry * 'after' (NULL stands for "insert at start") from a list of FL_POPUP_ITEM * structures - they are converted into a string that then gets passed * with the required additional arguments to fl_popup_insert_entries() ***************************************/ FL_POPUP_ENTRY * fli_popup_insert_items( FL_POPUP * popup, FL_POPUP_ENTRY * after, FL_POPUP_ITEM * entries, const char * caller) { FL_POPUP_ITEM *e; const char *c; char *txt; size_t cnt; static long val = 0; int level = 0; int need_line = 0; int is_sub = 0; FL_POPUP_ENTRY *entry = NULL; int first = 1; /* Return if the array of items is NULL */ if ( entries == NULL ) return NULL; /* Check if the popup we're supposed to add to does exist at all */ if ( fli_check_popup_exists( popup ) ) { M_err( caller, "Popup does not exist" ); return NULL; } /* If 'after' isn't NULL (indicating that we have to insert at the start) check that this popup entry exists */ if ( after != NULL ) { for ( entry = popup->entries; entry != NULL; entry = entry->next ) if ( entry == after ) break; if ( entry == NULL ) { M_err( caller, "Invalid 'after' argument" ); return NULL; } } /* Iterate over all items, inserting each individually */ for ( e = entries; e->text != NULL; e++ ) { /* Check that the type is ok */ if ( e->type != FL_POPUP_NORMAL && e->type != FL_POPUP_TOGGLE && e->type != FL_POPUP_RADIO ) { M_err( caller, "Invalid entry type" ); return NULL; } c = e->text; /* Check for '/' and '_' at the very start of the text */ if ( c[ 0 ] == '_' || ( c[ 0 ] == '/' && c[ 1 ] == '_' ) ) need_line = 1; if ( c[ 0 ] == '/' || ( c[ 0 ] == '_' && c[ 1 ] == '/' ) ) { if ( e->type != FL_POPUP_NORMAL ) { M_err( caller, "Entry can't be for a sub-popup " "and toggle or radio entry at the same time" ); return NULL; } is_sub = 1; } if ( ( *c == '/' && *++c == '_' ) || ( *c == '_' && *++c == '/' ) ) c++; /* Count the number of '%' in the string (without a directly following 'S') since all of them need to be escaped */ cnt = 0; for ( txt = strchr( c, '%' ); txt != NULL; txt = strchr( ++txt, '%' ) ) if ( txt[ 1 ] != 'S' ) cnt++; /* Get enough memory for the string to pass to fl_popup_insert_entries() */ if ( ( txt = fl_malloc( strlen( c ) + cnt + 13 ) ) == NULL ) { M_err( caller, "Running out of memory" ); return NULL; } /* Copy the original text, doubling all '%'s (except those in front of 'S') */ for ( cnt = 0; *c != '\0'; c++, cnt++ ) { txt[ cnt ] = *c; if ( c[ 0 ] == '%' && c[ 1 ] != 'S' ) txt[ ++cnt ] = '%'; } /* Add special sequences passed in every case */ memcpy( txt + cnt, "%x%f%s", 6 ); cnt += 6; /* Optionally add those for for disabling or hiding the entry */ if ( e->state & FL_POPUP_DISABLED ) { memcpy( txt + cnt, "%d", 2 ); cnt += 2; } if ( e->state & FL_POPUP_HIDDEN ) { memcpy( txt + cnt, "%h", 2 ); cnt += 2; } txt[ cnt ] = '\0'; /* Now we can start creating the entry. To make sure that the value assigned to the entry is correct even when sub-popus are to be created we need to know the level of recursion */ level++; if ( need_line ) { if ( ( after = fl_popup_insert_entries( popup, after, "%l" ) ) == NULL ) { if ( --level == 0 ) val = 0; return NULL; } need_line = 0; } if ( e->type == FL_POPUP_NORMAL && ! is_sub ) { if ( ( after = fl_popup_insert_entries( popup, after, txt, val++, e->callback, e->shortcut ) ) == NULL ) { fl_free( txt ); if ( --level == 0 ) val = 0; return NULL; } } else if ( e->type == FL_POPUP_TOGGLE ) { strcat( txt, e->state & FL_POPUP_CHECKED ? "%T" : "%t" ); if ( ( after = fl_popup_insert_entries( popup, after, txt, val++, e->callback, e->shortcut ) ) == NULL ) { fl_free( txt ); if ( --level == 0 ) val = 0; return NULL; } } else if ( e->type == FL_POPUP_RADIO ) { strcat( txt, e->state & FL_POPUP_CHECKED ? "%R" : "%r" ); if ( ( after = fl_popup_insert_entries( popup, after, txt, val++, e->callback, e->shortcut, INT_MIN ) ) == NULL ) { fl_free( txt ); if ( --level == 0 ) val = 0; return NULL; } } else if ( is_sub ) { FL_POPUP *sub; long pval = val++; strcat( txt, "%m" ); if ( ( sub = fl_popup_create( popup->win, NULL, e + 1 ) ) == NULL || ( after = fl_popup_insert_entries( popup, after,txt, pval, e->callback, e->shortcut, sub ) ) == NULL ) { fl_free( txt ); if ( ! fli_check_popup_exists( sub ) ) fl_popup_delete( sub ); if ( --level == 0 ) val = 0; return NULL; } } fl_free( txt ); /* Set the entries text member to exactly what the user gave us */ fl_safe_free( after->text ); if ( ( after->text = fl_strdup( e->text ) ) == NULL ) { fl_popup_delete( popup ); if ( --level == 0 ) val = 0; return NULL; } /* If this was a sub-popup entry skip items that were for the sub- or sub-sub-popus etc. */ if ( is_sub ) { cnt = 1; while ( cnt > 0 ) { e++; if ( e->text == NULL ) cnt--; else if ( e->text[ 0 ] == '/' || ( e->text[ 0 ] == '_' && e->text[ 1 ] == '/' ) ) cnt++; } is_sub = 0; } if ( first ) { entry = after; first = 0; } } val++; if ( --level == 0 ) val = 0; return entry; } /*************************************** * Create a popup and populate it from a list of FL_POPUP_ITEM structures ***************************************/ FL_POPUP * fl_popup_create( Window win, const char * title, FL_POPUP_ITEM * entries ) { FL_POPUP *popup; if ( ( popup = fl_popup_add( win, title ) ) == NULL ) return NULL; if ( fli_popup_insert_items( popup, NULL, entries, "fl_popup_create" ) == NULL ) { fl_popup_delete( popup ); return NULL; } return popup; } /*************************************** * Appends entries to a popup from a list of FL_POPUP_ITEM structures ***************************************/ FL_POPUP_ENTRY * fl_popup_add_items( FL_POPUP * popup, FL_POPUP_ITEM * entries ) { FL_POPUP_ENTRY *after; /* Return if the array of items is NULL */ if ( entries == NULL ) return NULL; /* Check if the popup we're supposed to add to does exist at all */ if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_add_items", "Popup does not exist" ); return NULL; } /* Determine the last existing entry in the popup */ after = popup->entries; while ( after != NULL && after->next != NULL ) after = after->next; return fli_popup_insert_items( popup, after, entries, "fl_popup_add_items" ); } /*************************************** * Insert entries into a popup from a list of FL_POPUP_ITEM structures * after an entry ***************************************/ FL_POPUP_ENTRY * fl_popup_insert_items( FL_POPUP * popup, FL_POPUP_ENTRY * after, FL_POPUP_ITEM * entries ) { return fli_popup_insert_items( popup, after, entries, "fl_popup_insert_items" ); } /*************************************** * Removes a popup, returns 0 on success and -1 on failure. ***************************************/ int fl_popup_delete( FL_POPUP * popup ) { /* Check if the popup we're asked to delete does exist */ if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_delete", "Popup does not exist" ); return -1; } /* Don't delete a popup that's currently shown */ if ( popup->win != None ) { M_err( "fl_popup_delete", "Can't free popup that is still shown" ); return -1; } /* Remove all entries (including sub-popups refered to there) */ while ( popup->entries ) fl_popup_entry_delete( popup->entries ); /* Get rid of the title string (if it exists) */ fl_safe_free( popup->title ); /* Finally unlink it from the list */ if ( popup->prev != NULL ) popup->prev->next = popup->next; else popups = popup->next; if ( popup->next != NULL ) popup->next->prev = popup->prev; fl_free( popup ); return 0; } /*************************************** * Delete a single popup entry (if it's a sub-popup entry also delete * the popup it refers to) ***************************************/ int fl_popup_entry_delete( FL_POPUP_ENTRY * entry ) { if ( entry == NULL ) { M_err( "fl_popup_entry_delete", "Invalid argument" ); return -1; } /* We don't remove entries that are shown at the moment */ if ( entry->popup->win != None ) { M_err( "fl_popup_entry_delete", "Can't free entry of a popup that is " "shown" ); return -1; } /* Remove the entry from the entry list of the popup it belongs to */ if ( entry->prev == NULL ) entry->popup->entries = entry->next; else entry->prev->next = entry->next; if ( entry->next != NULL ) entry->next->prev = entry->prev; entry->popup->need_recalc = 1; /* Free all remaining memory used by entry */ fl_safe_free( entry->text ); fl_safe_free( entry->label ); fl_safe_free( entry->accel ); fl_safe_free( entry->shortcut ); /* For entries that refer to sub-popups delete the sub-popup */ if ( entry->type == FL_POPUP_SUB ) fl_popup_delete( entry->sub ); return 0; } /*************************************** * Do interaction with a popup ***************************************/ FL_POPUP_RETURN * fl_popup_do( FL_POPUP * popup ) { /* Check that the popup exists */ if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_do", "Invalid popup" ); return NULL; } /* We don't interact directly with sub-popups */ if ( popup->parent != NULL ) { M_err( "fl_popup_do", "Can't do direct interaction with sub-popup" ); return NULL; } draw_popup( popup ); return popup_interaction( popup ); } /*************************************** * Set position where the popup is supposed to appear (if * never called the popup appears at the mouse position) ***************************************/ void fl_popup_set_position( FL_POPUP * popup, int x, int y ) { if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_position", "Invalid popup" ); return; } popup->use_req_pos = 1; popup->req_x = x; popup->req_y = y; } /*************************************** * Returns the policy set for a popup or the default policy if called * with a NULL pointer ***************************************/ int fl_popup_get_policy( FL_POPUP * popup ) { if ( popup == NULL ) return popup_policy; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_get_title_font", "Invalid popup" ); return -1; } return popup->top_parent->policy; } /*************************************** * Set policy of handling the popup (i.e. does it get closed when the * user releases the mouse button outside an active entry or not?) ***************************************/ int fl_popup_set_policy( FL_POPUP * popup, int policy ) { int old_policy; if ( policy < FL_POPUP_NORMAL_SELECT || policy > FL_POPUP_DRAG_SELECT ) { M_err( "fl_popup_set_policy", "Invalid policy argument" ); return -1; } if ( popup == NULL ) { old_policy = popup_policy; popup_policy = policy; return old_policy; } if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_policy", "Invalid popup" ); return -1; } old_policy = popup->policy; popup->policy = policy; return old_policy; } /*************************************** * Set new text for an entry. Returns 0 on succes and -1 on failure. ***************************************/ int fl_popup_entry_set_text( FL_POPUP_ENTRY * entry, const char * text ) { char *t, *label, *accel, sc_str[ 2 ]; int ret = -1; long *old_sc; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_text", "Invalid entry argument" ); return -1; } /* If the new text is NULL (not very useful;-) we're already done */ if ( text == NULL ) { M_err( "fl_popup_entry_set_text", "Invalid text argument" ); return -1; } /* Get rid of the old text, label and accelerator strings */ fl_safe_free( entry->text ); fl_safe_free( entry->label ); fl_safe_free( entry->accel ); /* Make two copies of the text, the first one for storing in the entry, the second one for creating the label the accelerator string */ if ( ( t = fl_strdup( text ) ) == NULL ) goto REPLACE_DONE; if ( ( entry->text = fl_strdup( text ) ) == NULL ) goto REPLACE_DONE; /* Split up the text at the first '%S' */ label = t; if ( ( accel = strstr( t, "%S" ) ) != NULL ) { *accel = '\0'; accel += 2; } /* Remove all backspace characters and replace tabs by spaces in both the label and the accelerator string */ cleanup_string( label ); cleanup_string( accel ); /* Finally set up the label and accel members of the structure */ if ( ! *label ) entry->label = NULL; else if ( ( entry->label = fl_strdup( label ) ) == NULL ) goto REPLACE_DONE; if ( ! accel || ! *accel ) entry->accel = NULL; else if ( ( entry->accel = fl_strdup( accel ) ) == NULL ) goto REPLACE_DONE; ret = 0; REPLACE_DONE: fl_safe_free( t ); if ( ret == -1 ) { fl_safe_free( entry->text ); fl_safe_free( entry->label ); fl_safe_free( entry->accel ); M_err( "fl_popup_entry_set_text", "Running out of memory" ); } for ( old_sc = entry->shortcut; *old_sc != 0; old_sc++ ) if ( ( *old_sc & ~ ( FL_CONTROL_MASK | FL_ALT_MASK ) ) > 0 && ( *old_sc & ~ ( FL_CONTROL_MASK | FL_ALT_MASK ) ) <= 0xFF ) { sc_str[ 0 ] = *old_sc & ~ ( FL_CONTROL_MASK | FL_ALT_MASK ); sc_str[ 1 ] = '\0'; convert_shortcut( sc_str, entry ); break; } entry->popup->need_recalc = 1; return 0; } /*************************************** * Set new shortcuts for an entry ***************************************/ void fl_popup_entry_set_shortcut( FL_POPUP_ENTRY * entry, const char * sc ) { if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_shortcut", "Invalid entry argument" ); return; } fl_safe_free( entry->shortcut ); if ( sc == NULL ) entry->ulpos = -1; else convert_shortcut( sc, entry ); } /*************************************** * Set callback function for a popup ***************************************/ FL_POPUP_CB fl_popup_set_callback( FL_POPUP * popup, FL_POPUP_CB callback ) { FL_POPUP_CB old_cb; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_callback", "Invalid popup" ); return NULL; } old_cb = popup->callback; popup->callback = callback; return old_cb; } /*************************************** * Set a new title for a popup ***************************************/ const char * fl_popup_get_title( FL_POPUP * popup ) { if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_title", "Invalid popup" ); return NULL; } return popup->title; } /*************************************** * Set a new title for a popup ***************************************/ FL_POPUP * fl_popup_set_title( FL_POPUP * popup, const char * title ) { if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_title", "Invalid popup" ); return NULL; } fl_safe_free( popup->title ); if ( title && *title ) { popup->title = fl_strdup( title ); if ( popup->title == NULL ) { M_err( "fl_popup_set_title", "Running out of memory" ); return NULL; } } popup->need_recalc = 1; return popup; } /*************************************** * Return title font for a popup ***************************************/ void fl_popup_get_title_font( FL_POPUP * popup, int * style, int * size ) { if ( popup == NULL ) { if ( style != NULL ) *style = popup_title_font_style; if ( size != NULL ) *size = popup_title_font_size; return; } if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_get_title_font", "Invalid popup" ); return; } if ( style != NULL ) *style = popup->top_parent->title_font_style; if ( size != NULL ) *size = popup->top_parent->title_font_size ; } /*************************************** * Set title font for a popup (or change the default if called with NULL) ***************************************/ void fl_popup_set_title_font( FL_POPUP * popup, int style, int size ) { if ( popup == NULL ) { popup_title_font_style = style; popup_title_font_size = size; return; } if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_title_font", "Invalid popup" ); return; } popup->title_font_style = style; popup->title_font_size = size; if ( popup->parent == NULL ) set_need_recalc( popup ); } /*************************************** * Return entry font for a popup ***************************************/ void fl_popup_entry_get_font( FL_POPUP * popup, int * style, int * size ) { if ( popup == NULL ) { if ( style != NULL ) *style = popup_entry_font_style; if ( size != NULL ) *size = popup_entry_font_size; return; } if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_entry_get_font", "Invalid popup" ); return; } if ( style != NULL ) *style = popup->top_parent->entry_font_style; if ( size != NULL ) *size = popup->top_parent->entry_font_size ; } /*************************************** * Set entry font for a popup (or change the default if called with NULL) ***************************************/ void fl_popup_entry_set_font( FL_POPUP * popup, int style, int size ) { if ( popup == NULL ) { popup_entry_font_style = style; popup_entry_font_size = size; return; } if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_entry_set_font", "Invalid popup" ); return; } popup->entry_font_style = style; popup->entry_font_size = size; if ( popup->parent == NULL ) set_need_recalc( popup ); } /*************************************** * Return the border width of a popup (or the default border width if * called with NULL or an invalid argument) ***************************************/ int fl_popup_get_bw( FL_POPUP * popup ) { if ( popup == NULL ) return popup_bw; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_get_bw", "Invalid argument" ); return popup_bw; } return popup->top_parent->bw; } /*************************************** * Sets the border width of a popup or the default border width (if called * with NULL) ***************************************/ int fl_popup_set_bw( FL_POPUP * popup, int bw ) { int old_bw; /* Clamp border width to a reasonable range */ if ( bw == 0 || FL_abs( bw ) > FL_MAX_BW ) { bw = bw == 0 ? -1 : ( bw > 0 ? FL_MAX_BW : - FL_MAX_BW ); M_warn( "fl_popup_set_bw", "Adjusting invalid border width to %d", bw ); } if ( popup == NULL ) { old_bw = popup_bw; popup_bw = bw; return old_bw; } if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_bw", "Invalid popup argument" ); return INT_MIN; } old_bw = bw; popup->bw = bw; if ( popup->parent == NULL ) set_need_recalc( popup ); return old_bw; } /*************************************** * Get one of the colors of the popup (NULL or invalid popup returns the * default settings) ***************************************/ FL_COLOR fl_popup_get_color( FL_POPUP * popup, int color_type ) { /* Check if the popup exists */ if ( popup != NULL && fli_check_popup_exists( popup ) ) { M_err( "fl_popup_get_color", "Invalid popup argument" ); popup = NULL; } /* For sub-popups always return the color of the controlling popup */ if ( popup != NULL ) popup = popup->top_parent; switch ( color_type ) { case FL_POPUP_BACKGROUND_COLOR : return popup ? popup->bg_color : popup_bg_color; case FL_POPUP_HIGHLIGHT_COLOR : return popup ? popup->on_color : popup_on_color; case FL_POPUP_TITLE_COLOR : return popup ? popup->title_color : popup_title_color; case FL_POPUP_TEXT_COLOR : return popup ? popup->text_color : popup_text_color; case FL_POPUP_HIGHLIGHT_TEXT_COLOR : return popup ? popup->text_on_color : popup_text_on_color; case FL_POPUP_DISABLED_TEXT_COLOR : return popup ? popup->text_off_color : popup_text_off_color; case FL_POPUP_RADIO_COLOR : return popup ? popup->radio_color : popup_radio_color; } M_err( "fl_popup_get_color", "Invalid color type argument" ); return FL_BLACK; } /*************************************** * Set one of the colors of the popup (NULL sets the default) ***************************************/ FL_COLOR fl_popup_set_color( FL_POPUP * popup, int color_type, FL_COLOR color ) { FL_COLOR old_color; /* Check if the popup exists */ if ( popup != NULL && fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_color", "Invalid popup argument" ); return FL_MAX_COLORS; } if ( color >= FL_MAX_COLORS ) { M_err( "fl_popup_set_color", "Invalid color argument" ); return FL_MAX_COLORS; } switch ( color_type ) { case FL_POPUP_BACKGROUND_COLOR : if ( popup != NULL ) { old_color = popup->bg_color; popup->bg_color = color; } else { old_color = popup_bg_color; popup_bg_color = color; } break; case FL_POPUP_HIGHLIGHT_COLOR : if ( popup != NULL ) { old_color = popup->on_color; popup->on_color = color; } else { old_color = popup_on_color; popup_on_color = color; } break; case FL_POPUP_TITLE_COLOR : if ( popup != NULL ) { old_color = popup->title_color; popup->title_color = color; } else { old_color = popup_title_color; popup_title_color = color; } break; case FL_POPUP_TEXT_COLOR : if ( popup != NULL ) { old_color = popup->text_color; popup->text_color = color; } else { old_color = popup_text_color; popup_text_color = color; } break; case FL_POPUP_HIGHLIGHT_TEXT_COLOR : if ( popup != NULL ) { old_color = popup->text_on_color; popup->text_on_color = color; } else { old_color = popup_text_on_color; popup_text_on_color = color; } break; case FL_POPUP_DISABLED_TEXT_COLOR : if ( popup != NULL ) { old_color = popup->text_off_color; popup->text_off_color = color; } else { old_color = popup_text_off_color; popup_text_off_color = color; } break; case FL_POPUP_RADIO_COLOR : if ( popup != NULL ) { old_color = popup->radio_color; popup->radio_color = color; } else { old_color = popup_radio_color; popup_radio_color = color; } break; default : M_err( "fl_popup_set_color", "Invalid color type argument" ); return FL_MAX_COLORS; } return old_color; } /*************************************** * Sets the cursor of a popup (or change the * default cursor if called with NULL) ***************************************/ void fl_popup_set_cursor( FL_POPUP * popup, int cursor ) { if ( popup == NULL ) { popup_cursor = fl_get_cursor_byname( cursor ); return; } if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_set_cursor", "Invalid popup argument" ); return; } popup->cursor = fl_get_cursor_byname( cursor ); if ( popup->win ) XDefineCursor( flx->display, popup->win, popup->cursor ); } /*************************************** * Set selection callback function for a popup entry ***************************************/ FL_POPUP_CB fl_popup_entry_set_callback( FL_POPUP_ENTRY * entry, FL_POPUP_CB callback ) { FL_POPUP_CB old_cb; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_enter_callback", "Invalid entry argument" ); return NULL; } old_cb = entry->callback; entry->callback = callback; return old_cb; } /*************************************** * Set enter callback function for a popup entry ***************************************/ FL_POPUP_CB fl_popup_entry_set_enter_callback( FL_POPUP_ENTRY * entry, FL_POPUP_CB callback ) { FL_POPUP_CB old_cb; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_enter_callback", "Invalid entry argument" ); return NULL; } old_cb = entry->enter_callback; entry->enter_callback = callback; return old_cb; } /*************************************** * Set leave callback function for a popup entry ***************************************/ FL_POPUP_CB fl_popup_entry_set_leave_callback( FL_POPUP_ENTRY * entry, FL_POPUP_CB callback ) { FL_POPUP_CB old_cb; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_leave_callback", "Invalid entry argument" ); return NULL; } old_cb = entry->leave_callback; entry->leave_callback = callback; return old_cb; } /*************************************** * Get state (disabled, hidden, checked) of a popup entry ***************************************/ unsigned int fl_popup_entry_get_state( FL_POPUP_ENTRY * entry ) { if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_get_state", "Invalid entry argument" ); return UINT_MAX; } return entry->state; } /*************************************** * Set state (disabled, hidden, checked) of a popup entry ***************************************/ unsigned int fl_popup_entry_set_state( FL_POPUP_ENTRY * entry, unsigned int state ) { unsigned int old_state; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_state", "Invalid entry argument" ); return UINT_MAX; } /* Nothing to be done if new and old state are identical */ if ( entry->state == state ) return state; old_state = entry->state; entry->state = state; /* If the entry gets disabled or hidden we may have to switch off it's "activated" state - don't call leave callback in this case */ if ( entry->state & ( FL_POPUP_DISABLED | FL_POPUP_HIDDEN ) ) entry->is_act = 0; /* If a radio entry gets checked uncheck all radio other entries belonging to the same group in the popup */ if ( entry->type == FL_POPUP_RADIO && state & FL_POPUP_CHECKED ) { FL_POPUP_ENTRY *e; for ( e = entry->popup->entries; e != NULL; e = e->next ) if ( e->type == FL_POPUP_RADIO && entry->group == e->group && entry != e ) e->state &= ~ FL_POPUP_CHECKED; } /* If the entry was hidden or made visible again the dimensions of the popup need to be recalculated */ if ( ( old_state & FL_POPUP_HIDDEN ) ^ ( state & FL_POPUP_HIDDEN ) ) entry->popup->need_recalc = 1; /* If the popup the entry belongs to is visible redraw the popup */ if ( entry->popup->win != None ) draw_popup( entry->popup ); return old_state; } /*************************************** * Clear certain bits of an entries state ***************************************/ unsigned int fl_popup_entry_clear_state( FL_POPUP_ENTRY * entry, unsigned int what ) { unsigned int old_state; size_t i; unsigned int flags[ ] = { FL_POPUP_DISABLED, FL_POPUP_HIDDEN, FL_POPUP_CHECKED }; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_clear_state", "Invalid entry argument" ); return UINT_MAX; } old_state = entry->state; for ( i = 0; i < sizeof flags / sizeof *flags; i++ ) if ( what & flags[ i ] ) fl_popup_entry_set_state( entry, entry->state & ~ flags[ i ] ); return old_state; } /*************************************** * Set certain bits of an entrys state ***************************************/ unsigned int fl_popup_entry_raise_state( FL_POPUP_ENTRY * entry, unsigned int what ) { unsigned int old_state; size_t i; unsigned int flags[ ] = { FL_POPUP_DISABLED, FL_POPUP_HIDDEN, FL_POPUP_CHECKED }; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_raise_state", "Invalid entry argument" ); return UINT_MAX; } old_state = entry->state; for ( i = 0; i < sizeof flags / sizeof *flags; i++ ) if ( what & flags[ i ] ) fl_popup_entry_set_state( entry, entry->state | flags[ i ] ); return old_state; } /*************************************** * Toggle certain bits of an entries state ***************************************/ unsigned int fl_popup_entry_toggle_state( FL_POPUP_ENTRY * entry, unsigned int what ) { unsigned int old_state; size_t i; unsigned int flags[ ] = { FL_POPUP_DISABLED, FL_POPUP_HIDDEN, FL_POPUP_CHECKED }; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_toggle_state", "Invalid entry argument" ); return UINT_MAX; } old_state = entry->state; for ( i = 0; i < sizeof flags / sizeof *flags; i++ ) if ( what & flags[ i ] ) fl_popup_entry_set_state( entry, entry->state ^ flags[ i ] ); return old_state; } /*************************************** * Set the value associated with an entry ***************************************/ long fl_popup_entry_set_value( FL_POPUP_ENTRY * entry, long value ) { long old_val; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_value", "Invalid entry argument" ); return INT_MIN; } old_val = entry->val; entry->val = value; return old_val; } /*************************************** * Set the user data pointer associated with an entry ***************************************/ void * fl_popup_entry_set_user_data( FL_POPUP_ENTRY * entry, void * user_data ) { void *old_user_data; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_user_data", "Invalid entry argument" ); return NULL; } old_user_data = entry->user_data; entry->user_data = user_data; return old_user_data; } /*************************************** * Returns the group a radio entry belongs to. * Returns group number on success and INT_MAX on failure. ***************************************/ int fl_popup_entry_get_group( FL_POPUP_ENTRY * entry ) { if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_get_group", "Invalid entry argument" ); return INT_MAX; } return entry->group; } /*************************************** * Set a new group a radio entry * Returns old group number on success and INT_MAX on failure. ***************************************/ int fl_popup_entry_set_group( FL_POPUP_ENTRY * entry, int group ) { int old_group; FL_POPUP_ENTRY *e; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_group", "Invalid entry argument" ); return INT_MAX; } old_group = entry->group; if ( entry->type != FL_POPUP_RADIO ) { entry->group = group; return old_group; } if ( old_group == group ) return entry->group; for ( e = entry; e != NULL; e = e->next ) if ( e->type == FL_POPUP_RADIO && e->group == group && e->state & FL_POPUP_CHECKED ) entry->state &= ~ FL_POPUP_CHECKED; entry->group = group; return old_group; } /*************************************** * Returns the sub-popup for a sub-popup entry. * Returns the sub-popups address on success and NULL on failure. ***************************************/ FL_POPUP * fl_popup_entry_get_subpopup( FL_POPUP_ENTRY * entry ) { if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_get_subpopup", "Invalid entry argument" ); return NULL; } if ( entry->type != FL_POPUP_SUB ) { M_err( "fl_popup_entry_get_subpopup", "Entry isn't a subpopup entry" ); return NULL; } return entry->sub; } /*************************************** * Set a new sub-popup for an entry, requires that this a sub-popup entry. * Returns the new sub-popups address on success and NULL on failure. ***************************************/ FL_POPUP * fl_popup_entry_set_subpopup( FL_POPUP_ENTRY * entry, FL_POPUP * subpopup ) { FL_POPUP *old_sub; if ( fli_check_popup_entry_exists( entry ) ) { M_err( "fl_popup_entry_set_subpopup", "Invalid entry argument" ); return NULL; } if ( entry->type != FL_POPUP_SUB ) { M_err( "fl_popup_entry_set_subpopup", "Entry isn't a subpopup entry" ); return NULL; } if ( entry->sub == subpopup ) return entry->sub; if ( entry->sub->win != None || subpopup->win != None ) { M_err( "fl_popup_entry_set_subpopup", "Can't change sub-popup while " "entries sub-popup is shown."); return NULL; } old_sub = entry->sub; entry->sub = subpopup; if ( check_sub( entry ) ) { entry->sub = old_sub; M_err( "fl_popup_entry_set_subpopup", "Invalid sub-popup argument" ); return NULL; } fl_popup_delete( entry->sub ); return entry->sub = subpopup; } /*************************************** * Find a popup entry by its position in the popup, starting at 1. * (Line entries aren't counted, but hidden entries are.) ***************************************/ FL_POPUP_ENTRY * fl_popup_entry_get_by_position( FL_POPUP * popup, int position ) { FL_POPUP_ENTRY *e; int i = 0; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_entry_get_by_position", "Invalid popup argument" ); return NULL; } for ( e = popup->entries; e != NULL; e = e->next ) { if ( e->type == FL_POPUP_LINE ) continue; if ( i++ == position ) return e; } return NULL; } /*************************************** * Find a popup entry by its value ***************************************/ FL_POPUP_ENTRY * fl_popup_entry_get_by_value( FL_POPUP * popup, long val ) { FL_POPUP_ENTRY *e, *r; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_entry_get_by_value", "Invalid popup argument" ); return NULL; } for ( e = popup->entries; e != NULL; e = e->next ) { if ( e->type == FL_POPUP_LINE ) continue; if ( e->val == val ) return e; if ( e->type == FL_POPUP_SUB && ( r = fl_popup_entry_get_by_value( e->sub, val ) ) ) return r; } return NULL; } /*************************************** * Find a popup entry by its user data ***************************************/ FL_POPUP_ENTRY * fl_popup_entry_get_by_user_data( FL_POPUP * popup, void * user_data ) { FL_POPUP_ENTRY *e, *r; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_entry_get_by_value", "Invalid popup argument" ); return NULL; } for ( e = popup->entries; e != NULL; e = e->next ) { if ( e->type == FL_POPUP_LINE ) continue; if ( e->user_data == user_data ) return e; if ( e->type == FL_POPUP_SUB && ( r = fl_popup_entry_get_by_user_data( e->sub, user_data ) ) ) return r; } return NULL; } /*************************************** * Find a popup entry by its text ***************************************/ FL_POPUP_ENTRY * fl_popup_entry_get_by_text( FL_POPUP * popup, const char * text ) { FL_POPUP_ENTRY *e, *r; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_entry_get_by_text", "Invalid popup argument" ); return NULL; } for ( e = popup->entries; e != NULL; e = e->next ) { if ( e->type == FL_POPUP_LINE ) continue; if ( ! strcmp( e->text, text ) ) return e; if ( e->type == FL_POPUP_SUB && ( r = fl_popup_entry_get_by_text( e->sub, text ) ) ) return r; } return NULL; } /*************************************** * Find a popup entry by its label ***************************************/ FL_POPUP_ENTRY * fl_popup_entry_get_by_label( FL_POPUP * popup, const char * label ) { FL_POPUP_ENTRY *e, *r; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_entry_get_by_label", "Invalid popup argument" ); return NULL; } for ( e = popup->entries; e != NULL; e = e->next ) { if ( e->type == FL_POPUP_LINE || e->label == NULL ) continue; if ( ! strcmp( e->label, label ) ) return e; if ( e->type == FL_POPUP_SUB && ( r = fl_popup_entry_get_by_label( e->sub, label ) ) ) return r; } return NULL; } /*************************************** * Get size of a popup, returns 0 on success and -1 on error ***************************************/ int fl_popup_get_size( FL_POPUP * popup, unsigned int * w, unsigned int * h ) { if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_get_size", "Invalid popup argument" ); return -1; } if ( popup->need_recalc ) recalc_popup( popup ); *w = popup->w; *h = popup->h; return 0; } /*************************************** * Get minimum width of a popup ***************************************/ int fl_popup_get_min_width( FL_POPUP * popup ) { if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_get_size", "Invalid popup argument" ); return -1; } if ( popup->need_recalc ) recalc_popup( popup ); return popup->min_width; } /*************************************** * Set minimum width of a popup ***************************************/ int fl_popup_set_min_width( FL_POPUP * popup, int min_width ) { int old_min_width; if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_get_size", "Invalid popup argument" ); return -1; } old_min_width = popup->min_width; if ( min_width < 0 ) min_width = 0; popup->min_width = min_width; popup->need_recalc = 1; return old_min_width; } /*************************************** * Set up a linked list of entries for a popup according to a string * and optional arguments. The resulting list then can be merged into * an already existing list of entries of the popup. The 'simple' * argument, when set, says that the new entry can't be a sub-entry, * a toggle, line or radio entry. ***************************************/ static FL_POPUP_ENTRY * parse_entries( FL_POPUP * popup, char * str, va_list ap, const char * caller, int simple ) { FL_POPUP_ENTRY *entry, *entry_first = NULL; char *c, *s, *sc = NULL, *acc = NULL; /* Split the string at '|' and create a new entry for each part */ for ( c = strtok( str, "|" ); c != NULL; c = strtok( NULL, "|" ) ) { /* Allocate a new entry and append it to the list of new entries */ if ( ( entry = fl_malloc( sizeof *entry ) ) == NULL ) { M_err( caller, "Running out of memory" ); return failed_add( entry_first ); } if ( entry_first == NULL ) { entry_first = entry; entry->prev = NULL; } else { FL_POPUP_ENTRY *e; for ( e = entry_first; e->next != NULL; e = e->next ) /* empty */; e->next = entry; entry->prev = e; } entry->next = NULL; entry->label = NULL; entry->accel = NULL; /* The text field is exactly what the user gave us */ if ( ( entry->text = fl_strdup( c ) ) == NULL ) { M_err( caller, "Running out of memory" ); return failed_add( entry_first ); } /* Set some default values */ entry->user_data = NULL; entry->val = popup->counter++; entry->is_act = 0; entry->type = FL_POPUP_NORMAL; entry->state = 0; entry->shortcut = NULL; entry->ulpos = -1; entry->callback = NULL; entry->enter_callback = NULL; entry->leave_callback = NULL; entry->sub = NULL; entry->popup = popup; /* Now analyze the string for the entry */ s = c; while ( ( s = strchr( s, '%' ) ) != NULL ) { switch ( s[ 1 ] ) { case '%' : memmove( s, s + 1, strlen( s ) ); s++; break; case 'x' : /* set a value */ entry->val = va_arg( ap, long ); memmove( s, s + 2, strlen( s + 1 ) ); break; case 'u' : /* set pointer to user data */ entry->user_data = va_arg( ap, void * ); memmove( s, s + 2, strlen( s + 1 ) ); break; case 'f' : /* set callback function */ entry->callback = va_arg( ap, FL_POPUP_CB ); memmove( s, s + 2, strlen( s + 1 ) ); break; case 'E' : /* set enter callback function */ entry->enter_callback = va_arg( ap, FL_POPUP_CB ); memmove( s, s + 2, strlen( s + 1 ) ); break; case 'L' : /* set leave callback function */ entry->leave_callback = va_arg( ap, FL_POPUP_CB ); memmove( s, s + 2, strlen( s + 1 ) ); break; case 'm' : /* set a submenu */ if ( entry->type != FL_POPUP_NORMAL ) { M_err( caller, "Entry can't be submenu and something " "else" ); return failed_add( entry_first ); } entry->sub = va_arg( ap, FL_POPUP * ); if ( ! simple ) { if ( check_sub( entry ) ) { M_err( caller, "Invalid submenu popup" ); return failed_add( entry_first ); } entry->type = FL_POPUP_SUB; entry->sub->parent = popup; } else entry->sub = NULL; memmove( s, s + 2, strlen( s + 1 ) ); break; case 'l' : /* set up entry as a line entry */ if ( entry->type != FL_POPUP_NORMAL ) { M_err( caller, "Entry can't be a line marker and " "something else" ); return failed_add( entry_first ); } entry->type = FL_POPUP_LINE; memmove( s, s + 2, strlen( s + 1 ) ); break; case 'T' : /* set up as toggle entry */ case 't' : if ( entry->type != FL_POPUP_NORMAL ) { M_err( caller, "Entry can't be a toggle entry and " "something else" ); return failed_add( entry_first ); } if ( ! simple ) { entry->type = FL_POPUP_TOGGLE; if ( s[ 1 ] == 'T' ) entry->state |= FL_POPUP_CHECKED; } memmove( s, s + 2, strlen( s + 1 ) ); break; case 'R' : /* set up as radio entry */ case 'r' : /* set up as radio entry */ if ( entry->type != FL_POPUP_NORMAL ) { M_err( caller, "Entry can't be radio entry and " "something else" ); return failed_add( entry_first ); } entry->group = va_arg( ap, int ); if ( ! simple ) { entry->type = FL_POPUP_RADIO; if ( s[ 1 ] == 'R' ) entry->state |= FL_POPUP_CHECKED; } memmove( s, s + 2, strlen( s + 1 ) ); break; case 'd' : /* mark entry as disabled */ entry->state |= FL_POPUP_DISABLED; memmove( s, s + 2, strlen( s + 1 ) ); break; case 'h' : /* mark entry as hidden */ entry->state |= FL_POPUP_HIDDEN; memmove( s, s + 2, strlen( s + 1 ) ); break; case 's' : /* set a shortcut */ sc = va_arg( ap, char * ); memmove( s, s + 2, strlen( s + 1 ) ); break; case 'S' : if ( acc != NULL ) { M_err( caller, "'%%S' sequence found more than once in " "entry definition" ); return failed_add( entry_first ); } *s++ = '\0'; acc = ++s; break; default : M_err( caller, "Invalid flag '%%%c'", s[ 1 ] ); return failed_add( entry_first ); } } /* If we're asked to create simple popup (for a FL_SELECT object) remove the entry again if it's a line entry */ if ( simple && entry->type == FL_POPUP_LINE ) { if ( entry->prev != NULL ) entry->prev->next = NULL; else entry_first = NULL; fl_free( entry ); popup->counter--; continue; } /* Now all flags should be removed from text string, so we can set the entries label and accelerator key text after also removing backspace characters and replacing tabs by spaces. */ cleanup_string ( c ); if ( ! *c ) entry->label = NULL; else if ( ( entry->label = fl_strdup( c ) ) == NULL ) { M_err( caller, "Running out of memory" ); return failed_add( entry_first ); } acc = cleanup_string( acc ); if ( ! acc || ! *acc ) entry->accel = NULL; else if ( ( entry->accel = fl_strdup( acc ) ) == NULL ) { M_err( caller, "Running out of memory" ); return failed_add( entry_first ); } acc = NULL; /* Having the text we can set up the shortcuts */ if ( sc ) { convert_shortcut( sc, entry ); sc = NULL; } } /* Make sure the settings for radio entries are consistent, i.e. only a single one of a group (taking both the already existing as well as the new ones into account) is set (the last created wins) */ for ( entry = entry_first; entry != NULL; entry = entry->next ) if ( entry->type == FL_POPUP_RADIO && entry->state * FL_POPUP_CHECKED ) radio_check( entry ); /* List is complete and the caller can link it into its list */ return entry_first; } /*************************************** * Called when adding popup entries fails due to whatever reasons * to get rid of all already created ones ***************************************/ static FL_POPUP_ENTRY * failed_add( FL_POPUP_ENTRY * first ) { FL_POPUP_ENTRY *e; while ( first ) { e = first->next; fl_popup_entry_delete( first ); first = e; } return NULL; } /*************************************** * Checks if a popup is suitable for use as a sub-popup ***************************************/ static int check_sub( FL_POPUP_ENTRY * entry ) { /* Sub-popup can't be NULL */ if ( entry->sub == NULL ) return 1; /* Check if the sub-popup exists */ if ( fli_check_popup_exists( entry->sub ) ) return 1; /* The sub-popup can't be the entries popup itself */ if ( entry->popup == entry->sub ) return 1; /* The sub-popup can not already be a sub-popup for some other entry */ if ( entry->sub->parent ) return 1; return 0; } /*************************************** * Go through all entries of a popup and resets the checked state of * all other entries belonging to the same group before the one we * were called with. ***************************************/ static void radio_check( FL_POPUP_ENTRY * entry ) { FL_POPUP_ENTRY *e; /* First reset (if necessary) the old ones */ for ( e = entry->popup->entries; e != NULL; e = e->next ) if ( e->type == FL_POPUP_RADIO && e->group == e->group ) e->state &= ~ FL_POPUP_CHECKED; /* Also reset all the new ones (except the one we were called for) */ for ( e = entry->prev; e != NULL; e = e->prev ) if ( e->type == FL_POPUP_RADIO && e->group == e->group ) e->state &= ~ FL_POPUP_CHECKED; } /*************************************** * Makes a shortcut out of an entries text and determines where to underline ***************************************/ static void convert_shortcut( const char * shortcut, FL_POPUP_ENTRY * entry ) { long sc[ MAX_SHORTCUTS + 1 ]; int cnt; if ( entry->label && *entry->label && ( ! entry->accel || ! *entry->accel ) ) entry->ulpos = fli_get_underline_pos( entry->label, shortcut ) - 1; else entry->ulpos = -1; cnt = fli_convert_shortcut( shortcut, sc ); fl_safe_free( entry->shortcut ); entry->shortcut = fl_malloc( ( cnt + 1 ) * sizeof *entry->shortcut ); memcpy( entry->shortcut, sc, ( cnt + 1 ) * sizeof *entry->shortcut ); } /*************************************** * Recalculate the dimensions of a popup and the positions of the entries ***************************************/ static void recalc_popup( FL_POPUP * popup ) { FL_POPUP_ENTRY *e; int offset = FL_abs( popup->top_parent->bw ) + ( popup->top_parent->bw > 0 ? 1 : 0 ); unsigned int cur_w = 0, cur_h = offset, w, h; title_dimensions( popup, &w, &h ); if ( w > 0 ) { /* Note: title box should always have a bit of spacing to the top of the window */ popup->title_box_x = offset + OUTER_PADDING_LEFT; popup->title_box_y = offset + FL_max( OUTER_PADDING_TOP, 3 ); cur_w = w + INNER_PADDING_LEFT + INNER_PADDING_RIGHT; popup->title_box_h = h + INNER_PADDING_TOP + INNER_PADDING_BOTTOM; cur_h += popup->title_box_h + FL_max( OUTER_PADDING_TOP, 3 ) + OUTER_PADDING_BOTTOM + 2; } popup->has_subs = 0; popup->has_boxes = 0; for ( e = popup->entries; e != NULL; e = e->next ) { if ( e->state & FL_POPUP_HIDDEN ) continue; e->box_x = offset + OUTER_PADDING_LEFT; e->box_y = cur_h; entry_text_dimensions( e, &w, &h ); cur_w = FL_max( cur_w, w ); cur_h += e->box_h = h + OUTER_PADDING_TOP + OUTER_PADDING_BOTTOM; if ( e->type == FL_POPUP_TOGGLE || e->type == FL_POPUP_RADIO ) popup->has_boxes = 1; else if ( e->type == FL_POPUP_SUB ) popup->has_subs = 1; } if ( popup->has_boxes ) cur_w += popup->top_parent->entry_font_size + SYMBOL_PADDING; if ( popup->has_subs ) cur_w += SYMBOL_PADDING + popup->top_parent->entry_font_size; popup->w = cur_w + 2 * offset + OUTER_PADDING_LEFT + OUTER_PADDING_RIGHT; popup->h = cur_h + offset + 1; popup->w = FL_max( popup->w, ( unsigned int ) popup->min_width ); popup->title_box_w = popup->w - 2 * offset - OUTER_PADDING_LEFT - OUTER_PADDING_RIGHT; popup->need_recalc = 0; } /*************************************** * Calculate the dimensions of the title ***************************************/ static void title_dimensions( FL_POPUP * popup, unsigned int * w, unsigned int * h ) { FL_POPUP *ptp = popup->top_parent; char *s, *c; int dummy; if ( popup->title == NULL ) { *w = *h = 0; return; } s = c = fl_strdup( popup->title ); /* Now calculate the dimensions of the string */ *w = 0; *h = 0; for ( c = strtok( s, "\n" ); c != NULL; c = strtok( NULL, "\n" ) ) { *w = FL_max( *w, ( unsigned int ) fl_get_string_width( ptp->title_font_style, ptp->title_font_size, c, strlen( c ) ) ); *h += fl_get_string_height( ptp->title_font_style, ptp->title_font_size, c, strlen( c ), &dummy, &dummy ); } fl_free( s ); /* Add offsets the string drawing function will add */ *w += 2 * STR_OFFSET_X; *h += 2 * STR_OFFSET_Y; } /*************************************** * Calculate the (minimum) dimensions of an entry ***************************************/ static void entry_text_dimensions( FL_POPUP_ENTRY * entry, unsigned int * w, unsigned int * h ) { FL_POPUP *ptp = entry->popup->top_parent; char *s, *c; int ulpos = entry->ulpos; XRectangle *xr; int asc; int dummy; *w = *h = 0; if ( entry->type == FL_POPUP_LINE ) { *h = LINE_HEIGHT; return; } /* Determine length and height of label string */ if ( entry->label && *entry->label ) { s = c = fl_strdup( entry->label ); /* Calculate the dimensions of the label (always use the font of the top-most parent) */ for ( c = strtok( s, "\n" ); c != NULL; c = strtok( NULL, "\n" ) ) { unsigned int old_h = *h; *w = FL_max( *w, ( unsigned int ) fl_get_string_width( ptp->entry_font_style, ptp->entry_font_size, c, strlen( c ) ) ); *h += fl_get_string_height( ptp->entry_font_style, ptp->entry_font_size, c, strlen( c ), &asc, &dummy ); if ( c == s ) entry->sl_h = *h; /* Not very nice hack to get the underline position */ if ( ulpos >= 0 ) { if ( ulpos < ( int ) strlen( c ) ) { xr = fli_get_underline_rect( fl_get_font_struct( ptp->entry_font_style, ptp->entry_font_size ), 0, asc, c, ulpos ); entry->ul_x = xr->x + STR_OFFSET_X; entry->ul_y = old_h + xr->y + STR_OFFSET_Y; entry->ul_w = xr->width; entry->ul_h = xr->height; } ulpos -= strlen( c ) + 1; } } fl_safe_free( s ); } /* Repeat this for the accelerator key text (minimum spacing between this and the label is 1.5 times the font size) */ if ( entry->accel && *entry->accel ) { unsigned int aw = 0, ah = 0; *w += 1.5 * ptp->entry_font_size; s = c = fl_strdup( entry->accel ); for ( c = strtok( s, "\n" ); c != NULL; c = strtok( NULL, "\n" ) ) { aw = FL_max( aw, ( unsigned int ) fl_get_string_width( ptp->entry_font_style, ptp->entry_font_size, c, strlen( c ) ) ); ah += fl_get_string_height( ptp->entry_font_style, ptp->entry_font_size, c, strlen( c ), &dummy, &dummy ); } fl_safe_free( s ); *w += aw; *h = FL_max( *h, ah ); } *w += 2 * STR_OFFSET_X; *h += 2 * STR_OFFSET_Y; } /*************************************** * Draw a popup ***************************************/ static void draw_popup( FL_POPUP * popup ) { FL_POPUP_ENTRY *e; /* If necessary recalculate the size of the popup window and, if it's already shown, resize it */ if ( popup->need_recalc ) { unsigned int old_w = popup->w, old_h = popup->h; recalc_popup( popup ); if ( popup->win != None && ( popup->w != old_w || popup->h != old_h ) ) XResizeWindow( flx->display, popup->win, popup->w, popup->h ); } /* If necessary create and map the popup window, otherwise just draw it (no drawing needed when the window gets opened, we will receive an Expose event that will induce the drawing) */ if ( popup->win == None ) create_popup_window( popup ); else { /* Draw the popup box */ fl_drw_box( FL_UP_BOX, 0, 0, popup->w, popup->h, popup->bg_color, popup->top_parent->bw ); /* Draw the title and all entries */ draw_title( popup ); for ( e = popup->entries; e != NULL; e = e->next ) draw_entry( e ); } } /*************************************** * Draws the title of a popup ***************************************/ static void draw_title( FL_POPUP * popup ) { FL_POPUP *ptp = popup->top_parent; if ( popup->title == NULL ) return; /* Draw a box with a frame around the title */ fl_drw_box( FL_FRAME_BOX, popup->title_box_x - 1, popup->title_box_y - 1, popup->title_box_w + 2, popup->title_box_h + 2, ptp->bg_color, 1 ); fl_drw_text( FL_ALIGN_CENTER, popup->title_box_x, popup->title_box_y, popup->title_box_w, popup->title_box_h, ptp->title_color, ptp->title_font_style, ptp->title_font_size, popup->title ); } /*************************************** * Draws an entry of a popup ***************************************/ static void draw_entry( FL_POPUP_ENTRY * entry ) { FL_POPUP *p = entry->popup, *ptp = p->top_parent; FL_COLOR color; int offset = FL_abs( ptp->bw ) + ( ptp->bw > 0 ? 1 : 0 ); int x; unsigned int w; /* Hidden entries need no further work */ if ( entry->state & FL_POPUP_HIDDEN ) return; /* Calculate the width of the box we're going to be drawning in */ x = entry->box_x; w = entry->box_w = p->w - 2 * offset - OUTER_PADDING_LEFT - OUTER_PADDING_RIGHT; /* For entries that just stand for separating lines draw that line and be done with it */ if ( entry->type == FL_POPUP_LINE ) { fl_drw_box( FL_DOWN_BOX, x, entry->box_y + OUTER_PADDING_TOP + 1, w, LINE_HEIGHT - 1, ptp->bg_color, 1 ); return; } /* Draw the background of the entry */ fl_rectangle( 1, offset, entry->box_y, p->w - 2 * offset - 1, entry->box_h, entry->is_act ? ptp->on_color : ptp->bg_color ); /* Find out what color the text is to be drawn in */ if ( entry->state & FL_POPUP_DISABLED ) color = ptp->text_off_color; else color = entry->is_act ? ptp->text_on_color : ptp->text_color; /* If there are radio/toggle entries extra space at the start is needed. For checked toggle items a check mark is drawn there and for radio items a circle */ if ( p->has_boxes ) { if ( entry->type == FL_POPUP_RADIO ) fl_drw_box( FL_ROUNDED3D_DOWNBOX, x + 0.2 * entry->sl_h, entry->box_y + 0.25 * entry->sl_h + STR_OFFSET_Y, 0.5 * entry->sl_h, 0.5 * entry->sl_h, entry->state & FL_POPUP_CHECKED ? ptp->radio_color : ptp->bg_color, 1 ); else if ( entry->state & FL_POPUP_CHECKED ) { FL_POINT xp[ 3 ]; xp[ 0 ].x = x + 0.25 * entry->sl_h; xp[ 0 ].y = entry->box_y + 0.5 * entry->sl_h + STR_OFFSET_Y; xp[ 1 ].x = xp[ 0 ].x + 0.2 * entry->sl_h; xp[ 1 ].y = xp[ 0 ].y + 0.25 * entry->sl_h; xp[ 2 ].x = xp[ 1 ].x + 0.2 * entry->sl_h; xp[ 2 ].y = xp[ 1 ].y - 0.5 * entry->sl_h; fl_lines( xp, 3, color ); xp[ 2 ].x += 1; fl_lines( xp + 1, 2, color ); } w -= ptp->entry_font_size + SYMBOL_PADDING; x += ptp->entry_font_size + SYMBOL_PADDING;; } /* If there are sub-popups we need some extra space at the end of the entries and for sub-popups entries a triangle at the end */ if ( p->has_subs ) { if ( entry->type == FL_POPUP_SUB ) { FL_POINT xp[ 4 ]; xp[ 0 ].x = x + w - 0.125 * entry->sl_h; xp[ 0 ].y = entry->box_y + 0.5 * entry->box_h; xp[ 1 ].x = xp[ 0 ].x - 0.35355 * entry->sl_h; xp[ 1 ].y = xp[ 0 ].y - 0.25 * entry->sl_h; xp[ 2 ].x = xp[ 1 ].x; xp[ 2 ].y = xp[ 1 ].y + 0.5 * entry->sl_h; fl_polygon( 1, xp, 3, color ); } w -= ptp->entry_font_size + SYMBOL_PADDING; } /* Finally it's time to draw the label and accelerator. Underlining is not done via the "normal" functions since they are too much of a mess...*/ if ( entry->label && *entry->label ) { fl_drw_text( FL_ALIGN_LEFT_TOP, x, entry->box_y, w, entry->box_h, color, ptp->entry_font_style, ptp->entry_font_size, entry->label ); if ( entry->ulpos >= 0 ) fl_rectangle( 1, x + entry->ul_x, entry->box_y + entry->ul_y , entry->ul_w, entry->ul_h, color ); } if ( entry->accel && *entry->accel ) fl_drw_text( FL_ALIGN_RIGHT_TOP, x, entry->box_y, w, entry->box_h, color, ptp->entry_font_style, ptp->entry_font_size, entry->accel ); } /*************************************** * Figure out where to draw a popup window ***************************************/ static void calculate_window_position( FL_POPUP * popup ) { FL_POPUP_ENTRY *e; int x, y; unsigned int dummy; /* If no position has been requested use the mouse position, otherwise the requested coordinates. Negatve positions mean relative to right edge or botton of the screen. */ fl_get_mouse( &x, &y, &dummy ); if ( ! popup->use_req_pos ) { popup->x = x + 1; popup->y = y + 1; } else { if ( popup->req_x >= 0 ) popup->x = popup->req_x; else popup->x = - popup->req_x - popup->w; if ( popup->req_y >= 0 ) popup->y = popup->req_y; else popup->y = - popup->req_y - popup->h; } /* Try to make sure the popup is fully on the screen (for sub-popups display to the left of the parent popup if necessary) */ if ( popup->y + ( int ) popup->h > fl_scrh && ! popup->use_req_pos ) popup->y = popup->y - ( int ) popup->h - 1; if ( popup->y + ( int ) popup->h > fl_scrh ) popup->y = FL_max( fl_scrh - ( int ) popup->h, 0 ); if ( popup->y < 0 ) popup->y = 0; if ( popup->x + ( int ) popup->w > fl_scrw ) { if ( popup->parent != NULL ) popup->x = FL_max( popup->parent->x - ( int ) popup->w, 0 ); else popup->x = FL_max( fl_scrw - ( int ) popup->w, 0 ); } if ( ( e = find_entry( popup, x - popup->x, y - popup->y ) ) != NULL && ! ( e->state & FL_POPUP_DISABLED ) ) enter_leave( e, 1 ); } /*************************************** * Create the popup's window ***************************************/ static void create_popup_window( FL_POPUP * popup ) { XSetWindowAttributes xswa; unsigned long vmask; /* Figure out where to open the window */ calculate_window_position( popup ); /* Create a new window */ popup->event_mask = ExposureMask | ButtonPressMask | ButtonReleaseMask | OwnerGrabButtonMask | PointerMotionMask | PointerMotionHintMask | KeyPressMask; xswa.event_mask = popup->event_mask; xswa.save_under = True; xswa.backing_store = WhenMapped; xswa.override_redirect = True; xswa.cursor = popup->cursor; xswa.border_pixel = 0; xswa.colormap = fli_colormap( fl_vmode ); xswa.do_not_propagate_mask = ButtonPress | ButtonRelease | KeyPress; vmask = CWEventMask | CWSaveUnder | CWBackingStore | CWCursor | CWBorderPixel | CWColormap | CWDontPropagate | CWOverrideRedirect; popup->win = XCreateWindow( flx->display, fl_root, popup->x, popup->y, popup->w, popup->h, 0, fli_depth( fl_vmode ), InputOutput, fli_visual( fl_vmode ), vmask, &xswa ); XSetTransientForHint( flx->display, popup->win, fl_root ); if ( popup->title ) XStoreName( flx->display, popup->win, popup->title ); /* Special hack for B&W */ if ( fli_dithered( fl_vmode ) ) { XGCValues xgcv; GC gc; xgcv.stipple = FLI_INACTIVE_PATTERN; vmask = GCForeground | GCFont | GCStipple; xgcv.foreground = fl_get_flcolor( popup->text_off_color ); gc = XCreateGC( flx->display, popup->win, vmask, &xgcv ); XSetFillStyle( flx->display, gc, FillStippled ); } XSetWMColormapWindows( flx->display, fl_root, &popup->win, 1 ); XMapRaised( flx->display, popup->win ); fl_winset( popup->win ); grab( popup ); } /*************************************** * Grabs both the pointer and the keyboard ***************************************/ static void grab( FL_POPUP * popup ) { unsigned int evmask = popup->event_mask; /* Set the window we're using */ fl_winset( popup->win ); /* Get rid of all non-pointer events in event_mask */ evmask &= ~ ( ExposureMask | KeyPressMask ); XSync( flx->display, False ); XChangeActivePointerGrab( flx->display, evmask, popup->cursor, CurrentTime ); /* Do pointer and keyboard grab */ if ( XGrabPointer( flx->display, popup->win, False, evmask, GrabModeAsync, GrabModeAsync, None, popup->cursor, CurrentTime ) != GrabSuccess ) M_err( "grab", "Can't grab pointer" ); else if ( XGrabKeyboard( flx->display, popup->win, False, GrabModeAsync, GrabModeAsync, CurrentTime ) != GrabSuccess ) { M_err( "grab", "Can't grab keyboard" ); XUngrabPointer( flx->display, CurrentTime ); } } /*************************************** * Close a popup window ***************************************/ static void close_popup( FL_POPUP * popup, int do_callback ) { FL_POPUP_ENTRY *e; XEvent ev; /* Change grab to parent popup window (if there's one), delete popup window and drop all events for it. Sync before waiting for events to make sure all events are already in the event queue. */ if ( popup->parent ) grab( popup->parent ); XDestroyWindow( flx->display, popup->win ); XSync( flx->display, False ); while ( XCheckWindowEvent( flx->display, popup->win, AllEventsMask, &ev ) ) /* empty */ ; popup->win = None; /* We have to redraw forms or popups that received a Expose event due to the closing of a sub-popup (at least if the Xserver did not save the content under the popups window). Not needed for top-level popups since there the normal event loop takes care of this. */ if ( popup->parent != NULL && ! DoesSaveUnders( ScreenOfDisplay( flx->display, fl_screen ) ) ) { FL_FORM *form; FL_POPUP *p; while ( XCheckMaskEvent( flx->display, ExposureMask, &ev ) != False ) if ( ( form = fl_win_to_form( ( ( XAnyEvent * ) &ev )->window ) ) != NULL ) { fl_winset( form->window ); fl_redraw_form( form ); } else for ( p = popups; p != NULL; p = p->next ) if ( ( ( XAnyEvent * ) &ev )->window == p->win ) { fl_winset( p->win ); draw_popup( p ); } fl_winset( popup->parent->win ); } /* Run the leave callback for an active entry if we're asked to */ for ( e = popup->entries; e != NULL; e = e->next ) if ( e->is_act ) { if ( do_callback ) enter_leave( e, 0 ); else e->is_act = 0; break; } } /*************************************** * Do all the interaction with the popup, also dealing with other * background tasks (taking over from the main event loop in forms.c * while the popup is shown) ***************************************/ static FL_POPUP_RETURN * popup_interaction( FL_POPUP * popup ) { FL_POPUP *p; FL_POPUP_ENTRY *e = NULL; XEvent ev; int timer_cnt = 0; ev.xmotion.time = 0; /* for fli_handle_idling() */ while ( 1 ) { long msec = fli_context->idle_delta; if ( fli_context->timeout_rec ) fli_handle_timeouts( &msec ); /* Check for new event for the popup window, if there's none deal with idle tasks */ if ( ! XCheckWindowEvent( flx->display, popup->win, popup->event_mask, &ev ) ) { if ( timer_cnt++ % 10 == 0 ) { timer_cnt = 0; fli_handle_idling( &ev, msec, 1 ); fl_winset( popup->win ); } continue; } timer_cnt = 0; fli_int.query_age++; switch ( ev.type ) { case Expose : draw_popup( popup ); break; case MotionNotify : fli_int.mousex = ev.xmotion.x; fli_int.mousey = ev.xmotion.y; fli_int.keymask = ev.xmotion.state; fli_int.query_age = 0; fli_compress_event( &ev, PointerMotionMask ); popup = handle_motion( popup, ev.xmotion.x, ev.xmotion.y ); break; case ButtonRelease : case ButtonPress : fli_int.mousex = ev.xbutton.x; fli_int.mousey = ev.xbutton.y; fli_int.keymask = ev.xbutton.state; fli_int.query_age = 0; /* Don't react to mouse wheel buttons */ if ( ev.xbutton.button == Button4 || ev.xbutton.button == Button5 ) break; /* Try to find "active" entry */ e = find_entry( popup, ev.xmotion.x, ev.xmotion.y ); /* Implement policy: in normal select mode don't react to button release except when on a selectable item. React to button press only when outside of popup(s). */ if ( popup->top_parent->policy == FL_POPUP_NORMAL_SELECT && ev.type == ButtonRelease && ( e == NULL || e->state & FL_POPUP_DISABLED ) ) break; if ( ev.type == ButtonPress && is_on_popups( popup, ev.xmotion.x, ev.xmotion.y ) ) break; /* Close all popups, invoking the leave callbacks if no selection was made */ for ( p = popup; p != NULL; p = p->parent ) close_popup( p, e == NULL ); return handle_selection( e ); case KeyPress : fli_int.mousex = ev.xkey.x; fli_int.mousey = ev.xkey.y; fli_int.keymask = ev.xkey.state; fli_int.query_age = 0; if ( ( p = handle_key( popup, ( XKeyEvent * ) &ev, &e ) ) ) popup = p; else return handle_selection( e ); } } return NULL; } /*************************************** * Returns if the mouse is within a popup window ***************************************/ static int is_on_popups( FL_POPUP * popup, int x, int y ) { do { if ( x >= 0 && x < ( int ) popup->w && y >= 0 && y < ( int ) popup->h ) return 1; if ( popup->parent == NULL ) break;; x += popup->x - popup->parent->x; y += popup->y - popup->parent->y; } while ( ( popup = popup->parent ) != NULL ); return 0; } /*************************************** * Deals with everything to be done once a selection has been made ***************************************/ static FL_POPUP_RETURN * handle_selection( FL_POPUP_ENTRY *entry ) { FL_POPUP *p; int cb_result = 1; /* If there wasn't a selection or the selected entry is disabled report "failure" */ if ( entry == NULL || entry->state & FL_POPUP_DISABLED ) return NULL; /* Toggle entries must change state */ if ( entry->type == FL_POPUP_TOGGLE ) { if ( entry->state & FL_POPUP_CHECKED ) entry->state &= ~ FL_POPUP_CHECKED; else entry->state |= FL_POPUP_CHECKED; } /* For a radio entry that wasn't already set the other radio entries for the same group must be unset before the selected one becomes set */ if ( entry->type == FL_POPUP_RADIO && ! ( entry->state & FL_POPUP_CHECKED ) ) { FL_POPUP_ENTRY *e; for ( e = entry->popup->entries; e != NULL; e = e->next ) if ( e->type == FL_POPUP_RADIO && e->group == entry->group ) e->state &= ~ FL_POPUP_CHECKED; entry->state |= FL_POPUP_CHECKED; } /* Set up the structure to be returned and call the entries callback function */ fli_set_popup_return( entry ); if ( entry->callback ) cb_result = entry->callback( &entry->popup->top_parent->ret ); /* Call all popup callback functions (if the selected entry is in a sub-popup call that of the sub-popup first, then that of the parent, grand-parent etc.). Interrupt chain of callbacks if one of them returns FL_IGNORE. */ for ( p = entry->popup; p != NULL && cb_result != FL_IGNORE; p = p->parent ) if ( p->callback ) { entry->popup->top_parent->ret.popup = p; cb_result = p->callback( &entry->popup->top_parent->ret ); } return cb_result != FL_IGNORE ? &entry->popup->top_parent->ret : NULL; } /*************************************** * Deal with motion of the mouse * Note: the coordinates received are relative to the current popup. ***************************************/ static FL_POPUP * handle_motion( FL_POPUP * popup, int x, int y ) { FL_POPUP_ENTRY *e, *ce; /* First deal with the situation where the mouse isn't on the popup */ if ( x < 0 || x >= ( int ) popup->w || y < 0 || y >= ( int ) popup->h ) { FL_POPUP *p; /* If there was an active entry make it inactive and call its leave callback */ for ( e = popup->entries; e != NULL; e = e->next ) if ( e->is_act ) { enter_leave( e, 0 ); break; } /* Check if we're on a different popup and return if we aren't. Coordinates must be transformed to relative to the root window. */ if ( ( p = find_popup( x + popup->x, y + popup->y ) ) == NULL ) return popup; /* Otherwise first check if we need to shift the window - coordinates must now be relative to the new popups window and might be changed by the routine */ x += popup->x - p->x; y += popup->y - p->y; motion_shift_window( p, &x, &y ); /* Also check if we're on the entry for the sub-entry we were on before. In that case nothing needs to be done yet. Take care: find_entry() needs to be called with the coordinates transformed to those relative to the other popup. */ e = find_entry( p, x, y ); if ( e != NULL && e->type == FL_POPUP_SUB && e->sub == popup ) return popup; /* Otherwise close the current sub-popup, invoking the leave callback for an activate entry */ close_popup( popup, 1 ); /* We might not have ended up on the parent popup but a parent of the parent, in which case also the parent popup must be closed. Note that the coordinates must again be transformed so that they are now relative to that of the parents window. */ return handle_motion( popup->parent, x + p->x - popup->parent->x, y + p->y - popup->parent->y ); } /* Check if we need to shift the window */ motion_shift_window( popup, &x, &y ); /* Test if the mouse is on a new entry*/ ce = find_entry( popup, x, y ); /* If we're still on the same entry as we were on the last call do nothing (except for the case that we're on a entry for a sub-popup, in that case we've got onto it via the keyboard and the sub-popup isn't open yet) */ if ( ce != NULL && ce->is_act ) return ce->type == FL_POPUP_SUB ? open_subpopup( ce ) : popup; /* Redraw former active entry as inactive and call its leave callback*/ for ( e = popup->entries; e != NULL; e = e->next ) if ( e->is_act ) { enter_leave( e, 0 ); break; } /* If we are on a new, non-disabled entry mark it as active and call its enter callback. If the new entry is a sub-entry open the corresponding sub-popup (per default at the same height as the entry and to the right of it.*/ if ( ce != NULL && ! ( ce->state & FL_POPUP_DISABLED ) ) { enter_leave( ce, 1 ); if ( ce->type == FL_POPUP_SUB ) return open_subpopup( ce ); } return popup; } /*************************************** * Shift popup window if it doesn't fit completely on the screen and the * user is trying to move the mouse in the direction of the non-visible * parts of the popups window. ***************************************/ static void motion_shift_window( FL_POPUP * popup, int * x, int * y ) { FL_POPUP_ENTRY *e; static long sec = 0, usec = 0; long now_sec, now_usec; int xr = *x + popup->x, /* coordinates relative to root window */ yr = *y + popup->y; int old_x_pos, old_y_pos; /* First check if parts of the popup window are off-screen and the user is tryng to move the mouse out of the screen into a direction where non-visible parts are. If not we're done. */ if ( ( xr > 0 || popup->x >= 0 ) && ( xr < fl_scrw - 1 || popup->x + ( int ) popup->w <= fl_scrw ) && ( yr > 0 || popup->y >= 0 ) && ( yr < fl_scrh - 1 || popup->y + ( int ) popup->h <= fl_scrh ) ) return; /* Check if the minimum time delay since last shift is over */ fl_gettime( &now_sec, &now_usec ); if ( 1000000 * ( now_sec - sec ) + now_usec - usec < WINDOW_SHIFT_DELAY ) return; /* Shift window left/right by a fixed amout of pixels*/ old_x_pos = popup->x; if ( xr == fl_scrw - 1 && popup->x + ( int ) popup->w > fl_scrw ) popup->x = FL_max( popup->x - WINDOW_SHIFT, fl_scrw - ( int ) popup->w ); else if ( xr == 0 && popup->x < 0 ) popup->x = FL_min( popup->x + WINDOW_SHIFT, 0 ); *x -= popup->x - old_x_pos; /* Shift window up/down by one entry*/ old_y_pos = popup->y; if ( yr == fl_scrh - 1 && popup->y + ( int ) popup->h > fl_scrh) { /* Find first entry that extends below the bottom of the screen and set the windows y-position so that it is shown completely */ for ( e = popup->entries; e != NULL; e = e->next ) if ( e->type != FL_POPUP_LINE && ! ( e->state & FL_POPUP_HIDDEN ) && e->box_y + ( int ) e->box_h - 1 > *y ) break; if ( e != NULL ) popup->y = fl_scrh - e->box_y - ( int ) e->box_h; } else if ( yr == 0 && popup->y < 0 ) { /* Find first entry that's at least one pixel below the upper screen border */ for ( e = popup->entries; e != NULL; e = e->next ) if ( ! ( e->state & FL_POPUP_HIDDEN ) && e->box_y >= *y ) break; /* Go to the one before that which isn't a line or hidden and make it the one at the very top of the screen */ if ( e != NULL ) do e = e->prev; while ( e != NULL && ( e->type == FL_POPUP_LINE || e->state & FL_POPUP_HIDDEN ) ); if ( e == NULL ) popup->y = 0; else popup->y = - e->box_y; } *y -= popup->y - old_y_pos; /* Move the window to the new position */ if ( popup->x != old_x_pos || popup->y != old_y_pos ) { XMoveWindow( flx->display, popup->win, popup->x, popup->y ); sec = now_sec; usec = now_usec; } } /*************************************** * Handle keyboard input. If NULL gets returned either a selection was * made (in that case 'entry' points to the selected entry) or dealing * with the popup is to be stopped. If non-NULL is returned it's the * popup we now have to deal with. ***************************************/ static FL_POPUP * handle_key( FL_POPUP * popup, XKeyEvent * ev, FL_POPUP_ENTRY ** entry ) { KeySym keysym = NoSymbol; char buf[ 16 ]; FL_POPUP_ENTRY *e, *ce; XLookupString( ev, buf, sizeof buf, &keysym, 0 ); /* Start of with checking for shortcut keys, they may have overridden some of the keys normally used */ if ( ( e = handle_shortcut( popup, keysym, ev->state ) ) != NULL ) { /* Special handling for sub-popup entries: shortcut key doesn't result in a selection but in the corresponding sub-popup being opened (if it isn't already shown) */ if ( e->type == FL_POPUP_SUB ) { if ( e->sub->win != None ) return popup; for ( ce = popup->entries; ce != NULL; ce = ce->next ) if ( ce->is_act ) { if ( ce != e ) enter_leave( ce, 0 ); break; } if ( ce != e ) enter_leave( e, 1 ); return open_subpopup( e ); } /* Close all popups. Leave callbacks are not invoked since a selection was made */ while ( popup ) { close_popup( popup, 0 ); popup = popup->parent; } *entry = e; return NULL; } /* and close the current popup, invoking leave callback */ if ( keysym == XK_Escape || keysym == XK_Cancel ) { close_popup( popup, 1 ); return popup->parent; } /* Try to find the "active" entry (there may not exist one) */ for ( ce = popup->entries; ce != NULL; ce = ce->next ) if ( ce->is_act ) break; /* does nothing (returning the original popup) if there isn't an active entry. If we're on a sub-entry open the sup-popup. Otherwise return indicating that the active entry was selected after closing all popups. */ if ( keysym == XK_Return ) { if ( ce == NULL ) return popup; /* If we're on a sun-popup entry open the corresponding sub-pupop */ if ( ce->type == FL_POPUP_SUB ) return open_subpopup( ce ); /* Otherwise we got a selection, so close all popups, invoke no leave callbacks (since selection was made) and return the selected entry */ while ( popup ) { close_popup( popup, 0 ); popup = popup->parent; } *entry = ce; return NULL; } /* The key only does something when we're on a sub-entry. In this case the sub-popup is opened and the top-most usable entry is activated. */ if ( IsRight( keysym ) ) { if ( ce == NULL || ce->type != FL_POPUP_SUB ) return popup; for ( e = ce->sub->entries; e != NULL; e = e->next ) if ( IS_ACTIVATABLE( e ) ) break; if ( e != NULL ) enter_leave( e, 1 ); return open_subpopup( ce ); } /* The key only has a meaning if we're in a sub-popup. In this case the sub-popup gets closed (leave callbacks get invoked). */ if ( IsLeft( keysym ) ) { if ( popup->parent == NULL ) return popup; close_popup( popup, 1 ); return popup->parent; } /* The key moves down to the next "activatable" entry (with wrap-around). If no entry was active yet the first in the popup is activated. */ if ( IsDown( keysym ) ) { e = NULL; if ( ce != NULL ) for ( e = ce->next; e != NULL; e = e->next ) if ( IS_ACTIVATABLE( e ) ) break; if ( e == NULL ) for ( e = popup->entries; e != ce; e = e->next ) if ( IS_ACTIVATABLE( e ) ) break; if ( e != NULL ) key_shift_window( popup, e ); if ( e != ce ) { if ( ce != NULL ) enter_leave( ce, 0 ); enter_leave( e, 1 ); } return popup; } /* The key moves up to the previous "activatable" entry (with wrap-around). If no entry was active yet the last in the popup is activated. */ if ( IsUp( keysym ) ) { FL_POPUP_ENTRY * ei; for ( e = NULL, ei = popup->entries; ei != ce; ei = ei->next ) if ( IS_ACTIVATABLE( ei ) ) e = ei; if ( e == NULL && ce != NULL ) for ( ei = ce->next; ei != NULL; ei = ei->next ) if ( IS_ACTIVATABLE( ei ) ) e = ei; if ( ce != NULL && e != NULL ) { key_shift_window( popup, e ); enter_leave( ce, 0 ); } if ( e != NULL ) enter_leave( e, 1 ); return popup; } /* The key moves to the last "activatable" in the popup */ if ( IsEnd( keysym ) ) { FL_POPUP_ENTRY *ei; for ( e = NULL, ei = ce != NULL ? ce->next : popup->entries; ei != NULL; ei = ei->next ) if ( IS_ACTIVATABLE( ei ) ) e = ei; if ( ce != NULL && e != NULL ) enter_leave( ce, 0 ); if ( e != NULL ) { key_shift_window( popup, e ); enter_leave( e, 1 ); } return popup; } /* The key moves to the first "activatable" in the popup */ if ( IsHome( keysym ) ) { for ( e = popup->entries; e != ce; e = e->next ) if ( IS_ACTIVATABLE( e ) ) break; if ( ce != NULL && e != ce ) enter_leave( ce, 0 ); if ( e != ce ) { key_shift_window( popup, e ); enter_leave( e, 1 ); } return popup; } /* All other keys do nothing, returning the original popup indicates that */ return popup; } /*************************************** * Shift popup window if it doesn't fit completely on the screen and the * user pressed a key that takes us to a non-visible entry of the window. ***************************************/ static void key_shift_window( FL_POPUP * popup, FL_POPUP_ENTRY * entry ) { /* Test if the window is only partially visible on the window (in vertical direction) and the entry we're supposed to go to isn't in the visible part of the window. If not we're done.*/ if ( ( popup->y >= 0 && popup->y + ( int ) popup->h < fl_scrh ) || ( popup->y + entry->box_y >= 0 && popup->y + entry->box_y + ( int ) entry->box_h < fl_scrh ) ) return; /* Shift window up/down */ if ( popup->y + entry->box_y < 0 ) popup->y = - entry->box_y + 1; else popup->y = fl_scrh - entry->box_y - ( int ) entry->box_h - 1; XMoveWindow( flx->display, popup->win, popup->x, popup->y ); } /*************************************** * Open a sub-popup ***************************************/ static FL_POPUP * open_subpopup( FL_POPUP_ENTRY * entry ) { FL_POPUP *popup = entry->popup; int offset = FL_abs( popup->top_parent->bw ) + ( popup->top_parent->bw > 0 ? 1 : 0 ) + OUTER_PADDING_TOP; /* Set the position of the new sub-popup. Normally show it to the right of the parent popup, but if this is a sub-popup of a sub-popup and the parent sub-pupop is to the left of its parent (because there wasn't enough room on the right side) position it also to the left. Vertically put it at the same height as the entry its opened up from. But the function for opening the window for the sub-popup may overrule these settings if there isn't enough room on the screen. */ if ( popup->parent == NULL || popup->x > popup->parent->x ) fl_popup_set_position( entry->sub, popup->x + popup->w, popup->y + entry->box_y - offset ); else { if ( entry->sub->need_recalc ) recalc_popup( entry->sub ); fl_popup_set_position( entry->sub, popup->x - entry->sub->w, popup->y + entry->box_y - offset ); } draw_popup( entry->sub ); return entry->sub; } /*************************************** * Check popup entries for a shortcut identical to a pressed key ***************************************/ static FL_POPUP_ENTRY * handle_shortcut( FL_POPUP * popup, long keysym, unsigned int keymask ) { FL_POPUP_ENTRY *e; long *sc; if ( controlkey_down( keymask ) && keysym >= 'a' && keysym <= 'z' ) keysym = toupper( keysym ); keysym += ( controlkey_down( keymask ) ? FL_CONTROL_MASK : 0 ) + ( metakey_down( keymask ) ? FL_ALT_MASK : 0 ); /* Look at the shortcuts for all of the entries of the current popup, then those of the parent etc. */ while ( popup != NULL ) { for ( e = popup->entries; e != NULL; e = e->next ) if ( IS_ACTIVATABLE( e ) && e->shortcut != NULL ) for ( sc = e->shortcut; *sc != 0; sc++ ) if ( *sc == keysym ) return e; popup = popup->parent; } return NULL; } /*************************************** * Handle entering (act = 1) or leaving (act = 0) of an entry ***************************************/ static void enter_leave( FL_POPUP_ENTRY * entry, int act ) { /* Mark entry as entered or left */ entry->is_act = act; /* Redraw the entry (at least while popup is shown) */ if ( entry->popup->win != None ) draw_entry( entry ); /* If a callback for the situation exists invoke it */ if ( ( act && entry->enter_callback == NULL ) || ( ! act && entry->leave_callback == NULL ) ) return; fli_set_popup_return( entry ); if ( act ) entry->enter_callback( &entry->popup->top_parent->ret ); else entry->leave_callback( &entry->popup->top_parent->ret ); } /*************************************** * Try to find a (shown) popup from its position (coordinates must be * relative to the root window) ***************************************/ static FL_POPUP * find_popup( int x, int y ) { FL_POPUP *p; for ( p = popups; p != NULL; p = p->next ) { if ( p->win == None ) continue; if ( x >= p->x && x < p->x + ( int ) p->w && y >= p->y && y < p->y + ( int ) p->h ) return p; } return NULL; } /*************************************** * Try to find an entry in a popup from its position (coordinates must be * relative to the popup's window) ***************************************/ static FL_POPUP_ENTRY * find_entry( FL_POPUP * popup, int x, int y ) { FL_POPUP_ENTRY *e; for ( e = popup->entries; e != NULL; e = e->next ) { if ( e->type == FL_POPUP_LINE || e->state & FL_POPUP_HIDDEN ) continue; if ( x >= 0 && x < ( int ) popup->w && y >= e->box_y && y < e->box_y + ( int ) e->box_h ) return e; } return NULL; } /*************************************** * Makes sure the top-parent pointers in sub-popups are set correctly ***************************************/ static void setup_subpopups( FL_POPUP * popup ) { FL_POPUP *p; FL_POPUP_ENTRY *e; /* The top-parent of sub-popups must be set to the top-most popup since it gets all its drawing properties etc. from that one. In normal popups the top_parent entry just points back to the popup itself. */ if ( ( p = popup->parent ) != NULL ) { while ( p->parent != NULL ) p = p->parent; popup->top_parent = p; } else popup->top_parent = popup; for ( e = popup->entries; e != NULL; e = e->next ) if ( e->type == FL_POPUP_SUB ) setup_subpopups( e->sub ); } /*************************************** * Removes all backspace characters from a string * and replaces all tabs by spaces. ***************************************/ static char * cleanup_string( char *s ) { char *c; if ( ! s || ! *s ) return s; /* Remove all backspace charscters */ c = s; while ( ( c = strchr( c, '\b' ) ) ) memmove( c, c + 1, strlen( c ) ); /* Replace tabs by single blanks */ c = s; while ( ( c = strchr( c, '\t' ) ) ) *c++ = ' '; return s; } /*************************************** * Set need_recalc flag for a popup and all its sub-popups ***************************************/ static void set_need_recalc( FL_POPUP * popup ) { FL_POPUP_ENTRY *e; popup->need_recalc = 1; for ( e = popup->entries; e != NULL; e = e->next ) if ( e->type == FL_POPUP_SUB ) set_need_recalc( e->sub ); } /*************************************** * Function called by fl_initialize() to set up defaults ***************************************/ void fli_popup_init( void ) { fli_popup_finish( ); /* just to make sure... */ popup_entry_font_style = FL_NORMAL_STYLE; popup_title_font_style = FL_EMBOSSED_STYLE; #ifdef __sgi popup_entry_font_size = FL_SMALL_SIZE, popup_title_font_size = FL_SMALL_SIZE; #else popup_entry_font_size = FL_NORMAL_SIZE; popup_title_font_size = FL_NORMAL_SIZE; #endif popup_bg_color = FL_MCOL; popup_on_color = FL_BOTTOM_BCOL; popup_title_color = FL_BLACK; popup_text_color = FL_BLACK; popup_text_on_color = FL_WHITE; popup_text_off_color = FL_INACTIVE_COL; popup_radio_color = FL_BLUE; popup_bw = ( fli_cntl.borderWidth && FL_abs( fli_cntl.borderWidth ) <= FL_MAX_BW ) ? fli_cntl.borderWidth : FL_BOUND_WIDTH; popup_cursor = XC_sb_right_arrow; popup_policy = FL_POPUP_NORMAL_SELECT; } /*************************************** * Function called by fl_finish() to release all memory used by popups. ***************************************/ void fli_popup_finish( void ) { FL_POPUP *p; /* Delete all top-level popups, sub-popus get taken care of automatically */ while ( popups ) for ( p = popups; p != NULL; p = p->next ) if ( p->parent == NULL ) { fl_popup_delete( p ); break; } } /*************************************** * Checks if a popup exists, returns 0 if it does, 1 otherwise. ***************************************/ int fli_check_popup_exists( FL_POPUP * popup ) { FL_POPUP *p; for ( p = popups; p != NULL; p = p->next ) if ( popup == p ) return 0; return 1; } /*************************************** * Checks if an entry exists, returns 0 if it does, 1 otherwise. ***************************************/ int fli_check_popup_entry_exists( FL_POPUP_ENTRY * entry ) { FL_POPUP_ENTRY *e; if ( entry == NULL ) return 1; if ( fli_check_popup_exists( entry->popup ) ) return 1; for ( e = entry->popup->entries; e != NULL; e = e->next ) if ( entry == e ) return 0; return 1; } /*************************************** * Set up the return structure of a popup for a certain entry ***************************************/ FL_POPUP_RETURN * fli_set_popup_return( FL_POPUP_ENTRY * entry ) { entry->popup->top_parent->ret.text = entry->text; entry->popup->top_parent->ret.label = entry->label; entry->popup->top_parent->ret.accel = entry->accel; entry->popup->top_parent->ret.val = entry->val; entry->popup->top_parent->ret.user_data = entry->user_data; entry->popup->top_parent->ret.entry = entry; entry->popup->top_parent->ret.popup = entry->popup; return &entry->popup->top_parent->ret; } /*************************************** * Reset the popups counter to 0 ***************************************/ void fli_popup_reset_counter( FL_POPUP *popup ) { popup->counter = 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/Makefile.in0000644000175000017500000010464311377311602015052 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/config/common.am subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man5dir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libforms_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libforms_la_OBJECTS = align.lo appwin.lo asyn_io.lo bitmap.lo \ box.lo browser.lo button.lo canvas.lo chart.lo checkbut.lo \ child.lo choice.lo clipboard.lo clock.lo cmd_br.lo colsel.lo \ combo.lo counter.lo cursor.lo dial.lo display.lo errmsg.lo \ events.lo flcolor.lo fldraw.lo flsnprintf.lo flresource.lo \ flvisual.lo fonts.lo formbrowser.lo forms.lo frame.lo free.lo \ fselect.lo goodie_alert.lo goodie_choice.lo goodie_input.lo \ goodie_msg.lo goodies.lo goodie_sinput.lo goodie_yesno.lo \ handling.lo input.lo interpol.lo keyboard.lo labelbut.lo \ lframe.lo lightbut.lo listdir.lo menu.lo nmenu.lo objects.lo \ oneliner.lo pixmap.lo popup.lo positioner.lo read2lsbf.lo \ read2msbf.lo read4lsb.lo read4msb.lo readint.lo round3d.lo \ roundbut.lo scrollbar.lo scrollbut.lo select.lo signal.lo \ sldraw.lo slider.lo space.lo spline.lo spinner.lo strdup.lo \ symbols.lo sysdep.lo tabfolder.lo tbox.lo text.lo \ thumbwheel.lo timeout.lo timer.lo tooltip.lo util.lo \ valuator.lo version.lo vn_pair.lo vstrcat.lo win.lo xdraw.lo \ xpopup.lo xsupport.lo xtext.lo xyplot.lo libforms_la_OBJECTS = $(am_libforms_la_OBJECTS) libforms_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libforms_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libforms_la_SOURCES) DIST_SOURCES = $(libforms_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive man5dir = $(mandir)/man5 NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D @USE_BWC_BS_HACK_FALSE@BWC = @USE_BWC_BS_HACK_TRUE@BWC = -D USE_BWC_BS_HACK CLEANFILES = forms.h xforms.5 EXTRA_DIST = xforms.man \ dirent_vms.h \ vms_readdir.c SUBDIRS = bitmaps fd include private # The Autobook recommends using "man5_MANS = xforms.man" which certainly # simplifies things but appears not to work with automake 1.5. man_MANS = xforms.5 INCLUDES = -DMAKING_FORMS $(X_CFLAGS) $(BWC) lib_LTLIBRARIES = libforms.la libforms_la_LDFLAGS = -no-undefined -Wl,--no-undefined -version-info @SO_VERSION@ libforms_la_LIBADD = $(X_LIBS) $(XPM_LIB) -lX11 libforms_la_SOURCES = \ align.c \ appwin.c \ asyn_io.c \ bitmap.c \ box.c \ browser.c \ button.c \ canvas.c \ chart.c \ checkbut.c \ child.c \ choice.c \ clipboard.c \ clock.c \ cmd_br.c \ colsel.c \ combo.c \ counter.c \ cursor.c \ dial.c \ display.c \ dmalloc.h \ errmsg.c \ events.c \ extern.h \ flcolor.c \ fldraw.c \ flinternal.h \ flsnprintf.c \ flresource.c \ flvisual.c \ fonts.c \ formbrowser.c \ forms.c \ frame.c \ free.c \ fselect.c \ global.h \ goodie_alert.c \ goodie_choice.c \ goodie_input.c \ goodie_msg.c \ goodies.c \ goodie_sinput.c \ goodie_yesno.c \ handling.c \ input.c \ interpol.c \ keyboard.c \ labelbut.c \ lframe.c \ lightbut.c \ listdir.c \ local.h \ menu.c \ nmenu.c \ objects.c \ oneliner.c \ pixmap.c \ popup.c \ positioner.c \ read2lsbf.c \ read2msbf.c \ read4lsb.c \ read4msb.c \ readint.c \ round3d.c \ roundbut.c \ scrollbar.c \ scrollbut.c \ select.c \ signal.c \ sldraw.c \ slider.c \ space.c \ spline.c \ spinner.c \ strdup.c \ symbols.c \ sysdep.c \ tabfolder.c \ tbox.c \ text.c \ thumbwheel.c \ timeout.c \ timer.c \ tooltip.c \ ulib.h \ util.c \ valuator.c \ version.c \ vn_pair.c \ vstrcat.c \ win.c \ xdraw.c \ xpopup.c \ xsupport.c \ xtext.c \ xyplot.c all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status lib/config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libforms.la: $(libforms_la_OBJECTS) $(libforms_la_DEPENDENCIES) $(libforms_la_LINK) -rpath $(libdir) $(libforms_la_OBJECTS) $(libforms_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/align.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appwin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asyn_io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/browser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/button.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canvas.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkbut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/child.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/choice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clipboard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmd_br.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colsel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/combo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/counter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errmsg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/events.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flcolor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fldraw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flresource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flsnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flvisual.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fonts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formbrowser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/forms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fselect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goodie_alert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goodie_choice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goodie_input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goodie_msg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goodie_sinput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goodie_yesno.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goodies.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/labelbut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lframe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lightbut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listdir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nmenu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objects.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneliner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/positioner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read2lsbf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read2msbf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read4lsb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read4msb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round3d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/roundbut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrollbar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrollbut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sldraw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slider.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/space.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spinner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysdep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabfolder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tbox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thumbwheel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tooltip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/valuator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vn_pair.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vstrcat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdraw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpopup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsupport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xyplot.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man5: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" @list=''; test -n "$(man5dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.5[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ done; } uninstall-man5: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(MANS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man5dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man5 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-man uninstall-man: uninstall-man5 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man \ install-man5 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-man uninstall-man5 xforms.5: cp -p $(srcdir)/xforms.man xforms.5 # 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: xforms-1.0.93sp1/lib/counter.c0000644000175000017500000004617311316735045014637 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file counter.c *. * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Counter class */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pcounter.h" #include #include #include /* Give each component a name. parts are numbered 01 4 23, i.e. OB0 is the button for reducing the counter value in large steps, OB1 the one for reducing the value in small steps, OB2 the one for increasing the value in small steps, OB3 the one for increasing the value in large steps and finally OB4 the field with the counters value. */ enum { NONE, OB0 = 1, OB1 = 2, OB2 = 4, OB3 = 8, OB4 = 16, ALL = 31 }; /*************************************** * Draws a counter ***************************************/ static void draw_counter( FL_OBJECT * ob ) { char str[ 64 ]; int i, btype[ 5 ]; FLI_COUNTER_SPEC *sp = ob->spec; /* Compute boxtypes if pushed */ for ( i = 0; i < 5; i++ ) if ( ob->pushed && FL_IS_UPBOX( ob->boxtype ) && ( sp->mouseobj & ( 1 << i ) ) ) btype[i] = FL_TO_DOWNBOX( ob->boxtype ); else btype[ i ] = ob->boxtype; if ( btype[ 4 ] == FL_UP_BOX ) btype[ 4 ] = FL_DOWN_BOX; /* Compute sizes. Must not leave any gaps otherwise double buffering will not work correctly */ if ( ob->type == FL_NORMAL_COUNTER ) { /* Button is numbered 01 4 23 */ sp->ww[ 0 ] = sp->ww[ 1 ] = sp->ww[ 2 ] = sp->ww[ 3 ] = FL_min( 0.18 * ob->w, ob->h ); sp->ww[ 4 ] = ob->w - 4 * sp->ww[ 0 ]; /* must calculate this way */ sp->xx[ 0 ] = ob->x; sp->xx[ 1 ] = sp->xx[ 0 ] + sp->ww[ 0 ]; sp->xx[ 4 ] = sp->xx[ 1 ] + sp->ww[ 1 ]; sp->xx[ 2 ] = sp->xx[ 4 ] + sp->ww[ 4 ]; sp->xx[ 3 ] = sp->xx[ 2 ] + sp->ww[ 2 ]; } else { /* 1 4 2 */ sp->ww[ 1 ] = sp->ww[ 2 ] = FL_min( 0.20 * ob->w, ob->h ); sp->ww[ 4 ] = ob->w - 2 * sp->ww[ 1 ]; sp->xx[ 1 ] = ob->x; sp->xx[ 4 ] = ob->x + sp->ww[ 1 ]; sp->xx[ 2 ] = sp->xx[ 4 ] + sp->ww[ 4 ]; } if ( sp->filter ) strcpy( str, sp->filter( ob, sp->val, sp->prec ) ); else sprintf( str, "%.*f", sp->prec, sp->val ); /* Only draw the parts that need to be drawn */ if ( ob->type == FL_NORMAL_COUNTER && sp->draw_type & OB0 ) { fl_drw_box( btype[ 0 ], sp->xx[ 0 ], ob->y, sp->ww[ 0 ], ob->h, ob->col1, ob->bw ); fl_drw_text( FL_ALIGN_CENTER, sp->xx[ 0 ], ob->y, sp->ww[ 0 ], ob->h, ob->col2, 0, 0, "@#<<" ); } if ( sp->draw_type & OB1 ) { fl_drw_box( btype[ 1 ], sp->xx[ 1 ], ob->y, sp->ww[ 1 ], ob->h, ob->col1, ob->bw ); fl_drw_text( FL_ALIGN_CENTER, sp->xx[ 1 ], ob->y, sp->ww[ 1 ], ob->h, ob->col2, 0, 0, "@#<" ); } if ( sp->draw_type & OB4 ) { fl_drw_box( btype[ 4 ], sp->xx[ 4 ], ob->y, sp->ww[ 4 ], ob->h, ob->col1, ob->bw ); fl_set_text_clipping( sp->xx[ 4 ], ob->y, sp->ww[ 4 ], ob->h ); fl_drw_text( FL_ALIGN_CENTER, sp->xx[ 4 ], ob->y, sp->ww[ 4 ], ob->h, ob->lcol, ob->lstyle, ob->lsize, str ); fl_unset_text_clipping( ); } if ( sp->draw_type & OB2 ) { fl_drw_box( btype[ 2 ], sp->xx[ 2 ], ob->y, sp->ww[ 2 ], ob->h, ob->col1, ob->bw ); fl_drw_text( FL_ALIGN_CENTER, sp->xx[ 2 ], ob->y, sp->ww[ 2 ], ob->h, ob->col2, 0, 0, "@#>" ); } if ( ob->type == FL_NORMAL_COUNTER && sp->draw_type & OB3 ) { fl_drw_box( btype[ 3 ], sp->xx[ 3 ], ob->y, sp->ww[ 3 ], ob->h, ob->col1, ob->bw ); fl_drw_text( FL_ALIGN_CENTER, sp->xx[ 3 ], ob->y, sp->ww[ 3 ], ob->h, ob->col2, 0, 0, "@#>>" ); } if ( sp->draw_type == ALL ) fl_draw_object_label_outside( ob ); sp->draw_type = ALL; } /*************************************** * Buttons are numbered as 01 4 23 ***************************************/ static void calc_mouse_obj( FL_OBJECT * ob, FL_Coord mx, FL_Coord my ) { FLI_COUNTER_SPEC *sp = ob->spec; sp->mouseobj = NONE; if ( my < ob->y || my > ob->y + ob->h || mx < ob->x ) return; /* 01 4 23 */ if ( ob->type == FL_NORMAL_COUNTER ) { if ( mx < ob->x + sp->ww[ 0 ] ) sp->mouseobj = OB0; else if ( mx < sp->ww[ 1 ] + sp->xx[ 1 ] ) sp->mouseobj = OB1; else if ( mx < sp->ww[ 4 ] + sp->xx[ 4 ] ) sp->mouseobj = OB4; else if ( mx < sp->ww[ 2 ] + sp->xx[ 2 ] ) sp->mouseobj = OB2; else if ( mx < sp->ww[ 3 ] + sp->xx[ 3 ] ) sp->mouseobj = OB3; } else { /* 1 4 2 */ if ( mx < ob->x + sp->ww[ 1 ] ) sp->mouseobj = OB1; else if ( mx < sp->xx[ 4 ] + sp->ww[ 4 ] ) sp->mouseobj = OB4; else if ( mx < sp->xx[ 2 ] + sp->ww[ 2 ] ) sp->mouseobj = OB2; } } /*************************************** ***************************************/ int fl_get_counter_repeat( FL_OBJECT * ob ) { return ( ( FLI_COUNTER_SPEC * ) ob->spec )->repeat_ms; } /*************************************** ***************************************/ void fl_set_counter_repeat( FL_OBJECT * ob, int millisec ) { if ( millisec <= 0 ) { M_warn( "fl_set_counter_repeat", "Invalid argument, disregarded" ); return; } ( ( FLI_COUNTER_SPEC * ) ob->spec )->repeat_ms = millisec; } /*************************************** ***************************************/ int fl_get_counter_min_repeat( FL_OBJECT * ob ) { return ( ( FLI_COUNTER_SPEC * ) ob->spec )->min_repeat_ms; } /*************************************** ***************************************/ void fl_set_counter_min_repeat( FL_OBJECT * ob, int millisec ) { if ( millisec <= 0 ) { M_warn( "fl_set_counter_min_repeat", "Invalid argument, disregarded" ); return; } ( ( FLI_COUNTER_SPEC * ) ob->spec )->min_repeat_ms = millisec; } /*************************************** ***************************************/ int fl_get_counter_speedjump( FL_OBJECT * ob ) { return ( ( FLI_COUNTER_SPEC * ) ob->spec )->do_speedjump; } /*************************************** ***************************************/ void fl_set_counter_speedjump( FL_OBJECT * ob, int yes_no ) { ( ( FLI_COUNTER_SPEC * ) ob->spec )->do_speedjump = yes_no != 0; } /*************************************** ***************************************/ static void timeoutCB( int val FL_UNUSED_ARG, void * data ) { ( ( FLI_COUNTER_SPEC * ) data )->timeout_id = -1; } /*************************************** * Show which button is active by highlighting the button ***************************************/ static void show_focus_obj( FL_OBJECT * ob, FL_Coord mx, FL_Coord my ) { FLI_COUNTER_SPEC *sp = ob->spec; unsigned int oldobj = sp->mouseobj; calc_mouse_obj( ob, mx, my ); /* If same object, do nothing */ if ( sp->mouseobj == oldobj ) return; if ( sp->mouseobj && sp->mouseobj != OB4 && sp->mouseobj != oldobj ) { FL_COLOR old = ob->col1; sp->draw_type = sp->mouseobj; ob->col1 = FL_MCOL; fl_redraw_object( ob ); sp->draw_type = oldobj; ob->col1 = old; fl_redraw_object( ob ); } else if ( ( sp->mouseobj == NONE || sp->mouseobj == OB4 ) && oldobj ) { sp->draw_type = oldobj; fl_redraw_object( ob ); } } /*************************************** * Handles mouse related events ***************************************/ static int handle_mouse( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my ) { FLI_COUNTER_SPEC *sp = ob->spec; int ret = FL_RETURN_NONE; switch ( event ) { /* On mouse push store the old value of the counter, set up the time values for speeding up updates while the mouse is pressed down, check where the mouse is and, if it's on one of the buttons, we're going to change the counters value. Reset the value for the timeout just to make sure */ case FL_PUSH : sp->start_val = sp->val; sp->cur_repeat_ms = sp->repeat_ms; calc_mouse_obj( ob, mx, my ); if ( sp->mouseobj != NONE ) ret |= FL_RETURN_CHANGED; sp->timeout_id = -1; break; /* On release stop the update timer (if it's still running), set flag that indicates we're on a button and return end of inter- action */ case FL_RELEASE : if ( sp->timeout_id != -1 ) { fl_remove_timeout( sp->timeout_id ); sp->timeout_id = -1; } sp->mouseobj = NONE; fl_redraw_object( ob ); ret |= FL_RETURN_END; break; /* During an update (and if we're on a button) and the time has expired a change of the counters value is in order */ case FL_UPDATE : if ( sp->mouseobj != NONE && sp->timeout_id == -1 ) ret |= FL_RETURN_CHANGED; break; } /* Handle changes of the counter value */ if ( ret == FL_RETURN_CHANGED ) { double oval = sp->val; /* (Re)start the timer */ sp->timeout_id = fl_add_timeout( sp->cur_repeat_ms, timeoutCB, sp ); /* If 'speedjump' hasn't been switched on and we didn't reach the final speed reduce the timeout value by a third of the remaining difference (the extra substraction of 2 makes sure we can reach it in all circumstances) */ if ( ! sp->do_speedjump && sp->cur_repeat_ms > sp->min_repeat_ms ) { sp->cur_repeat_ms -= ( sp->cur_repeat_ms - sp->min_repeat_ms ) / 3 + 2; sp->cur_repeat_ms = FL_max( sp->cur_repeat_ms, sp->min_repeat_ms ); } /* If 'speedjump' has been switched on but initial and final speed aren't identical it means that we have a long delay at the start and then short timeouts afterwards */ if ( sp->do_speedjump && sp->cur_repeat_ms > sp->min_repeat_ms ) sp->cur_repeat_ms = sp->min_repeat_ms; /* Change the counters value according to which button we're on */ if ( sp->mouseobj == OB0 ) sp->val -= sp->lstep; if ( sp->mouseobj == OB1 ) sp->val -= sp->sstep; if ( sp->mouseobj == OB2 ) sp->val += sp->sstep; if ( sp->mouseobj == OB3 ) sp->val += sp->lstep; sp->val = fli_clamp( sp->val, sp->min, sp->max ); /* Redraw the central field with the new value */ if ( sp->val != oval ) { sp->draw_type = sp->mouseobj | OB4; fl_redraw_object( ob ); } } return ret; } /*************************************** * Handles an event ***************************************/ static int handle_counter( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_COUNTER_SPEC *sp = ob->spec; int ret = FL_RETURN_NONE; switch ( event ) { case FL_DRAW: draw_counter( ob ); break; case FL_DRAWLABEL: fl_draw_object_label_outside( ob ); break; case FL_PUSH: case FL_UPDATE: if ( key != FL_MBUTTON1 ) break; if ( ( ret |= handle_mouse( ob, event, mx, my ) ) && ! ( ob->how_return & FL_RETURN_END_CHANGED ) ) sp->start_val = sp->val; break; case FL_RELEASE: if ( key != FL_MBUTTON1 ) break; ret |= handle_mouse( ob, event, mx, my ); show_focus_obj( ob, mx, my ); if ( sp->start_val != sp->val ) ret |= FL_RETURN_CHANGED; break; case FL_MOTION: case FL_ENTER: case FL_LEAVE: show_focus_obj( ob, mx, my ); break; case FL_FREEMEM: fl_free( ob->spec ); break; } return ret; } /*************************************** * Creates an object ***************************************/ FL_OBJECT * fl_create_counter( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_COUNTER_SPEC *sp; ob = fl_make_object( FL_COUNTER, type, x, y, w, h, label, handle_counter ); ob->boxtype = FL_COUNTER_BOXTYPE; ob->col1 = FL_COUNTER_COL1; ob->col2 = FL_COUNTER_COL2; ob->align = FL_COUNTER_ALIGN; ob->lcol = FL_COUNTER_LCOL; ob->want_motion = 1; ob->want_update = 1; /* Counter has a different default */ if ( ob->bw == FL_BOUND_WIDTH && ob->bw == 3 ) ob->bw = FL_COUNTER_BW; sp = ob->spec = fl_calloc( 1, sizeof *sp ); sp->min = -1000000.0; sp->max = 1000000.0; sp->sstep = 0.1; sp->lstep = 1.0; sp->val = 0.0; sp->prec = 1; sp->mouseobj = NONE; sp->draw_type = ALL; sp->filter = NULL; sp->min_repeat_ms = 50; sp->repeat_ms = 600; sp->do_speedjump = 0; sp->timeout_id = -1; /* Set default return policy for the object */ fl_set_object_return( ob, FL_RETURN_CHANGED ); return ob; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_counter( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_counter( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** ***************************************/ void fl_set_counter_value( FL_OBJECT * ob, double val ) { FLI_COUNTER_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_COUNTER ) ) { M_err( "fl_set_counter_value", "%s not a counter", ob ? ob->label : "" ); return; } #endif val = fli_clamp( val, sp->min, sp->max ); if ( sp->val != val ) { sp->val = sp->start_val = val; sp->draw_type = ( ob->visible && ob->form->visible ) ? OB4 : ALL; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_get_counter_bounds( FL_OBJECT * ob, double * min, double * max ) { FLI_COUNTER_SPEC *sp = ob->spec; *min = sp->min; *max = sp->max; } /*************************************** ***************************************/ void fl_set_counter_bounds( FL_OBJECT * ob, double min, double max ) { FLI_COUNTER_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_COUNTER ) ) { M_err( "fl_set_counter_bounds", "%s not a counter", ob ? ob->label : "" ); return; } #endif if ( sp->min != min || sp->max != max ) { sp->min = min; sp->max = max; sp->val = fli_clamp( sp->val, sp->min, sp->max ); fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_counter_step( FL_OBJECT * ob, double s, double l ) { FLI_COUNTER_SPEC *sp = ob->spec; if ( sp->sstep != s || sp->lstep != l ) { sp->sstep = s; sp->lstep = l; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_get_counter_step( FL_OBJECT * ob, double * s, double * l ) { FLI_COUNTER_SPEC *sp = ob->spec; *s = sp->sstep; *l = sp->lstep; } /*************************************** ***************************************/ void fl_set_counter_precision( FL_OBJECT * ob, int prec ) { FLI_COUNTER_SPEC *sp = ob->spec; if ( prec < 0 ) prec = 0; if ( prec > DBL_DIG ) prec = DBL_DIG; if ( sp->prec != prec ) { sp->prec = prec; fl_redraw_object( ob ); } } /*************************************** ***************************************/ int fl_get_counter_precision( FL_OBJECT * ob ) { return ( ( FLI_COUNTER_SPEC * ) ob->spec )->prec; } /*************************************** ***************************************/ double fl_get_counter_value( FL_OBJECT * ob ) { #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_COUNTER ) ) { M_err( "fl_get_counter_value", "%s not a counter", ob ? ob->label : "" ); return 0; } #endif return ( ( FLI_COUNTER_SPEC * ) ob->spec )->val; } /*************************************** * Sets under which conditions the object is to be returned to the * application. This function should be regarded as deprecated and * fl_set_object_return() should be used instead. ***************************************/ void fl_set_counter_return( FL_OBJECT * obj, unsigned int when ) { fl_set_object_return( obj, when ); } /*************************************** ***************************************/ void fl_set_counter_filter( FL_OBJECT * ob, FL_VAL_FILTER filter ) { ( ( FLI_COUNTER_SPEC * ) ob->spec )->filter = filter; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/symbols.c0000644000175000017500000007723511323662651014653 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file symbols.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Predefined symbols and rotuines for adding more symbols * * Public routines: * * fl_add_symbol(const char *name, FL_DRAWPTR how, int scalable); * fl_draw_symbol(const char *name, x, y, w, h, FL_COLOR col) */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include #include #include #ifdef __EMX__ #include #endif #ifndef M_PI #define M_PI 3.141592654 #endif typedef struct { FL_DRAWPTR drawit; /* how to draw it */ char * name; /* symbol name */ int scalable; /* currently unused */ } SYMBOL; static SYMBOL * symbols = NULL; /* The symbols */ static size_t nsymbols = 0; #define swapit( type, a, b ) \ do { type a_; \ a_ = ( a ); \ a = ( b ); \ b = a_; \ } while ( 0 ) #define AddPoint( p, xp, yp ) \ do { p->x = ( xp ); \ p->y = ( yp ); \ p++; \ } while ( 0 ) #define ShrinkBox( x, y, w, h, d ) \ do { x += ( d ); \ y += ( d ); \ w -= 2 * ( d ); \ h -= 2 * ( d ); \ } while ( 0 ) /*************************************** * check if symbol exsits and return it ***************************************/ static SYMBOL * find_symbol( const char * name ) { size_t i; for ( i = 0; i < nsymbols; i++ ) if ( ! strcmp( symbols[ i ].name, name ) ) break; return i < nsymbols ? symbols + i : NULL; } /******************* PUBLIC ROUTINES ******************{**/ /*************************************** ***************************************/ int fl_add_symbol( const char * name, FL_DRAWPTR drawit, int scalable FL_UNUSED_ARG ) { SYMBOL *s; if ( ! name || ! *name || ! drawit ) return -1; if ( ! ( s = find_symbol( name ) ) ) { symbols = fl_realloc( symbols, ++nsymbols * sizeof *symbols ); s = symbols + nsymbols - 1; s->name = fl_strdup( name ); } s->drawit = drawit; s->scalable = scalable; return 1; } /*************************************** * Draws the symbol with the given label ***************************************/ int fl_draw_symbol( const char * label, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, FL_COLOR col ) { int pos, shift, equalscale = 0; FL_Coord dx = 0, dy = 0; int rotated = 0, delta = 0; short defr[ ] = { 0, 225, 270, 315, 180, 0, 0, 135, 90, 45 }; SYMBOL *s; if ( ! label || *label != '@' ) return 0; fli_init_symbols( ); pos = 1; while ( ( label[ pos ] == '-' && isdigit( ( int ) label[ pos + 1 ] ) ) || ( label[ pos ] == '+' && isdigit( ( int ) label[ pos + 1 ] ) ) || label[ pos ] == '#' ) { switch ( label[ pos ] ) { case '+': delta = '0' - label[ ++pos ]; break; case '-': delta = label[ ++pos ] - '0'; break; case '#': equalscale = 1; break; } pos++; } shift = pos; if ( label[ pos ] >= '1' && label[ pos ] <= '9' ) { rotated = defr[ label[ pos ] - '0' ]; shift = pos + 1; } else if ( label[ pos ] == '0' ) { rotated = 100 * ( label[ pos + 1 ] - '0' ) + 10 * ( label[ pos + 2 ] - '0' ) + 1 * ( label[ pos + 3 ] - '0' ); shift = pos + 4; } /* Need to special-casing labels like "@4" etc. */ if ( ! ( s = label[ shift ] ? find_symbol( label + shift ) : symbols ) ) { char *newlabel = fl_strdup( label ); /* need to replace the first @ otherwise bad recursion */ newlabel[ 0 ] = ' '; M_err( "fl_draw_symbol", "Bad symbol:@%s", newlabel + 1 ); fl_free( newlabel ); return 0; } if ( equalscale ) { dx = w > h ? ( w - h ) / 2 : 0; dy = w > h ? 0 : ( h - w ) / 2; w = h = FL_min( w, h ); } if ( delta ) ShrinkBox( x, y, w, h, delta ); /* Also if rotated 90 degrees, switch w, h and the bounding box. TODO */ if ( rotated == 90 || rotated == 270 ) { x += ( w - h ) / 2; y += ( h - w ) / 2; swapit( FL_Coord, w, h ); } s->drawit( x + dx, y + dy, w, h, rotated, col ); return 1; } /*********** END of PUBLIC ROTUINES ***********}**/ /*************************************** ***************************************/ static void rotate_it( FL_Coord xc, FL_Coord yc, FL_POINT xpnts[ ], int i, int a ) { FL_POINT *xp = xpnts, *xps = xpnts + i; double tmpx, tmpy; int tmp; if ( a == 0 || a == 360 ) return; if ( a == 180 ) for ( ; xp < xps; xp++ ) xp->x = 2 * xc - xp->x; else if ( a == 90 ) for ( ; xp < xps; xp++ ) { tmp = xp->x; xp->x = xc + xp->y - yc; xp->y = yc - tmp + xc; } else if ( a == 270 ) for ( ; xp < xps; xp++ ) { tmp = xp->x; xp->x = xc + xp->y - yc; xp->y = yc + tmp - xc; } #define FACT 0.707106781187 /* sin45 */ else if ( a == 45 ) for ( ; xp < xps; xp++ ) { tmpx = xp->x - xc; tmpy = xp->y - yc; xp->x = FL_nint( ( tmpx + tmpy ) * FACT + xc ); xp->y = FL_nint( ( - tmpx + tmpy ) * FACT + yc ); } else if ( a == 135 ) for ( ; xp < xps; xp++ ) { tmpx = xp->x - xc; tmpy = xp->y - yc; xp->x = FL_nint( ( - tmpx + tmpy ) * FACT + xc ); xp->y = FL_nint( ( - tmpx - tmpy ) * FACT + yc ); } else if ( a == 225 ) for ( ; xp < xps; xp++ ) { tmpx = xp->x - xc; tmpy = xp->y - yc; xp->x = FL_nint( ( - tmpx - tmpy ) * FACT + xc ); xp->y = FL_nint( ( tmpx - tmpy ) * FACT + yc ); } else if ( a == 315 ) for ( ; xp < xps; xp++ ) { tmpx = xp->x - xc; tmpy = xp->y - yc; xp->x = FL_nint( ( tmpx - tmpy ) * FACT + xc ); xp->y = FL_nint( ( tmpx + tmpy ) * FACT + yc ); } else { double sinfact = sin( a * M_PI / 180.0 ); double cosfact = cos( a * M_PI / 180.0 ); for ( ; xp < xps; xp++ ) { tmpx = xp->x - xc; tmpy = xp->y - yc; xp->x = FL_nint( xc + tmpx * cosfact + tmpy * sinfact ); xp->y = FL_nint( yc - tmpx * sinfact + tmpy * cosfact ); } } } /******************** THE DEFAULT SYMBOLS ****************************/ /*************************************** ***************************************/ static void draw_returnarrow( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle FL_UNUSED_ARG, FL_COLOR col ) { double wm = w * 0.5, hm = h * 0.5; int xc = FL_nint( x + wm ), yc = FL_nint( y + hm ); FL_POINT xpoint[ 8 ], *xp; xp = xpoint; AddPoint( xp, xc - 0.8 * wm, yc ); AddPoint( xp, xc - 0.1 * wm, yc - 0.6 * hm ); AddPoint( xp, xc - 0.1 * wm, yc + 0.6 * hm ); fl_polyf( xpoint, 3, col ); /* trailing line */ xp = xpoint + 4; AddPoint( xp, xc - 0.1 * wm, yc ); AddPoint( xp, xc + 0.8 * wm, yc ); AddPoint( xp, xc + 0.8 * wm, yc - 0.7 * hm ); fl_lines( xpoint + 4, 3, col ); fl_polyl( xpoint, 3, FL_BLACK ); } /*************************************** * Thin arrow --> ***************************************/ static void draw_arrow( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { int xc, yc, dx, dy; FL_POINT xpoint[ 5 ], *xp; int d = 3 + ( w + h ) * 0.03; xc = x + w / 2; yc = y + h / 2; ShrinkBox( x, y, w, h, d ); dx = 0.35 * w; dy = 0.08 * h; if ( dy < 1 ) dy = 1; xp = xpoint; AddPoint( xp, xc + dx, yc - dy ); AddPoint( xp, x + w - 1, yc ); AddPoint( xp, xc + dx, yc + dy ); rotate_it( xc, yc, xpoint, 3, angle ); fl_polyf( xpoint, 3, col ); fl_polyl( xpoint, 3, FL_BLACK ); xp = xpoint; AddPoint( xp, x, yc ); AddPoint( xp, xc + dx, yc ); AddPoint( xp, xc + dx, yc + 2 ); AddPoint( xp, x, yc + 2 ); rotate_it( xc, yc, xpoint, 4, angle ); fl_polyf( xpoint, 4, FL_BLACK ); } /*************************************** * An arrow -> ***************************************/ static void draw_arrow1( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { double wm = ( w - 4 ) * 0.5, hm = ( h - 4 ) * 0.5; int xc = x + w / 2, yc = y + h / 2; FL_POINT xpoint[ 8 ], *xp; double pl = 0.8, ps = 0.4; int pshm = ps * hm + 0.1, plwm = pl * wm + 0.1, plhm = pl * hm + 0.1; xp = xpoint; AddPoint( xp, xc - plwm, yc + pshm ); AddPoint( xp, xc - plwm, yc - pshm ); AddPoint( xp, xc, yc - pshm ); AddPoint( xp, xc, yc - plhm ); AddPoint( xp, xc + plwm, yc ); AddPoint( xp, xc, yc + plhm ); AddPoint( xp, xc, yc + pshm ); rotate_it( xc, yc, xpoint, 7, angle ); fl_polyf( xpoint, 7, col ); fl_polyl( xpoint, 7, FL_BLACK ); } /*************************************** * An arrow head > ***************************************/ static void draw_arrow2( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { int xc = x + w / 2, yc = y + h / 2; FL_POINT xpoint[ 4 ], *xp; double wm = ( w - 4 ) * 0.5, hm = ( h - 4 ) * 0.5; double pl = 0.8, ps = 0.3; int pswm = ps * wm + 0.1, plhm = pl * hm + 0.1; xp = xpoint; AddPoint( xp, xc - pswm, yc - plhm ); AddPoint( xp, xc + 0.5 * wm, yc ); AddPoint( xp, xc - pswm, yc + plhm ); rotate_it( xc, yc, xpoint, 3, angle ); fl_polyf( xpoint, 3, col ); fl_polyl( xpoint, 3, FL_BLACK ); } /*************************************** * double arrow head >> ***************************************/ static void draw_arrow3( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { int xc = x + w / 2 - 1, yc = y + h / 2; FL_POINT xpoint[ 9 ], *xp; double wm = ( w - 4 ) * 0.5, hm = ( h - 4 ) * 0.5; double pl = 0.7, ps = 0.15; int pswm = ps * wm + 0.1, plhm = pl * hm + 0.1; xp = xpoint; AddPoint( xp, xc + pswm, yc - plhm ); AddPoint( xp, xc + 0.82 * wm, yc ); AddPoint( xp, xc + pswm, yc + plhm ); rotate_it( xc, yc, xpoint, 3, angle ); pswm = 0.55 * wm + 0.1; xp = xpoint + 5; AddPoint( xp, xc - pswm, yc - plhm ); AddPoint( xp, xc + 0.12 * wm, yc ); AddPoint( xp, xc - pswm, yc + plhm ); rotate_it( xc, yc, xpoint + 5, 3, angle ); fl_polyf( xpoint, 3, col ); fl_polyf( xpoint + 5, 3, col ); fl_polyl( xpoint, 3, FL_BLACK ); fl_polyl( xpoint + 5, 3, FL_BLACK ); } /*************************************** ***************************************/ static void draw_arrow01( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { if ( ( angle += 180 ) > 360 ) angle -= 360; draw_arrow1( x, y, w, h, angle, col ); } /*************************************** ***************************************/ static void draw_arrow02( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { if ( ( angle += 180 ) > 360 ) angle -= 360; draw_arrow2( x, y, w, h, angle, col ); } /*************************************** ***************************************/ static void draw_arrow03( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { if ( ( angle += 180 ) > 360 ) angle -= 360; draw_arrow3( x, y, w, h, angle, col ); } /*************************************** ***************************************/ static void draw_circle( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle FL_UNUSED_ARG, FL_COLOR col ) { FL_Coord xo = x + w / 2, yo = y + h / 2; int rr, s = 3 + 0.04 * ( w + h ); ShrinkBox( x, y, w, h, s ); if ( ( rr = 0.5 * FL_min( w, h ) ) <= 0 ) rr = 1; fl_circf( xo, yo, rr, col ); fl_circ( xo, yo, rr, FL_BLACK ); } /*************************************** ***************************************/ static void draw_square( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle FL_UNUSED_ARG, FL_COLOR col ) { int s = ( 0.09 * w ) + 3; ShrinkBox( x, y, w, h, s ); if ( w <= 1 ) w = 2; if ( h <= 1 ) h = 2; fl_rectbound( x, y, w - 1, h - 1, col ); } /*************************************** ***************************************/ static void draw_plus( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { int wm = ( w - 4 ) * 0.5, hm = ( h - 4 ) * 0.5; int xc = x + 2 + wm, yc = y + 2 + hm; int plw = FL_nint( 0.8 * wm ), psh = FL_nint( 0.15 * hm ); int psw = FL_nint( 0.15 * wm ), plh = FL_nint( 0.8 * hm ); FL_POINT xpoint[ 13 ], *xp; xp = xpoint; AddPoint( xp, xc - plw, yc + psh ); AddPoint( xp, xc - plw, yc - psh ); AddPoint( xp, xc - psw, yc - psh ); AddPoint( xp, xc - psw, yc - plh ); AddPoint( xp, xc + psw, yc - plh ); AddPoint( xp, xc + psw, yc - psh ); AddPoint( xp, xc + plw, yc - psh ); AddPoint( xp, xc + plw, yc + psh ); AddPoint( xp, xc + psw, yc + psh ); AddPoint( xp, xc + psw, yc + plh ); AddPoint( xp, xc - psw, yc + plh ); AddPoint( xp, xc - psw, yc + psh ); rotate_it( xc, yc, xpoint, 12, angle ); fl_polyf( xpoint, 12, col ); fl_polyl( xpoint, 12, FL_BLACK ); } /*************************************** ***************************************/ static void draw_menu( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle FL_UNUSED_ARG, FL_COLOR col ) { FL_Coord wm = ( w - 8 ) * 0.5, hm = ( h - 8 ) * 0.5; int xc = x + w / 2, yc = y + h / 2; int dx = FL_nint( 0.6 * wm ), cur_x, cur_y; int shadow = FL_max( 2, 0.1 * FL_min( w, h ) ), t = FL_min( 3, 0.30 * hm ); cur_x = xc - dx; fl_rectbound( cur_x, yc - hm + 1, 2 * dx, t, col ); cur_y = yc - hm + t + t; fl_rectf( cur_x + shadow, cur_y + shadow, 2 * dx, 1.6 * hm, FL_RIGHT_BCOL ); fl_rectbound( cur_x, cur_y, 2 * dx, 1.6 * hm, col ); } /*************************************** ***************************************/ static void draw_line( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { FL_POINT xpoint[ 3 ], *xp; FL_Coord xc = x + w / 2, yc = y + h / 2; ShrinkBox( x, y, w, h, 3 ); xp = xpoint; AddPoint( xp, x, yc ); AddPoint( xp, x + w - 1, yc ); rotate_it( xc, yc, xpoint, 2, angle ); fl_line( xpoint[ 0 ].x, xpoint[ 0 ].y, xpoint[ 1 ].x, xpoint[ 1 ].y, col ); } /*************************************** ***************************************/ static void draw_ripplelines( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col FL_UNUSED_ARG ) { int ym = y + ( h + 1 ) / 2, xm = x + ( w + 1 ) / 2; int xs, ys, i, mw = 3; xs = xm - 5; ys = ym - 5; if ( angle == 0 || angle == 180 ) for ( i = 0; i < 3; i++ ) { fl_line( x + mw, ys, x + w - 1 - mw, ys, FL_LEFT_BCOL ); ys += 1; fl_line( x + mw, ys, x + w - 1 - mw, ys, FL_RIGHT_BCOL ); ys += 3; } else if ( angle == 90 || angle == 270 ) { int e; y += ( h - w ) / 2; swapit( FL_Coord, w, h ); e = h < 15; for ( i = 0; i < 3; i++ ) { fl_line( xs, y + mw - e, xs, y + h - 1 - mw + e, FL_LEFT_BCOL ); xs += 1; fl_line( xs, y + mw - e, xs, y + h - 1 - mw + e, FL_RIGHT_BCOL ); xs += 3; } } else fprintf( stderr, "RippleLine: unsupported angle %d\n", angle ); } /*************************************** * draw a line that appears down ***************************************/ static void draw_dnline( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col FL_UNUSED_ARG ) { FL_POINT xpnt[ 3 ], *xp; FL_Coord yc = y + h / 2; ShrinkBox( x, y, w, h, 3 ); xp = xpnt; AddPoint( xp, x, yc ); AddPoint( xp, x + w - 1, yc ); rotate_it( x + w / 2, yc, xpnt, 2, angle ); fl_line( xpnt[ 0 ].x, xpnt[ 0 ].y, xpnt[ 1 ].x, xpnt[ 1 ].y, FL_RIGHT_BCOL ); xp = xpnt; AddPoint( xp, x, yc + 1 ); AddPoint( xp, x + w - 1, yc + 1 ); rotate_it( x + w / 2, yc, xpnt, 2, angle ); fl_line( xpnt[ 0 ].x, xpnt[ 0 ].y, xpnt[ 1 ].x, xpnt[ 1 ].y, FL_LEFT_BCOL ); } /*************************************** ***************************************/ static void draw_upline( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col FL_UNUSED_ARG ) { FL_POINT xpnt[ 3 ], *xp; FL_Coord yc = y + h / 2; ShrinkBox( x, y, w, h, 3 ); xp = xpnt; AddPoint( xp, x, yc ); AddPoint( xp, x + w - 1, yc ); rotate_it( x + w / 2, yc, xpnt, 2, angle ); fl_line( xpnt[ 0 ].x, xpnt[ 0 ].y, xpnt[ 1 ].x, xpnt[ 1 ].y, FL_LEFT_BCOL ); xp = xpnt; AddPoint( xp, x, yc + 1 ); AddPoint( xp, x + w - 1, yc + 1 ); rotate_it( x + w / 2, yc, xpnt, 2, angle ); fl_line( xpnt[ 0 ].x, xpnt[ 0 ].y, xpnt[ 1 ].x, xpnt[ 1 ].y, FL_RIGHT_BCOL ); } /*************************************** ***************************************/ static void draw_uparrow( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int a, FL_COLOR col FL_UNUSED_ARG ) { FL_Coord xc = x + ( w + 1 ) / 2, dx; FL_Coord yc = y + ( h + 1 ) / 2, dy; int d = 3 + ( w + h ) * 0.06; ShrinkBox( x, y, w, h, d ); if ( a == 90 ) { /* undo driver's transformation */ swapit( FL_Coord, w, h ); x -= ( w - h ) / 2; y -= ( h - w ) / 2; dx = w / 2; dy = h / 2; /* correct for human perception error */ y++; h -= 2; fl_line( xc, yc - dy, xc - dx, yc + dy, FL_LEFT_BCOL ); fl_line( xc, yc - dy, xc + dx, yc + dy, FL_RIGHT_BCOL ); fl_line( xc - dx, yc + dy, xc + dx, yc + dy, FL_BOTTOM_BCOL ); } else if ( a == 270 ) { swapit( FL_Coord, w, h ); x -= ( w - h ) / 2; y -= ( h - w ) / 2; dx = w / 2; dy = h / 2; fl_line( xc - dx, yc - dy, xc + dx, yc - dy, FL_TOP_BCOL ); fl_line( xc + dx, yc - dy, xc, yc + dy, FL_RIGHT_BCOL ); fl_line( xc, yc + dy, xc - dx, yc - dy, FL_LEFT_BCOL ); } else if ( a == 180 ) { dy = h / 2; dx = w / 2; fl_line( xc - dx, yc, xc + dx, yc - dy, FL_LEFT_BCOL ); fl_line( xc + dx, yc - dy, xc + dx, yc + dy, FL_RIGHT_BCOL ); fl_line( xc + dx, yc + dy, xc - dx, yc, FL_BOTTOM_BCOL ); } else { dx = w / 2; dy = h / 2; fl_line( xc - dx, yc - dy, xc + dx, yc, fli_dithered( fl_vmode ) ? FL_BLACK : FL_TOP_BCOL ); fl_line( xc - dx, yc + dy, xc + dx, yc, FL_RIGHT_BCOL ); fl_line( xc - dx, yc - dy, xc - dx, yc + dy, fli_dithered( fl_vmode ) ? FL_BLACK : FL_LEFT_BCOL ); } } /*************************************** ***************************************/ static void draw_dnarrow( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int a, FL_COLOR col FL_UNUSED_ARG ) { FL_Coord xc = x + ( w + 1 ) / 2, dx; FL_Coord yc = y + ( h + 1 ) / 2, dy; int d = 3 + ( w + h ) * 0.06; ShrinkBox( x, y, w, h, d ); if ( a == 90 ) { /* undo driver's transformation */ swapit( FL_Coord, w, h ); x -= ( w - h ) / 2; y -= ( h - w ) / 2; dx = w / 2; dy = h / 2; /* correct for human perception error */ y++; h -= 2; fl_line( xc, yc - dy, xc - dx, yc + dy, FL_RIGHT_BCOL ); fl_line( xc, yc - dy, xc + dx, yc + dy, FL_LEFT_BCOL ); fl_line( xc - dx, yc + dy, xc + dx, yc + dy, FL_TOP_BCOL ); } else if ( a == 270 ) { swapit( FL_Coord, w, h ); x -= ( w - h ) / 2; y -= ( h - w ) / 2; dx = w / 2; dy = h / 2; fl_line( xc - dx, yc - dy, xc + dx, yc - dy, FL_BOTTOM_BCOL ); fl_line( xc + dx, yc - dy, xc, yc + dy, FL_LEFT_BCOL ); fl_line( xc, yc + dy, xc - dx, yc - dy, FL_RIGHT_BCOL ); } else if ( a == 180 ) { dy = h / 2; dx = w / 2; fl_line( xc - dx, yc, xc + dx, yc - dy, FL_RIGHT_BCOL ); fl_line( xc + dx, yc - dy, xc + dx, yc + dy, FL_LEFT_BCOL ); fl_line( xc + dx, yc + dy, xc - dx, yc, FL_BOTTOM_BCOL ); } else { dx = w / 2; dy = h / 2; fl_line( xc - dx, yc - dy, xc - dx, yc + dy, FL_RIGHT_BCOL ); fl_line( xc - dx, yc - dy, xc + dx, yc, FL_RIGHT_BCOL ); fl_line( xc - dx, yc + dy, xc + dx, yc, FL_TOP_BCOL ); } } /*************************************** * double arrow <-->. Partition the space into 1/4 1/2 1/4 ***************************************/ static void draw_doublearrow( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { int xc = x + w / 2, yc = y + h / 2; double wm = ( w - 4 ) * 0.5, hm = ( h - 4 ) * 0.5; int dx1 = 0.5 * wm + 0.2, dx2 = 0.9 * wm + 0.2; int dy1 = 0.3 * hm + 0.2, dy2 = 0.7 * hm + 0.2; FL_POINT xpoint[ 11 ], *xp; xp = xpoint; AddPoint( xp, xc - dx1, yc - dy1 ); AddPoint( xp, xc + dx1, yc - dy1 ); AddPoint( xp, xc + dx1, yc - dy2 ); AddPoint( xp, xc + dx2, yc ); AddPoint( xp, xc + dx1, yc + dy2 ); AddPoint( xp, xc + dx1, yc + dy1 ); AddPoint( xp, xc - dx1, yc + dy1 ); AddPoint( xp, xc - dx1, yc + dy2 ); AddPoint( xp, xc - dx2, yc ); AddPoint( xp, xc - dx1, yc - dy2 ); rotate_it( xc, yc, xpoint, 10, angle ); fl_polyf( xpoint, 10, col ); fl_polyl( xpoint, 10, FL_BLACK ); } /*************************************** * an arrow with a bar ->| ***************************************/ static void draw_arrowbar( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { double wm = ( w - 6 ) * 0.5, hm = ( h - 6 ) * 0.5; int xc = x + w / 2, yc = y + h / 2; FL_POINT xpoint[ 8 ], *xp; double pl = 0.8, ps = 0.4; int pshm = ps * hm + 0.1, plwm = pl * wm + 0.1, plhm = pl * hm + 0.1; xp = xpoint; xc--; AddPoint( xp, xc - plwm, yc + pshm ); AddPoint( xp, xc - plwm, yc - pshm ); AddPoint( xp, xc, yc - pshm ); AddPoint( xp, xc, yc - plhm ); AddPoint( xp, xc + plwm, yc ); AddPoint( xp, xc, yc + plhm ); AddPoint( xp, xc, yc + pshm ); rotate_it( xc, yc, xpoint, 7, angle ); fl_polyf( xpoint, 7, col ); fl_polyl( xpoint, 7, FL_BLACK ); xp = xpoint; xc++; AddPoint( xp, xc + plwm + 1, yc + plhm ); AddPoint( xp, xc + plwm + 1, yc - plhm ); AddPoint( xp, xc + ( 0.9 * plwm ), yc - plhm ); AddPoint( xp, xc + ( 0.9 * plwm ), yc + plhm ); rotate_it( xc, yc, xpoint, 4, angle ); fl_polyf( xpoint, 4, col ); fl_polyl( xpoint, 4, FL_BLACK ); } /*************************************** * same as arrow bar ->|, but reversed ***************************************/ static void draw_arrowbar0( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { if ( ( angle += 180 ) >= 360 ) angle -= 360; draw_arrowbar( x, y, w, h, angle, col ); } /*************************************** * An arrow head with a bar >| ***************************************/ static void draw_arrowheadbar( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { int xc = x + w / 2, yc = y + h / 2; FL_POINT xpoint[ 5 ], *xp; double wm = ( w - 6 ) * 0.5, hm = ( h - 6 ) * 0.5; double pl = 0.8, ps = 0.45; int pswm = ps * wm + 0.1, plhm = pl * hm + 0.1; xp = xpoint; AddPoint( xp, xc - pswm, yc - plhm ); AddPoint( xp, xc + pswm, yc ); AddPoint( xp, xc - pswm, yc + plhm ); rotate_it( xc, yc, xpoint, 3, angle ); fl_polyf( xpoint, 3, col ); fl_polyl( xpoint, 3, FL_BLACK ); xp = xpoint; AddPoint( xp, xc + pswm + 2, yc + plhm ); AddPoint( xp, xc + pswm + 2, yc - plhm ); AddPoint( xp, xc + 0.9 * pswm, yc - plhm ); AddPoint( xp, xc + 0.9 * pswm, yc + plhm ); rotate_it( xc, yc, xpoint, 4, angle ); fl_polyf( xpoint, 4, col ); fl_polyl( xpoint, 4, FL_BLACK ); } /*************************************** * same as arrowheadbar >|, but reversed |< ***************************************/ static void draw_arrowheadbar0( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { if ( ( angle += 180 ) >= 360 ) angle -= 360; draw_arrowheadbar( x, y, w, h, angle, col ); } /*************************************** ***************************************/ static void draw_bararrowhead( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { int xc = x + ( w + 1 ) / 2, yc = y + ( h + 1 ) / 2; int dx, dy, dbar, mar, xl; int d = 3 + ( w + h ) * 0.0; FL_POINT point[ 5 ], *p; ShrinkBox( x, y, w, h, d ); dx = w / 2; dy = h / 2; dbar = dx * 0.4; mar = 0.2 * dx; xl = xc - dx + 1.1 * mar; p = point; AddPoint( p, xl, yc - dy ); AddPoint( p, xl + dbar, yc - dy ); AddPoint( p, xl + dbar, yc + dy ); AddPoint( p, xl, yc + dy ); rotate_it( xc, yc, point, 4, angle ); fl_polyf( point, 4, col ); fl_polyl( point, 4, FL_RIGHT_BCOL ); p = point; AddPoint( p, xc - mar, yc - dy ); AddPoint( p, xc - mar + dx, yc ); AddPoint( p, xc - mar, yc + dy ); rotate_it( xc, yc, point, 3, angle ); fl_polyf( point, 3, col ); fl_polyl( point, 3, FL_RIGHT_BCOL ); } /*************************************** ***************************************/ static void draw_bararrowhead0( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { if ( ( angle += 180 ) >= 360 ) angle -= 360; draw_bararrowhead( x, y, w, h, angle, col ); } /*************************************** ***************************************/ void fli_init_symbols( void ) { if ( symbols ) return; fl_add_symbol( "", draw_arrow1, 1 ); fl_add_symbol( "->", draw_arrow1, 1 ); fl_add_symbol( ">", draw_arrow2, 1 ); fl_add_symbol( ">>", draw_arrow3, 1 ); fl_add_symbol( "<-", draw_arrow01, 1 ); fl_add_symbol( "<", draw_arrow02, 1 ); fl_add_symbol( "<<", draw_arrow03, 1 ); fl_add_symbol( "returnarrow", draw_returnarrow, 1 ); fl_add_symbol( "circle", draw_circle, 1 ); fl_add_symbol( "square", draw_square, 1 ); fl_add_symbol( "plus", draw_plus, 1 ); fl_add_symbol( "menu", draw_menu, 1 ); fl_add_symbol( "line", draw_line, 1 ); fl_add_symbol( "=", draw_ripplelines, 1 ); fl_add_symbol( "DnLine", draw_dnline, 1 ); fl_add_symbol( "UpLine", draw_upline, 1 ); fl_add_symbol( "UpArrow", draw_uparrow, 1 ); fl_add_symbol( "DnArrow", draw_dnarrow, 1 ); fl_add_symbol( "-->", draw_arrow, 1 ); fl_add_symbol( "<->", draw_doublearrow, 1 ); fl_add_symbol( "->|", draw_arrowbar, 1 ); fl_add_symbol( "|<-", draw_arrowbar0, 1 ); fl_add_symbol( ">|", draw_arrowheadbar, 1 ); fl_add_symbol( "|<", draw_arrowheadbar0, 1 ); fl_add_symbol( "|>", draw_bararrowhead, 1 ); fl_add_symbol( "<|", draw_bararrowhead0, 1 ); /* aliases */ fl_add_symbol( "arrow", draw_arrow, 1 ); fl_add_symbol( "RippleLines", draw_ripplelines, 1 ); fl_add_symbol( "+", draw_plus, 1 ); } /*************************************** ***************************************/ void fli_release_symbols( void ) { size_t i; for ( i = 0; i < nsymbols; i++ ) fl_safe_free( symbols[ i ].name ); fl_safe_free( symbols ); nsymbols = 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/choice.c0000644000175000017500000005553311317443454014413 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file choice.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * FL_CHOICE class */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pchoice.h" #include "private/flsnprintf.h" #include #include /*************************************** ***************************************/ static void free_choice( FLI_CHOICE_SPEC * sp ) { int i; for ( i = 1; i <= FL_CHOICE_MAXITEMS; i++ ) { if ( sp->items[ i ] ) fl_safe_free( sp->items[ i ] ); if ( sp->shortcut[ i ] ) fl_safe_free( sp->shortcut[ i ] ); } } /*************************************** * Draws a choice object ***************************************/ static void draw_choice( FL_OBJECT * ob ) { FL_COLOR c1; FLI_CHOICE_SPEC *sp = ob->spec; int absbw = FL_abs(ob->bw); int off1 = 0, off2 = 0; c1 = ob->belowmouse ? FL_CHOICE_MCOL : ob->col1; fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, c1, ob->bw ); if ( ob->type == FL_NORMAL_CHOICE2 ) { int dh = FL_max( 6 + ( ob->bw > 0 ), ob->h * 0.1 ); int dw = FL_max( 0.11 * ob->w, 13 ); int dbh = FL_max( absbw - 1, 1 ); int align = sp->align & ~ FL_ALIGN_INSIDE; fl_drw_box( FL_UP_BOX, ob->x + ob->w - dw - absbw - 2, ob->y + ( ob->h - dh ) / 2, dw, dh, ob->col1, - dbh ); off1 = align == FL_ALIGN_CENTER ? ( dw / 2 ) : 0; off2 = align == FL_ALIGN_RIGHT ? dw : 0; } fl_drw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); /* string can conceivably contain "type flags". need to get rid of them on the fly */ if ( sp->val > 0 && sp->val <= sp->numitems ) { char *str = fl_strdup( sp->items[ sp->val ] ), *cc = strchr( str, '%' ); if ( cc ) { if ( cc[ 1 ] == '%' ) cc[ 1 ] = '\0'; else cc[ 0 ] = '\0'; } fl_set_text_clipping( ob->x + absbw, ob->y, ob->w - 2 * absbw, ob->h ); fl_drw_text( sp->align, ob->x - off1, ob->y, ob->w - off2, ob->h, ob->col2, sp->fontstyle, sp->fontsize, str + ( str && ( *str == '\010' ) ) ); fl_unset_text_clipping( ); fl_free( str ); } } /*************************************** ***************************************/ static void draw_droplist_choice( FL_OBJECT * ob ) { FL_COLOR c1; FLI_CHOICE_SPEC *sp = ob->spec; FL_Coord dw = ob->h, dx = ob->w - dw, bw; c1 = sp->below ? FL_CHOICE_MCOL : ob->col1; bw = ob->bw; if ( bw > 0 ) bw -= ob->bw > 1; /* arrows */ fl_drw_box( sp->pushed ? FL_DOWN_BOX : FL_UP_BOX, ob->x + dx, ob->y, dw, ob->h, c1, bw ); fl_drw_text( FL_ALIGN_CENTER, ob->x + dx + 2, ob->y + 2, dw - 4, ob->h - 4, FL_BLACK, 0, 0, "@#2->" ); /* choice box */ fl_drw_box( ob->boxtype, ob->x, ob->y, dx, ob->h, ob->col1, ob->bw ); fl_drw_text_beside( ob->align, ob->x, ob->y, dx, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); /* string can conceivably contain "type flags", need to get rid of them on the fly */ if ( sp->val > 0 && sp->val <= sp->numitems ) { char *str = fl_strdup( sp->items[ sp->val ] ), *cc = strchr( str, '%' ); if ( cc ) { if ( cc[ 1 ] == '%') cc[ 1 ] = '\0'; else cc[ 0 ] = '\0'; } fl_set_text_clipping( ob->x + FL_abs( ob->bw ), ob->y, ob->w - 2 * FL_abs( ob->bw ), ob->h ); fl_drw_text( sp->align, ob->x, ob->y, dx, ob->h, ob->col2, sp->fontstyle, sp->fontsize, str + ( str && ( *str == '\010' ) ) ); fl_unset_text_clipping( ); fl_free( str ); } } /*************************************** * Due to grayout, need to find out which one is valid ***************************************/ static int set_next_entry( FLI_CHOICE_SPEC * sp, int dir ) { int target = 0; int min = 1, max = sp->numitems; if ( sp->numitems == 0 ) return -1; while ( sp->mode[ min ] & FL_PUP_GREY && min < max ) min++; while ( sp->mode[ max ] & FL_PUP_GREY && max > min ) max--; if ( min == max ) return -1; if ( dir > 0 ) { target = sp->val + 1; if ( target > max ) target = min; } else if ( dir < 0 ) { target = sp->val - 1; if ( target < min ) target = max; } for ( ; target >= min && target <= max; target += dir ) if ( ! ( sp->mode[ target ] & FL_PUP_GREY ) ) return sp->val = target; M_err( "set_next_entry", "No valid entries" ); return -1; } /*************************************** ***************************************/ static int do_pup( FL_OBJECT * ob ) { int popup_id; FLI_CHOICE_SPEC *sp = ob->spec; int i, val; popup_id = fl_newpup( FL_ObjWin( ob ) ); /* fake a title */ if ( ob->label && ob->label[ 0 ] && ob->type != FL_DROPLIST_CHOICE && ! sp->no_title ) { char *t = fl_malloc( strlen( ob->label ) + 3 ); strcpy( t, ob->label ); strcat( t, "%t" ); fl_addtopup( popup_id, t ); fl_free( t ); } for ( i = 1; i <= sp->numitems; i++ ) { fl_addtopup( popup_id, sp->items[ i ] ); if ( sp->modechange[ i ] || sp->mode[ i ] != FL_PUP_NONE ) { fl_setpup( popup_id, i, sp->mode[ i ] ); sp->modechange[ i ] = 0; } fl_setpup_shortcut( popup_id, i, sp->shortcut[ i ] ); } fl_setpup_shadow( popup_id, ob->type != FL_DROPLIST_CHOICE ); fl_setpup_selection( popup_id, sp->val ); fl_setpup_softedge( popup_id, ob->bw < 0 ); val = fl_dopup( popup_id ); if ( val > 0 ) { sp->mode[ val ] = fl_getpup_mode( popup_id, i ); sp->modechange[ val ] = 1; sp->val = val; } fl_freepup( popup_id ); return val; } #define Within( x, y, w, h ) ( mx >= ( x ) \ && mx <= ( ( x ) + ( w ) ) \ && my >= ( y ) \ && my <= ( ( y ) + ( h ) ) ) /*************************************** * Handles an event, returns whether value has changed. ***************************************/ static int handle_choice( FL_OBJECT * ob, int event, FL_Coord mx, FL_Coord my, int key, void * ev FL_UNUSED_ARG ) { FLI_CHOICE_SPEC *sp = ob->spec; int val; int ret = FL_RETURN_NONE; #if FL_DEBUG >= ML_DEBUG M_info2( "handle_choice", fli_event_name( event ) ); #endif switch ( event ) { case FL_DRAW: /* always force outside alignment */ ob->align &= ~FL_ALIGN_INSIDE; /* Draw the object */ if ( ob->type == FL_DROPLIST_CHOICE ) draw_droplist_choice( ob ); else draw_choice( ob ); break; case FL_DRAWLABEL: fl_drw_text_beside( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); break; case FL_PUSH: if ( key == FL_MBUTTON2 || key == FL_MBUTTON3 ) { sp->counter = 0; val = set_next_entry( sp, key == FL_MBUTTON3 ? 1 : -1 ); sp->pushed = 0; fl_redraw_object( ob ); if ( val > 0 ) ret |= FL_RETURN_CHANGED; break; } if ( key != FL_MBUTTON1 || sp->numitems == 0 ) break; if ( ob->type != FL_DROPLIST_CHOICE ) { if ( do_pup( ob ) > 0 ) ret |= FL_RETURN_CHANGED; break; } /* Droplist choices only become active when the mouse button has been released */ if ( Within( ob->x + ob->w - ob->h, ob->y, ob->h, ob->h ) ) { sp->pushed = 1; draw_droplist_choice( ob ); } break; case FL_UPDATE: if ( ( key == FL_MBUTTON2 || key == FL_MBUTTON3 ) && ++sp->counter % 15 == 0 ) { sp->counter = 0; val = set_next_entry( sp, key == FL_MBUTTON3 ? 1 : -1 ); sp->pushed = 0; fl_redraw_object( ob ); if ( val > 0 ) ret |= FL_RETURN_CHANGED; } break; case FL_MOTION: if ( sp->numitems == 0 || ob->type != FL_DROPLIST_CHOICE ) break; if ( Within( ob->x + ob->w - ob->h, ob->y, ob->h, ob->h ) ) { if ( ! sp->below ) { sp->below = 1; draw_droplist_choice( ob ); } } else if ( sp->below ) { sp->below = 0; draw_droplist_choice( ob ); } break; case FL_RELEASE: if ( sp->numitems == 0 ) break; if ( key == FL_MBUTTON4 || key == FL_MBUTTON5 ) { val = set_next_entry( sp, key == FL_MBUTTON5 ? 1 : -1 ); sp->pushed = 0; fl_redraw_object( ob ); if ( val > 0 ) ret |= FL_RETURN_CHANGED | FL_RETURN_END; break; } if ( ob->type != FL_DROPLIST_CHOICE || ! sp->pushed ) break; if ( ! Within( ob->x + ob->w - ob->h, ob->y, ob->h, ob->h ) ) { sp->pushed = 0; fl_redraw_object( ob ); break; } fl_setpup_position( - ( ob->form->x + ob->x + ob->w ), ob->form->y + ob->y + ob->h + FL_PUP_PADH ); sp->pushed = 0; if ( do_pup( ob ) > 0 ) ret |= FL_RETURN_CHANGED | FL_RETURN_END; break; case FL_LEAVE: sp->below = 0; fl_redraw_object( ob ); break; case FL_ENTER: if ( sp->numitems == 0 ) break; if ( ( ob->type == FL_DROPLIST_CHOICE && Within( ob->x + ob->w - ob->h, ob->y, ob->h, ob->h ) ) || ob->type != FL_DROPLIST_CHOICE ) { sp->below = 1; fl_redraw_object( ob ); } break; case FL_SHORTCUT: if ( sp->numitems == 0 ) break; fl_setpup_position( ob->form->x + ob->x + 10, ob->form->y + ob->y + ob->h / 2 ); val = do_pup( ob ); fl_redraw_object( ob ); if ( val > 0 ) ret |= FL_RETURN_CHANGED | FL_RETURN_END; break; case FL_FREEMEM: free_choice( ob->spec ); fl_free( ob->spec ); break; } return ret; } /*************************************** * creates an object ***************************************/ FL_OBJECT * fl_create_choice( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; int i; FLI_CHOICE_SPEC *sp; obj = fl_make_object( FL_CHOICE, type, x, y, w, h, label, handle_choice ); obj->boxtype = type == FL_NORMAL_CHOICE2 ? FL_UP_BOX : FL_CHOICE_BOXTYPE; obj->col1 = FL_CHOICE_COL1; obj->col2 = FL_CHOICE_COL2; obj->lcol = FL_CHOICE_LCOL; obj->align = FL_CHOICE_ALIGN; obj->want_update = 1; obj->spec = sp = fl_calloc( 1, sizeof *sp ); sp->fontsize = fli_cntl.choiceFontSize ? fli_cntl.choiceFontSize : FL_DEFAULT_SIZE; sp->fontstyle = FL_NORMAL_STYLE; sp->align = FL_ALIGN_CENTER; for ( i = 0; i <= FL_CHOICE_MAXITEMS; i++ ) { sp->items[ i ] = NULL; sp->shortcut[ i ] = NULL; } fl_set_object_return( obj, FL_RETURN_CHANGED ); return obj; } /*************************************** * Adds an object ***************************************/ FL_OBJECT * fl_add_choice( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { FL_OBJECT *ob; ob = fl_create_choice( type, x, y, w, h, l ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** * Clears the choice object ***************************************/ void fl_clear_choice( FL_OBJECT * ob ) { FLI_CHOICE_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_CHOICE ) ) { M_err( "fl_clear_choice", "%s is not choice class", ob ? ob->label : "" ); return; } #endif free_choice( sp ); sp->val = 0; sp->numitems = 0; fl_redraw_object( ob ); } /*************************************** * add a single choice item ***************************************/ static void addto_choice( FL_OBJECT * ob, const char * str ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( sp->numitems >= FL_CHOICE_MAXITEMS ) return; sp->items[ ++sp->numitems ] = fl_strdup( str ); sp->shortcut[ sp->numitems ] = fl_strdup( "" ); sp->mode[ sp->numitems ] = FL_PUP_NONE; sp->modechange[ sp->numitems ] = 0; if ( sp->val == 0 ) { sp->val = 1; fl_redraw_object( ob ); } } /*************************************** * user interface routine. | allowed ***************************************/ int fl_addto_choice( FL_OBJECT * ob, const char * str ) { FLI_CHOICE_SPEC *sp = ob->spec; char *t, *c; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_CHOICE ) ) { M_err( "fl_addto_choice", "%s is not choice class", ob ? ob->label : "" ); return 0; } #endif if ( sp->numitems >= FL_CHOICE_MAXITEMS ) return sp->numitems; /* Split up string at '|' chars and create an entry for each part */ t = fl_strdup( str ); for ( c = strtok( t, "|" ); c && sp->numitems < FL_CHOICE_MAXITEMS; c = strtok( NULL, "|" ) ) addto_choice( ob, c ); if ( t ) fl_free( t ); return sp->numitems; } /*************************************** * Replaces a line to the choice item. ***************************************/ void fl_replace_choice( FL_OBJECT * ob, int numb, const char * str ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( numb < 1 || numb > sp->numitems ) return; if ( sp->items[ numb ] ) fl_free( sp->items[ numb ] ); sp->items[ numb ] = fl_strdup( str ); if ( sp->val == numb ) fl_redraw_object( ob ); } /*************************************** * Removes a line from the choice item. ***************************************/ void fl_delete_choice( FL_OBJECT * ob, int numb ) { int i; FLI_CHOICE_SPEC *sp = ob->spec; if ( numb < 1 || numb > sp->numitems ) return; if ( sp->items[ numb ] ) fl_free( sp->items[ numb ] ); if ( sp->shortcut[ numb ] ) fl_free( sp->shortcut[ numb ] ); for ( i = numb; i < sp->numitems; i++ ) { sp->items[ i ] = sp->items[ i + 1 ]; sp->shortcut[ i ] = sp->shortcut[ i + 1 ]; } sp->items[ sp->numitems ] = NULL; sp->shortcut[ sp->numitems ] = NULL; sp->numitems--; if ( sp->val == numb ) { if ( sp->val > sp->numitems ) sp->val = sp->numitems; fl_redraw_object( ob ); } else if ( sp->val > numb ) sp->val--; } /*************************************** * Sets the number of the choice. ***************************************/ void fl_set_choice( FL_OBJECT * ob, int choice ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( choice < 1 || choice > sp->numitems || sp->mode[ choice ] & FL_PUP_GREY ) sp->val = 0; else sp->val = choice; fl_redraw_object( ob ); } /*************************************** * similar to set_choice, except we use txt ***************************************/ void fl_set_choice_text( FL_OBJECT * ob, const char * txt ) { FLI_CHOICE_SPEC *sp; int i; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_CHOICE ) ) { M_err( "fl_set_choice_text", "%s not choice class", ob ? ob->label : "" ); return; } #endif sp = ob->spec; for ( i = 1; i <= sp->numitems; i++ ) if ( strcmp( txt, sp->items[ i ] ) == 0 ) { fl_set_choice( ob, i ); return; } M_err( "fl_set_choice_text", "%s not found", txt ); } /*************************************** ***************************************/ int fl_get_choice_item_mode( FL_OBJECT * ob, int item ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( item < 1 || item > sp->numitems ) { M_err( "fl_get_choice_item_mode", "Bad item index %d", item ); return -1; } return sp->mode[ item ]; } /*************************************** * Set the mode of an item in a choice object ***************************************/ void fl_set_choice_item_mode( FL_OBJECT * ob, int item, unsigned int mode ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( item < 1 || item > sp->numitems ) { M_err( "fl_set_choice_item_mode", "Bad item index %d", item ); return; } sp->mode[ item ] = mode; sp->modechange[ item ] = 1; } /*************************************** ***************************************/ void fl_set_choice_item_shortcut( FL_OBJECT * ob, int item, const char * sc ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( item < 1 || item > sp->numitems ) { M_err( "fl_set_choice_item_shortcut", "Bad item index %d", item ); return; } if ( sp->shortcut[ item ] ) fl_free( sp->shortcut[ item ] ); sp->shortcut[ item ] = fl_strdup( sc ? sc : "" ); } /*************************************** * Returns the number of the choice. ***************************************/ int fl_get_choice( FL_OBJECT * ob ) { #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_CHOICE ) ) { M_err( "fl_get_choice", "%s is not choice class", ob ? ob->label : "" ); return 0; } #endif return ( ( FLI_CHOICE_SPEC * ) ob->spec )->val; } /*************************************** ***************************************/ int fl_get_choice_maxitems( FL_OBJECT * ob ) { return ( ( FLI_CHOICE_SPEC * ) ob->spec )->numitems; } /*************************************** * Returns the text of the choice. ***************************************/ const char * fl_get_choice_text( FL_OBJECT * ob ) { FLI_CHOICE_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_CHOICE ) ) { M_err( "fl_get_choice_text", "%s is not choice class", ob ? ob->label : "" ); return 0; } #endif if ( sp->val == 0 ) return NULL; return sp->items[ sp->val ]; } /*************************************** ***************************************/ const char * fl_get_choice_item_text( FL_OBJECT * ob, int n ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( n < 1 || n > sp->numitems ) return NULL; return sp->items[ n ]; } /*************************************** * Sets the font size inside the choice. ***************************************/ void fl_set_choice_fontsize( FL_OBJECT * ob, int size ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( sp->fontsize != size ) { sp->fontsize = size; fl_redraw_object( ob ); } } /*************************************** * Sets the font style inside the choice. ***************************************/ void fl_set_choice_fontstyle( FL_OBJECT * ob, int style ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( sp->fontstyle != style ) { sp->fontstyle = style; fl_redraw_object( ob ); } } /*************************************** ***************************************/ void fl_set_choice_align( FL_OBJECT * ob, int align ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( sp->align != align ) { sp->align = align; fl_redraw_object( ob ); } } /*************************************** ***************************************/ int fl_set_choice_entries(FL_OBJECT * ob, FL_PUP_ENTRY * ent ) { int i, k; fl_clear_choice( ob ); for ( k = 0; ent && ent->text; ent++, k++ ) { i = fl_addto_choice( ob, ent->text ); if ( ent->mode == FL_PUP_GRAY ) fl_set_choice_item_mode( ob, i, ent->mode ); if ( ent->shortcut && *ent->shortcut ) fl_set_choice_item_shortcut( ob, i, ent->shortcut ); } return k; } /*************************************** ***************************************/ int fl_set_choice_notitle( FL_OBJECT * ob, int n ) { FLI_CHOICE_SPEC *sp = ob->spec; int old = sp->no_title; sp->no_title = n; return old; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/extern.h0000644000175000017500000000412211247055071014453 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file extern.h * * This file is part of the XForms library package. * Copyright (c) 1996-1998 T.C. Zhao and Mark Overmars * All rights reserved. * * All global variables used in forms. Should not be used * by application programs. There is no guarantee that these * variables exist in future version of XForms */ #ifndef FL_EXTERN_H_MAKING_FORMS_ONLY #define FL_EXTERN_H_MAKING_FORMS_ONLY extern Pixmap fli_gray_pattern[ ]; extern GC fli_bwgc[ ]; extern GC fli_whitegc; extern XKeyboardControl fli_keybdcontrol; extern unsigned long fli_keybdmask; extern FL_OBJECT *fli_current_group; #define FLI_INACTIVE_PATTERN fli_gray_pattern[ 1 ] extern Display *fl_display; extern Window fl_root, fl_vroot; extern int fl_screen; extern int fl_vmode; extern int fl_scrh, fl_scrw; extern float fli_dpi; extern FL_IOPT fli_cntl; extern int fli_inverted_y; extern FLI_CONTEXT *fli_context; extern FLI_TARGET *flx; extern long fli_requested_vid; extern int fli_no_connection; extern char fli_curfnt[ 127 ]; extern FLI_WIN *fli_app_win; extern void fli_drw_tbox( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, FL_COLOR, int ); #endif /* !def EXTERN.H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/menu.c0000644000175000017500000005677311247055071014130 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file menu.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * XForms Class FL_MENU. * call PopUp to handle the actual random access * * possible optimization: * upon first creation of the popup, set extern_menu to the popup ID * and let popup manage all the modes/values from then on. * * OR use the following to simplify code for extern pup * when extern_menu is used, gets all text and mode, then * all the code would be the same for extern and native menu. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "private/pmenu.h" #include #include #include #define ISPUP( sp ) ( ( sp )->extern_menu >= 0 ) /*************************************** * Returns the index into the array of items from the items menu ID ***************************************/ static int val_to_index( FL_OBJECT * ob, int val ) { int i; FLI_MENU_SPEC *sp = ob->spec; if ( ISPUP( sp ) ) return val; for ( i = 1; i <= sp->numitems; i++ ) if ( val == sp->mval[ i ] ) return i; return -1; } /*************************************** * Creates the menu and shows it. Returns the item selected. ***************************************/ static int do_menu_low_level( FL_OBJECT * ob ) { int popup_id, i, val, k; FLI_MENU_SPEC *sp = ob->spec; /* The number of items can be 0 only if the menu is an external popup */ if ( sp->numitems == 0 && ! ISPUP( sp ) ) return 0; /* If it's an external popup let the xpopup code deal with everything */ if ( ISPUP( sp ) ) { if ( ob->label && *ob->label && ob->type != FL_PULLDOWN_MENU ) fl_setpup_title( sp->extern_menu, ob->label ); if ( ( val = fl_dopup( sp->extern_menu ) ) > 0 ) sp->val = val; return val; } /* Create a new popup */ popup_id = fl_newpup( FL_ObjWin( ob ) ); if ( ob->type != FL_PULLDOWN_MENU && ! sp->no_title ) fl_setpup_title( popup_id, ob->label ); else fl_setpup_softedge( popup_id, 1 ); for ( i = 1; i <= sp->numitems; i++ ) { if ( sp->mval[ i ] == i && ! sp->cb[ i ] ) fl_addtopup( popup_id, sp->items[ i ] ); else { char *s = fl_malloc( strlen( sp->items[ i ] ) + 6 + log10( INT_MAX ) ); sprintf( s, "%s%%x%d%s", sp->items[ i ], sp->mval[ i ], sp->cb[ i ] ? "%f" : "" ); if ( ! sp->cb[ i ] ) fl_addtopup( popup_id, s ); else fl_addtopup( popup_id, s, sp->cb[ i ] ); fl_free( s ); } if ( sp->modechange[ i ] || sp->mode[ i ] != FL_PUP_NONE ) { fl_setpup_mode( popup_id, sp->mval[ i ], sp->mode[ i ] ); sp->modechange[ i ] = 0; } fl_setpup_shortcut( popup_id, sp->mval[ i ], sp->shortcut[ i ] ); } /* Pulldown menus and those without a title appear directly below the menu itself, the others more or less on top of the menu */ if ( ob->type == FL_PULLDOWN_MENU || sp->no_title ) fl_setpup_position( ob->form->x + ob->x + 1, ob->form->y + ob->y + ob->h + 1 ); else fl_setpup_position( ob->form->x + ob->x + 5, ob->form->y + ob->y + 5 ); /* Now do the user interaction */ val = fl_dopup( popup_id ); /* Deal with whatever is needed according to the return value */ if ( val > 0 && ( k = val_to_index( ob, val ) ) > 0 ) { /* If shown for the first time, need to get all mode right as the menu item string may have embedded mode setting strings in it */ if ( sp->shown == 0 ) { for ( i = 1; i <= sp->numitems; i++ ) { int m = fl_getpup_mode( popup_id, sp->mval[ i ] ); sp->modechange[ i ] = sp->mode[ i ] != m; sp->mode[ i ] = m; sp->shown = 1; } } else { sp->mode[ k ] = fl_getpup_mode( popup_id, val ); sp->modechange[ k ] = 1; /* Old val also might change mode if binary */ if ( sp->val > 0 ) { int m = fl_getpup_mode( popup_id, sp->mval[ sp->val ] ); sp->modechange[ sp->val ] = sp->mode[ sp->val ] != m; sp->mode[ sp->val ] = m; } } sp->val = k; } /* Get rid of the popup */ fl_freepup( popup_id ); return val; } /*************************************** ***************************************/ static int do_menu( FL_OBJECT *ob ) { int val; ob->pushed = 1; fl_redraw_object( ob ); val = do_menu_low_level( ob ) > 0; ob->pushed = 0; fl_redraw_object( ob ); return val > 0; } /*************************************** * Handles an event, return non-zero if an item has been selected. ***************************************/ static int handle_menu( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { FLI_MENU_SPEC *sp = ob->spec; int val, boxtype = ob->boxtype; FL_COLOR col; int ret = FL_RETURN_NONE; #if FL_DEBUG >= ML_DEBUG M_info2( "handle_menu", fli_event_name( event ) ); #endif switch ( event ) { case FL_DRAW: /* Draw the object */ if ( ob->pushed ) { boxtype = FL_UP_BOX; col = ob->col2; } else col = ob->col1; fl_drw_box( boxtype, ob->x, ob->y, ob->w, ob->h, col, ob->bw ); fl_drw_text( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); if ( sp->showsymbol ) { int dm = 0.85 * FL_min( ob->w, ob->h ); fl_drw_text( 0, ob->x + ob->w - dm - 1, ob->y + 1, dm, dm, col, 0, 0, "@menu" ); } break; case FL_ENTER: if ( ob->type == FL_TOUCH_MENU && do_menu( ob ) > 0 ) ret |= FL_RETURN_CHANGED; break; case FL_PUSH: /* Touch menus and push menus without a title don't do anything on a button press */ if ( key != FL_MBUTTON1 || ( ob->type == FL_PUSH_MENU && sp->no_title ) ) break; if ( ob->type == FL_TOUCH_MENU ) { ret |= FL_RETURN_END; break; } if ( do_menu( ob ) > 0 ) ret |= FL_RETURN_END | FL_RETURN_CHANGED; break; case FL_RELEASE : /* Button release is only important for push menus without a title, all others get started by a button press or by just moving the mouse on top of it (and they also don't expect a release - that gets eaten by the popup handler) */ if ( key != FL_MBUTTON1 || ! ( ob->type == FL_PUSH_MENU && sp->no_title ) || mx < ob->x || mx > ob->x + ob->w || my < ob->y || my > ob->y + ob->h ) break; if ( do_menu( ob ) > 0 ) ret |= FL_RETURN_CHANGED | FL_RETURN_END; break; case FL_SHORTCUT: /* Show menu as highlighted */ ob->pushed = 1; fl_redraw_object( ob ); /* Do interaction and then redraw without highlighting */ val = do_menu( ob ); ob->pushed = 0; fl_redraw_object( ob ); if ( val > 0 ) ret |= FL_RETURN_CHANGED | FL_RETURN_END; break; case FL_FREEMEM: fl_clear_menu( ob ); fl_free( ob->spec ); return 0; } return ret; } /*************************************** * Creates a menu object ***************************************/ FL_OBJECT * fl_create_menu( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *obj; FLI_MENU_SPEC *sp; obj = fl_make_object( FL_MENU, type, x, y, w, h, label, handle_menu ); obj->boxtype = FL_FLAT_BOX; obj->col1 = FL_MENU_COL1; obj->col2 = FL_MENU_COL2; obj->lcol = FL_MENU_LCOL; obj->lstyle = FL_NORMAL_STYLE; obj->align = FL_MENU_ALIGN; if ( type == FL_TOUCH_MENU ) fl_set_object_return( obj, FL_RETURN_CHANGED ); else fl_set_object_return( obj, FL_RETURN_END_CHANGED ); sp = obj->spec = fl_calloc( 1, sizeof *sp ); sp->extern_menu = -1; return obj; } /*************************************** * Adds a menu object ***************************************/ FL_OBJECT * fl_add_menu( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_create_menu( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** * Clears the menu object ***************************************/ void fl_clear_menu( FL_OBJECT * ob ) { int i; FLI_MENU_SPEC *sp = ob->spec; if ( ISPUP( sp ) ) { fl_freepup( sp->extern_menu ); sp->extern_menu = -1; return; } sp->val = 0; sp->cur_val = 0; for ( i = 1; i <= sp->numitems; i++ ) { fl_safe_free( sp->items[ i ] ); fl_safe_free( sp->shortcut[ i ] ); sp->mode[ i ] = FL_PUP_NONE; sp->cb[ i ] = NULL; } sp->numitems = 0; } /*************************************** * Adds a line to the menu item. ***************************************/ static void addto_menu( FL_OBJECT * ob, const char * str, ... ) { FLI_MENU_SPEC *sp = ob->spec; int n; char *p; if ( ISPUP( sp ) || sp->numitems >= FL_MENU_MAXITEMS || sp->cur_val == INT_MAX ) return; n = ++sp->numitems; sp->items[ n ] = fl_strdup( str ); sp->shortcut[ n ] = fl_strdup( "" ); sp->mode[ n ] = FL_PUP_NONE; sp->cb[ n ] = NULL; /* Check if a callback function needs to be set */ if ( ( p = strstr( sp->items[ n ], "%f" ) ) ) { va_list ap; va_start( ap, str ); sp->cb[ n ] = va_arg( ap, FL_PUP_CB ); va_end( ap ); memmove( p, p + 2, strlen( p ) - 1 ); } /* Set the value for the menu (either the index or extract it from "%xn" */ if ( ! ( p = strstr( sp->items[ n ], "%x" ) ) ) sp->mval[ n ] = ++sp->cur_val; else { if ( ! isdigit( ( int ) p[ 2 ] ) ) { M_err( "addto_menu", "Missing number after %%x" ); sp->mval[ n ] = ++sp->cur_val; } else { char *eptr; sp->mval[ n ] = strtol( p + 2, &eptr, 10 ); while ( *eptr && isspace( ( int ) *eptr ) ) eptr++; if ( *eptr ) memmove( p, eptr, strlen( eptr ) + 1 ); else *p = '\0'; } } } /*************************************** * Sets the menu to a particular menu string ***************************************/ void fl_set_menu( FL_OBJECT * ob, const char * menustr, ... ) { char *t, *c; va_list ap; FLI_MENU_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_MENU ) ) { M_err( "fl_set_menu", "%s is not Menu class", ob ? ob->label : "" ); return; } #endif fl_clear_menu( ob ); /* Split up menu string at '|' chars and create an entry for each part */ va_start( ap, menustr ); t = fl_strdup( menustr ); for ( c = strtok( t, "|" ); c && sp->numitems < FL_CHOICE_MAXITEMS; c = strtok( NULL, "|" ) ) { FL_PUP_CB cb; if ( strstr( c, "%f" ) ) { cb = va_arg( ap, FL_PUP_CB ); addto_menu( ob, c, cb ); } else addto_menu( ob, c ); } if ( t ) fl_free( t ); va_end( ap ); } /*************************************** * Adds a line to the menu item. ***************************************/ int fl_addto_menu( FL_OBJECT * ob, const char * menustr, ... ) { FLI_MENU_SPEC *sp= ob->spec; char *t, *c; va_list ap; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_MENU ) ) { M_err( "fl_addto_menu", "%s is not Menu class", ob ? ob->label : "" ); return 0; } #endif /* Split up menu string at '|' chars and create an entry for each part */ va_start( ap, menustr ); t = fl_strdup( menustr ); for ( c = strtok( t, "|" ); c && sp->numitems < FL_CHOICE_MAXITEMS; c = strtok( NULL, "|" ) ) { FL_PUP_CB cb; if ( strstr( c, "%f" ) ) { cb = va_arg( ap, FL_PUP_CB ); addto_menu( ob, c, cb ); } else addto_menu( ob, c ); } if ( t ) fl_free( t ); va_end( ap ); return sp->numitems; } /*************************************** * Replaces a line in the menu item. ***************************************/ void fl_replace_menu_item( FL_OBJECT * ob, int numb, const char * str, ... ) { FLI_MENU_SPEC *sp = ob->spec; char *s, *p, *eptr; if ( ISPUP( sp ) ) { fli_replacepup_text( sp->extern_menu, numb, str ); return; } if ( ( numb = val_to_index( ob, numb ) ) <= 0 ) return; if ( sp->items[ numb ] ) fl_free( sp->items[ numb ] ); sp->cb[ numb ] = NULL; s = strdup( str ); if ( ( p = strstr( s, "%f" ) ) ) { va_list ap; va_start( ap, str ); sp->cb[ numb ] = va_arg( ap, FL_PUP_CB ); va_end( ap ); memmove( p, p + 2, strlen( p ) - 1 ); } if ( ( p = strstr( s, "%x" ) ) ) { if ( isdigit( ( int ) p[ 2 ] ) ) { sp->mval[ numb ] = strtol( p + 2, &eptr, 10 ); while ( *eptr && isspace( ( int ) *eptr ) ) eptr++; if ( *eptr ) memmove( p, eptr, strlen( eptr ) + 1 ); else *p = '\0'; } else { M_err( "fl_replace_menu_item", "Missing number after %%x" ); memmove( p, p + 2, strlen( p ) - 1 ); } } sp->items[ numb ] = s; } /*************************************** * Removes a line from the menu item. ***************************************/ void fl_delete_menu_item( FL_OBJECT * ob, int numb ) { int i; FLI_MENU_SPEC *sp = ob->spec; if ( ISPUP( sp ) || ( numb = val_to_index( ob, numb ) ) <= 0 ) return; fl_safe_free( sp->items[ numb ] ); fl_safe_free( sp->shortcut[ numb ] ); for ( i = numb; i < sp->numitems; i++ ) { sp->items[ i ] = sp->items[ i + 1 ]; sp->mode[ i ] = sp->mode[ i + 1 ]; sp->modechange[ i ] = sp->modechange[ i + 1 ]; sp->mval[ i ] = sp->mval[ i + 1 ]; sp->shortcut[ i ] = sp->shortcut[ i + 1 ]; sp->cb[ i ] = sp->cb[ i + 1 ]; } if ( sp->val == numb ) sp->val = -1; sp->items[ sp->numitems ] = NULL; sp->shortcut[ sp->numitems ] = NULL; sp->mode[ sp->numitems ] = FL_PUP_NONE; sp->modechange[ sp->numitems ] = 0; sp->mval[ sp->numitems ] = 0; sp->cb[ sp->numitems ] = NULL; sp->numitems--; } /*************************************** * Sets a callback function for a menu item ***************************************/ FL_PUP_CB fl_set_menu_item_callback( FL_OBJECT * ob, int numb, FL_PUP_CB cb ) { FLI_MENU_SPEC *sp = ob->spec; FL_PUP_CB old_cb; if ( ISPUP( sp ) || ( numb = val_to_index( ob, numb ) ) <= 0 ) return NULL; old_cb = sp->cb[ numb ]; sp->cb[ numb ] = cb; return old_cb; } /*************************************** * Sets a shortcut for a menu item ***************************************/ void fl_set_menu_item_shortcut( FL_OBJECT * ob, int numb, const char * str ) { FLI_MENU_SPEC *sp = ob->spec; if ( ISPUP( sp ) || ( numb = val_to_index( ob, numb ) ) <= 0 ) return; fl_safe_free( sp->shortcut[ numb ] ); sp->shortcut[ numb ] = fl_strdup( str ? str : "" ); } /*************************************** * Sets the display mode for the menu item ***************************************/ void fl_set_menu_item_mode( FL_OBJECT * ob, int numb, unsigned int mode ) { FLI_MENU_SPEC *sp = ob->spec; if ( ISPUP( sp ) ) fl_setpup_mode( sp->extern_menu, numb, mode ); else { if ( ( numb = val_to_index( ob, numb ) ) <= 0 ) return; sp->mode[ numb ] = mode; sp->modechange[ numb ] = 1; if ( mode & FL_PUP_CHECK ) sp->val = numb; } } /*************************************** * Sets the display mode for the menu item ***************************************/ int fl_set_menu_item_id( FL_OBJECT * ob, int index, int id ) { FLI_MENU_SPEC *sp = ob->spec; int old_id; if ( ISPUP( sp ) || id < 1 || index < 1 || index > sp->numitems ) return -1; old_id = sp->mval[ index ]; sp->mval[ index ] = id; return old_id; } /*************************************** * Makes the menu symbol visible or not ***************************************/ void fl_show_menu_symbol( FL_OBJECT * ob, int show ) { FLI_MENU_SPEC *sp = ob->spec; if ( ISPUP( sp ) ) return; sp->showsymbol = show; fl_redraw_object( ob ); } /*************************************** * Returns the number of the menu item selected. ***************************************/ int fl_get_menu( FL_OBJECT * ob ) { FLI_MENU_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_MENU ) ) { M_err( "fl_get_menu", "%s is not Menu class", ob ? ob->label : "" ); return 0; } #endif return val_to_index( ob, sp->val ); } /*************************************** * Returns rhe number of items in a menu ***************************************/ int fl_get_menu_maxitems( FL_OBJECT * ob ) { FLI_MENU_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_MENU ) ) { M_err( "fl_get_menu_maxitems", "%s is not Menu class", ob ? ob->label : "" ); return 0; } #endif return ISPUP( sp ) ? fl_getpup_items( sp->extern_menu ) : sp->numitems; } /*************************************** * Returns the text of the menu item selected. ***************************************/ const char * fl_get_menu_text( FL_OBJECT * ob ) { FLI_MENU_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_MENU ) ) { M_err( "fl_get_menu_text", "%s is not Menu class", ob ? ob->label : "" ); return NULL; } #endif if ( ISPUP( sp ) ) return fl_getpup_text( sp->extern_menu, sp->val ); return ( sp->val < 1 || sp->val > sp->numitems ) ? NULL : sp->items[ sp->val ]; } /*************************************** * Returns a string with the menu items text ***************************************/ const char * fl_get_menu_item_text( FL_OBJECT * ob, int numb ) { FLI_MENU_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_MENU ) ) { M_err( "fl_get_menu_item_text", "%s is not Menu class", ob ? ob->label : "" ); return NULL; } #endif if ( ISPUP(sp ) ) return fl_getpup_text( sp->extern_menu, numb ); numb = val_to_index( ob, numb ); return numb <= 0 ? NULL : sp->items[ numb ]; } /*************************************** * Returns the mode of a menu item ***************************************/ unsigned int fl_get_menu_item_mode( FL_OBJECT * ob, int numb ) { FLI_MENU_SPEC *sp = ob->spec; #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_MENU ) ) { M_err( "fl_get_menu_item_mode", "%s is not Menu class", ob ? ob->label : "" ); return 0; } #endif if ( ISPUP( sp ) ) return fl_getpup_mode( sp->extern_menu, numb ); numb = val_to_index( ob, numb ); return numb <= 0 ? 0 : sp->mode[ numb ]; } /*************************************** * Makes an already existing popup a menu ***************************************/ void fl_set_menu_popup( FL_OBJECT * ob, int pup ) { #if FL_DEBUG >= ML_ERR if ( ! IsValidClass( ob, FL_MENU ) ) { M_err( "fl_set_menu_popup", "%s is not Menu class", ob ? ob->label : "" ); return; } #endif ( ( FLI_MENU_SPEC * ) ob->spec )->extern_menu = pup; if ( ob->type == FL_PULLDOWN_MENU ) fl_setpup_shadow( pup, 0 ); } /*************************************** * Creates a popup and makes that a menu ***************************************/ int fl_set_menu_entries( FL_OBJECT * ob, FL_PUP_ENTRY * ent ) { int n; fl_clear_menu( ob ); n = fl_newpup( FL_ObjWin( ob ) ); fl_set_menu_popup( ob, fl_setpup_entries( n, ent ) ); if ( ob->type == FL_PULLDOWN_MENU ) { fl_setpup_bw( n, ob->bw ); fl_setpup_shadow( n, 0 ); } return n; } /*************************************** * If the menu is really a popup in disguise returns the popups number ***************************************/ int fl_get_menu_popup( FL_OBJECT * ob ) { FLI_MENU_SPEC *sp = ob->spec; return ISPUP( sp ) ? sp->extern_menu : -1; } /*************************************** * Allows to change the no-title attribute of a menu ***************************************/ int fl_set_menu_notitle( FL_OBJECT * ob, int off ) { FLI_MENU_SPEC *sp = ob->spec; int old = sp->no_title; sp->no_title = off; return old; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/lib/ulib.h0000644000175000017500000000732211247055071014106 0ustar jensjens/* * * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file ulib.h * * Macros and Prototypes for the utilities routines */ #ifndef TC_ULIB_H #define TC_ULIB_H #include /* for FILE */ #include #ifndef FL_EXPORT # if ! defined FL_WIN32 || ! defined SHARED_LIB # define FL_EXPORT extern # else # ifdef MAKING_FORMS # define FL_EXPORT __declspec( dllexport ) extern # else # define FL_EXPORT __declspec( dllimport ) extern # endif /* MAKING_FORMS */ # endif /* FL_WIN32 */ #endif /* !def FL_EXPORT */ /***************** Portable IO operations *******************{**/ extern int fli_readint( FILE * ); extern int fli_readpint( FILE * ); extern int fli_readhexint( FILE * ); extern int fli_fget4MSBF( FILE * ); extern int fli_fput4MSBF( int, FILE * ); extern int fli_fget2LSBF( FILE * ); extern int fli_fput2LSBF( int, FILE * ); extern int fli_fget2MSBF( FILE * ); extern int fli_fput2MSBF( int, FILE * ); extern int fli_fget4LSBF( FILE *); extern int fli_fput4LSBF( int, FILE * ); /********** End of Portable IO *******************}**/ extern char * fli_de_space( char * ); extern char * fli_space_de( char * ); extern char * fli_de_space_de( char * ); extern char * fli_nuke_all_non_alnum( char * ); /********* Variable number arguments strcat ******************/ extern char * fli_vstrcat( const char *, ... ); extern void fli_free_vstrcat( void * ); /********************************************************************* * Basic error handling routines ********************************************************************/ /* Message levels (verbosity). Error generating routine should * have a (positive) control parameter specifying how loud * to bark (i.e., amount of messages generated) */ # define ML_ERR -1 # define ML_WARN 0 # define ML_INFO1 1 # define ML_INFO2 2 # define ML_DEBUG 3 # define ML_TRACE 4 extern FL_ERROR_FUNC fli_error_setup( int, const char *, int ); extern FL_ERROR_FUNC efp_; extern FL_ERROR_FUNC user_error_function_; /* Define the actual names that will be used */ # define M_err \ ( efp_ = fli_error_setup( ML_ERR, __FILE__, __LINE__ ) ), efp_ # define M_warn \ ( efp_ = fli_error_setup( ML_WARN, __FILE__, __LINE__ ) ), efp_ # define M_info \ ( efp_ = fli_error_setup( ML_INFO1, __FILE__, __LINE__ ) ), efp_ # define M_info2 \ ( efp_ = fli_error_setup( ML_INFO2, __FILE__, __LINE__ ) ), efp_ # define M_debug \ ( efp_ = fli_error_setup( ML_DEBUG, __FILE__, __LINE__ ) ), efp_ # define M_trace \ ( efp_ = fli_error_setup( ML_TRACE, __FILE__, __LINE__ ) ), efp_ /****** Misc. control routines **********/ extern void fli_set_msg_threshold( int ); extern const char *fli_get_syserror_msg( void ); #endif /* TC_ULIB_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/0000755000175000017500000000000011377311602013646 5ustar jensjensxforms-1.0.93sp1/fdesign/fd_printC.c0000644000175000017500000013014111375531626015732 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_printC.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Generate header/C files */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "private/flsnprintf.h" #include "flinternal.h" #include "fd_main.h" #include "fd_spec.h" #include #include #include #include #ifdef WIN32 #include #endif /*************************************** ***************************************/ void make_backup( const char *s ) { char buf[ 1024 ]; if ( access( ( char * ) s, R_OK ) == 0 ) { sprintf( buf, "%s.bak", s ); #ifdef __EMX__ unlink( buf ); #endif if ( rename( s, buf ) ) M_err( "make_backup", "%s write failed", buf ); } } /*************************************** ***************************************/ static char const * filename_only( char const * filename ) { char const * ptr = strrchr( filename, '/' ); if ( ptr ) return ptr + 1; return filename; } /*************************************** ***************************************/ static int build_fname( char * fname, size_t fname_capacity, char const * filename, char const * ext ) { int npc; if ( fdopt.output_dir ) npc = fl_snprintf( fname, fname_capacity, "%s%s%s%s", fdopt.output_dir, fdopt.output_dir[ strlen( fdopt.output_dir ) - 1 ] != '/' ? "/" : "", filename_only( filename ), ext ); else npc = fl_snprintf( fname, fname_capacity, "%s%s", filename, ext ); /* Older libc return -1 if text doesn't, newer ones the total number of chars that would have been written if there would have been enough space */ return npc >= 0 && ( size_t ) npc <= fname_capacity; } /*************************************** * Note: 'filename' has no extensions ***************************************/ int C_output( const char * filename, FRM * forms, int fnumb ) { char fname[ PATH_MAX + 1 ]; const char *name_only; int i; FILE *fn; FL_OBJECT *obj; int use_glcanvas = 0; /* Figure out the name of the file without any path */ if ( ( name_only = strrchr( filename, '/' ) ) ) ++name_only; else name_only = filename; if ( ! build_fname( fname, sizeof fname, filename, ".h" ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't create header file!", "Filename is too long:", "", 1 ); else M_err( "C_output", "Can't create header file, filename is too long" ); return 0; } make_backup( fname ); if ( ! ( fn = fopen( fname, "w" ) ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't open header file!", fname, "", 1 ); else M_err( "C_output", "Can't create open header file '%s'", fname ); return 0; } fprintf( fn, "/* Header file generated by fdesign on %s */\n\n" "#ifndef %s_h_\n" "#define %s_h_\n\n" "#include <%s>\n", fl_now( ), get_fd_name( forms[ 0 ].fname ), get_fd_name( forms[ 0 ].fname ), xform_header ); for ( i = 0; i < fnumb && ! use_glcanvas; i++ ) { obj = forms[ i ].form->first; while ( ( obj = obj->next ) != NULL ) if ( obj->objclass == FL_GLCANVAS ) { use_glcanvas = 1; break; } } if ( use_glcanvas ) fprintf( fn, "#include <%s>\n", glcanvas_header ); fprintf( fn, "\n/* Callbacks, globals and object handlers */\n\n" ); for ( i = 0; i < fnumb; i++ ) print_callbacks_and_globals( fn, forms[ i ].form, 0 ); fprintf( fn, "\n/* Forms and Objects */\n\n" ); for ( i = 0; i < fnumb; i++ ) print_header( fn, forms[ i ].form, forms[ i ].fname ); if ( fdopt.altformat ) fprintf( fn, "\n/* Creation Routine */\n\n" "extern void %s( void );\n", main_name ); fprintf( fn, "\n#endif /* %s_h_ */\n", get_fd_name( forms[ 0 ].fname ) ); fclose( fn ); /* Make the .c file. */ if ( ! build_fname( fname, sizeof fname, filename, ".c" ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't create C file!", "Filename is too long.", "", 1 ); else M_err( "C_output", "Can't create C file, filename is too long" ); return 0; } make_backup( fname ); if ( ! ( fn = fopen( fname, "w" ) ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't open C file!", fname, "", 1 ); else M_err( "C_output", "Can't open C file '%s'", fname ); return 0; } fprintf( fn, "/* Form definition file generated by fdesign */\n\n" "#include \n" "#include \"%s.h\"\n", name_only ); reset_dupinfo_cache( ); for ( i = 0; i < fnumb; i++ ) print_form( fn, forms[ i ].form, forms[ i ].fname ); if ( fdopt.altformat ) { fprintf( fn, "void %s( void )\n{\n", main_name ); for ( i = 0; i < fnumb; i++ ) fprintf( fn, " create_form_%s( );\n", forms[ i ].fname ); fprintf( fn, "}\n" ); } fclose( fn ); /* Check if we need to output a template for the main program */ if ( fdopt.emit_main ) { if ( ! build_fname( fname, sizeof fname, filename, "_main.c" ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't create C file for main() function!", "Filename is too long:", "", 1 ); else M_err( "C_output", "Can't create C file for main() function, " "filename is too long" ); return 0; } make_backup( fname ); if ( ! ( fn = fopen( fname, "w" ) ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't open file for main() function!", "", "", 1 ); else M_err( "C_output", "Can't open file for main() function!" ); return 0; } /* Print out the include for the header file and then all the code */ fprintf( fn, "#include \"%s.h\"\n\n", name_only ); output_main( fn, forms, fnumb ); fclose( fn ); } /* Output callback stubs */ if ( fdopt.emit_cb ) { if ( ! build_fname( fname, sizeof fname, filename, "_cb.c" ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't create C file for callbacks!", "Filename is too long:", "", 1 ); else M_err( "C_output", "Can't create C file for callbacks, " "filename is too long" ); return 0; } make_backup( fname ); if ( ! ( fn = fopen( fname, "w" ) ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't open C file for callbacks!", fname, "", 1 ); else M_err( "C_output", "Can't open C file for callbacks '%s'", fname ); return 0; } /* Print out the include for the header file and then all the code */ fprintf( fn, "#include \"%s.h\"\n\n", name_only ); output_callbacks( fn, forms, fnumb ); fclose( fn ); } return 1; } /* Some attributes query routines */ #define VN( v ) { v, #v, NULL, NULL } #define PVN( v ) v, #v VN_pair vn_btype[ ] = { { PVN( FL_NO_BOX ), "No box%r1", "Nn#n" }, { PVN( FL_UP_BOX ), "Up box%r1", "Uu#u" }, { PVN( FL_DOWN_BOX ), "Down box%r1", "Dd#d" }, { PVN( FL_BORDER_BOX ), "Border box%r1", "Bb#b" }, { PVN( FL_SHADOW_BOX ), "Shadow box%r1", "Ss#s" }, { PVN( FL_FRAME_BOX ), "Frame box%r1", "Ff#f" }, { PVN( FL_ROUNDED_BOX ), "Rounded box%r1", "Rr#r" }, { PVN( FL_EMBOSSED_BOX ), "Embossed box%r1", "Ee#e" }, { PVN( FL_FLAT_BOX ), "Flat box%r1", "Ff#f" }, { PVN( FL_RFLAT_BOX ), "Rflat box%r1", "lL#l" }, { PVN( FL_RSHADOW_BOX ), "Rshadow box%r1", "wW#w" }, { PVN( FL_OVAL_BOX ), "Oval box%r1", "Oo#o" }, { PVN( FL_ROUNDED3D_UPBOX ), "rounded3d upbox%r1", "nN#n" }, { PVN( FL_ROUNDED3D_DOWNBOX ), "rounded3d downbox%r1", "oO#o" }, { PVN( FL_OVAL3D_UPBOX ), "Oval3d upbox%r1", "vV#v" }, { PVN( FL_OVAL3D_DOWNBOX ), "Oval3d downbox%r1", "lL#l" }, { PVN( FL_OVAL3D_FRAMEBOX ), "Oval3d framebox%r1", "eE#e" }, { PVN( FL_OVAL3D_EMBOSSEDBOX ), "Oval3d embossed%r1", "eE#e" }, #if 0 { PVN( FL_TOPTAB_UPBOX ), "toptab%r1", "tT#t" }, { PVN( FL_SELECTED_TOPTAB_UPBOX ), "selected toptab%r1", "sS#s" }, #endif { PVN( -1 ), NULL, NULL } }; VN_pair vn_align[ ] = { VN( FL_ALIGN_TOP ), VN( FL_ALIGN_BOTTOM ), VN( FL_ALIGN_LEFT ), VN( FL_ALIGN_RIGHT ), VN( FL_ALIGN_CENTER ), VN( FL_ALIGN_RIGHT_TOP ), VN( FL_ALIGN_LEFT_TOP ), VN( FL_ALIGN_RIGHT_BOTTOM ), VN( FL_ALIGN_LEFT_BOTTOM ), VN( FL_ALIGN_TOP_RIGHT ), /* need them for backward compatibility */ VN( FL_ALIGN_TOP_LEFT ), VN( FL_ALIGN_BOTTOM_RIGHT ), VN( FL_ALIGN_BOTTOM_LEFT ), { -1, NULL, NULL, NULL } }; static VN_pair vn_lsize[ ] = { VN( FL_DEFAULT_SIZE ), VN( FL_TINY_SIZE ), VN( FL_SMALL_SIZE ), VN( FL_NORMAL_SIZE ), VN( FL_MEDIUM_SIZE ), VN( FL_LARGE_SIZE ), VN( FL_HUGE_SIZE ), VN( FL_DEFAULT_FONT ), VN( FL_TINY_FONT ), VN( FL_SMALL_FONT ), VN( FL_NORMAL_FONT ), VN( FL_MEDIUM_FONT ), VN( FL_LARGE_FONT ), VN( FL_HUGE_FONT ), { FL_SMALL_FONT, "FL_NORMAL_FONT1", NULL, NULL }, { FL_NORMAL_FONT, "FL_NORMAL_FONT2", NULL, NULL }, { -1, NULL, NULL, NULL } }; static VN_pair vn_lstyle[ ] = { VN( FL_NORMAL_STYLE ), VN( FL_BOLD_STYLE ), VN( FL_ITALIC_STYLE ), VN( FL_BOLDITALIC_STYLE ), VN( FL_FIXED_STYLE ), VN( FL_FIXEDBOLD_STYLE ), VN( FL_FIXEDITALIC_STYLE ), VN( FL_FIXEDBOLDITALIC_STYLE ), VN( FL_TIMES_STYLE ), VN( FL_TIMESBOLD_STYLE ), VN( FL_TIMESITALIC_STYLE ), VN( FL_TIMESBOLDITALIC_STYLE ), VN( FL_SHADOW_STYLE ), VN( FL_ENGRAVED_STYLE ), VN( FL_EMBOSSED_STYLE ), { -1, NULL, NULL, NULL } }; VN_pair vn_gravity[] = { VN( FL_NoGravity ), VN( FL_NorthWest ), VN( FL_North ), VN( FL_NorthEast ), VN( FL_West ), VN( FL_East ), VN( FL_South ), VN( FL_SouthEast ), VN( FL_SouthWest ), VN( FL_ForgetGravity ), VN( ForgetGravity ), VN( NorthWestGravity ), VN( NorthGravity ), VN( NorthEastGravity ), VN( WestGravity ), VN( EastGravity ), VN( SouthGravity ), VN( SouthEastGravity ), VN( SouthWestGravity ), { -1, NULL, NULL, NULL } }; VN_pair vn_resize[ ] = { VN( FL_RESIZE_NONE ), VN( FL_RESIZE_X ), VN( FL_RESIZE_Y ), VN( FL_RESIZE_ALL ), { -1, NULL, NULL, NULL } }; static VN_pair vn_unit[ ] = { VN( FL_COORD_PIXEL ), VN( FL_COORD_MM ), VN( FL_COORD_centiMM ), VN( FL_COORD_POINT ), VN( FL_COORD_centiPOINT ), { FL_COORD_PIXEL, "pixel", NULL, NULL }, { FL_COORD_MM, "mm", NULL, NULL }, { FL_COORD_POINT, "point", NULL, NULL }, { FL_COORD_centiPOINT, "cp", NULL, NULL }, { FL_COORD_centiMM, "cmm", NULL, NULL }, { FL_COORD_centiPOINT, "cpoint", NULL, NULL }, { -1, NULL, NULL, NULL } }; /*************************************** ***************************************/ int get_vn_val( VN_pair * vn, const char * name ) { long val; char *ep; for ( ; vn->name; vn++ ) if ( strcmp( name, vn->name ) == 0 ) return vn->val; val = strtol( name, &ep, 10 ); if ( ep != name && ! *ep && val >= INT_MIN && val <= INT_MAX ) return val; return -1; } /*************************************** ***************************************/ char * get_vn_name( VN_pair * vn, int val ) { static char buf[ MAX_TYPE_NAME_LEN ]; for ( ; vn->name; vn++ ) if ( vn->val == val ) return vn->name; sprintf( buf, "%d", val ); return buf; } static void output_object( FILE * fn, FL_OBJECT * obj, int ); static void pre_form_output( FILE * fn ); static void post_form_output( FILE * fn ); /*************************************** ***************************************/ static void emit_attrib( FILE * fp, int a, VN_pair * vn, const char * aname ) { const char *s; if ( vn == vn_align ) s = align_name( a, 1 ); else s = get_vn_name( vn, a ); fprintf( fp, " %s( obj, %s );\n", aname, s ); } /*************************************** ***************************************/ static char * pure_style_name( int val ) { VN_pair *vn = vn_lstyle; static char buf[ 64 ]; for ( ; vn->name && vn->val != val; vn++ ) /* empty */ ; if ( vn->val == val ) return vn->name; else { sprintf( buf, "%d", val ); return buf; } } /*************************************** ***************************************/ static int pure_style_val( const char * cc ) { VN_pair *vn = vn_lstyle; for ( ; vn->name && strcmp( cc, vn->name ); vn++ ) /* empty */; return ( vn->name && ! strcmp( cc, vn->name ) ) ? vn->val : atoi( cc ); } /*************************************** ***************************************/ char * style_name( int style ) { static char buf[ 64 ]; int lstyle = style % FL_SHADOW_STYLE; int spstyle = ( style / FL_SHADOW_STYLE ) * FL_SHADOW_STYLE; strcpy( buf, pure_style_name( lstyle ) ); if ( spstyle ) strcat( strcat( buf, " + " ), pure_style_name( spstyle ) ); return buf; } /*************************************** ***************************************/ int style_val( const char * cc ) { char lstyle[ MAX_TYPE_NAME_LEN ], spstyle[ MAX_TYPE_NAME_LEN ], *p; fli_sstrcpy( lstyle, cc, sizeof lstyle ); *spstyle = '\0'; if ( ( p = strchr( lstyle, '+' ) ) ) { strcpy( spstyle, p + 1 ); *p = 0; } return pure_style_val( lstyle ) + pure_style_val( spstyle ); } /*************************************** ***************************************/ char * lsize_name( int val ) { return get_vn_name( vn_lsize, val ); } /*************************************** ***************************************/ int lsize_val( const char * cc ) { return get_vn_val( vn_lsize, cc ); } /*************************************** ***************************************/ char * gravity_name( int val ) { return get_vn_name(vn_gravity, val); } /*************************************** ***************************************/ int gravity_val( const char * cc ) { return get_vn_val( vn_gravity, cc ); } /*************************************** ***************************************/ char * resize_name( int val ) { return get_vn_name( vn_resize, val ); } /*************************************** ***************************************/ int resize_val( const char * cc ) { return get_vn_val( vn_resize, cc ); } /*************************************** ***************************************/ const char * align_name( int val, int with_spaces ) { static char buf[ 128 ]; strcpy( buf, get_vn_name( vn_align, val % FL_ALIGN_INSIDE ) ); if ( val & FL_ALIGN_INSIDE ) { strcat( buf, with_spaces ? " | " : "|" ); strcat( buf, "FL_ALIGN_INSIDE" ); } return buf; } /*************************************** ***************************************/ int align_val( const char * cc ) { char s[ MAX_TYPE_NAME_LEN ], *p; int val; fli_sstrcpy( s, cc, sizeof s ); if ( ( p = strchr( s, '|' ) ) ) { *p = '\0'; while ( isspace( ( int ) *--p ) ) *p = '\0'; } val = get_vn_val( vn_align, s ); return p ? ( val | FL_ALIGN_INSIDE ) : val; } /*************************************** ***************************************/ char * boxtype_name( int val ) { return get_vn_name( vn_btype, val ); } /*************************************** ***************************************/ int boxtype_val( const char * cc ) { return get_vn_val( vn_btype, cc ); } /*************************************** ***************************************/ char * unit_name( int val ) { return get_vn_name( vn_unit, val ); } /*************************************** ***************************************/ int unit_val( const char * s ) { return get_vn_val( vn_unit, s ); } /*** End of attributes query routines ***/ /*------------- Keeping track of array names. -------------------*/ #define MAXARNAME 100 static char *arnames[ MAXARNAME ]; static unsigned long arsizes[ MAXARNAME ]; static size_t anumb = 0; /*************************************** * Initializes the aray names. ***************************************/ static void init_array_names( void ) { anumb = 0; } /*************************************** * Checks whether this name is an array name and remembers it ***************************************/ static int check_array_name( char * aname ) { char tmpstr[ MAX_VAR_LEN ]; char *p, *ep; unsigned long ind; size_t i; if ( ! ( p = strchr( aname, '[' ) ) ) return FL_FALSE; strcpy( tmpstr, aname ); p = tmpstr + ( p - aname ); ind = strtoul( p + 1, &ep, 10 ); if ( ep == p + 1 ) ind = 0; *p = 0; for ( i = 0; i < anumb; i++ ) if ( strcmp( arnames[ i ], tmpstr ) == 0 ) { if ( ind + 1 > arsizes[ i ] ) arsizes[ i ] = ind + 1; return FL_TRUE; } if ( anumb == MAXARNAME ) return FL_FALSE; arnames[ anumb ] = malloc( MAX_VAR_LEN ); strcpy( arnames[ anumb ], tmpstr); arsizes[ anumb++ ] = ind + 1; return FL_TRUE; } /*************************************** ***************************************/ static int arethere_array_names( void ) { return anumb > 0; } /*************************************** * Prints the array names of the file. ***************************************/ static void print_array_names( FILE * fn, int newf ) { size_t i; for ( i = 0; i < anumb; i++ ) { if ( ! newf ) { fprintf( fn, " *%s[ %lu ]", arnames[ i ], arsizes[ i ] ); if ( i < anumb - 1 ) fprintf( fn, ",\n" ); } else fprintf( fn, " FL_OBJECT * %s[ %lu ];\n", arnames[ i ], arsizes[ i ] ); } } /*----------------------- Printing the C-code --------------------*/ /*************************************** * Prints the form description in C-code. Note that no matter what * the internal coordinate system is, externally we always have * positive y pointing upward from the lower-left corner of the * screen ***************************************/ const char * get_fd_name( const char * form_name ) { static char fdtname[ MAX_VAR_LEN ]; sprintf( fdtname, "FD_%s", form_name ); return fdtname; } /*************************************** ***************************************/ double get_conversion_factor( void ) { double sc = 1.0; if ( fdopt.unit == FL_COORD_POINT ) sc = 72.00 / fli_dpi; else if ( fdopt.unit == FL_COORD_MM ) sc = 25.40 / fli_dpi; else if ( fdopt.unit == FL_COORD_centiPOINT ) sc = 7200.00 / fli_dpi; else if ( fdopt.unit == FL_COORD_centiMM ) sc = 2540.00 / fli_dpi; return sc; } /*************************************** * unit indicates what kind of output is desired. ***************************************/ int convert_u( FL_Coord l ) { FL_Coord len = l, t = 0; fli_scale_length( &t, &len, get_conversion_factor( ) ); return len; } /* * emit fl_set_xxxx_shortcut instead of fl_set_object_shortcut */ static VN_pair scclass[ ] = { { FL_BUTTON, "button", 0, 0 }, { FL_LIGHTBUTTON, "button", 0, 0 }, { FL_ROUNDBUTTON, "button", 0, 0 }, { FL_CHECKBUTTON, "button", 0, 0 }, { FL_BITMAPBUTTON, "button", 0, 0 }, { FL_PIXMAPBUTTON, "button", 0, 0 }, { FL_INPUT, "input", 0, 0 }, { -1, NULL, 0, 0 } /* sentinel */ }; /*************************************** ***************************************/ static const char * supported_shortcut( int objclass ) { VN_pair *vn = scclass; for ( ; vn->val >= 0; vn++ ) if ( vn->val == objclass ) return vn->name; return "object"; } /*************************************** ***************************************/ static unsigned int check_resize( unsigned int what, int nw, int se ) { if ( what & FL_RESIZE_X && ( nw == FL_NorthWest || nw == FL_West || nw == FL_SouthWest ) && ( se == FL_NorthWest || se == FL_West || se == FL_SouthWest ) ) what &= ~ FL_RESIZE_X; else if ( ! ( what & FL_RESIZE_X ) && ( nw == FL_NorthWest || nw == FL_West || nw == FL_SouthWest ) && ( se == FL_NorthEast || se == FL_East || se == FL_SouthEast ) ) what |= ~ FL_RESIZE_X; if ( what & FL_RESIZE_Y && ( nw == FL_NorthWest || nw == FL_North || nw == FL_NorthEast ) && ( se == FL_NorthWest || se == FL_North || se == FL_NorthEast ) ) what &= ~ FL_RESIZE_Y; else if ( ! ( what & FL_RESIZE_Y ) && ( nw == FL_NorthWest || nw == FL_North || nw == FL_NorthEast ) && ( se == FL_SouthWest || se == FL_South || se == FL_SouthEast ) ) what |= ~ FL_RESIZE_Y; return what; } /*************************************** * Generate the C file for the forms we've defined. Header is generated * elsewhere. All default attributes are omitted. ***************************************/ static void print_form_newformat( FILE * fn, FL_FORM * form, const char * fname ) { FL_OBJECT *obj; char fdtname[ MAX_VAR_LEN ], fdvname[ MAX_VAR_LEN ]; strcpy( fdtname, get_fd_name( fname ) ); strcpy( fdvname, "fdui" ); /* Check if object specific stuff wants to write anything */ for ( obj = form->first; obj; obj = obj->next ) emit_objclass_spec_header( fn, obj ); fprintf( fn, "\n\n/***************************************\n" " ***************************************/\n\n" ); fprintf( fn, "%s *\ncreate_form_%s( void )\n{\n FL_OBJECT *obj;\n", fdtname, fname ); fprintf( fn, " %s *%s = fl_malloc( sizeof *%s );\n\n", fdtname, fdvname, fdvname ); /* Take care of unit, borderwidth etc that affect the entire form */ pre_form_output( fn ); fprintf( fn, " %s->vdata = %s->cdata = NULL;\n" " %s->ldata = 0;\n\n", fdvname, fdvname, fdvname ); fprintf( fn, " %s->%s = fl_bgn_form( FL_NO_BOX, %d, %d );\n", fdvname, fname, convert_u(form->w), convert_u(form->h)); /* Don't output the first object, it's an unnecessary box */ for ( obj = form->first->next; obj; obj = obj->next ) output_object( fn, obj, 0 ); fprintf( fn, "\n fl_end_form( );\n\n"); if ( fdopt.compensate ) fprintf(fn, " fl_adjust_form_size( %s->%s );\n", fdvname, fname ); fprintf( fn, " %s->%s->%s = %s;\n", fdvname, fname, fdvname, fdvname ); /* Restore */ post_form_output( fn ); fprintf( fn, "\n return %s;\n}\n", fdvname ); } /*************************************** * Output C files for the forms defined, but slightly different from * the earlier routines. Activated by -altformat on the command line ***************************************/ static void print_form_altformat( FILE * fn, FL_FORM * form, const char * fname ) { FL_OBJECT *obj; char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; int first = 1; /* Print the form declaration */ fprintf( fn, "FL_FORM *%s;\n\n", fname ); /* Print the object declarations */ init_array_names( ); obj = form->first; while ( ( obj = obj->next ) != NULL ) { get_object_name( obj, name, cbname, argname ); if ( *name ) { if ( ! check_array_name( name ) ) { fprintf( fn, first ? "FL_OBJECT\n" : ",\n" ); first = 0; fprintf( fn, " *%s", name ); } } } if ( arethere_array_names( ) ) { fprintf( fn, first ? "FL_OBJECT\n" : ",\n"); first = 0; print_array_names( fn, 0 ); } fprintf( fn, first ? "\n" : ";\n\n" ); /* Check if object specific stuff wants to write anything */ for ( obj = form->first; obj; obj = obj->next ) emit_objclass_spec_header( fn, obj ); /* Print the defining procedure */ fprintf( fn, "\n\n/***************************************\n" " ***************************************/\n\n" ); fprintf( fn, "void\ncreate_form_%s( void )\n{\n FL_OBJECT *obj;\n", fname ); pre_form_output( fn ); fprintf( fn, " if ( %s )\n" " return;\n\n", fname ); fprintf( fn, " %s = fl_bgn_form( FL_NO_BOX, %d, %d );\n", fname, convert_u( form->w ), convert_u( form->h ) ); for ( obj = form->first; obj; obj = obj->next ) output_object( fn, obj, 1 ); fprintf( fn, " fl_end_form( );\n" ); if ( fdopt.compensate ) fprintf( fn, " fl_adjust_form_size( %s );\n", fname ); post_form_output( fn ); fprintf( fn, "\n}\n\n\n/*---------------------------------------*/\n\n" ); } /*************************************** * This is the routine called the output rotuine in fd_forms.c ***************************************/ void print_form( FILE * fn, FL_FORM * form, const char * fname ) { ( ! fdopt.altformat ? print_form_newformat : print_form_altformat ) ( fn, form, fname ); } /*************************************** * Check if a callback stub has already been emitted so we can suppress * duplicates as callbacks can be bound to multiple objects. * Potential problems: this check is only for a particular form, * if a callback is bound to multiple objects across many forms, * the callback will be output at least once per form. ***************************************/ static int already_emitted( FL_OBJECT * first, FL_OBJECT * curobj, const char * cb ) { char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; FL_OBJECT *ob = first; for ( ob = first->next; ob && ob != curobj; ob = ob->next ) { get_object_name( ob, name, cbname, argname ); if ( *cbname && strcmp( cbname, cb ) == 0 ) return 1; } return 0; } #define MAXFREEOBJ 16 /*************************************** ***************************************/ static char * get_free_handle( FL_OBJECT * ob, const char * name ) { static int n; static char buf[ 1024 ]; static FL_OBJECT *freeobj[ MAXFREEOBJ ]; int i, k; if ( ob->c_vdata ) strcpy( buf, ob->c_vdata ); else if ( *name ) sprintf( buf, "freeobj_%s_handle", name ); else if ( *ob->label ) sprintf( buf, "freeobj_%s_handle", ob->label ); else { for ( k = -1, i = 0; i < MAXFREEOBJ && k < 0; i++ ) if ( freeobj[ i ] == ob ) k = i; if ( k < 0 ) { k = ++n; freeobj[ k ] = ob; } sprintf( buf, "freeobj%d_handle", k ); } return buf; } /*************************************** * Prints the callback routines used in form ***************************************/ void print_callbacks_and_globals( FILE * fn, FL_FORM * form, int code ) { FL_OBJECT *obj; char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; obj = form->first; while ( ( obj = obj->next ) != NULL ) { get_object_name( obj, name, cbname, argname ); if ( obj->objclass == FL_FREE ) { if ( ! code ) { fprintf( fn, "extern int %s( FL_OBJECT *, int, FL_Coord, " "FL_Coord, int, void * );\n", get_free_handle( obj, name ) ); } else { fprintf( fn, "/***************************************\n" " ***************************************/\n\n" ); fprintf( fn, "int %s( FL_OBJECT * ob,\n" " int ev,\n" " FL_Coord mx,\n" " FL_Coord my,\n" " int key,\n" " void * xev )\n" "{\n" " /* Free object handler code */\n\n" " return 0;\n" "}\n\n\n", get_free_handle( obj, name ) ); } } if ( *cbname && ! strstr( cbname, "::" ) && ! already_emitted( form->first, obj, cbname ) ) { if ( ! code ) fprintf( fn, "extern void %s( FL_OBJECT *, long );\n", cbname ); else fprintf( fn, "/***************************************\n" " ***************************************/\n\n" "void %s( FL_OBJECT * ob,\n" " long data )\n" "{\n" " /* Fill-in code for callback here */\n" "}\n\n\n", cbname ); } if ( obj->objclass == FL_MENU ) emit_menu_item_callback_headers( fn, obj, code ); if ( ! code ) emit_objclass_spec_global( fn, obj ); } fprintf( fn, "\n" ); } /*************************************** * Output header file that contains the form definition. ***************************************/ static void print_header_newformat( FILE * fn, FL_FORM * form, const char * fname) { FL_OBJECT *obj; char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ], fdtname[ MAX_VAR_LEN ]; sprintf( fdtname, "FD_%s", fname ); fprintf( fn, "typedef struct {\n" " FL_FORM * %s;\n", fname ); fprintf( fn, " void * vdata;\n" " char * cdata;\n" " long ldata;\n"); init_array_names( ); for ( obj = form->first; obj; obj = obj->next ) { get_object_name( obj, name, cbname, argname ); if ( *name && ! check_array_name( name ) ) fprintf( fn, " FL_OBJECT * %s;\n", name ); } if ( arethere_array_names( ) ) print_array_names( fn, 1 ); fprintf( fn, "} %s;\n", fdtname ); fprintf( fn, "\nextern %s * create_form_%s( void );\n", fdtname, fname ); } /*************************************** * Prints the object declarations used in form ***************************************/ static void print_header_altformat( FILE * fn, FL_FORM * form, const char * fname) { FL_OBJECT *obj; char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; int first = 1; fprintf( fn, "extern FL_FORM *%s;\n\n", fname ); init_array_names( ); obj = form->first; while ( ( obj = obj->next ) != NULL ) { get_object_name( obj, name, cbname, argname ); if ( *name ) { if ( ! check_array_name( name ) ) { fprintf( fn, first ? "extern FL_OBJECT\n" : ",\n" ); first = 0; fprintf( fn, " *%s", name ); } } } if ( arethere_array_names( ) ) { fprintf( fn, first ? "extern FL_OBJECT\n" : ",\n" ); first = 0; print_array_names( fn, 0 ); } if ( ! first ) fprintf( fn, ";\n\n" ); } /*************************************** ***************************************/ void print_header( FILE * fn, FL_FORM * form, const char * fname ) { ( ! fdopt.altformat ? print_header_newformat : print_header_altformat ) ( fn, form, fname ); } /* * All callback stubs */ /*************************************** ***************************************/ void output_callbacks( FILE * fn, FRM * fdform, int nform ) { int i; for ( i = 0; i < nform; i++ ) { fprintf( fn, "/* Callbacks and freeobj handles for form %s */\n\n", fdform[ i ].fname ); print_callbacks_and_globals( fn, fdform[i].form, 1 ); fprintf( fn, "\n" ); } } /*************************************** ***************************************/ const char * get_placement( FL_FORM * form ) { if ( ! form->first ) return "FL_PLACE_CENTER"; else if ( ! form->first->next ) return "FL_PLACE_CENTER"; else if ( form->first->next->resize ) return "FL_PLACE_CENTERFREE"; return "FL_PLACE_CENTER"; } /* * A Main stub. */ /*************************************** ***************************************/ static void output_main_newformat( FILE * fn, FRM * fdform, int nform ) { char fdtname[ MAX_VAR_LEN ]; char * fname; int i; /* Only output callback stubs if not already output */ if ( ! fdopt.emit_cb ) output_callbacks( fn, fdform, nform ); fprintf( fn, "int\nmain( int argc,\n char * argv[ ] )\n{\n" ); for ( i = 0; i < nform; i++ ) { fname = fdform[ i ].fname; sprintf( fdtname, "FD_%s", fname ); fprintf( fn, " %s *fd_%s;\n", fdtname, fname ); } fprintf(fn, "\n"); fprintf( fn, " fl_initialize( &argc, argv, 0, 0, 0 );\n" ); for ( i = 0; i < nform; i++ ) { fname = fdform[ i ].fname; fprintf( fn, " fd_%s = create_form_%s( );\n", fname, fname ); } fprintf( fn, "\n /* Fill-in form initialization code */\n\n" ); fprintf( fn, " /* Show the first form */\n\n" ); fprintf( fn, " fl_show_form( fd_%s->%s, %s, FL_FULLBORDER, " "\"%s\" );\n\n", fdform[ 0 ].fname, fdform[ 0 ].fname, get_placement( fdform[ 0 ].form), fdform[ 0 ].fname ); fprintf( fn, " fl_do_forms( );\n\n" ); for ( i = 0; i < nform; i++ ) fprintf( fn, " if ( fl_form_is_visible( fd_%s->%s ) )\n" " fl_hide_form( fd_%s->%s );\n" " fl_free( fd_%s );\n", fdform[ i ].fname, fdform[ i ].fname, fdform[ i ].fname, fdform[ i ].fname, fdform[ i ].fname ); fprintf( fn, " fl_finish( );\n\n" " return 0;\n" "}\n" ); } /*************************************** ***************************************/ static void output_main_altformat( FILE * fn, FRM * fdform, int nform ) { /* Only output callback stubs if not already output */ if ( ! fdopt.emit_cb ) output_callbacks( fn, fdform, nform ); fprintf( fn, "int\nmain( int argc,\n char * argv[ ] )\n{\n" ); fprintf( fn, " fl_initialize( &argc, argv, 0, 0, 0 );\n\n" ); fprintf( fn, "\n %s( );\n\n", main_name ); fprintf( fn, "\n /* Fill-in form initialization code */\n\n" ); fprintf( fn, " /* Show the first form */\n\n" ); fprintf( fn, " fl_show_form( %s, FL_PLACE_CENTER, FL_FULLBORDER, " "\"%s\" );\n", fdform[ 0 ].fname, fdform[ 0 ].fname); fprintf( fn, " fl_do_forms( );\n\n return 0;\n}\n" ); } /*************************************** ***************************************/ void output_main( FILE * fn, FRM * fdform, int nform ) { ( fdopt.altformat ? output_main_altformat : output_main_newformat ) ( fn, fdform, nform ); } /*************************************** * set some defaults, unit/bw etc. ***************************************/ static void pre_form_output( FILE * fn ) { /* Some global defaults */ if ( fdopt.unit != FL_COORD_PIXEL ) fprintf( fn, " int old_unit = fl_get_coordunit( );\n" ); if ( fd_bwidth != FL_BOUND_WIDTH && fd_bwidth != 0 ) fprintf( fn, " int old_bw = fl_get_border_width( );\n" ); if ( fdopt.unit != FL_COORD_PIXEL ) fprintf( fn, " fl_set_coordunit( %s );\n", unit_name( fdopt.unit ) ); if ( fd_bwidth != FL_BOUND_WIDTH && fd_bwidth != 0 ) fprintf( fn, " fl_set_border_width( %d );\n", fd_bwidth ); if ( fdopt.unit != FL_COORD_PIXEL || ( fd_bwidth != FL_BOUND_WIDTH && fd_bwidth != 0 ) || ( fd_bwidth != FL_BOUND_WIDTH && fd_bwidth != 0 ) ) fprintf( fn, "\n" ); } /*************************************** ***************************************/ static void post_form_output( FILE * fn ) { if ( fdopt.unit != FL_COORD_PIXEL ) fprintf( fn, " fl_set_coordunit( old_unit );\n" ); if ( fd_bwidth != FL_BOUND_WIDTH && fd_bwidth ) fprintf( fn, " fl_set_border_width( old_bw );\n" ); } /*************************************** ***************************************/ static void output_object( FILE * fn, FL_OBJECT * obj, int altfmt ) { FL_OBJECT *defobj, fakeobj; char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; char * p, fdvname[ MAX_VAR_LEN ]; char *label; double sc = get_conversion_factor( ); if ( obj->parent ) return; strcpy( fdvname, "fdui" ); get_object_name( obj, name, cbname, argname ); if ( obj->objclass == FL_BEGIN_GROUP ) { if ( *name ) { if ( ! altfmt ) fprintf( fn, "\n %s->%s =", fdvname, name ); else fprintf( fn, "\n %s =", name ); } fprintf( fn, " fl_bgn_group( );\n" ); } else if ( obj->objclass == FL_END_GROUP ) fprintf( fn, " fl_end_group( );\n\n"); else { defobj = find_class_default( obj->objclass, obj->type ); if ( ! defobj ) { M_err( "output_object", "Failed to create default (class = %s, type = %s)", find_class_name( obj->objclass ), find_type_name( obj->objclass, obj->type ) ); exit( 1 ); } fprintf( fn, "\n " ); if ( *name ) { if ( ! altfmt ) fprintf( fn, "%s->%s = ", fdvname, name ); else fprintf( fn, "%s = ", name ); } fprintf( fn, "obj = " ); fprintf( fn, "fl_add_%s( ", find_class_name( obj->objclass ) ); fprintf( fn, "FL_%s,", find_type_name( obj->objclass, obj->type ) ); fakeobj.x = obj->x; fakeobj.y = obj->y; fakeobj.w = obj->w; fakeobj.h = obj->h; fl_scale_object( &fakeobj, sc, sc ); label = get_label( obj, 1 ); if ( obj->objclass != FL_FREE ) fprintf( fn, " %d, %d, %d, %d, \"%s\" );\n", fakeobj.x, fakeobj.y, fakeobj.w, fakeobj.h, label ); else fprintf( fn, "% d, %d, %d, %d, \"%s\",\n\t\t\t%s );\n", fakeobj.x, fakeobj.y, fakeobj.w, fakeobj.h, label, get_free_handle( obj, name ) ); fl_free( label ); if ( ( p = get_shortcut_string( obj ) ) && *p && obj->type != FL_RETURN_BUTTON ) fprintf( fn, " fl_set_%s_shortcut( obj, \"%s\", 1 );\n", supported_shortcut( obj->objclass ), get_shortcut_string( obj ) ); if ( obj->boxtype != defobj->boxtype && obj->objclass != FL_BOX ) { if ( obj->objclass != FL_CANVAS && obj->objclass != FL_FRAME ) emit_attrib( fn, obj->boxtype, vn_btype, "fl_set_object_boxtype" ); } if ( obj->col1 != defobj->col1 || obj->col2 != defobj->col2 ) { if ( obj->objclass != FL_CANVAS ) fprintf( fn, " fl_set_object_color( obj, %s, %s );\n", fli_query_colorname( obj->col1 ), fli_query_colorname( obj->col2 ) ); } if ( obj->lcol != defobj->lcol ) fprintf( fn, " fl_set_object_lcolor( obj, %s );\n", fli_query_colorname( obj->lcol ) ); if ( obj->lsize != defobj->lsize ) emit_attrib( fn, obj->lsize, vn_lsize, "fl_set_object_lsize" ); if ( obj->align != defobj->align ) emit_attrib( fn, obj->align, vn_align, "fl_set_object_lalign" ); if ( obj->lstyle != defobj->lstyle ) fprintf( fn, " fl_set_object_lstyle( obj, %s );\n", style_name( obj->lstyle ) ); /* 'resize' must be checked for consistency with the gravity settings */ obj->resize = check_resize( obj->resize, obj->nwgravity, obj->segravity ); if ( obj->resize != defobj->resize ) fprintf( fn, " fl_set_object_resize( obj, %s );\n", resize_name( obj->resize ) ); if ( obj->nwgravity != defobj->nwgravity || obj->segravity != defobj->segravity) fprintf( fn, " fl_set_object_gravity( obj, %s, %s );\n", gravity_name( obj->nwgravity ), gravity_name( obj->segravity ) ); if ( *cbname ) fprintf( fn, " fl_set_object_callback( obj, %s, %s );\n", cbname, argname ); if ( obj->how_return != defobj->how_return ) fprintf( fn, " fl_set_object_return( obj, %s );\n", get_how_return_name( obj->how_return, 1 ) ); } /* Generate object class specifc settings */ emit_objclass_spec_info( fn, obj ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_attribs.c0000644000175000017500000007126411375530003016141 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_attribs.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * It contains some routines to deal with attributes of the objects. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "include/forms.h" #include "fd_main.h" #include "private/flsnprintf.h" /****************** FORMS AND CALL-BACKS ************************/ int auto_apply = 1; static void readback_attributes( FL_OBJECT * ); /*************************************** * Callback routine to get a color from the user ***************************************/ void setcolor_cb( FL_OBJECT * obj, long arg FL_UNUSED_ARG ) { int col1 = fl_show_colormap( obj->col1 ); fl_set_object_color( obj, col1, col1 ); auto_apply_cb( obj, 0 ); } /*************************************** * If we're to change attributes automatically ***************************************/ void auto_apply_cb( FL_OBJECT * ob, long arg ) { if ( auto_apply ) apply_cb( ob, arg ); } /*************************************** * The auto-apply setting itself ***************************************/ void autoapply_setting_cb( FL_OBJECT * ob, long arg FL_UNUSED_ARG ) { if ( ! ( auto_apply = fl_get_button( ob ) ) ) fl_show_object( fd_attrib->applyobj ); else fl_hide_object( fd_attrib->applyobj ); } /******* For cancel and restore operation *******{*/ static FL_OBJECT *oldcopy, /* object being changed */ *curobj; static char oldname[ MAX_VAR_LEN ]; static char oldcbname[ MAX_VAR_LEN ], oldargname[ MAX_VAR_LEN ]; /*************************************** ***************************************/ static void save_object( FL_OBJECT * obj ) { char *ol; long *os; FL_OBJECT *tmp; get_object_name( obj, oldname, oldcbname, oldargname ); if ( ! oldcopy ) oldcopy = fl_make_object( 0, 0, 0, 0, 0, 0, NULL, NULL ); ol = oldcopy->label; os = oldcopy->shortcut; *oldcopy = *obj; oldcopy->label = ol; oldcopy->shortcut = os; fl_set_object_label( oldcopy, obj->label ); for ( tmp = obj->child; tmp; tmp = tmp->nc ) tmp->parent = obj; } /*************************************** * Duplicate everything in oldobj to obj ***************************************/ static void restore_object( FL_OBJECT * obj ) { char *ol = obj->label; long *os = obj->shortcut; FL_OBJECT *tmp; void *spec; FL_OBJECT *child, *prev, *next; if ( obj->type != oldcopy->type ) change_type( obj, oldcopy->type ); child = obj->child; prev = obj->prev; next = obj->next; spec = obj->spec; set_object_name( obj, oldname, oldcbname, oldargname ); *obj = *oldcopy; obj->child = child; for ( tmp = child; tmp; tmp = tmp->nc ) tmp->parent = obj; obj->spec = spec; obj->prev = prev; obj->next = next; obj->label = ol; obj->shortcut = os; fl_set_object_label( obj, oldcopy->label ); fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); } /********** End of cancel/restore ********}***/ /*************************************** * Really change object attributes ***************************************/ void apply_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { readback_attributes( curobj ); change_selected_objects( curobj ); redraw_the_form( 0 ); } /*************************************** * Restore from the original copy ***************************************/ void restore_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { restore_object( curobj ); show_attributes( curobj ); change_selected_objects( curobj ); redraw_the_form( 0 ); } /****************** GLOBAL INITIALIZATION ************************/ static FL_OBJECT *fnts; /*************************************** ***************************************/ static void add_font_choice( const char * p ) { fl_addto_choice( fnts, p ); } /* Font sizes. Need to do this because of symbolic names */ typedef struct { int size; char * name, * sc; } Fsizes; static Fsizes fsizes[ ] = { { FL_TINY_SIZE, "Tiny", "Tt#t" }, { FL_SMALL_SIZE, "Small", "Ss#s" }, { FL_NORMAL_SIZE, "Normal", "Nn#n" }, { FL_MEDIUM_SIZE, "Medium", "Mm#m" }, { FL_LARGE_SIZE, "Large", "Ll#l" }, { FL_HUGE_SIZE, "Huge", "Hh#h" }, { 11, "Variable", "" } }; #define NFSIZE ( sizeof fsizes / sizeof *fsizes ) /*************************************** ***************************************/ static void attrib_init( FD_generic_attrib * ui ) { static int attrib_initialized; int i; char buf[ 64 ]; VN_pair *vp; if ( attrib_initialized ) return; attrib_initialized = 1; fl_clear_choice( ui->boxobj ); for ( i = 1, vp = vn_btype; vp->val >= 0; vp++, i++ ) { fl_addto_choice( ui->boxobj, vp->shown ); fl_set_choice_item_shortcut( ui->boxobj, i, vp->hotkey ); } fl_set_object_return( ui->nameobj, FL_RETURN_END ); fl_set_object_return( ui->cbnameobj, FL_RETURN_END ); /* resize */ fl_set_choice_fontsize( ui->resize, fd_align_fontsize ); for ( vp = vn_resize; vp->val >= 0; vp++ ) fl_addto_choice( ui->resize, vp->name + 3 ); /* gravity. Due to compatibilities issues, there are more than need in vn_gravity */ for ( i = 0, vp = vn_gravity; vp->val >= 0 && i < 9; vp++, i++ ) { fl_addto_choice( ui->nwgravity, vp->name + 3 ); fl_addto_choice( ui->segravity, vp->name + 3 ); } /* align (only show the first 9 elements of 'vn_align' the rest is in there only for backward compatibility reasons when reading in a file) */ fl_set_choice_fontsize( ui->align, fd_align_fontsize ); for ( vp = vn_align, i = 0; vp->val >= 0 && i < 9; vp++, i++ ) fl_addto_choice( ui->align, vp->name + 9 ); fl_addto_choice( ui->inside, "Inside|Outside" ); /* font stuff */ fnts = ui->fontobj; fl_enumerate_fonts( add_font_choice, 1 ); fl_addto_choice( ui->styleobj, "Normal|Shadow|Engraved|Embossed" ); /* size */ for ( i = 0; i < ( int ) NFSIZE; i++ ) { if ( fsizes[ i ].size == FL_NORMAL_SIZE ) { fsizes[ i ].name = "Normal"; fsizes[ i ].sc = "Nn#n"; } sprintf( buf, "%2d %s%%r1", fsizes[ i ].size, fsizes[ i ].name ); fl_addto_choice( ui->sizeobj, buf ); fl_set_choice_item_shortcut( ui->sizeobj, i + 1, fsizes[ i ].sc ); } } /* Check for obvious errors */ #define OK_letter( c ) ( *c == '_' \ || *c == '[' \ || *c == ']' \ || * c== '.' \ || ( *c == ':' && *++c == ':' ) \ || ( *c == '-' && *++c == '>' ) ) /*************************************** ***************************************/ static int valid_c_identifier( const char * s ) { if ( fdopt.lax ) return 1; /* Empty is considered to be valid */ if ( ! s || ! *s || ( *s == ' ' && *( s + 1 ) == '\0' ) ) return 1; if ( ! isalpha( ( int ) *s ) && *s != '_' ) return 0; for ( s++; *s; s++ ) if ( ! isalnum( ( int ) *s ) && ! OK_letter( s ) ) return 0; return 1; } /*************************************** ***************************************/ static int validate_cvar_name( FL_OBJECT * obj, const char * w ) { const char *s = fl_get_input( obj ); if ( ! valid_c_identifier( s ) ) { char *m; if ( ! w || ! *w ) m = fl_strdup( "Invalid C identifier:" ); else m = fli_print_to_string( "Invalid C identifier specified for %s:", w ); fl_show_alert( "Error", m, s, 0 ); fl_free( m ); fl_set_focus_object( obj->form, obj ); return 0; } return 1; } /*************************************** ***************************************/ static int validate_attributes( void ) { return validate_cvar_name( fd_generic_attrib->nameobj, "object name" ) && validate_cvar_name( fd_generic_attrib->cbnameobj, "callback" ); } /*************************************** ***************************************/ void validate_cvar_name_cb( FL_OBJECT * obj, long data ) { validate_cvar_name( obj, data == 0 ? "object name" : "callback" ); } /********************* THE ACTUAL ROUTINES ****************************/ /*************************************** ***************************************/ static void readback_attributes( FL_OBJECT * obj ) { int spstyle; char name[ 128], cbname[ 128 ]; char tmpbuf[ 128 ]; obj->boxtype = fl_get_choice( fd_generic_attrib->boxobj ) - 1; /* Label style consists of two parts */ obj->lstyle = fl_get_choice( fd_generic_attrib->fontobj ) - 1; spstyle = fl_get_choice( fd_generic_attrib->styleobj ) - 1; obj->lstyle += spstyle == 3 ? FL_EMBOSSED_STYLE : ( spstyle * FL_SHADOW_STYLE ); obj->col1 = fd_generic_attrib->col1obj->col1; obj->col2 = fd_generic_attrib->col2obj->col1; obj->lcol = fd_generic_attrib->lcolobj->col1; fl_snprintf( tmpbuf, sizeof tmpbuf, "FL_ALIGN_%s", fl_get_choice_text( fd_generic_attrib->align ) ); obj->align = align_val( tmpbuf ); if ( fl_get_choice( fd_generic_attrib->inside ) == 1 && obj->align != FL_ALIGN_CENTER ) obj->align |= FL_ALIGN_INSIDE; else obj->align &= ~FL_ALIGN_INSIDE; fl_snprintf( tmpbuf, sizeof tmpbuf, "FL_%s", fl_get_choice_text( fd_generic_attrib->resize ) ); obj->resize = resize_val( tmpbuf ); fl_snprintf( tmpbuf, sizeof tmpbuf, "FL_%s", fl_get_choice_text( fd_generic_attrib->segravity ) ); obj->segravity = gravity_val( tmpbuf ); fl_snprintf( tmpbuf, sizeof tmpbuf, "FL_%s", fl_get_choice_text( fd_generic_attrib->nwgravity ) ); obj->nwgravity = gravity_val( tmpbuf ); obj->lsize = fsizes[ fl_get_choice( fd_generic_attrib->sizeobj ) - 1 ].size; set_label( obj, fl_get_input( fd_generic_attrib->labelobj ) ); set_shortcut( obj, fl_get_input( fd_generic_attrib->scobj ) ); fli_sstrcpy( name, fl_get_input( fd_generic_attrib->nameobj ), sizeof name ); fli_sstrcpy( cbname, fl_get_input( fd_generic_attrib->cbnameobj ), sizeof cbname ); if ( ! valid_c_identifier( name ) ) *name = '\0'; if ( ! valid_c_identifier( cbname ) ) *cbname = '\0'; set_object_name( obj, name, cbname, fl_get_input( fd_generic_attrib->argobj ) ); /* Change type need to be the last call as it may create objects based on the current object, which need to have the latest attributes */ if ( obj->objclass == FL_BOX ) change_type( obj, obj->boxtype ); else change_type( obj, fl_get_choice( fd_generic_attrib->typeobj ) - 1 ); } /*************************************** ***************************************/ void show_attributes( const FL_OBJECT * obj ) { char objname[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; char buf[ MAX_VAR_LEN ]; char *label; int i, lstyle, spstyle, oksize, align = obj->align & ~FL_ALIGN_INSIDE; static char othersize[ 32 ]; fl_freeze_form( fd_generic_attrib->generic_attrib ); /* Fill in list of types */ fl_clear_choice( fd_generic_attrib->typeobj ); fl_set_choice_fontsize( fd_generic_attrib->typeobj, fd_type_fontsize ); if ( obj->objclass != FL_BOX ) { for ( i = 0; i < find_class_maxtype( obj->objclass ); i++ ) { strcat( strcpy( buf, find_type_name( obj->objclass, i ) ), "%r1" ); fl_addto_choice( fd_generic_attrib->typeobj, buf ); } fl_set_choice( fd_generic_attrib->typeobj, obj->type + 1 ); } /* Fill in settings */ fl_set_choice( fd_generic_attrib->boxobj, obj->boxtype + 1 ); fl_set_choice_text( fd_generic_attrib->align, align_name( align, 0 ) + 9 ); fl_set_choice( fd_generic_attrib->inside, ( obj->align == align ) + 1 ); lstyle = obj->lstyle % FL_SHADOW_STYLE; spstyle = obj->lstyle / FL_SHADOW_STYLE; if ( spstyle >= 3 ) spstyle = 3; fl_set_choice( fd_generic_attrib->fontobj, lstyle + 1 ); fl_set_choice( fd_generic_attrib->styleobj, spstyle + 1 ); for ( oksize = i = 0; !oksize && i < ( int ) NFSIZE; i++ ) if ( ( oksize = obj->lsize == fsizes[ i ].size )) fl_set_choice( fd_generic_attrib->sizeobj, i + 1 ); if ( ! oksize ) { sprintf( othersize, "%d (Variable)", obj->lsize ); fsizes[ NFSIZE - 1 ].size = obj->lsize; fsizes[ NFSIZE - 1 ].name = othersize; fl_replace_choice( fd_generic_attrib->sizeobj, NFSIZE, othersize ); fl_set_choice( fd_generic_attrib->sizeobj, NFSIZE ); } /* gravity stuff */ fl_set_choice_text( fd_generic_attrib->resize, resize_name( obj->resize ) + 3 ); fl_set_choice_text( fd_generic_attrib->nwgravity, gravity_name( obj->nwgravity ) + 3 ); fl_set_choice_text( fd_generic_attrib->segravity, gravity_name( obj->segravity ) + 3 ); get_object_name( obj, objname, cbname, argname ); label = get_label( obj, 0 ); fl_set_input( fd_generic_attrib->labelobj, label ); fl_free( label ); fl_set_input( fd_generic_attrib->nameobj, objname ); fl_set_input( fd_generic_attrib->cbnameobj, cbname ); fl_set_input( fd_generic_attrib->argobj, argname ); fl_set_input(fd_generic_attrib->scobj, get_shortcut_string( obj ) ); fl_set_object_color( fd_generic_attrib->col1obj, obj->col1, obj->col1 ); fl_set_object_color( fd_generic_attrib->col2obj, obj->col2, obj->col2 ); fl_set_object_color( fd_generic_attrib->lcolobj, obj->lcol, obj->lcol ); fl_unfreeze_form( fd_generic_attrib->generic_attrib ); } /*************************************** * Displays the form to change the attributes. 'all' indicates * whether all label, name, etc. should also be changed ***************************************/ int change_object( FL_OBJECT * obj, int all ) { FL_OBJECT *retobj; FD_generic_attrib *ui = fd_generic_attrib; attrib_init( fd_generic_attrib ); /* Save current attributes for later restore */ curobj = obj; save_object( obj ); /* Show only required parts */ if ( all ) { fl_show_object( ui->labelobj ); fl_show_object( ui->scobj ); fl_show_object( ui->nameobj ); fl_show_object( ui->cbnameobj ); fl_show_object( ui->argobj ); } else { fl_hide_object( ui->labelobj ); fl_hide_object( ui->scobj ); fl_hide_object( ui->nameobj ); fl_hide_object( ui->cbnameobj ); fl_hide_object( ui->argobj ); } /* Show attributes of the current object */ show_attributes( obj ); /* Do interaction */ fl_deactivate_all_forms( ); /* Disable selection */ no_selection = 1; /* Always come up with Generic */ fl_set_folder_bynumber( fd_attrib->attrib_folder, 1 ); if ( fd_attrib->attrib->y < 55 ) fd_attrib->attrib->y = 25; fl_show_form( fd_attrib->attrib, FL_PLACE_GEOMETRY, FL_FULLBORDER, "Attributes" ); fl_set_app_mainform( fd_attrib->attrib ); /* Both cancel and readyobj should have their own callbacks, so we don't need to call fl_do_forms(), but since attribute editing can't be invoked for more than once item at a time we need to block the proces_xevent. TODO */ do { XEvent xev; retobj = fl_do_forms( ); if ( retobj == FL_EVENT ) fl_XNextEvent( &xev ); } while ( ! ( ( retobj == fd_attrib->readyobj && validate_attributes( ) ) || retobj == fd_attrib->cancelobj ) ); fl_set_app_mainform( fd_control->control ); fl_hide_form( fd_attrib->attrib ); fl_activate_all_forms( ); no_selection = 0; if ( retobj == fd_attrib->cancelobj ) { restore_object( obj ); redraw_the_form( 0 ); return FL_FALSE; } else { readback_attributes( obj ); return FL_TRUE; } } /*************************************** * Sets the attributes of an object ***************************************/ void set_attribs( FL_OBJECT * obj, int boxtype, int col1, int col2, int lcol, int align, int lsize, int lstyle, const char * label ) { obj->boxtype = boxtype; obj->col1 = col1; obj->col2 = col2; obj->lcol = lcol; obj->align = align; obj->lsize = lsize; obj->lstyle = lstyle; fl_set_object_label( obj, label ); fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); /* Some extra adjustments for spinner objects (this is a hack but avoiding it would require a complete change of how fdesign works) */ if ( obj->objclass == FL_SPINNER ) { FL_OBJECT *subobj = fl_get_spinner_input( obj ); subobj->col1 = col1; subobj->col2 = col2; subobj->lstyle = lstyle; subobj->lsize = lsize; fli_handle_object( subobj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); } } /*************************************** * More attributes ***************************************/ void set_miscattribs( FL_OBJECT * obj, unsigned int nw, unsigned int se, unsigned int re ) { obj->nwgravity = nw; obj->segravity = se; obj->resize = re; } #define NL 10 /*************************************** * Sets the label, turning \n into NL ***************************************/ void set_label( FL_OBJECT * obj, const char * str ) { int i = 0, j = 0; char *tmpstr = fl_malloc( strlen( str ) + 1 ); *tmpstr = '\0'; do { if ( str[ i ] == '\\' && str[ i + 1 ] == 'n' ) { tmpstr[ j++ ] = NL; i++; } else if ( str[ i ] == '\\' && strncmp( str + i + 1, "010", 3 ) == 0 ) { if ( ! obj->shortcut || ! *obj->shortcut ) tmpstr[ j++ ] = *fl_ul_magic_char; i += 3; } else tmpstr[ j++ ] = str[ i ]; } while ( str[ i++ ] ); fl_set_object_label( obj, tmpstr ); fl_free( tmpstr ); } /*************************************** ***************************************/ void set_shortcut( FL_OBJECT * obj, const char * sc ) { if ( obj->type != FL_RETURN_BUTTON && obj->type != FL_HIDDEN_RET_BUTTON ) fl_set_object_shortcut(obj, sc, 1); } /* if \ preceeds c, \ does not need quote */ #define Ok( c ) ( c== '"' || c== '\\' || c == 't' || c == 'n' || isdigit( c ) ) /*************************************** * Decide if label need quotes ('\') ***************************************/ static int need_quote( const char * s, int i ) { int c = s[ i ], p, n; p = i ? s[ i - 1 ] : 0; /* prev char */ n = *s ? s[ i + 1 ] : 0; /* next char */ if ( c == '"' && p != '\\' ) return 1; else if ( c == '\\' && p != '\\' ) return ! isdigit( n ) && ! Ok( n ); else return 0; } /*************************************** * Read the label, turning NL into \n ***************************************/ char * get_label( const FL_OBJECT * obj, int c_source ) { int i = 0, j = 0; const char *label = obj->label; int len = strlen( label ); int tlen = len + 1; char *tmpstr = fl_malloc( tlen ); for ( i = 0; i < len; i++ ) { if ( label[ i ] == NL ) { tmpstr = fl_realloc( tmpstr, tlen += 1 ); tmpstr[ j++ ] = '\\'; tmpstr[ j++ ] = 'n'; } else if ( label[ i ] == *fl_ul_magic_char ) { if ( ! obj->shortcut || ! *obj->shortcut ) { tmpstr = fl_realloc( tmpstr, tlen += 3 ); tmpstr[ j++ ] = '\\'; tmpstr[ j++ ] = '0'; tmpstr[ j++ ] = '1'; tmpstr[ j++ ] = '0'; } } else if ( c_source && need_quote( label, i ) ) { tmpstr = fl_realloc( tmpstr, tlen += 1 ); tmpstr[ j++ ] = '\\'; tmpstr[ j++ ] = label[ i ]; } else tmpstr[ j++ ] = label[ i ]; } tmpstr[ j ] = '\0'; return tmpstr; } /*************************************** * Convert shortcut into string representation. * ESC -> ^[, F1 -> &1 etc. ***************************************/ static int special_key( int key, char * outbuf ) { char *start = outbuf; if ( key >= XK_F1 && key <= XK_F30 ) { int p = ( key - XK_F1 + 1 ) / 10, q = ( key - XK_F1 + 1 ) % 10; *outbuf++ = '&'; if ( p ) *outbuf++ = '0' + p; *outbuf++ = '0' + q; } else if ( IsUp( key ) ) { *outbuf++ = '&'; *outbuf++ = 'A'; } else if ( IsDown( key ) ) { *outbuf++ = '&'; *outbuf++ = 'B'; } else if ( IsRight( key ) ) { *outbuf++ = '&'; *outbuf++ = 'C'; } else if ( IsLeft( key ) ) { *outbuf++ = '&'; *outbuf++ = 'D'; } else *outbuf++ = key; *outbuf = '\0'; return outbuf - start; } /*************************************** ***************************************/ char * get_shortcut_string( const FL_OBJECT * obj ) { static char tmps[ 127 ]; char *p = tmps; long *sc = obj->shortcut; int n; for ( *p = '\0'; sc && *sc; sc++ ) { if ( *sc >= FL_ALT_MASK ) { *p++ = '#'; n = special_key( *sc - FL_ALT_MASK, p ); p += n; } else if ( *sc == '#' || *sc == '&' || *sc == '^' ) /* prefixed w/ ^ */ { *p++ = '^'; *p++ = *sc; } else if ( *sc < 30 ) { *p++ = '^'; if ( *sc <= 'Z' ) *p++ = 'A' + *sc - 1; else if ( *sc == 27 ) /* Escape */ *p++ = '['; } else if ( *sc > 255 ) { n = special_key( *sc, p ); p += n; } else *p++ = *sc; } *p = '\0'; return tmps; } /*************************************** * Makes a copy of the object. If 'exact' is set neither * shortcut nor object name are copied. ***************************************/ FL_OBJECT * copy_object( FL_OBJECT * obj, int exact ) { char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; FL_OBJECT *obj2; obj2 = add_an_object( obj->objclass, obj->type, obj->x, obj->y, obj->w, obj->h ); get_object_name( obj, name, cbname, argname ); set_object_name( obj2, exact ? name : "", cbname, argname ); set_attribs( obj2, obj->boxtype, obj->col1, obj->col2, obj->lcol, obj->align, obj->lsize, obj->lstyle, obj->label ); set_miscattribs( obj2, obj->nwgravity, obj->segravity, obj->resize ); /* Also copy the object specific info */ copy_superspec( obj2, obj ); fl_delete_object( obj2 ); return obj2; } /*************************************** * Changes the type of an object by reconstructing it. A quite nasty * procedure that delves into the form structure in a bad way. * And it looks a lot like a memory leak... ***************************************/ void change_type( FL_OBJECT * obj, int type ) { FL_OBJECT *ttt, *defobj, *prev; FL_FORM *form; int boxtype, is_focus; SuperSPEC *sp = obj->u_vdata; if ( obj->type == type ) return; /* Create a new object. */ ttt = add_an_object( obj->objclass, type, obj->x, obj->y, obj->w, obj->h ); /* Remove it from the form */ fl_delete_object( ttt ); /* Create a default object from which we can test if the user has changed boxtype and other attributes. This is done primarily to get around the type change problem with types having different default boxtype. Don't need to free the defobj as it is managed by find_class_default */ defobj = find_class_default( obj->objclass, obj->type ); if ( defobj->boxtype != obj->boxtype ) boxtype = obj->boxtype; else boxtype = ttt->boxtype; /* Set the attributes */ set_attribs( ttt, boxtype, obj->col1, obj->col2, obj->lcol, obj->align, obj->lsize, obj->lstyle, obj->label ); set_miscattribs( ttt, obj->nwgravity, obj->segravity, obj->resize ); is_focus = obj->focus; prev = obj->prev; form = obj->form; clear_selection( ); fl_delete_object( obj ); fli_handle_object( obj, FL_FREEMEM, 0, 0, 0, NULL, 0 ); if ( obj->child ) fli_free_composite( obj ); *obj = *ttt; obj->u_vdata = sp; obj->form = NULL; if ( prev->next ) fli_insert_object( obj, prev->next ); else fl_add_object( form, obj ); addto_selection( obj ); superspec_to_spec( obj ); fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); /* Correct the object focus if required. */ if ( is_focus ) fl_set_object_focus( obj->form, obj ); redraw_the_form( 0 ); show_attributes( obj ); } /*************************************** ***************************************/ static void accept_spec( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { long tmp; spec_to_superspec( curobj ); fl_set_folder_bynumber( fd_attrib->attrib_folder, 1 ); tmp = fd_attrib->attrib_folder->argument; fd_attrib->attrib_folder->argument = -1; fl_call_object_callback( fd_attrib->attrib_folder ); fd_attrib->attrib_folder->argument = tmp; } /*************************************** ***************************************/ static void spec_apply_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { redraw_the_form( 0 ); } /*************************************** * Switch between "Generic" and "Spec" folder ***************************************/ void folder_switch_cb( FL_OBJECT * ob, long data ) { FD_attrib *ui = ob->form->fdui; int active = fl_get_active_folder_number( ui->attrib_folder ); if ( active == 1 ) { if ( data != -1 ) /* -1 indicates manual call */ fl_call_object_callback( fd_attrib->readyobj ); fd_attrib->readyobj->type = FL_RETURN_BUTTON; /* yuk! */ fl_set_object_shortcut( fd_attrib->readyobj, "^M", 0 ); fl_redraw_object( fd_attrib->readyobj ); fl_set_object_callback( fd_attrib->readyobj, NULL, 0 ); fl_set_object_callback( fd_attrib->applyobj, apply_cb, 0 ); fl_set_object_callback( fd_attrib->restoreobj, restore_cb, 0 ); cleanup_spec( curobj ); } else { fd_attrib->readyobj->type = FL_NORMAL_BUTTON; /* yuk! */ fl_set_object_shortcut( fd_attrib->readyobj, "", 0 ); fl_redraw_object( fd_attrib->readyobj ); fl_redraw_object( fd_attrib->readyobj ); fl_set_object_callback( fd_attrib->readyobj, accept_spec, 0 ); fl_set_object_callback( fd_attrib->applyobj, spec_apply_cb, 0 ); set_objclass_spec_attributes( curobj, 0 ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_control.c0000644000175000017500000005670611311775320016160 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_control.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Form designer Control panel handling */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd/ui_theforms.h" #include "private/pmenu.h" #include "private/pchoice.h" /* All control panel menus, File Object Options etc. have this * common structures */ typedef struct { const char * entry; /* label */ const char * sc; /* shortcut */ void ( * callback )( FL_OBJECT *, /* callback functions */ long ); int n; /* func_cb parameter */ int * p; /* binary value */ } MenuEntry; extern void exit_cb( FL_OBJECT *, long ); extern void saveforms_cb( FL_OBJECT *, long ); /**** FileMenu ******{*/ static MenuEntry fmenu[ ] = { { " Open", "Oo#o", loadforms_cb, 0, 0 }, { " Merge", "Mm#m", mergeforms_cb, 0, 0 }, { " Save", "Ss#s", saveforms_cb, 0, 0 }, { " Save As %l", "Aa#a", saveforms_as_cb, 0, 0 }, { " Exit", "Ee#e", exit_cb, 0, 0 } }; #define NFM ( sizeof fmenu / sizeof *fmenu ) /*************************************** ***************************************/ void filemenu_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int n = fl_get_menu( ob ) - 1; if ( n >= 0 && fmenu[ n ].callback ) fmenu[ n ].callback( 0, 0 ); } /*************************************** * Exit the program ***************************************/ void exit_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { if ( changed ) { int rep; fl_set_choices_shortcut( "Ss#s", "Ee#e", "Rr#r" ); rep = fl_show_choice( "WARNING", "", "Changes have not been saved.", 3, "Save", "Exit", "Return", 1 ); if ( ( rep == 1 && ! save_forms( NULL ) ) || rep == 3 ) return; } fl_finish( ); exit( 0 ); } /*************************************** * Merge a set of forms with the current ones. ***************************************/ void mergeforms_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { load_forms( FL_TRUE, NULL, 0 ); changed = 1; loadedfile = 0; } /*************************************** * Save the current set of forms. ***************************************/ void saveforms_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { changed = ! save_forms( loadedfile_fullpath ); } /*************************************** ***************************************/ void saveforms_as_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { changed = ! save_forms( NULL ); } /*************************************** * Load a new set of forms ***************************************/ void loadforms_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { if ( changed && fl_show_question( "Forms have been changed!\n" "Should I save them?", 1 ) && ! save_forms( NULL ) ) return; load_forms( FL_FALSE, NULL, 1 ); changed = 0; } /***** End of FileMenu *****/ /* Group Menu entry */ static MenuEntry gmenu[ ] = { { "New group", "Nn#n", NULL, 7, 0 }, { "Delete Group", "Dd#d", NULL, 8, 0 }, { "Rename Group", "Rr#r", changegroupname_cb, 0, 0 } }; #define NGM ( sizeof gmenu / sizeof *gmenu ) /*************************************** ***************************************/ void groupmenu_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int n = fl_get_menu( ob ) - 1; if ( n >= 0 ) { if ( gmenu[ n ].callback ) gmenu[ n ].callback( 0, 0 ); else func_cb( 0, gmenu[ n ].n ); } } /* object menu entry */ static MenuEntry obmenu[ ] = { { "Object Attributes", "Oo#o", 0, 1, 0 }, { "Lower Object", "Ll#l", 0, 2, 0 }, { "Raise Object", "Rr#r", 0, 3, 0 }, { "Show Object", "Ss#s", 0, 5, 0 }, { "Hide Object", "Hh#h", 0, 6, 0 }, { "Cut Object", "Cc#c", 0, 12, 0 }, { "Paste Object", "Pp#p", 0, 10, 0 } }; #define NOBM ( sizeof obmenu / sizeof *obmenu ) /*************************************** ***************************************/ void objectmenu_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int n = fl_get_menu( ob ) - 1; if ( n >= 0 ) func_cb( 0, obmenu[ n ].n ); } /* form menu entry */ static MenuEntry fmmenu[ ] = { { "New Form", "Nn#n", addform_cb, 0, 0 }, { "Delete Form", "Dd#d", deleteform_cb, 0, 0 }, { "Rename Form", "Rr#r", changename_cb, 0, 0 }, { "Resize Form", "Ss#s", changesize_cb, 0, 0 } }; #define NFMM ( sizeof fmmenu / sizeof *fmmenu ) /*************************************** ***************************************/ void formmenu_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int n = fl_get_menu( ob ) - 1; if ( n >= 0 && fmmenu[ n ].callback ) fmmenu[ n ].callback( 0, 0 ); } /* Option menu */ static MenuEntry opmenu[ ] = { { "Track Geometry", "Gg#g", 0, 0, &fd_trackgeometry }, { "Show Pallette", "Pp#p", 0, 0, &fd_show_palette }, { "Emit %s UI code", "Ee#e", 0, 0, &fdopt.emit_code }, { "Emit Callback", "Cc#c", 0, 0, &fdopt.emit_cb }, { "Emit Main", "Mm#m", 0, 0, &fdopt.emit_main }, { "Alt Format", "Aa#a", 0, 0, &fdopt.altformat }, { "FS Compensate ", "Ff#f", 0, 0, &fdopt.compensate } }; #define NOPM ( sizeof opmenu / sizeof *opmenu ) /*************************************** ***************************************/ void optionmenu_callback( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { int n = fl_get_menu( ob ) - 1; char buf[ 32 ]; if ( n >= 0 ) { *opmenu[ n ].p = ! *opmenu[ n ].p; sprintf( buf, "%s%%%c", opmenu[ n ].entry, *opmenu[ n ].p ? 'B' : 'b' ); fl_replace_menu_item( fd_control->optionmenu, n + 1, buf ); ( fd_show_palette ? show_pallette : hide_pallette )( ); } } /*************************************** ***************************************/ void reset_pallette_menu_status(void) { fl_set_menu_item_mode( fd_control->optionmenu, 2, FL_PUP_BOX ); fd_show_palette = 0; } /*************************************** ***************************************/ static void deactivate_control( FL_FORM * form FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { fl_set_object_lcol( fd_control->title, FL_SLATEBLUE ); fl_set_object_lcol( fd_control->menubar_group, FL_INACTIVE ); fl_set_object_lcol( fd_control->shortcut_group, FL_INACTIVE ); fl_set_object_lcol( fd_control->fkey_group, FL_INACTIVE ); } /*************************************** ***************************************/ static void activate_control( FL_FORM * form FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { fl_set_object_lcol( fd_control->title, FL_BLUE ); fl_set_object_lcol( fd_control->menubar_group, FL_BLACK ); fl_set_object_lcol( fd_control->shortcut_group, FL_BLACK ); fl_set_object_lcol( fd_control->fkey_group, FL_BLACK ); } /*************************************** * Initialize the control panel by filling in the menu entries ***************************************/ void control_init( FD_control * ui ) { static int control_initialized; MenuEntry *m, *me; char buf[ 32 ]; int i; if ( control_initialized ) return; control_initialized = 1; #ifdef __sgi fl_set_object_lsize( ui->filemenu, FL_SMALL_SIZE ); fl_set_object_lsize( ui->formmenu, FL_SMALL_SIZE ); fl_set_object_lsize( ui->groupmenu, FL_SMALL_SIZE ); fl_set_object_lsize( ui->objectmenu, FL_SMALL_SIZE ); fl_set_object_lsize( ui->optionmenu, FL_SMALL_SIZE ); #endif fl_set_form_atdeactivate( ui->control, deactivate_control, ui ); fl_set_form_atactivate( ui->control, activate_control, ui ); fl_set_object_dblbuffer( ui->selmsg, 1 ); fl_set_object_dblbuffer( ui->sizestatus, 1 ); fl_set_object_dblbuffer( ui->oristatus, 1 ); /* File menu */ for ( m = fmenu, me = m + NFM, i = 1; m < me; m++, i++ ) { fl_addto_menu( ui->filemenu, m->entry ); fl_set_menu_item_shortcut( ui->filemenu, i, m->sc ); } /* Form menu */ for ( m = fmmenu, me = m + NFMM, i = 1; m < me; m++, i++ ) { fl_addto_menu( ui->formmenu, m->entry ); fl_set_menu_item_shortcut( ui->formmenu, i, m->sc ); } /* Group menu */ for ( m = gmenu, me = m + NGM, i = 1; m < me; m++, i++ ) { fl_addto_menu( ui->groupmenu, m->entry ); fl_set_menu_item_shortcut( ui->groupmenu, i, m->sc ); } /* Object menu */ for ( m = obmenu, me = m + NOBM, i = 1; m < me; m++, i++ ) { fl_addto_menu( ui->objectmenu, m->entry ); fl_set_menu_item_shortcut( ui->objectmenu, i, m->sc ); } /* Option menu. all are binary items */ for ( m = opmenu, me = m + NOPM, i = 1; m < me; m++, i++ ) { if ( strncmp( m->entry, "Emit %s", 7 ) == 0 ) { static char tmpbuf[ 128 ]; sprintf( tmpbuf, m->entry, convertor[ fdopt.language ].lang_name ); m->entry = tmpbuf; } sprintf( buf, "%s%%%c", m->entry, * ( m->p ) ? 'B' : 'b' ); fl_addto_menu( ui->optionmenu, buf ); fl_set_menu_item_shortcut( ui->optionmenu, i, m->sc ); } } /* Misc. service routines */ /*************************************** ***************************************/ void show_geometry( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { char buf[ 128 ]; static FL_Coord lx = -1, ly, lw = -1, lh; /* Canonicalize rectangle */ if ( w < 0 ) { x += w; w = -w; } if ( h < 0 ) { y += h; h = -h; } if ( x != lx || y != ly ) { sprintf( buf, "(%d %d)", x, y ); fl_set_object_label( fd_control->oristatus, buf ); lx = x; ly = y; } if ( w != lw || h != lh ) { sprintf( buf, "(%d %d)", w, h ); fl_set_object_label( fd_control->sizestatus, buf ); lw = w; lh = h; } } /*************************************** ***************************************/ void show_selmessage( FL_OBJECT * sel[ ], int n ) { char objname[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; char buf[ MAX_VAR_LEN ]; *buf = '\0'; if ( n == 1 ) { get_object_name( sel[ 0 ], objname, cbname, argname ); sprintf( buf, "%s Name: %s %s%s", find_type_name( sel[ 0 ]->objclass, sel[ 0 ]->type ), *objname ? objname : "None", *cbname ? "Callback: " : "", *cbname ? cbname : "" ); } else { if ( sel[ 0 ]->objclass == FL_BEGIN_GROUP ) n -= 2; sprintf( buf, "%d objects", n ); } fl_set_object_label( fd_control->selmsg, buf ); } /********* Callback routines for the control panel ***************/ /* * Form designer itself does not use resource settings, but when testing * the newly created forms, resources are turned on. At the moment we * only allow button label size to be changed */ FL_FORM *thetestform; typedef struct { int x, y, w, h; } GEOM; static short *osize = NULL; static GEOM *oldgeom = NULL; static FL_Coord formw, formh; /* original form size */ /*************************************** ***************************************/ static void fix_button_label_size( FL_FORM * form, int save ) { FL_OBJECT *ob; int i; if ( fd_buttonLabelSize == 0 ) return; if ( save ) { for ( i = 0, ob = form->first; ob; ob = ob->next ) if ( ob->objclass == FL_BUTTON ) i++; osize = fl_realloc( osize, i * sizeof *osize ); } for ( i = 0, ob = form->first; ob; ob = ob->next ) { if ( ob->objclass == FL_BUTTON ) { if ( save ) { osize[ i++ ] = ob->lsize; if ( ob->lsize == FL_NORMAL_FONT ) ob->lsize = fd_buttonLabelSize; } else ob->lsize = osize[ i++ ]; } } if ( ! save ) fl_safe_free( osize ); } /*************************************** ***************************************/ static void fix_menu_etc( FL_FORM * form, int save ) { FL_OBJECT *ob; int i; for ( ob = form->first; ob; ob = ob->next ) { if ( ob->objclass != FL_MENU && ob->objclass != FL_CHOICE && ob->objclass != FL_BROWSER ) continue; if ( ob->objclass == FL_MENU ) { FLI_MENU_SPEC *sp = ob->spec; if ( save ) { if ( sp->numitems > 0 ) for ( i = 1; i <= sp->numitems; i++ ) fl_safe_free( sp->cb[ i ] ); else { fl_addto_menu( ob, "menuitem 1" ); fl_addto_menu( ob, "menuitem 2" ); fl_addto_menu( ob, "menuitem 3" ); fl_addto_menu( ob, "menuitem 4" ); } } else { SuperSPEC *ssp = get_superspec( ob ); if ( sp->numitems == ssp->nlines ) for ( i = 1; i <= sp->numitems; i++ ) if ( ssp->callback[ i ] ) sp->cb[ i ] = ( FL_PUP_CB ) fl_strdup( ssp->callback[ i ] ); else sp->cb[ i ] = NULL; else fl_clear_menu( ob ); } } else if ( ob->objclass == FL_CHOICE ) { FLI_CHOICE_SPEC *sp = ob->spec; if ( save ) { if ( sp->numitems == 0 ) { fl_addto_choice( ob, "choice 1" ); fl_addto_choice( ob, "choice 2" ); fl_addto_choice( ob, "choice 3" ); fl_addto_choice( ob, "choice 4" ); } } else { SuperSPEC *ssp = get_superspec( ob ); if ( sp->numitems != ssp->nlines ) fl_clear_choice( ob ); } } else if ( ob->objclass == FL_BROWSER ) { int nlines = fl_get_browser_maxline( ob ); if ( save ) { if ( nlines == 0 ) { char buf[ 100 ]; for ( i = 0; i < 20; i++ ) { sprintf( buf, "browser line %d", i + 1 ); fl_add_browser_line( ob, buf ); } } } else { SuperSPEC *ssp = get_superspec( ob ); if ( nlines != ssp->nlines ) fl_clear_browser( ob ); } } } } /*************************************** * Start a test of the current form ***************************************/ void test_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { int i; FL_OBJECT *ob; GEOM *p; int resizeable; if ( cur_form == NULL ) return; fl_deactivate_form(fd_control->control); thetestform = cur_form; /* During test, accumulation error might result. Save the old size */ formw = cur_form->w; formh = cur_form->h; for ( i = 0, ob = cur_form->first; ob; ob = ob->next, i++ ) /* empty */ ; p = oldgeom = fl_realloc( oldgeom, i * sizeof *oldgeom ); for ( ob = cur_form->first; ob; ob = ob->next, i++, p++ ) { p->x = ob->x; p->y = ob->y; p->w = ob->w; p->h = ob->h; } /* Change button label size to the one requested */ fix_button_label_size( thetestform, 1 ); fix_menu_etc( thetestform, 1 ); cur_form = NULL; redraw_the_form( 1 ); fl_clear_browser( fd_test->browser ); resizeable = strstr( get_placement( thetestform ), "FREE" ) != NULL; if ( resizeable ) { fl_set_form_minsize( thetestform, formw >= 10 ? formw / 2 : formw, formh >= 10 ? formh / 2 : formh ); fl_set_form_maxsize( thetestform, fl_scrw, fl_scrh ); } else { fl_set_form_minsize( thetestform, formw, formh ); fl_set_form_maxsize( thetestform, formw, formh ); } fl_show_form( thetestform, resizeable ? FL_PLACE_CENTERFREE : FL_PLACE_CENTER, FL_FULLBORDER, "Test Form" ); fl_show_form( fd_test->test, FL_PLACE_POSITION | FL_PLACE_FREE, FL_FULLBORDER, "Test" ); } /*************************************** * Ends a testing session ***************************************/ void stoptest_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { FL_OBJECT *ob; GEOM *p = oldgeom; if ( thetestform == NULL ) return; fl_hide_form( fd_test->test ); fl_hide_form( thetestform ); fix_button_label_size( thetestform, 0 ); fix_menu_etc( thetestform, 0 ); cur_form = thetestform; thetestform = NULL; fl_set_form_size( cur_form, formw, formh ); if ( p ) { for ( ob = cur_form->first; ob; ob = ob->next, p++ ) { ob->x = p->x; ob->y = p->y; ob->w = p->w; ob->h = p->h; } fl_safe_free( oldgeom ); } redraw_the_form( 0 ); fl_activate_form( fd_control->control ); } /** do alignment */ /*************************************** * Shows the align form ***************************************/ void align_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { if ( fd_align->align->visible ) fl_hide_form( fd_align->align ); else { fl_show_form( fd_align->align, FL_PLACE_MOUSE, FL_FULLBORDER, "Alignments" ); XRaiseWindow( flx->display, fd_align->align->window ); } } /*************************************** * Stop showing the align window ***************************************/ void exitalign_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_hide_form( fd_align->align ); } /*************************************** * Does some alignment action ***************************************/ void doalign_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg ) { if ( fd_align->vdata ) free_dupped_selection( fd_align->vdata ); fd_align->vdata = dup_selection( ); align_selection( arg ); } /*************************************** ***************************************/ void undoalign_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { if ( fd_align->vdata ) { set_selection( fd_align->vdata ); /* only allow undo once */ free_dupped_selection( fd_align->vdata ); fd_align->vdata = 0; } } /*************************************** ***************************************/ void snap_cb( FL_OBJECT * obj, long arg FL_UNUSED_ARG ) { set_step_size( fl_get_counter_value( obj ) ); } /***** End of alignment stuff */ /*************************************** * The user pressed one of the function keys while in the main form ***************************************/ void func_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg ) { switch ( arg ) { case 1: change_selection( ); redraw_the_form( 0 ); break; case 2: lower_selection( ); redraw_the_form( 0 ); break; case 3: raise_selection( ); redraw_the_form( 0 ); break; case 4: select_all( ); redraw_the_form( 0 ); break; case 5: show_selection( ); redraw_the_form( 0 ); break; case 6: hide_selection( ); redraw_the_form( 0 ); break; case 7: group_selection( ); break; case 8: flatten_selection( ); break; case 9: copy_selection( ); break; case 10: paste_selection( ); redraw_the_form( 0 ); break; case 11: next_selection( ); break; case 12: cut_selection( ); redraw_the_form( 0 ); break; } } /*************************************** ***************************************/ static void draw_centering_symbol( FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int angle, FL_COLOR col ) { int delta = 4; if ( angle == 0 || angle == 180 ) { fl_draw_symbol( "@->", x, y, w / 2 + delta, h, col ); fl_draw_symbol( "@<-", x + w / 2 - delta, y, w / 2 + delta, h, col ); } else { fl_draw_symbol( "@2->", x, y + 1, w, h / 2 + delta, col ); fl_draw_symbol( "@8->", x, y + h / 2 - delta - 1, w, h / 2 + delta - 1, col ); } } /*************************************** ***************************************/ void init_align( void ) { fl_add_symbol( "-><-", draw_centering_symbol, 0 ); fl_set_object_label( fd_align->hcenter, "@-><-" ); fl_set_object_label( fd_align->vcenter, "@8-><-" ); fl_set_object_helper( fd_align->left, "Flush left" ); fl_set_object_helper( fd_align->hcenter, "Center horizontally" ); fl_set_object_helper( fd_align->hequal, "Equal horizontal distance" ); fl_set_object_helper( fd_align->right, "Flush right" ); fl_set_object_helper( fd_align->top, "Flush top" ); fl_set_object_helper( fd_align->bottom, "Flush bottom" ); fl_set_object_helper( fd_align->vcenter, "Center vertically" ); fl_set_object_helper( fd_align->vequal, "Equal vertical distance" ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_slider.c0000644000175000017500000002224511252274077016011 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_slider.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting slider class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "spec/slider_spec.h" extern FD_sliderattrib *create_form_sliderattrib( void ); static FD_sliderattrib *sl_attrib; static SuperSPEC *slider_spec; static void show_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_slider_spec_fdform( void ) { if ( ! sl_attrib ) { sl_attrib = create_form_sliderattrib( ); setup_how_return_menu( sl_attrib->returnsetting ); fl_set_menu_item_mode( sl_attrib->returnsetting, 5, FL_PUP_BOX | FL_PUP_GRAY ); fl_set_menu_item_mode( sl_attrib->returnsetting, 6, FL_PUP_BOX | FL_PUP_GRAY ); } return sl_attrib; } /*************************************** ***************************************/ void slider_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *edit_obj = sl_attrib->vdata; superspec_to_spec( edit_obj ); show_spec( get_superspec( edit_obj ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec ) { set_finput_value( sl_attrib->minval, spec->min, spec->prec ); set_finput_value( sl_attrib->maxval, spec->max, spec->prec ); set_finput_value( sl_attrib->initial_val, spec->val, spec->prec ); set_finput_value( sl_attrib->slsize, spec->slsize, 2 ); set_finput_value( sl_attrib->step, spec->step, 3 ); set_finput_value( sl_attrib->ldelta, spec->ldelta, -1 ); set_finput_value( sl_attrib->rdelta, spec->rdelta, -1 ); fl_set_counter_value( sl_attrib->prec, spec->prec ); reset_how_return_menu( sl_attrib->returnsetting, spec->how_return ); } #define is_vert(t) ( t == FL_VERT_SLIDER \ || t == FL_VERT_NICE_SLIDER \ || t == FL_VERT_BROWSER_SLIDER \ || t == FL_VERT_FILL_SLIDER ) /*************************************** ***************************************/ int set_slider_attrib( FL_OBJECT * ob ) { sl_attrib->vdata = ob; slider_spec = get_superspec( ob ); fl_freeze_form( sl_attrib->sliderattrib ); if ( ob->objclass == FL_VALSLIDER ) fl_show_object( sl_attrib->prec ); else fl_hide_object( sl_attrib->prec ); fl_set_counter_step( sl_attrib->prec, 1, 2 ); fl_set_counter_precision( sl_attrib->prec, 0 ); fl_set_counter_bounds( sl_attrib->prec, 0, 6 ); fl_redraw_object( sl_attrib->prec ); /* need this to draw counter fully */ if ( is_vert( ob->type ) ) { fl_set_object_label( sl_attrib->minval, "Value at top" ); fl_set_object_label( sl_attrib->maxval, "Value at bottom" ); } else { fl_set_object_label( sl_attrib->minval, "Value at left" ); fl_set_object_label( sl_attrib->maxval, "Value at right" ); } show_spec( slider_spec ); fl_unfreeze_form( sl_attrib->sliderattrib ); return 0; } /*************************************** ***************************************/ void emit_slider_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *sp, *defsp; if ( ob->objclass != FL_SLIDER && ob->objclass != FL_VALSLIDER ) return; /* create a default object */ defobj = ( ob->objclass == FL_SLIDER ? fl_create_slider : fl_create_valslider ) ( ob->type, 0, 0, 0, 0, ""); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->prec != defsp->prec ) fprintf( fp, " fl_set_slider_precision( obj, %d );\n", sp->prec ); if ( sp->min != defsp->min || sp->max != defsp->max ) fprintf( fp, " fl_set_slider_bounds( obj, %g, %g );\n", sp->min, sp->max ); if ( sp->val != defsp->val ) fprintf( fp, " fl_set_slider_value( obj, %g );\n", sp->val ); if ( sp->slsize != defsp->slsize ) fprintf( fp, " fl_set_slider_size( obj, %.2f );\n", sp->slsize ); if ( sp->step != defsp->step ) fprintf( fp, " fl_set_slider_step( obj, %g );\n", sp->step ); if ( sp->ldelta != defsp->ldelta || sp->rdelta != defsp->rdelta ) fprintf( fp, " fl_set_slider_increment( obj, %g, %g );\n", sp->ldelta, sp->rdelta ); } /*************************************** ***************************************/ void save_slider_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defsp, *sp; if ( ob->objclass != FL_SLIDER && ob->objclass != FL_VALSLIDER ) return; /* create a default object */ defobj = ( ob->objclass == FL_SLIDER ? fl_create_slider : fl_create_valslider ) ( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->min != defsp->min || sp->max != defsp->max ) fprintf( fp, " bounds: %g %g\n", sp->min, sp->max ); if ( sp->prec != defsp->prec ) fprintf( fp, " precision: %d\n", sp->prec ); if ( sp->val != defsp->val ) fprintf( fp, " value: %g\n", sp->val ); if ( sp->ldelta != defsp->ldelta || sp->rdelta != defsp->rdelta ) fprintf( fp, " increment: %g %g\n", sp->ldelta, sp->rdelta ); if ( sp->slsize != defsp->slsize ) fprintf( fp, " slsize: %.2f\n", sp->slsize ); if ( sp->step != defsp->step ) fprintf( fp, " step: %g\n", sp->step ); } /*************************************** ***************************************/ void adjust_precision( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { double p = fl_get_counter_value( ob ); fl_set_slider_precision( sl_attrib->vdata, p ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void minmax_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double min = get_finput_value( sl_attrib->minval ); double max = get_finput_value( sl_attrib->maxval ); fl_set_slider_bounds( sl_attrib->vdata, min, max ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void slsize_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double slsize = get_finput_value( sl_attrib->slsize ); fl_set_slider_size( sl_attrib->vdata, slsize ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void step_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double step = get_finput_value( sl_attrib->step ); fl_set_slider_step( sl_attrib->vdata, step ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void increment_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double l = get_finput_value( sl_attrib->ldelta ); double r = get_finput_value( sl_attrib->rdelta ); fl_set_slider_increment( sl_attrib->vdata, l, r ); } /*************************************** ***************************************/ void initialvalue_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double val = get_finput_value( sl_attrib->initial_val ); fl_set_slider_value( sl_attrib->vdata, val ); slider_spec->val = fl_get_slider_value( sl_attrib->vdata ); set_finput_value( sl_attrib->initial_val, slider_spec->val, slider_spec->prec ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( sl_attrib->returnsetting, sl_attrib->vdata ); } #include "spec/slider_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_browser.c0000644000175000017500000002136111252274000016172 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_browser.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. *. * Settting browser class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "private/pbrowser.h" #include "spec/browser_spec.h" extern FD_browserattrib *create_form_browserattrib( void ); static FD_browserattrib *br_attrib; static SuperSPEC *browser_spec; static void show_spec( SuperSPEC * ); void change_item_cb( FL_OBJECT * ob, long data ); /*************************************** ***************************************/ void * get_browser_spec_fdform( void ) { if ( ! br_attrib ) { br_attrib = create_form_browserattrib( ); fl_addto_choice( br_attrib->hscb_pref, get_scrollbar_pref_string( ) ); fl_addto_choice( br_attrib->vscb_pref, get_scrollbar_pref_string( ) ); fl_set_browser_dblclick_callback( br_attrib->content_br, change_item_cb, 0 ); setup_how_return_menu( br_attrib->returnsetting ); } return br_attrib; } /*************************************** ***************************************/ void browser_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *edited = br_attrib->vdata; superspec_to_spec( edited ); show_spec( get_superspec( edited ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec ) { int i; fl_set_choice( br_attrib->hscb_pref, spec->h_pref + 1 ); fl_set_choice( br_attrib->vscb_pref, spec->v_pref + 1 ); fl_freeze_form( br_attrib->content_br->form ); fl_clear_browser( br_attrib->content_br ); for ( i = 1; i <= spec->nlines; i++ ) fl_add_browser_line( br_attrib->content_br, spec->content[ i ] ); fl_unfreeze_form( br_attrib->content_br->form ); reset_how_return_menu( br_attrib->returnsetting, spec->how_return ); } /*************************************** ***************************************/ int set_browser_attrib( FL_OBJECT * ob ) { br_attrib->vdata = ob; browser_spec = get_superspec( ob ); superspec_to_spec(ob); show_spec( browser_spec ); return 0; } /*************************************** ***************************************/ void emit_browser_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *spec, *defspec; int i; if ( ob->objclass != FL_BROWSER ) return; /* Create a default object */ defobj = fl_create_browser( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( spec->h_pref != defspec->h_pref ) fprintf( fp, " fl_set_browser_hscrollbar( obj, %s );\n", get_scrollbar_pref_name( spec->h_pref ) ); if ( spec->v_pref != defspec->v_pref ) fprintf( fp, " fl_set_browser_vscrollbar( obj, %s );\n", get_scrollbar_pref_name( spec->v_pref ) ); for ( i = 1; i <= spec->nlines; i++ ) fprintf( fp, " fl_add_browser_line( obj, \"%s\" );\n", spec->content[ i ] ); } /*************************************** ***************************************/ void save_browser_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defspec, *spec; int i; if ( ob->objclass != FL_BROWSER ) return; /* Create a default object */ defobj = fl_create_browser( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( defspec->h_pref != spec->h_pref ) fprintf( fp, "h_pref: %s\n", get_scrollbar_pref_name( spec->h_pref ) ); if ( defspec->v_pref != spec->v_pref ) fprintf( fp, "v_pref: %s\n", get_scrollbar_pref_name( spec->v_pref ) ); for ( i = 1; i <= spec->nlines; i++ ) fprintf( fp, "content: %s\n", spec->content[ i ] ); } /* * attributes callbacks */ /*************************************** * Callbacks and freeobj handles for form browserattrib ***************************************/ void add_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_browserattrib *ui = ob->form->fdui; const char *s = fl_get_input( ui->input ); if ( s && *s ) { fl_addto_browser( ui->content_br, s ); fl_addto_browser( ui->vdata, s ); if ( fl_get_button( ui->auto_clear ) ) fl_set_input( ui->input, "" ); if ( auto_apply ) redraw_the_form( 0 ); } } /*************************************** ***************************************/ void replace_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_browserattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); const char *s = fl_get_input( ui->input ); if ( *s && i > 0 ) { fl_replace_browser_line( ui->content_br, i, s ); fl_replace_browser_line( ui->vdata, i, s ); if ( fl_get_button( ui->auto_clear ) ) fl_set_input( ui->input, "" ); } if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void insert_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_browserattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); const char *s = fl_get_input( ui->input ); if ( *s && i > 0 ) { fl_insert_browser_line( ui->content_br, i, s ); fl_insert_browser_line( ui->vdata, i, s ); if ( fl_get_button( ui->auto_clear ) ) fl_set_input( ui->input, "" ); } if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void delete_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_browserattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); if ( i > 0 ) { fl_delete_browser_line( ui->content_br, i ); fl_delete_browser_line( ui->vdata, i ); if ( auto_apply ) redraw_the_form( 0 ); } } /*************************************** ***************************************/ void change_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_browserattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); if ( i > 0 ) fl_set_input( ui->input, fl_get_browser_line( ui->content_br, i ) ); } /*************************************** ***************************************/ void hscb_pref_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_browserattrib *ui = ob->form->fdui; int i = fl_get_choice( ob ); fl_set_browser_hscrollbar( ui->vdata, i - 1 ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void vscb_pref_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_browserattrib *ui = ob->form->fdui; int i = fl_get_choice( ob ); fl_set_browser_vscrollbar( ui->vdata, i - 1 ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void br_returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( br_attrib->returnsetting, br_attrib->vdata ); } /*************************************** ***************************************/ void clear_field_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_browserattrib *ui = ob->form->fdui; fl_set_input( ui->input, "" ); } #include "spec/browser_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_util.c0000644000175000017500000000372411247055071015447 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_util.c * * Eliminate the emission of duplicate info. This is necessary as * some #include define data (pixmap for example). * * We should eventually move the functionality of already_emited in * fd_printC.c into this function so callback is also checked. This * probably means we need make struct CodeInfo more efficient. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #define MAXREC 80 #define MAXLEN 79 typedef struct { FL_FORM * form; char buf[ MAXLEN + 1 ]; } CodeInfo; static CodeInfo info[ MAXREC ]; static int ninfo; /*************************************** ***************************************/ void reset_dupinfo_cache( void ) { ninfo = 0; } /*************************************** ***************************************/ int is_duplicate_info( FL_OBJECT * ob FL_UNUSED_ARG, const char * s ) { int i; for ( i = 0; i < ninfo; i++ ) if ( strcmp( s, info[ i ].buf ) == 0 ) return 1; if ( ninfo == MAXREC ) { fprintf( stderr, "dupinfo cache overflown\n" ); ninfo--; } fli_sstrcpy( info[ ninfo++ ].buf, s, MAXLEN ); return 0; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_help.h0000644000175000017500000000165311247055071015426 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifndef FD_HELP_H #define FD_HELP_H enum { HELP_VERSION, HELP_GENERAL, HELP_MOUSE, HELP_KEYBOARD, HELP_GROUP, HELP_TEST, HELP_SAVE }; #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_xyplot.c0000644000175000017500000002751211252274127016064 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_xyplot.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting xyplot class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "private/pxyplot.h" #include "spec/xyplot_spec.h" extern FD_xyplotattrib *create_form_xyplotattrib( void ); static FD_xyplotattrib *xyplot_attrib; static SuperSPEC *xyplot_spec; static void show_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_xyplot_spec_fdform( void ) { if ( ! xyplot_attrib ) { xyplot_attrib = create_form_xyplotattrib( ); fl_addto_choice( xyplot_attrib->xscale, get_scale_string( ) ); fl_addto_choice( xyplot_attrib->yscale, get_scale_string( ) ); fl_addto_choice( xyplot_attrib->xgrid, get_grid_string( ) ); fl_addto_choice( xyplot_attrib->ygrid, get_grid_string( ) ); fl_addto_choice( xyplot_attrib->gridstyle, get_linestyle_string( ) ); setup_how_return_menu( xyplot_attrib->how_return ); fl_set_menu_item_mode( xyplot_attrib->how_return, 5, FL_PUP_BOX | FL_PUP_GRAY ); fl_set_menu_item_mode( xyplot_attrib->how_return, 6, FL_PUP_BOX | FL_PUP_GRAY ); } return xyplot_attrib; } /*************************************** ***************************************/ void xyplot_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { superspec_to_spec( xyplot_attrib->vdata ); show_spec( get_superspec( xyplot_attrib->vdata ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec ) { fl_set_counter_value( xyplot_attrib->xmajor, spec->xmajor ); fl_set_counter_value( xyplot_attrib->xminor, spec->xminor ); fl_set_counter_value( xyplot_attrib->ymajor, spec->ymajor ); fl_set_counter_value( xyplot_attrib->yminor, spec->yminor ); fl_set_choice( xyplot_attrib->xgrid, spec->xgrid + 1 ); fl_set_choice( xyplot_attrib->ygrid, spec->ygrid + 1 ); fl_set_choice( xyplot_attrib->xscale, spec->xscale + 1 ); fl_set_choice( xyplot_attrib->yscale, spec->yscale + 1 ); fl_set_choice( xyplot_attrib->gridstyle, spec->grid_linestyle + 1 ); set_finput_value( xyplot_attrib->xbase, spec->xbase, -1 ); set_finput_value( xyplot_attrib->ybase, spec->ybase, -1 ); reset_how_return_menu( xyplot_attrib->how_return, spec->how_return ); fl_set_button( xyplot_attrib->mark_active, spec->mark_active ); } /*************************************** ***************************************/ int set_xyplot_attrib( FL_OBJECT * ob ) { xyplot_attrib->vdata = ob; xyplot_spec = get_superspec(ob); if ( ob->type != FL_ACTIVE_XYPLOT ) { fl_hide_object( xyplot_attrib->how_return ); fl_hide_object( xyplot_attrib->mark_active ); } else { fl_show_object( xyplot_attrib->how_return ); fl_show_object( xyplot_attrib->mark_active ); } if ( xyplot_spec->xscale != FL_LOG ) fl_hide_object( xyplot_attrib->xbase ); else fl_show_object( xyplot_attrib->xbase ); if ( xyplot_spec->yscale != FL_LOG ) fl_hide_object( xyplot_attrib->ybase ); else fl_show_object( xyplot_attrib->ybase ); if ( xyplot_spec->xgrid || xyplot_spec->ygrid ) fl_show_object( xyplot_attrib->gridstyle ); else fl_hide_object( xyplot_attrib->gridstyle ); show_spec( xyplot_spec ); return 0; } /*************************************** ***************************************/ void emit_xyplot_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *sp, *defsp; if ( ob->objclass != FL_XYPLOT ) { M_err( "EmitXYPlotCode", "not xyplot class!" ); return; } /* create a default object */ defobj = fl_create_xyplot( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->xmajor != defsp->xmajor || sp->xminor != defsp->xminor ) fprintf( fp, " fl_set_xyplot_xtics( obj, %d, %d );\n", sp->xmajor, sp->xminor ); if ( sp->ymajor != defsp->ymajor || sp->yminor != defsp->yminor ) fprintf( fp, " fl_set_xyplot_ytics( obj, %d, %d );\n", sp->ymajor, sp->yminor ); if ( sp->xscale != defsp->xscale || ( sp->xscale == FL_LOG && sp->xbase != defsp->xbase ) ) fprintf( fp, " fl_set_xyplot_xscale( obj, %s, %g );\n", get_scale_name( sp->xscale ), sp->xbase ); if ( sp->yscale != defsp->yscale || ( sp->yscale == FL_LOG && sp->ybase != defsp->ybase ) ) fprintf( fp, " fl_set_xyplot_yscale( obj, %s, %g );\n", get_scale_name( sp->yscale ), sp->ybase ); if ( sp->xgrid != defsp->xgrid ) fprintf( fp, " fl_set_xyplot_xgrid( obj, %s );\n", get_grid_name( sp->xgrid ) ); if ( sp->ygrid != defsp->ygrid ) fprintf( fp, " fl_set_xyplot_ygrid( obj, %s );\n", get_grid_name( sp->ygrid ) ); if ( sp->grid_linestyle != defsp->grid_linestyle ) fprintf( fp, " fl_set_xyplot_grid_linestyle( obj, %s );\n", get_linestyle_name( sp->grid_linestyle ) ); if ( ob->type == FL_ACTIVE_XYPLOT ) { if ( sp->mark_active != defsp->mark_active ) fprintf( fp, " fl_set_xyplot_mark_active( obj, %d );\n", sp->mark_active ); } fl_free_object( defobj ); } /*************************************** ***************************************/ void save_xyplot_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defsp, *sp; if ( ob->objclass != FL_XYPLOT ) return; /* create a default object */ defobj = fl_create_xyplot( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->xmajor != defsp->xmajor || sp->xminor != defsp->xminor ) fprintf( fp, " xtics: %d %d\n", sp->xmajor, sp->xminor ); if ( sp->ymajor != defsp->ymajor || sp->yminor != defsp->yminor ) fprintf( fp, " ytics: %d %d\n", sp->ymajor, sp->yminor ); if ( sp->xgrid != defsp->xgrid || sp->ygrid != defsp->ygrid ) fprintf( fp, " grid: %s %s\n", get_grid_name( sp->xgrid ), get_grid_name( sp->ygrid ) ); if ( sp->grid_linestyle != defsp->grid_linestyle ) fprintf( fp, " gridstyle: %s\n", get_linestyle_name( sp->grid_linestyle ) ); if ( sp->xscale != defsp->xscale || sp->xbase != defsp->xbase ) fprintf( fp, " xscale: %s %g\n", get_scale_name( sp->xscale ), sp->xbase ); if ( sp->yscale != defsp->yscale || sp->ybase != defsp->ybase ) fprintf( fp, " yscale: %s %g\n", get_scale_name( sp->yscale ), sp->ybase ); if ( ob->type == FL_ACTIVE_XYPLOT ) { if ( sp->mark_active != defsp->mark_active ) fprintf( fp, " markactive: %d\n", sp->mark_active ); } fl_free_object( defobj ); } /************ callback stuff ************/ /*************************************** ***************************************/ void grid_change_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { int xg = fl_get_choice( xyplot_attrib->xgrid ) - 1; int yg = fl_get_choice( xyplot_attrib->ygrid ) - 1; if ( xg || yg ) fl_show_object( xyplot_attrib->gridstyle ); else fl_hide_object( xyplot_attrib->gridstyle ); fl_set_xyplot_xgrid( xyplot_attrib->vdata, xg ); fl_set_xyplot_ygrid( xyplot_attrib->vdata, yg ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void markactive_change_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_set_xyplot_mark_active( xyplot_attrib->vdata, fl_get_button( xyplot_attrib->mark_active ) ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void gridstyle_change_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { int style = fl_get_choice( xyplot_attrib->gridstyle ) - 1; fl_set_xyplot_grid_linestyle( xyplot_attrib->vdata, style ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void xscale_change_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { int s = fl_get_choice( xyplot_attrib->xscale ) - 1; float base = get_finput_value( xyplot_attrib->xbase ); if ( s == FL_LOG ) fl_show_object( xyplot_attrib->xbase ); else fl_hide_object( xyplot_attrib->xbase ); fl_set_xyplot_xscale( xyplot_attrib->vdata, s, base ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void yscale_change_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { /* fill-in code for callback */ int s = fl_get_choice( xyplot_attrib->yscale ) - 1; float base = get_finput_value( xyplot_attrib->ybase ); if ( s == FL_LOG ) fl_show_object( xyplot_attrib->ybase ); else fl_hide_object( xyplot_attrib->ybase ); fl_set_xyplot_yscale( xyplot_attrib->vdata, s, base ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void ymajorminor_change_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { /* fill-in code for callback */ int ymajor = fl_get_counter_value( xyplot_attrib->ymajor ); int yminor = fl_get_counter_value( xyplot_attrib->yminor ); fl_set_xyplot_ytics( xyplot_attrib->vdata, ymajor, yminor ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void xmajorminor_change_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { int xmajor = fl_get_counter_value( xyplot_attrib->xmajor ); int xminor = fl_get_counter_value( xyplot_attrib->xminor ); fl_set_xyplot_xtics( xyplot_attrib->vdata, xmajor, xminor ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void xyplot_returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( xyplot_attrib->how_return, xyplot_attrib->vdata ); } #include "spec/xyplot_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd/0000755000175000017500000000000011377311602014237 5ustar jensjensxforms-1.0.93sp1/fdesign/fd/ui_theforms.h0000644000175000017500000000610511375051674016746 0ustar jensjens/* Header file generated by fdesign on Wed May 19 23:10:20 2010 */ #ifndef FD_control_h_ #define FD_control_h_ #include /* Callbacks, globals and object handlers */ extern void func_cb( FL_OBJECT *, long ); extern void form_cb( FL_OBJECT *, long ); extern void group_cb( FL_OBJECT *, long ); extern void object_cb( FL_OBJECT *, long ); extern void addform_cb( FL_OBJECT *, long ); extern void deleteform_cb( FL_OBJECT *, long ); extern void changename_cb( FL_OBJECT *, long ); extern void changesize_cb( FL_OBJECT *, long ); extern void align_cb( FL_OBJECT *, long ); extern void test_cb( FL_OBJECT *, long ); extern void help_cb( FL_OBJECT *, long ); extern void optionmenu_callback( FL_OBJECT *, long ); extern void filemenu_callback( FL_OBJECT *, long ); extern void formmenu_callback( FL_OBJECT *, long ); extern void objectmenu_callback( FL_OBJECT *, long ); extern void groupmenu_callback( FL_OBJECT *, long ); extern void doalign_cb( FL_OBJECT *, long ); extern void snap_cb( FL_OBJECT *, long ); extern void undoalign_cb( FL_OBJECT *, long ); extern void exitalign_cb( FL_OBJECT *, long ); extern void stoptest_cb( FL_OBJECT *, long ); extern void clearlog_cb( FL_OBJECT *, long ); extern void showhelp_cb( FL_OBJECT *, long ); extern void exithelp_cb( FL_OBJECT *, long ); /* Forms and Objects */ typedef struct { FL_FORM * control; void * vdata; char * cdata; long ldata; FL_OBJECT * title; FL_OBJECT * selmsg; FL_OBJECT * oristatus; FL_OBJECT * fkey_group; FL_OBJECT * formbrowser; FL_OBJECT * groupbrowser; FL_OBJECT * sizestatus; FL_OBJECT * objectbrowser; FL_OBJECT * shortcut_group; FL_OBJECT * renameform; FL_OBJECT * resizeform; FL_OBJECT * menubar_group; FL_OBJECT * optionmenu; FL_OBJECT * filemenu; FL_OBJECT * formmenu; FL_OBJECT * objectmenu; FL_OBJECT * groupmenu; } FD_control; extern FD_control * create_form_control( void ); typedef struct { FL_FORM * align; void * vdata; char * cdata; long ldata; FL_OBJECT * left; FL_OBJECT * hcenter; FL_OBJECT * right; FL_OBJECT * hequal; FL_OBJECT * snapobj; FL_OBJECT * bottom; FL_OBJECT * vcenter; FL_OBJECT * top; FL_OBJECT * vequal; FL_OBJECT * undo; FL_OBJECT * dismiss; } FD_align; extern FD_align * create_form_align( void ); typedef struct { FL_FORM * test; void * vdata; char * cdata; long ldata; FL_OBJECT * browser; FL_OBJECT * stoptesting; } FD_test; extern FD_test * create_form_test( void ); typedef struct { FL_FORM * helpform; void * vdata; char * cdata; long ldata; FL_OBJECT * browser; FL_OBJECT * vbutt; } FD_helpform; extern FD_helpform * create_form_helpform( void ); typedef struct { FL_FORM * resize; void * vdata; char * cdata; long ldata; FL_OBJECT * width; FL_OBJECT * height; FL_OBJECT * quit; FL_OBJECT * set_size; } FD_resize; extern FD_resize * create_form_resize( void ); #endif /* FD_control_h_ */ xforms-1.0.93sp1/fdesign/fd/pallette.h0000644000175000017500000000324511202603012016210 0ustar jensjens/** Header file generated by fdesign on Wed May 13 18:56:06 2009.**/ #ifndef FD_pmain_h_ #define FD_pmain_h_ #include /** Callbacks, globals and object handlers **/ extern void dismiss_pallete( FL_OBJECT *, long ); extern void pallette_entry_callback( FL_OBJECT *, long ); extern void pallette_entry_callback( FL_OBJECT *, long ); extern void pallette_entry_callback( FL_OBJECT *, long ); extern void pallette_entry_callback( FL_OBJECT *, long ); extern void pallette_entry_callback( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * pmain; void * vdata; char * cdata; long ldata; FL_OBJECT * folder; } FD_pmain; extern FD_pmain * create_form_pmain( void ); typedef struct { FL_FORM * buttform; void * vdata; char * cdata; long ldata; } FD_buttform; extern FD_buttform * create_form_buttform( void ); typedef struct { FL_FORM * staticform; void * vdata; char * cdata; long ldata; } FD_staticform; extern FD_staticform * create_form_staticform( void ); typedef struct { FL_FORM * valuatorform; void * vdata; char * cdata; long ldata; } FD_valuatorform; extern FD_valuatorform * create_form_valuatorform( void ); typedef struct { FL_FORM * choiceform; void * vdata; char * cdata; long ldata; } FD_choiceform; extern FD_choiceform * create_form_choiceform( void ); typedef struct { FL_FORM * miscform; void * vdata; char * cdata; long ldata; } FD_miscform; extern FD_miscform * create_form_miscform( void ); #endif /* FD_pmain_h_ */ xforms-1.0.93sp1/fdesign/fd/ui_theforms.fd0000644000175000017500000006261511375051674017120 0ustar jensjensMagic: 14000 Internal Form Definition File (do not change) Number of forms: 5 Unit of measure: FL_COORD_PIXEL Border Width: -1 SnapGrid: 5 =============== FORM =============== Name: control Width: 580 Height: 280 Number of Objects: 42 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 580 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: UP_FRAME box: 2 2 576 26 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 476 30 104 250 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 452 0 125 22 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_MEDIUM_SIZE lcol: FL_BLUE label: Form Designer shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: title callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 10 254 298 22 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: selmsg callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 315 254 75 22 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: oristatus callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 10 70 460 181 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BEGIN_GROUP type: 0 box: 0 10 10 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: fkey_group callback: argument: return: FL_RETURN_ALWAYS -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 483 51 45 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F1\nattribs shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 528 51 46 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F2\nlower shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 2 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 483 86 45 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F3\nraise shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 3 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 528 86 46 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F4\nall shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 4 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 483 121 45 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F5\nshow shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 5 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 528 121 46 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F6\nhide shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 6 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 483 156 45 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F7\ngroup shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 7 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 528 156 46 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F8\nungroup shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 8 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 483 191 45 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F9\ncopy shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 9 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 528 191 46 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F10\npaste shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 10 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 483 226 45 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F11\nselect shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 11 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 528 226 46 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: F12\ncut shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: func_cb argument: 12 -------------------- class: FL_END_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: return: FL_RETURN_ALWAYS -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 20 89 140 68 boxtype: FL_DOWN_BOX colors: FL_WHITE FL_YELLOW alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Forms shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: formbrowser callback: form_cb argument: 0 -------------------- class: FL_BROWSER type: MULTI_BROWSER box: 20 174 140 70 boxtype: FL_DOWN_BOX colors: FL_WHITE FL_YELLOW alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Groups shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: groupbrowser callback: group_cb argument: 0 -------------------- class: FL_TEXT type: NORMAL_TEXT box: 390 254 80 22 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: sizestatus callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 440 17 138 13 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: (c) T.C. Zhao & Mark Overmars shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 170 89 135 155 boxtype: FL_DOWN_BOX colors: FL_WHITE FL_YELLOW alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Objects shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: objectbrowser callback: object_cb argument: 0 -------------------- class: FL_BEGIN_GROUP type: 0 box: 0 10 10 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: shortcut_group callback: argument: return: FL_RETURN_ALWAYS -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 10 36 63 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: New Form shortcut: ^N resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: addform_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 74 36 73 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Delete Form shortcut: ^D resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: deleteform_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 148 36 78 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Rename Form shortcut: ^R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: renameform callback: changename_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 227 36 70 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Resize Form shortcut: ^S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: resizeform callback: changesize_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 310 36 50 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Align shortcut: ^A resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: align_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 365 36 50 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Test shortcut: ^T resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: test_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 420 36 50 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Help shortcut: ^H resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: help_cb argument: 0 -------------------- class: FL_END_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: return: FL_RETURN_ALWAYS -------------------- class: FL_BEGIN_GROUP type: 0 box: 0 10 10 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: menubar_group callback: argument: return: FL_RETURN_ALWAYS -------------------- class: FL_MENU type: PULLDOWN_MENU box: 365 4 60 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Options shortcut: ^P resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: optionmenu callback: optionmenu_callback argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 7 4 35 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: File shortcut: ^F resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: filemenu callback: filemenu_callback argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 58 4 40 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Form shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: formmenu callback: formmenu_callback argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 180 4 53 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Object shortcut: ^O resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: objectmenu callback: objectmenu_callback argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 115 4 48 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Group shortcut: ^G resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: groupmenu callback: groupmenu_callback argument: 0 -------------------- class: FL_END_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: return: FL_RETURN_ALWAYS =============== FORM =============== Name: align Width: 286 Height: 126 Number of Objects: 13 -------------------- class: FL_BOX type: UP_BOX box: 0 0 286 126 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 10 10 265 75 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 15 15 36 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @#<- shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: left callback: doalign_cb argument: FD_LEFT -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 53 15 36 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @#<-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hcenter callback: doalign_cb argument: FD_HCENTER -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 91 15 36 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @#-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: right callback: doalign_cb argument: FD_RIGHT -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 130 15 35 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: H. E shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hequal callback: doalign_cb argument: FD_HEQUAL -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 15 93 130 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: snapobj callback: snap_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 15 50 36 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @#2-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: bottom callback: doalign_cb argument: FD_BOTTOM -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 53 50 36 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @#8<-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vcenter callback: doalign_cb argument: FD_VCENTER -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 91 50 36 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLUE label: @#8-> shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: top callback: doalign_cb argument: FD_TOP -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 130 50 35 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: V.E shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vequal callback: doalign_cb argument: FD_VEQUAL -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 190 35 70 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Undo shortcut: Uu^U resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: undo callback: undoalign_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 195 95 70 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Dismiss shortcut: Dd^D resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: dismiss callback: exitalign_cb argument: 0 =============== FORM =============== Name: test Width: 272 Height: 291 Number of Objects: 4 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 272 291 boxtype: FL_FLAT_BOX colors: FL_INDIANRED FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 6 22 259 224 boxtype: FL_DOWN_BOX colors: FL_WHITE FL_YELLOW alignment: FL_ALIGN_TOP style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Object Returned shortcut: resize: FL_RESIZE_ALL gravity: FL_NorthWest FL_SouthEast name: browser callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 134 254 80 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Stop Testing shortcut: Ss^S resize: FL_RESIZE_NONE gravity: FL_SouthEast FL_SouthEast name: stoptesting callback: stoptest_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 45 254 80 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Clear Log shortcut: Cc^C resize: FL_RESIZE_NONE gravity: FL_SouthEast FL_SouthEast name: callback: clearlog_cb argument: 0 =============== FORM =============== Name: helpform Width: 536 Height: 321 Number of Objects: 10 -------------------- class: FL_BOX type: UP_BOX box: 0 0 536 321 boxtype: FL_UP_BOX colors: FL_SLATEBLUE FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 14 16 505 260 boxtype: FL_DOWN_BOX colors: FL_WHITE FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browser callback: argument: -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 14 286 61 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Version shortcut: Vv^V resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vbutt callback: showhelp_cb argument: HELP_VERSION -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 75 286 61 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: General shortcut: Gg^G resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: showhelp_cb argument: HELP_GENERAL -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 136 286 61 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Mouse shortcut: Mm^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: showhelp_cb argument: HELP_MOUSE -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 197 286 61 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Keyboard shortcut: Kk^K resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: showhelp_cb argument: HELP_KEYBOARD -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 258 286 61 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Group shortcut: pP^P resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: showhelp_cb argument: HELP_GROUP -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 319 286 61 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Testing shortcut: Tt^T resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: showhelp_cb argument: HELP_TEST -------------------- class: FL_BUTTON type: RADIO_BUTTON box: 380 286 61 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Saving shortcut: Ss^S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: showhelp_cb argument: HELP_SAVE -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 471 286 50 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Hide shortcut: Hh^H resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: exithelp_cb argument: 0 =============== FORM =============== Name: resize Width: 250 Height: 180 Number of Objects: 7 -------------------- class: FL_BOX type: UP_BOX box: 0 0 250 180 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 20 40 210 85 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 35 10 170 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Size of current form: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SPINNER type: INT_SPINNER box: 105 55 90 24 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Width: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: width callback: argument: return: FL_RETURN_END_CHANGED -------------------- class: FL_SPINNER type: INT_SPINNER box: 105 90 90 24 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Height: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: height callback: argument: return: FL_RETURN_END_CHANGED -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20 140 80 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Dismiss shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: quit callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 120 140 110 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Set new size shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: set_size callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fdesign/fd/pallette.fd0000644000175000017500000004241711177150610016372 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 6 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: pmain Width: 380 Height: 210 Number of Objects: 3 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 380 210 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TABFOLDER type: TOP_TABFOLDER box: 5 5 370 175 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: folder callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 311 183 62 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Dismiss shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: dismiss_pallete argument: 0 =============== FORM =============== Name: buttform Width: 360 Height: 150 Number of Objects: 9 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 360 150 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 10 10 345 130 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 15 15 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button shortcut: B#B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_BUTTON file: ../xpm/butt.xpm focus_file: fullpath: 0 data: butt_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 101 15 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LightButton shortcut: L#L resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_LIGHTBUTTON file: ../xpm/lightb.xpm focus_file: fullpath: 0 data: lightb_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 188 15 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: RoundButton shortcut: R#R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_ROUNDBUTTON file: ../xpm/roundb.xpm focus_file: fullpath: 0 data: roundb_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 275 15 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Round3DButton shortcut: 3#3 resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_ROUND3DBUTTON file: ../xpm/r3dbut.xpm focus_file: fullpath: 0 align: FL_ALIGN_TOP|FL_ALIGN_INSIDE data: r3dbut_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 58 80 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CheckButton shortcut: C#C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_CHECKBUTTON file: ../xpm/check.xpm focus_file: fullpath: 0 data: check_pixels focus_data: -------------------- class: FL_BITMAPBUTTON type: RADIO_BUTTON box: 145 80 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: BitmapButton shortcut: B#B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_BITMAPBUTTON file: ../xpm/picture.xbm focus_file: fullpath: 0 data: picture_bits focus_data: width: picture_width height: picture_height -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 231 80 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: PixmapButton shortcut: P#p resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_PIXMAPBUTTON file: ../xpm/xconq.xpm focus_file: fullpath: 0 data: xconq focus_data: =============== FORM =============== Name: staticform Width: 360 Height: 150 Number of Objects: 9 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 360 150 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 10 10 345 130 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 30 20 65 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Box shortcut: B#B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_BOX file: ../xpm/box.xpm focus_file: fullpath: 0 data: box_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 110 20 65 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Text shortcut: T#T resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_TEXT file: ../xpm/text.xpm focus_file: fullpath: 0 data: text_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 190 20 65 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Frame shortcut: F#F resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_LABELFRAME file: ../xpm/frame.xpm focus_file: fullpath: 0 data: frame_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 270 20 65 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Chart shortcut: C#C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_CHART file: ../xpm/chart.xpm focus_file: fullpath: 0 data: chart_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 30 80 65 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Clock shortcut: o#O resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_CLOCK file: ../xpm/clock.xpm focus_file: fullpath: 0 data: clock_pixels focus_data: -------------------- class: FL_BITMAPBUTTON type: RADIO_BUTTON box: 110 80 65 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Bitmap shortcut: B#B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_BITMAP file: ../xpm/picture1.xbm focus_file: fullpath: 0 data: picture1_bits focus_data: width: picture1_width height: picture1_height -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 210 80 65 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Pixmap shortcut: P#P resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_PIXMAP file: ../xpm/xconq1.xpm focus_file: fullpath: 0 data: xconq1 focus_data: =============== FORM =============== Name: valuatorform Width: 360 Height: 150 Number of Objects: 9 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 360 150 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 10 8 345 130 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 30 16 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Slider shortcut: S#S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_SLIDER file: ../xpm/sld.xpm focus_file: fullpath: 0 data: sld_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 183 16 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Scrollbar shortcut: b#b resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_SCROLLBAR file: ../xpm/scb.xpm focus_file: fullpath: 0 data: scb_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 260 16 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Dial shortcut: D#D resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_DIAL file: ../xpm/dial.xpm focus_file: fullpath: 0 data: dial_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 30 76 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Counter shortcut: C#C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_COUNTER file: ../xpm/cnt.xpm focus_file: fullpath: 0 data: cnt_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 105 76 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Positioner shortcut: P#P resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_POSITIONER file: ../xpm/pos.xpm focus_file: fullpath: 0 data: pos_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 106 16 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Valslider shortcut: #V resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_VALSLIDER file: ../xpm/vals.xpm focus_file: fullpath: 0 data: vals_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 185 76 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Thumbwheel shortcut: t#t resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_THUMBWHEEL file: ../xpm/twheel.xpm focus_file: fullpath: 0 data: twheel focus_data: =============== FORM =============== Name: choiceform Width: 360 Height: 150 Number of Objects: 5 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 360 150 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 10 10 345 130 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 30 20 60 60 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: M#M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_MENU file: ../xpm/menu.xpm focus_file: fullpath: 0 data: menu_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 100 20 60 60 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Choice shortcut: C#C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_CHOICE file: ../xpm/choice.xpm focus_file: fullpath: 0 data: choice_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 170 20 60 60 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Browser shortcut: B#B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_BROWSER file: ../xpm/br.xpm focus_file: fullpath: 0 data: br_pixels focus_data: =============== FORM =============== Name: miscform Width: 360 Height: 150 Number of Objects: 7 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 360 150 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME box: 10 10 345 130 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 30 16 70 45 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Timer shortcut: T#T resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_TIMER file: ../xpm/timer.xpm focus_file: fullpath: 0 data: timer_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 103 16 70 45 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: XYPlot shortcut: X#X resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_XYPLOT file: ../xpm/xyplot.xpm focus_file: fullpath: 0 data: xyplot_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 176 16 70 45 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Canvas shortcut: C#C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_CANVAS -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 250 16 70 45 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: GLCanvas shortcut: G#G resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_GLCANVAS file: ../xpm/glcan.xpm focus_file: fullpath: 0 data: glcan_pixels focus_data: -------------------- class: FL_PIXMAPBUTTON type: RADIO_BUTTON box: 30 82 70 40 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Tabfolder shortcut: f#f resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: pallette_entry_callback argument: FL_NTABFOLDER file: ../xpm/tab.xpm focus_file: fullpath: 0 data: tabfolder_pixels focus_data: ============================== create_the_forms xforms-1.0.93sp1/fdesign/fd/ui_objs.fd0000644000175000017500000002053111171560225016204 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 3 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: buttonform Width: 581 Height: 51 Number of Objects: 9 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 581 51 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 20 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: button shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 60 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: round shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 100 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: round3d shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 140 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: check shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 180 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: light shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 220 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: bitmap shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 260 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: pixmap shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 300 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: scroll shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: valuatorform Width: 581 Height: 51 Number of Objects: 7 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 581 51 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 20 5 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: slider shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 66 5 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: valslider shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 112 5 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: scrollbar shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 158 5 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: dial shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 204 5 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: counter shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 250 5 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: positioner shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: staticform Width: 581 Height: 51 Number of Objects: 9 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 581 51 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 20 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 70 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: frame shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 120 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: labelframe shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 170 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: text shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 220 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: bitmap shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 270 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: pixmap shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 320 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: chart shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 370 3 30 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: clock shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fdesign/fd/Makefile.am0000644000175000017500000000035211171560225016272 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = \ pallette.c \ pallette.fd \ pallette.h \ ui_attrib.c \ ui_attrib.fd \ ui_attrib.h \ ui_objs.c \ ui_objs.fd \ ui_objs.h \ ui_theforms.c \ ui_theforms.fd \ ui_theforms.h xforms-1.0.93sp1/fdesign/fd/ui_theforms.c0000644000175000017500000004036511375051674016747 0ustar jensjens/* Form definition file generated by fdesign */ #include #include "ui_theforms.h" /*************************************** ***************************************/ FD_control * create_form_control( void ) { FL_OBJECT *obj; FD_control *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->control = fl_bgn_form( FL_NO_BOX, 580, 280 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 580, 280, "" ); obj = fl_add_frame( FL_UP_FRAME, 2, 2, 576, 26, "" ); fl_set_object_color( obj, FL_COL1, FL_COL1 ); obj = fl_add_box( FL_UP_BOX, 476, 30, 104, 250, "" ); fdui->title = obj = fl_add_text( FL_NORMAL_TEXT, 452, 0, 125, 22, "Form Designer" ); fl_set_object_boxtype( obj, FL_NO_BOX ); fl_set_object_lcolor( obj, FL_BLUE ); fl_set_object_lsize( obj, FL_MEDIUM_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); fdui->selmsg = obj = fl_add_text( FL_NORMAL_TEXT, 10, 254, 298, 22, "" ); fl_set_object_boxtype( obj, FL_DOWN_BOX ); fl_set_object_color( obj, FL_COL1, FL_COL1 ); fdui->oristatus = obj = fl_add_text( FL_NORMAL_TEXT, 315, 254, 75, 22, "" ); fl_set_object_boxtype( obj, FL_DOWN_BOX ); fl_set_object_color( obj, FL_COL1, FL_COL1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 10, 70, 460, 181, "" ); fdui->fkey_group = fl_bgn_group( ); obj = fl_add_button( FL_NORMAL_BUTTON, 483, 51, 45, 35, "F1\nattribs" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 1 ); obj = fl_add_button( FL_NORMAL_BUTTON, 528, 51, 46, 35, "F2\nlower" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 2 ); obj = fl_add_button( FL_NORMAL_BUTTON, 483, 86, 45, 35, "F3\nraise" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 3 ); obj = fl_add_button( FL_NORMAL_BUTTON, 528, 86, 46, 35, "F4\nall" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 4 ); obj = fl_add_button( FL_NORMAL_BUTTON, 483, 121, 45, 35, "F5\nshow" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 5 ); obj = fl_add_button( FL_NORMAL_BUTTON, 528, 121, 46, 35, "F6\nhide" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 6 ); obj = fl_add_button( FL_NORMAL_BUTTON, 483, 156, 45, 35, "F7\ngroup" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 7 ); obj = fl_add_button( FL_NORMAL_BUTTON, 528, 156, 46, 35, "F8\nungroup" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 8 ); obj = fl_add_button( FL_NORMAL_BUTTON, 483, 191, 45, 35, "F9\ncopy" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 9 ); obj = fl_add_button( FL_NORMAL_BUTTON, 528, 191, 46, 35, "F10\npaste" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 10 ); obj = fl_add_button( FL_NORMAL_BUTTON, 483, 226, 45, 35, "F11\nselect" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 11 ); obj = fl_add_button( FL_NORMAL_BUTTON, 528, 226, 46, 35, "F12\ncut" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, func_cb, 12 ); fl_end_group( ); fdui->formbrowser = obj = fl_add_browser( FL_HOLD_BROWSER, 20, 89, 140, 68, "Forms" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, form_cb, 0 ); fdui->groupbrowser = obj = fl_add_browser( FL_MULTI_BROWSER, 20, 174, 140, 70, "Groups" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, group_cb, 0 ); fdui->sizestatus = obj = fl_add_text( FL_NORMAL_TEXT, 390, 254, 80, 22, "" ); fl_set_object_boxtype( obj, FL_DOWN_BOX ); fl_set_object_color( obj, FL_COL1, FL_COL1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); obj = fl_add_text( FL_NORMAL_TEXT, 440, 17, 138, 13, "(c) T.C. Zhao & Mark Overmars" ); fl_set_object_boxtype( obj, FL_NO_BOX ); fl_set_object_lsize( obj, FL_TINY_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); fdui->objectbrowser = obj = fl_add_browser( FL_HOLD_BROWSER, 170, 89, 135, 155, "Objects" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, object_cb, 0 ); fdui->shortcut_group = fl_bgn_group( ); obj = fl_add_button( FL_NORMAL_BUTTON, 10, 36, 63, 25, "New Form" ); fl_set_button_shortcut( obj, "^N", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, addform_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 74, 36, 73, 25, "Delete Form" ); fl_set_button_shortcut( obj, "^D", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, deleteform_cb, 0 ); fdui->renameform = obj = fl_add_button( FL_NORMAL_BUTTON, 148, 36, 78, 25, "Rename Form" ); fl_set_button_shortcut( obj, "^R", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, changename_cb, 0 ); fdui->resizeform = obj = fl_add_button( FL_NORMAL_BUTTON, 227, 36, 70, 25, "Resize Form" ); fl_set_button_shortcut( obj, "^S", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, changesize_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 310, 36, 50, 25, "Align" ); fl_set_button_shortcut( obj, "^A", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, align_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 365, 36, 50, 25, "Test" ); fl_set_button_shortcut( obj, "^T", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, test_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 420, 36, 50, 25, "Help" ); fl_set_button_shortcut( obj, "^H", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, help_cb, 0 ); fl_end_group( ); fdui->menubar_group = fl_bgn_group( ); fdui->optionmenu = obj = fl_add_menu( FL_PULLDOWN_MENU, 365, 4, 60, 20, "Options" ); fl_set_object_shortcut( obj, "^P", 1 ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, optionmenu_callback, 0 ); fdui->filemenu = obj = fl_add_menu( FL_PULLDOWN_MENU, 7, 4, 35, 20, "File" ); fl_set_object_shortcut( obj, "^F", 1 ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, filemenu_callback, 0 ); fdui->formmenu = obj = fl_add_menu( FL_PULLDOWN_MENU, 58, 4, 40, 20, "Form" ); fl_set_object_shortcut( obj, "^M", 1 ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, formmenu_callback, 0 ); fdui->objectmenu = obj = fl_add_menu( FL_PULLDOWN_MENU, 180, 4, 53, 20, "Object" ); fl_set_object_shortcut( obj, "^O", 1 ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, objectmenu_callback, 0 ); fdui->groupmenu = obj = fl_add_menu( FL_PULLDOWN_MENU, 115, 4, 48, 20, "Group" ); fl_set_object_shortcut( obj, "^G", 1 ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, groupmenu_callback, 0 ); fl_end_group( ); fl_end_form( ); fdui->control->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } /*************************************** ***************************************/ FD_align * create_form_align( void ) { FL_OBJECT *obj; FD_align *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->align = fl_bgn_form( FL_NO_BOX, 286, 126 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 286, 126, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 10, 10, 265, 75, "" ); fdui->left = obj = fl_add_button( FL_NORMAL_BUTTON, 15, 15, 36, 30, "@#<-" ); fl_set_object_lcolor( obj, FL_BLUE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, doalign_cb, FD_LEFT ); fdui->hcenter = obj = fl_add_button( FL_NORMAL_BUTTON, 53, 15, 36, 30, "@#<->" ); fl_set_object_lcolor( obj, FL_BLUE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, doalign_cb, FD_HCENTER ); fdui->right = obj = fl_add_button( FL_NORMAL_BUTTON, 91, 15, 36, 30, "@#->" ); fl_set_object_lcolor( obj, FL_BLUE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, doalign_cb, FD_RIGHT ); fdui->hequal = obj = fl_add_button( FL_NORMAL_BUTTON, 130, 15, 35, 30, "H. E" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, doalign_cb, FD_HEQUAL ); fdui->snapobj = obj = fl_add_counter( FL_NORMAL_COUNTER, 15, 93, 130, 25, "" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, snap_cb, 0 ); fdui->bottom = obj = fl_add_button( FL_NORMAL_BUTTON, 15, 50, 36, 30, "@#2->" ); fl_set_object_lcolor( obj, FL_BLUE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, doalign_cb, FD_BOTTOM ); fdui->vcenter = obj = fl_add_button( FL_NORMAL_BUTTON, 53, 50, 36, 30, "@#8<->" ); fl_set_object_lcolor( obj, FL_BLUE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, doalign_cb, FD_VCENTER ); fdui->top = obj = fl_add_button( FL_NORMAL_BUTTON, 91, 50, 36, 30, "@#8->" ); fl_set_object_lcolor( obj, FL_BLUE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, doalign_cb, FD_TOP ); fdui->vequal = obj = fl_add_button( FL_NORMAL_BUTTON, 130, 50, 35, 30, "V.E" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, doalign_cb, FD_VEQUAL ); fdui->undo = obj = fl_add_button( FL_NORMAL_BUTTON, 190, 35, 70, 25, "Undo" ); fl_set_button_shortcut( obj, "Uu^U", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, undoalign_cb, 0 ); fdui->dismiss = obj = fl_add_button( FL_NORMAL_BUTTON, 195, 95, 70, 25, "Dismiss" ); fl_set_button_shortcut( obj, "Dd^D", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, exitalign_cb, 0 ); fl_end_form( ); fdui->align->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } /*************************************** ***************************************/ FD_test * create_form_test( void ) { FL_OBJECT *obj; FD_test *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->test = fl_bgn_form( FL_NO_BOX, 272, 291 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 272, 291, "" ); fl_set_object_color( obj, FL_INDIANRED, FL_COL1 ); fdui->browser = obj = fl_add_browser( FL_NORMAL_BROWSER, 6, 22, 259, 224, "Object Returned" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fl_set_object_gravity( obj, FL_NorthWest, FL_SouthEast ); fdui->stoptesting = obj = fl_add_button( FL_NORMAL_BUTTON, 134, 254, 80, 26, "Stop Testing" ); fl_set_button_shortcut( obj, "Ss^S", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fl_set_object_callback( obj, stoptest_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 45, 254, 80, 26, "Clear Log" ); fl_set_button_shortcut( obj, "Cc^C", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fl_set_object_resize( obj, FL_RESIZE_NONE ); fl_set_object_gravity( obj, FL_SouthEast, FL_SouthEast ); fl_set_object_callback( obj, clearlog_cb, 0 ); fl_end_form( ); fdui->test->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } /*************************************** ***************************************/ FD_helpform * create_form_helpform( void ) { FL_OBJECT *obj; FD_helpform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->helpform = fl_bgn_form( FL_NO_BOX, 536, 321 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 536, 321, "" ); fl_set_object_color( obj, FL_SLATEBLUE, FL_COL1 ); fdui->browser = obj = fl_add_browser( FL_NORMAL_BROWSER, 14, 16, 505, 260, "" ); fdui->vbutt = obj = fl_add_button( FL_RADIO_BUTTON, 14, 286, 61, 26, "Version" ); fl_set_button_shortcut( obj, "Vv^V", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, showhelp_cb, HELP_VERSION ); obj = fl_add_button( FL_RADIO_BUTTON, 75, 286, 61, 26, "General" ); fl_set_button_shortcut( obj, "Gg^G", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, showhelp_cb, HELP_GENERAL ); obj = fl_add_button( FL_RADIO_BUTTON, 136, 286, 61, 26, "Mouse" ); fl_set_button_shortcut( obj, "Mm^M", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, showhelp_cb, HELP_MOUSE ); obj = fl_add_button( FL_RADIO_BUTTON, 197, 286, 61, 26, "Keyboard" ); fl_set_button_shortcut( obj, "Kk^K", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, showhelp_cb, HELP_KEYBOARD ); obj = fl_add_button( FL_RADIO_BUTTON, 258, 286, 61, 26, "Group" ); fl_set_button_shortcut( obj, "pP^P", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, showhelp_cb, HELP_GROUP ); obj = fl_add_button( FL_RADIO_BUTTON, 319, 286, 61, 26, "Testing" ); fl_set_button_shortcut( obj, "Tt^T", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, showhelp_cb, HELP_TEST ); obj = fl_add_button( FL_RADIO_BUTTON, 380, 286, 61, 26, "Saving" ); fl_set_button_shortcut( obj, "Ss^S", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, showhelp_cb, HELP_SAVE ); obj = fl_add_button( FL_NORMAL_BUTTON, 471, 286, 50, 26, "Hide" ); fl_set_button_shortcut( obj, "Hh^H", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, exithelp_cb, 0 ); fl_end_form( ); fdui->helpform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } /*************************************** ***************************************/ FD_resize * create_form_resize( void ) { FL_OBJECT *obj; FD_resize *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->resize = fl_bgn_form( FL_NO_BOX, 250, 180 ); obj = fl_add_box( FL_UP_BOX, 0, 0, 250, 180, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 20, 40, 210, 85, "" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); obj = fl_add_text( FL_NORMAL_TEXT, 35, 10, 170, 20, "Size of current form:" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->width = obj = fl_add_spinner( FL_INT_SPINNER, 105, 55, 90, 24, "Width: " ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->height = obj = fl_add_spinner( FL_INT_SPINNER, 105, 90, 90, 24, "Height: " ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fl_set_object_lsize( fl_get_spinner_input( obj ), FL_NORMAL_SIZE ); fdui->quit = obj = fl_add_button( FL_NORMAL_BUTTON, 20, 140, 80, 25, "Dismiss" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fdui->set_size = obj = fl_add_button( FL_NORMAL_BUTTON, 120, 140, 110, 25, "Set new size" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_end_form( ); fdui->resize->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/fd/pallette.c0000644000175000017500000003222511202603012016203 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "pallette.h" /*************************************** ***************************************/ FD_pmain * create_form_pmain( void ) { FL_OBJECT *obj; FD_pmain *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->pmain = fl_bgn_form( FL_NO_BOX, 380, 210 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 380, 210, "" ); fdui->folder = obj = fl_add_tabfolder( FL_TOP_TABFOLDER, 5, 5, 370, 175, "" ); fl_set_object_resize( obj, FL_RESIZE_ALL ); obj = fl_add_button( FL_NORMAL_BUTTON, 311, 183, 62, 23, " Dismiss " ); fl_set_object_callback( obj, dismiss_pallete, 0 ); fl_end_form( ); fdui->pmain->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } #include "butt.xpm" #include "lightb.xpm" #include "roundb.xpm" #include "r3dbut.xpm" #include "check.xpm" #include "picture.xbm" #include "xconq.xpm" /*************************************** ***************************************/ FD_buttform * create_form_buttform( void ) { FL_OBJECT *obj; FD_buttform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->buttform = fl_bgn_form( FL_NO_BOX, 360, 150 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 360, 150, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 10, 10, 345, 130, "" ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 15, 15, 70, 40, "Button" ); fl_set_button_shortcut( obj, "B#B", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_BUTTON ); fl_set_pixmapbutton_data( obj, butt_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 101, 15, 70, 40, "LightButton" ); fl_set_button_shortcut( obj, "L#L", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_LIGHTBUTTON ); fl_set_pixmapbutton_data( obj, lightb_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 188, 15, 70, 40, "RoundButton" ); fl_set_button_shortcut( obj, "R#R", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_ROUNDBUTTON ); fl_set_pixmapbutton_data( obj, roundb_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 275, 15, 70, 40, "Round3DButton" ); fl_set_button_shortcut( obj, "3#3", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_ROUND3DBUTTON ); fl_set_pixmapbutton_align( obj, FL_ALIGN_TOP | FL_ALIGN_INSIDE, 3, 3 ); fl_set_pixmapbutton_data( obj, r3dbut_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 58, 80, 70, 40, "CheckButton" ); fl_set_button_shortcut( obj, "C#C", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_CHECKBUTTON ); fl_set_pixmapbutton_data( obj, check_pixels ); obj = fl_add_bitmapbutton( FL_RADIO_BUTTON, 145, 80, 70, 40, "BitmapButton" ); fl_set_button_shortcut( obj, "B#B", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_BITMAPBUTTON ); fl_set_bitmapbutton_data( obj, picture_width, picture_height, ( unsigned char * ) picture_bits ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 231, 80, 70, 40, "PixmapButton" ); fl_set_button_shortcut( obj, "P#P", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_PIXMAPBUTTON ); fl_set_pixmapbutton_data( obj, xconq ); fl_end_form( ); fdui->buttform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } #include "box.xpm" #include "text.xpm" #include "frame.xpm" #include "chart.xpm" #include "clock.xpm" #include "picture1.xbm" #include "xconq1.xpm" /*************************************** ***************************************/ FD_staticform * create_form_staticform( void ) { FL_OBJECT *obj; FD_staticform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->staticform = fl_bgn_form( FL_NO_BOX, 360, 150 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 360, 150, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 10, 10, 345, 130, "" ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 30, 20, 65, 40, "Box" ); fl_set_button_shortcut( obj, "B#B", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_BOX ); fl_set_pixmapbutton_data( obj, box_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 110, 20, 65, 40, "Text" ); fl_set_button_shortcut( obj, "T#T", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_TEXT ); fl_set_pixmapbutton_data( obj, text_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 190, 20, 65, 40, "Frame" ); fl_set_button_shortcut( obj, "F#F", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_LABELFRAME ); fl_set_pixmapbutton_data( obj, frame_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 270, 20, 65, 40, "Chart" ); fl_set_button_shortcut( obj, "C#C", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_CHART ); fl_set_pixmapbutton_data( obj, chart_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 30, 80, 65, 40, "Clock" ); fl_set_button_shortcut( obj, "o#O", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_CLOCK ); fl_set_pixmapbutton_data( obj, clock_pixels ); obj = fl_add_bitmapbutton( FL_RADIO_BUTTON, 110, 80, 65, 40, "Bitmap" ); fl_set_button_shortcut( obj, "B#B", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_BITMAP ); fl_set_bitmapbutton_data( obj, picture1_width, picture1_height, ( unsigned char * ) picture1_bits ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 210, 80, 65, 40, "Pixmap" ); fl_set_button_shortcut( obj, "P#P", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_PIXMAP ); fl_set_pixmapbutton_data( obj, xconq1 ); fl_end_form( ); fdui->staticform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } #include "sld.xpm" #include "scb.xpm" #include "dial.xpm" #include "cnt.xpm" #include "pos.xpm" #include "vals.xpm" #include "twheel.xpm" /*************************************** ***************************************/ FD_valuatorform * create_form_valuatorform( void ) { FL_OBJECT *obj; FD_valuatorform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->valuatorform = fl_bgn_form( FL_NO_BOX, 360, 150 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 360, 150, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 10, 8, 345, 130, "" ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 30, 16, 70, 40, "Slider" ); fl_set_button_shortcut( obj, "S#S", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_SLIDER ); fl_set_pixmapbutton_data( obj, sld_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 183, 16, 70, 40, "Scrollbar" ); fl_set_button_shortcut( obj, "b#B", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_SCROLLBAR ); fl_set_pixmapbutton_data( obj, scb_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 260, 16, 70, 40, "Dial" ); fl_set_button_shortcut( obj, "D#D", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_DIAL ); fl_set_pixmapbutton_data( obj, dial_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 30, 76, 70, 40, "Counter" ); fl_set_button_shortcut( obj, "C#C", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_COUNTER ); fl_set_pixmapbutton_data( obj, cnt_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 105, 76, 70, 40, "Positioner" ); fl_set_button_shortcut( obj, "P#P", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_POSITIONER ); fl_set_pixmapbutton_data( obj, pos_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 106, 16, 70, 40, "Valslider" ); fl_set_button_shortcut( obj, "#V", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_VALSLIDER ); fl_set_pixmapbutton_data( obj, vals_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 185, 76, 70, 40, "Thumbwheel" ); fl_set_button_shortcut( obj, "t#T", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_THUMBWHEEL ); fl_set_pixmapbutton_data( obj, twheel ); fl_end_form( ); fdui->valuatorform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } #include "menu.xpm" #include "choice.xpm" #include "br.xpm" /*************************************** ***************************************/ FD_choiceform * create_form_choiceform( void ) { FL_OBJECT *obj; FD_choiceform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->choiceform = fl_bgn_form( FL_NO_BOX, 360, 150 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 360, 150, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 10, 10, 345, 130, "" ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 30, 20, 60, 60, "Menu" ); fl_set_button_shortcut( obj, "M#M", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_MENU ); fl_set_pixmapbutton_data( obj, menu_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 100, 20, 60, 60, "Choice" ); fl_set_button_shortcut( obj, "C#C", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_CHOICE ); fl_set_pixmapbutton_data( obj, choice_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 170, 20, 60, 60, "Browser" ); fl_set_button_shortcut( obj, "B#B", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_BROWSER ); fl_set_pixmapbutton_data( obj, br_pixels ); fl_end_form( ); fdui->choiceform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } #include "timer.xpm" #include "xyplot.xpm" #include "glcan.xpm" #include "tab.xpm" /*************************************** ***************************************/ FD_miscform * create_form_miscform( void ) { FL_OBJECT *obj; FD_miscform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->miscform = fl_bgn_form( FL_NO_BOX, 360, 150 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 360, 150, "" ); obj = fl_add_frame( FL_ENGRAVED_FRAME, 10, 10, 345, 130, "" ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 30, 16, 70, 45, "Timer" ); fl_set_button_shortcut( obj, "T#T", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_TIMER ); fl_set_pixmapbutton_data( obj, timer_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 103, 16, 70, 45, "XYPlot" ); fl_set_button_shortcut( obj, "X#X", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_XYPLOT ); fl_set_pixmapbutton_data( obj, xyplot_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 176, 16, 70, 45, "Canvas" ); fl_set_button_shortcut( obj, "C#C", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_CANVAS ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 250, 16, 70, 45, "GLCanvas" ); fl_set_button_shortcut( obj, "G#G", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_GLCANVAS ); fl_set_pixmapbutton_data( obj, glcan_pixels ); obj = fl_add_pixmapbutton( FL_RADIO_BUTTON, 30, 82, 70, 40, "Tabfolder" ); fl_set_button_shortcut( obj, "f#F", 1 ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_set_object_callback( obj, pallette_entry_callback, FL_NTABFOLDER ); fl_set_pixmapbutton_data( obj, tabfolder_pixels ); fl_end_form( ); fdui->miscform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/fd/ui_attrib.c0000644000175000017500000001753311375527000016375 0ustar jensjens/* Form definition file generated by fdesign */ #include #include "ui_attrib.h" /*************************************** ***************************************/ FD_attrib * create_form_attrib( void ) { FL_OBJECT *obj; FD_attrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->attrib = fl_bgn_form( FL_NO_BOX, 630, 310 ); fdui->background = obj = fl_add_box( FL_FLAT_BOX, 0, 0, 630, 310, "" ); obj = fl_add_box( FL_UP_BOX, 541, 0, 89, 310, "" ); fdui->readyobj = obj = fl_add_button( FL_RETURN_BUTTON, 550, 85, 70, 24, "Accept" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fdui->cancelobj = obj = fl_add_button( FL_NORMAL_BUTTON, 550, 109, 70, 24, "Cancel" ); fl_set_button_shortcut( obj, "#C^[", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fdui->applyobj = obj = fl_add_button( FL_NORMAL_BUTTON, 550, 133, 70, 24, "Apply" ); fl_set_button_shortcut( obj, "#A", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, apply_cb, 0 ); fdui->restoreobj = obj = fl_add_button( FL_NORMAL_BUTTON, 550, 158, 70, 24, " Restore " ); fl_set_button_shortcut( obj, "#R", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, restore_cb, 0 ); fdui->autoapplyobj = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 545, 25, 25, 30, "AutoApply" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_object_callback( obj, autoapply_setting_cb, 0 ); fdui->attrib_folder = obj = fl_add_tabfolder( FL_TOP_TABFOLDER, 6, 5, 531, 299, "" ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fl_set_object_resize( obj, FL_RESIZE_ALL ); fl_set_object_callback( obj, folder_switch_cb, 0 ); fl_end_form( ); fdui->attrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } /*************************************** ***************************************/ FD_generic_attrib * create_form_generic_attrib( void ) { FL_OBJECT *obj; FD_generic_attrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->generic_attrib = fl_bgn_form( FL_NO_BOX, 534, 278 ); fdui->background = obj = fl_add_box( FL_FLAT_BOX, 0, 0, 534, 278, "" ); fdui->generic_group = fl_bgn_group( ); fdui->text[2] = obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 235, 120, 185, 137, "Misc." ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->text[1] = obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 235, 15, 185, 95, "Font" ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->text[0] = obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 10, 15, 212, 242, "Basic Attributes" ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->typeobj = obj = fl_add_choice( FL_NORMAL_CHOICE, 69, 31, 143, 25, "Type" ); fl_set_object_shortcut( obj, "#T", 1 ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fdui->boxobj = obj = fl_add_choice( FL_NORMAL_CHOICE, 69, 61, 143, 25, "BoxType" ); fl_set_object_shortcut( obj, "#B", 1 ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fdui->nameobj = obj = fl_add_input( FL_NORMAL_INPUT, 69, 121, 143, 25, "Name" ); fl_set_input_shortcut( obj, "#N", 1 ); fl_set_object_color( obj, FL_COL1, FL_TOP_BCOL ); fl_set_object_callback( obj, validate_cvar_name_cb, 0 ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->cbnameobj = obj = fl_add_input( FL_NORMAL_INPUT, 69, 151, 143, 25, "Callback" ); fl_set_input_shortcut( obj, "#K", 1 ); fl_set_object_color( obj, FL_COL1, FL_TOP_BCOL ); fl_set_object_callback( obj, validate_cvar_name_cb, 1 ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->argobj = obj = fl_add_input( FL_NORMAL_INPUT, 69, 181, 143, 25, "Argument" ); fl_set_input_shortcut( obj, "#U", 1 ); fl_set_object_color( obj, FL_COL1, FL_TOP_BCOL ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->scobj = obj = fl_add_input( FL_NORMAL_INPUT, 69, 211, 143, 25, "Shortcut" ); fl_set_input_shortcut( obj, "#S", 1 ); fl_set_object_color( obj, FL_COL1, FL_TOP_BCOL ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->labelobj = obj = fl_add_input( FL_NORMAL_INPUT, 69, 91, 143, 25, "Label" ); fl_set_input_shortcut( obj, "#L", 1 ); fl_set_object_color( obj, FL_COL1, FL_TOP_BCOL ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->fontobj = obj = fl_add_choice( FL_NORMAL_CHOICE, 278, 24, 131, 25, "Font" ); fl_set_object_shortcut( obj, "#F", 1 ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fdui->styleobj = obj = fl_add_choice( FL_NORMAL_CHOICE, 278, 51, 131, 25, "Style" ); fl_set_object_shortcut( obj, "#S", 1 ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fdui->sizeobj = obj = fl_add_choice( FL_NORMAL_CHOICE, 278, 78, 131, 25, "Size" ); fl_set_object_shortcut( obj, "#Z", 1 ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fdui->text[3] = obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 431, 80, 89, 150, "Color" ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->lcolobj = obj = fl_add_button( FL_NORMAL_BUTTON, 440, 191, 70, 20, "LabelColor" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, setcolor_cb, 0 ); fdui->col1obj = obj = fl_add_button( FL_NORMAL_BUTTON, 440, 111, 70, 20, "Color1" ); fl_set_button_shortcut( obj, "#1", 1 ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, setcolor_cb, 1 ); fdui->col2obj = obj = fl_add_button( FL_NORMAL_BUTTON, 440, 151, 70, 20, "Color 2" ); fl_set_button_shortcut( obj, "#2", 1 ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, setcolor_cb, 2 ); fdui->align = obj = fl_add_choice( FL_NORMAL_CHOICE, 305, 130, 108, 23, "LabelAlign" ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fdui->nwgravity = obj = fl_add_choice( FL_NORMAL_CHOICE, 305, 182, 108, 23, "NW Gravity" ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fdui->segravity = obj = fl_add_choice( FL_NORMAL_CHOICE, 305, 206, 108, 23, "SE Gravity" ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fdui->inside = obj = fl_add_choice( FL_NORMAL_CHOICE, 305, 154, 108, 23, "In/Out" ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_set_object_callback( obj, auto_apply_cb, 0 ); fdui->resize = obj = fl_add_choice( FL_NORMAL_CHOICE, 305, 230, 108, 23, "Resize" ); fl_set_object_boxtype( obj, FL_SHADOW_BOX ); fl_end_group( ); fl_end_form( ); fdui->generic_attrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } /*************************************** ***************************************/ FD_nullattrib * create_form_nullattrib( void ) { FL_OBJECT *obj; FD_nullattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->nullattrib = fl_bgn_form( FL_NO_BOX, 540, 280 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 540, 280, "" ); obj = fl_add_box( FL_UP_BOX, 90, 100, 350, 50, "Not implemented (or not interesting)" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_end_form( ); fdui->nullattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/fd/ui_objs.c0000644000175000017500000001107111202603012016017 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "ui_objs.h" /*************************************** ***************************************/ FD_buttonform * create_form_buttonform( void ) { FL_OBJECT *obj; FD_buttonform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->buttonform = fl_bgn_form( FL_NO_BOX, 581, 51 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 581, 51, "" ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 20, 3, 30, 30, "button" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 60, 3, 30, 30, "round" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 100, 3, 30, 30, "round3d" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 140, 3, 30, 30, "check" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 180, 3, 30, 30, "light" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 220, 3, 30, 30, "bitmap" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 260, 3, 30, 30, "pixmap" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 300, 3, 30, 30, "scroll" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_end_form( ); fdui->buttonform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } /*************************************** ***************************************/ FD_valuatorform * create_form_valuatorform( void ) { FL_OBJECT *obj; FD_valuatorform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->valuatorform = fl_bgn_form( FL_NO_BOX, 581, 51 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 581, 51, "" ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 20, 5, 30, 30, "slider" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 66, 5, 30, 30, "valslider" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 112, 5, 30, 30, "scrollbar" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 158, 5, 30, 30, "dial" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 204, 5, 30, 30, "counter" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 250, 5, 30, 30, "positioner" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_end_form( ); fdui->valuatorform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } /*************************************** ***************************************/ FD_staticform * create_form_staticform( void ) { FL_OBJECT *obj; FD_staticform *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->staticform = fl_bgn_form( FL_NO_BOX, 581, 51 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 581, 51, "" ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 20, 3, 30, 30, "box" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 70, 3, 30, 30, "frame" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 120, 3, 30, 30, "labelframe" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 170, 3, 30, 30, "text" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 220, 3, 30, 30, "bitmap" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 270, 3, 30, 30, "pixmap" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 320, 3, 30, 30, "chart" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 370, 3, 30, 30, "clock" ); fl_set_object_color( obj, FL_COL1, FL_YELLOW ); fl_end_form( ); fdui->staticform->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/fd/.cvsignore0000644000175000017500000000002511171560225016233 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/fdesign/fd/ui_attrib.fd0000644000175000017500000003015711375527000016541 0ustar jensjensMagic: 14000 Internal Form Definition File (do not change) Number of forms: 3 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: attrib Width: 630 Height: 310 Number of Objects: 8 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 630 310 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 541 0 89 310 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: RETURN_BUTTON box: 550 85 70 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Accept shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: readyobj callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 550 109 70 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Cancel shortcut: #C^[ resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: cancelobj callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 550 133 70 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Apply shortcut: #A resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: applyobj callback: apply_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 550 158 70 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Restore shortcut: #R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: restoreobj callback: restore_cb argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 545 25 25 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: AutoApply shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: autoapplyobj callback: autoapply_setting_cb argument: 0 -------------------- class: FL_TABFOLDER type: TOP_TABFOLDER box: 6 5 531 299 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_LEFT_TOP style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: attrib_folder callback: folder_switch_cb argument: 0 =============== FORM =============== Name: generic_attrib Width: 534 Height: 278 Number of Objects: 25 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 534 278 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_BEGIN_GROUP type: 0 box: 0 10 10 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: generic_group callback: argument: return: FL_RETURN_ALWAYS -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 235 120 185 137 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_LEFT_TOP style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Misc. shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: text[2] callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 235 15 185 95 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_LEFT_TOP style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Font shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: text[1] callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 10 15 212 242 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_LEFT_TOP style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Basic Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: text[0] callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 69 31 143 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Type shortcut: #T resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: typeobj callback: auto_apply_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 69 61 143 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: BoxType shortcut: #B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: boxobj callback: auto_apply_cb argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 69 121 143 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_TOP_BCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Name shortcut: #N resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: nameobj callback: validate_cvar_name_cb argument: 0 return: FL_RETURN_END_CHANGED -------------------- class: FL_INPUT type: NORMAL_INPUT box: 69 151 143 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_TOP_BCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Callback shortcut: #K resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: cbnameobj callback: validate_cvar_name_cb argument: 1 return: FL_RETURN_END_CHANGED -------------------- class: FL_INPUT type: NORMAL_INPUT box: 69 181 143 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_TOP_BCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Argument shortcut: #U resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: argobj callback: argument: return: FL_RETURN_END_CHANGED -------------------- class: FL_INPUT type: NORMAL_INPUT box: 69 211 143 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_TOP_BCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Shortcut shortcut: #S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: scobj callback: auto_apply_cb argument: 0 return: FL_RETURN_END_CHANGED -------------------- class: FL_INPUT type: NORMAL_INPUT box: 69 91 143 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_TOP_BCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Label shortcut: #L resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: labelobj callback: auto_apply_cb argument: 0 return: FL_RETURN_END_CHANGED -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 278 24 131 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Font shortcut: #F resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: fontobj callback: auto_apply_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 278 51 131 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Style shortcut: #S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: styleobj callback: auto_apply_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 278 78 131 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Size shortcut: #Z resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: sizeobj callback: auto_apply_cb argument: 0 -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 431 80 89 150 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_LEFT_TOP style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Color shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: text[3] callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 440 191 70 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LabelColor shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: lcolobj callback: setcolor_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 440 111 70 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Color1 shortcut: #1 resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: col1obj callback: setcolor_cb argument: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 440 151 70 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Color 2 shortcut: #2 resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: col2obj callback: setcolor_cb argument: 2 -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 305 130 108 23 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: LabelAlign shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: align callback: auto_apply_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 305 182 108 23 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: NW Gravity shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: nwgravity callback: argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 305 206 108 23 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: SE Gravity shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: segravity callback: argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 305 154 108 23 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: In/Out shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: inside callback: auto_apply_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE box: 305 230 108 23 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Resize shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: resize callback: argument: 0 -------------------- class: FL_END_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: return: FL_RETURN_ALWAYS =============== FORM =============== Name: nullattrib Width: 540 Height: 280 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 90 100 350 50 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Not implemented (or not interesting) shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fdesign/fd/ui_objs.h0000644000175000017500000000147011202603012016026 0ustar jensjens/** Header file generated by fdesign on Wed May 13 18:47:17 2009.**/ #ifndef FD_buttonform_h_ #define FD_buttonform_h_ #include /** Callbacks, globals and object handlers **/ /**** Forms and Objects ****/ typedef struct { FL_FORM * buttonform; void * vdata; char * cdata; long ldata; } FD_buttonform; extern FD_buttonform * create_form_buttonform( void ); typedef struct { FL_FORM * valuatorform; void * vdata; char * cdata; long ldata; } FD_valuatorform; extern FD_valuatorform * create_form_valuatorform( void ); typedef struct { FL_FORM * staticform; void * vdata; char * cdata; long ldata; } FD_staticform; extern FD_staticform * create_form_staticform( void ); #endif /* FD_buttonform_h_ */ xforms-1.0.93sp1/fdesign/fd/Makefile.in0000644000175000017500000002425711377311602016316 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = fdesign/fd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = \ pallette.c \ pallette.fd \ pallette.h \ ui_attrib.c \ ui_attrib.fd \ ui_attrib.h \ ui_objs.c \ ui_objs.fd \ ui_objs.h \ ui_theforms.c \ ui_theforms.fd \ ui_theforms.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fdesign/fd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fdesign/fd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/fdesign/fd/ui_attrib.h0000644000175000017500000000351611375527000016376 0ustar jensjens/* Header file generated by fdesign on Fri May 21 18:00:00 2010 */ #ifndef FD_attrib_h_ #define FD_attrib_h_ #include /* Callbacks, globals and object handlers */ extern void apply_cb( FL_OBJECT *, long ); extern void restore_cb( FL_OBJECT *, long ); extern void autoapply_setting_cb( FL_OBJECT *, long ); extern void folder_switch_cb( FL_OBJECT *, long ); extern void auto_apply_cb( FL_OBJECT *, long ); extern void validate_cvar_name_cb( FL_OBJECT *, long ); extern void setcolor_cb( FL_OBJECT *, long ); /* Forms and Objects */ typedef struct { FL_FORM * attrib; void * vdata; char * cdata; long ldata; FL_OBJECT * background; FL_OBJECT * readyobj; FL_OBJECT * cancelobj; FL_OBJECT * applyobj; FL_OBJECT * restoreobj; FL_OBJECT * autoapplyobj; FL_OBJECT * attrib_folder; } FD_attrib; extern FD_attrib * create_form_attrib( void ); typedef struct { FL_FORM * generic_attrib; void * vdata; char * cdata; long ldata; FL_OBJECT * background; FL_OBJECT * generic_group; FL_OBJECT * typeobj; FL_OBJECT * boxobj; FL_OBJECT * nameobj; FL_OBJECT * cbnameobj; FL_OBJECT * argobj; FL_OBJECT * scobj; FL_OBJECT * labelobj; FL_OBJECT * fontobj; FL_OBJECT * styleobj; FL_OBJECT * sizeobj; FL_OBJECT * lcolobj; FL_OBJECT * col1obj; FL_OBJECT * col2obj; FL_OBJECT * align; FL_OBJECT * nwgravity; FL_OBJECT * segravity; FL_OBJECT * inside; FL_OBJECT * resize; FL_OBJECT * text[ 4 ]; } FD_generic_attrib; extern FD_generic_attrib * create_form_generic_attrib( void ); typedef struct { FL_FORM * nullattrib; void * vdata; char * cdata; long ldata; } FD_nullattrib; extern FD_nullattrib * create_form_nullattrib( void ); #endif /* FD_attrib_h_ */ xforms-1.0.93sp1/fdesign/xpm.h0000644000175000017500000004402211247055071014626 0ustar jensjens/* * Copyright (C) 1989-95 GROUPE BULL * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the name of GROUPE BULL shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from GROUPE BULL. */ /*****************************************************************************\ * xpm.h: * * * * XPM library * * Include file * * * * Developed by Arnaud Le Hors * \*****************************************************************************/ /* * The code related to FOR_MSW has been added by * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 */ /* * The code related to AMIGA has been added by * Lorens Younes (d93-hyo@nada.kth.se) 4/96 */ #ifndef XPM_h #define XPM_h /* * first some identification numbers: * the version and revision numbers are determined with the following rule: * SO Major number = LIB minor version number. * SO Minor number = LIB sub-minor version number. * e.g: Xpm version 3.2f * we forget the 3 which is the format number, 2 gives 2, and f gives 6. * thus we have XpmVersion = 2 and XpmRevision = 6 * which gives SOXPMLIBREV = 2.6 * * Then the XpmIncludeVersion number is built from these numbers. */ #define XpmFormat 3 #define XpmVersion 4 #define XpmRevision 11 #define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 + XpmRevision) #ifndef XPM_NUMBERS #ifdef FOR_MSW # define SYSV /* uses memcpy string.h etc. */ # include # include "simx.h" /* defines some X stuff using MSW types */ #define NEED_STRCASECMP /* at least for MSVC++ */ #else /* FOR_MSW */ # ifdef AMIGA # include "amigax.h" # else /* not AMIGA */ # include # include # endif /* not AMIGA */ #endif /* FOR_MSW */ /* let's define Pixel if it is not done yet */ #if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED) typedef unsigned long Pixel; /* Index into colormap */ # define PIXEL_ALREADY_TYPEDEFED #endif /* make sure we know whether function prototypes are needed or not */ #ifndef NeedFunctionPrototypes # if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) # define NeedFunctionPrototypes 1 # else # define NeedFunctionPrototypes 0 # endif #endif /* Return ErrorStatus codes: * null if full success * positive if partial success * negative if failure */ #define XpmColorError 1 #define XpmSuccess 0 #define XpmOpenFailed -1 #define XpmFileInvalid -2 #define XpmNoMemory -3 #define XpmColorFailed -4 typedef struct { char *name; /* Symbolic color name */ char *value; /* Color value */ Pixel pixel; /* Color pixel */ } XpmColorSymbol; typedef struct { char *name; /* name of the extension */ unsigned int nlines; /* number of lines in this extension */ char **lines; /* pointer to the extension array of strings */ } XpmExtension; typedef struct { char *string; /* characters string */ char *symbolic; /* symbolic name */ char *m_color; /* monochrom default */ char *g4_color; /* 4 level grayscale default */ char *g_color; /* other level grayscale default */ char *c_color; /* color default */ } XpmColor; typedef struct { unsigned int width; /* image width */ unsigned int height; /* image height */ unsigned int cpp; /* number of characters per pixel */ unsigned int ncolors; /* number of colors */ XpmColor *colorTable; /* list of related colors */ unsigned int *data; /* image data */ } XpmImage; typedef struct { unsigned long valuemask; /* Specifies which attributes are defined */ char * hints_cmt; /* Comment of the hints section */ char * colors_cmt; /* Comment of the colors section */ char * pixels_cmt; /* Comment of the pixels section */ unsigned int x_hotspot; /* Returns the x hotspot's coordinate */ unsigned int y_hotspot; /* Returns the y hotspot's coordinate */ unsigned int nextensions; /* number of extensions */ XpmExtension * extensions; /* pointer to array of extensions */ } XpmInfo; typedef int ( * XpmAllocColorFunc )( #if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, char * /* colorname */, XColor * /* xcolor */, void * /* closure */ #endif ); typedef int ( * XpmFreeColorsFunc )( #if NeedFunctionPrototypes Display * /* display */, Colormap /* colormap */, Pixel * /* pixels */, int /* npixels */, void * /* closure */ #endif ); typedef struct { unsigned long valuemask; /* Specifies which attributes are defined */ Visual *visual; /* Specifies the visual to use */ Colormap colormap; /* Specifies the colormap to use */ unsigned int depth; /* Specifies the depth */ unsigned int width; /* Returns the width of the created pixmap */ unsigned int height; /* Returns the height of the created pixmap */ unsigned int x_hotspot; /* Returns the x hotspot's coordinate */ unsigned int y_hotspot; /* Returns the y hotspot's coordinate */ unsigned int cpp; /* Specifies the number of char per pixel */ Pixel *pixels; /* List of used color pixels */ unsigned int npixels; /* Number of used pixels */ XpmColorSymbol *colorsymbols; /* List of color symbols to override */ unsigned int numsymbols; /* Number of symbols */ char *rgb_fname; /* RGB text file name */ unsigned int nextensions; /* Number of extensions */ XpmExtension *extensions; /* List of extensions */ unsigned int ncolors; /* Number of colors */ XpmColor *colorTable; /* List of colors */ /* 3.2 backward compatibility code */ char *hints_cmt; /* Comment of the hints section */ char *colors_cmt; /* Comment of the colors section */ char *pixels_cmt; /* Comment of the pixels section */ /* end 3.2 bc */ unsigned int mask_pixel; /* Color table index of transparent color */ /* Color Allocation Directives */ Bool exactColors; /* Only use exact colors for visual */ unsigned int closeness; /* Allowable RGB deviation */ unsigned int red_closeness; /* Allowable red deviation */ unsigned int green_closeness; /* Allowable green deviation */ unsigned int blue_closeness; /* Allowable blue deviation */ int color_key; /* Use colors from this color set */ Pixel *alloc_pixels; /* Returns the list of alloc'ed color pixels */ int nalloc_pixels; /* Returns the number of alloc'ed color pixels */ Bool alloc_close_colors; /* Specify whether close colors should be allocated using XAllocColor or not */ int bitmap_format; /* Specify the format of 1bit depth images: ZPixmap or XYBitmap */ /* Color functions */ XpmAllocColorFunc alloc_color; /* Application color allocator */ XpmFreeColorsFunc free_colors; /* Application color de-allocator */ void *color_closure; /* Application private data to pass to alloc_color and free_colors */ } XpmAttributes; /* XpmAttributes value masks bits */ #define XpmVisual (1L<<0) #define XpmColormap (1L<<1) #define XpmDepth (1L<<2) #define XpmSize (1L<<3) /* width & height */ #define XpmHotspot (1L<<4) /* x_hotspot & y_hotspot */ #define XpmCharsPerPixel (1L<<5) #define XpmColorSymbols (1L<<6) #define XpmRgbFilename (1L<<7) /* 3.2 backward compatibility code */ #define XpmInfos (1L<<8) #define XpmReturnInfos XpmInfos /* end 3.2 bc */ #define XpmReturnPixels (1L<<9) #define XpmExtensions (1L<<10) #define XpmReturnExtensions XpmExtensions #define XpmExactColors (1L<<11) #define XpmCloseness (1L<<12) #define XpmRGBCloseness (1L<<13) #define XpmColorKey (1L<<14) #define XpmColorTable (1L<<15) #define XpmReturnColorTable XpmColorTable #define XpmReturnAllocPixels (1L<<16) #define XpmAllocCloseColors (1L<<17) #define XpmBitmapFormat (1L<<18) #define XpmAllocColor (1L<<19) #define XpmFreeColors (1L<<20) #define XpmColorClosure (1L<<21) /* XpmInfo value masks bits */ #define XpmComments XpmInfos #define XpmReturnComments XpmComments /* XpmAttributes mask_pixel value when there is no mask */ #ifndef FOR_MSW #define XpmUndefPixel 0x80000000 #else /* int is only 16 bit for MSW */ #define XpmUndefPixel 0x8000 #endif /* * color keys for visual type, they must fit along with the number key of * each related element in xpmColorKeys[] defined in XpmI.h */ #define XPM_MONO 2 #define XPM_GREY4 3 #define XPM_GRAY4 3 #define XPM_GREY 4 #define XPM_GRAY 4 #define XPM_COLOR 5 /* macros for forward declarations of functions with prototypes */ #if NeedFunctionPrototypes #define FUNC(f, t, p) extern t f p #define LFUNC(f, t, p) static t f p #else #define FUNC(f, t, p) extern t f() #define LFUNC(f, t, p) static t f() #endif /* * functions declarations */ #ifdef __cplusplus extern "C" { #endif /* FOR_MSW, all ..Pixmap.. are excluded, only the ..XImage.. are used */ /* Same for Amiga! */ #if !defined(FOR_MSW) && !defined(AMIGA) FUNC(XpmCreatePixmapFromData, int, (Display *display, Drawable d, char **data, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); FUNC(XpmCreateDataFromPixmap, int, (Display *display, char ***data_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes)); FUNC(XpmReadFileToPixmap, int, (Display *display, Drawable d, char *filename, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); FUNC(XpmWriteFileFromPixmap, int, (Display *display, char *filename, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes)); #endif FUNC(XpmCreateImageFromData, int, (Display *display, char **data, XImage **image_return, XImage **shapemask_return, XpmAttributes *attributes)); FUNC(XpmCreateDataFromImage, int, (Display *display, char ***data_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes)); FUNC(XpmReadFileToImage, int, (Display *display, char *filename, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes)); FUNC(XpmWriteFileFromImage, int, (Display *display, char *filename, XImage *image, XImage *shapeimage, XpmAttributes *attributes)); FUNC(XpmCreateImageFromBuffer, int, (Display *display, char *buffer, XImage **image_return, XImage **shapemask_return, XpmAttributes *attributes)); #if !defined(FOR_MSW) && !defined(AMIGA) FUNC(XpmCreatePixmapFromBuffer, int, (Display *display, Drawable d, char *buffer, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); FUNC(XpmCreateBufferFromImage, int, (Display *display, char **buffer_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes)); FUNC(XpmCreateBufferFromPixmap, int, (Display *display, char **buffer_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes)); #endif FUNC(XpmReadFileToBuffer, int, (char *filename, char **buffer_return)); FUNC(XpmWriteFileFromBuffer, int, (char *filename, char *buffer)); FUNC(XpmReadFileToData, int, (char *filename, char ***data_return)); FUNC(XpmWriteFileFromData, int, (char *filename, char **data)); FUNC(XpmAttributesSize, int, ()); FUNC(XpmFreeAttributes, void, (XpmAttributes *attributes)); FUNC(XpmFreeExtensions, void, (XpmExtension *extensions, int nextensions)); FUNC(XpmFreeXpmImage, void, (XpmImage *image)); FUNC(XpmFreeXpmInfo, void, (XpmInfo *info)); FUNC(XpmGetErrorString, char *, (int errcode)); FUNC(XpmLibraryVersion, int, ()); /* XpmImage functions */ FUNC(XpmReadFileToXpmImage, int, (char *filename, XpmImage *image, XpmInfo *info)); FUNC(XpmWriteFileFromXpmImage, int, (char *filename, XpmImage *image, XpmInfo *info)); #if !defined(FOR_MSW) && !defined(AMIGA) FUNC(XpmCreatePixmapFromXpmImage, int, (Display *display, Drawable d, XpmImage *image, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); #endif FUNC(XpmCreateImageFromXpmImage, int, (Display *display, XpmImage *image, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes)); FUNC(XpmCreateXpmImageFromImage, int, (Display *display, XImage *image, XImage *shapeimage, XpmImage *xpmimage, XpmAttributes *attributes)); #if !defined(FOR_MSW) && !defined(AMIGA) FUNC(XpmCreateXpmImageFromPixmap, int, (Display *display, Pixmap pixmap, Pixmap shapemask, XpmImage *xpmimage, XpmAttributes *attributes)); #endif FUNC(XpmCreateDataFromXpmImage, int, (char ***data_return, XpmImage *image, XpmInfo *info)); FUNC(XpmCreateXpmImageFromData, int, (char **data, XpmImage *image, XpmInfo *info)); FUNC(XpmCreateXpmImageFromBuffer, int, (char *buffer, XpmImage *image, XpmInfo *info)); FUNC(XpmCreateBufferFromXpmImage, int, (char **buffer_return, XpmImage *image, XpmInfo *info)); FUNC(XpmGetParseError, int, (char *filename, int *linenum_return, int *charnum_return)); FUNC(XpmFree, void, (void *ptr)); #ifdef __cplusplus } /* for C++ V2.0 */ #endif /* backward compatibility */ /* for version 3.0c */ #define XpmPixmapColorError XpmColorError #define XpmPixmapSuccess XpmSuccess #define XpmPixmapOpenFailed XpmOpenFailed #define XpmPixmapFileInvalid XpmFileInvalid #define XpmPixmapNoMemory XpmNoMemory #define XpmPixmapColorFailed XpmColorFailed #define XpmReadPixmapFile(dpy, d, file, pix, mask, att) \ XpmReadFileToPixmap(dpy, d, file, pix, mask, att) #define XpmWritePixmapFile(dpy, file, pix, mask, att) \ XpmWriteFileFromPixmap(dpy, file, pix, mask, att) /* for version 3.0b */ #define PixmapColorError XpmColorError #define PixmapSuccess XpmSuccess #define PixmapOpenFailed XpmOpenFailed #define PixmapFileInvalid XpmFileInvalid #define PixmapNoMemory XpmNoMemory #define PixmapColorFailed XpmColorFailed #define ColorSymbol XpmColorSymbol #define XReadPixmapFile(dpy, d, file, pix, mask, att) \ XpmReadFileToPixmap(dpy, d, file, pix, mask, att) #define XWritePixmapFile(dpy, file, pix, mask, att) \ XpmWriteFileFromPixmap(dpy, file, pix, mask, att) #define XCreatePixmapFromData(dpy, d, data, pix, mask, att) \ XpmCreatePixmapFromData(dpy, d, data, pix, mask, att) #define XCreateDataFromPixmap(dpy, data, pix, mask, att) \ XpmCreateDataFromPixmap(dpy, data, pix, mask, att) #endif /* XPM_NUMBERS */ #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_freeobj.c0000644000175000017500000001203511311524627016132 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_freeobj.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting free object class specific attributes, in this * case, the handler name. We store this piece of into * in ob->c_vdata; */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include #include "spec/freeobj_spec.h" static char *get_free_handle( FL_OBJECT * ob, const char * name ); static char ori_handle_name[ 128 ]; extern FD_freeobjattrib *create_form_freeobjattrib( void ); static FD_freeobjattrib *fo_attrib; static SuperSPEC *freeobj_spec; static void show_spec( SuperSPEC * ); static FL_OBJECT *edited; /*************************************** ***************************************/ void * get_freeobj_spec_fdform( void ) { if ( ! fo_attrib ) fo_attrib = create_form_freeobjattrib( ); return fo_attrib; } /*************************************** ***************************************/ void freeobj_spec_restore( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( ob->c_vdata ) fl_free( ob->c_vdata ); ob->c_vdata = fl_strdup( ori_handle_name ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec FL_UNUSED_ARG ) { fl_set_input( fo_attrib->hname, get_free_handle( edited, 0 ) ); } /*************************************** ***************************************/ int set_freeobj_attrib( FL_OBJECT * ob ) { fo_attrib->vdata = edited = ob; *ori_handle_name = '\0'; if ( ob->c_vdata ) strcpy( ori_handle_name, ob->c_vdata ); show_spec( freeobj_spec ); return 0; } /*************************************** ***************************************/ int noop_handle( FL_OBJECT * ob, int e, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int k FL_UNUSED_ARG, void * xev FL_UNUSED_ARG ) { if ( e == FL_DRAW ) { fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); return 0; } if ( ob->type == FL_INACTIVE_FREE ) return 0; if ( ob->type == FL_INPUT_FREE ) return e == FL_KEYPRESS; return 1; } /*************************************** ***************************************/ #if 0 static FL_OBJECT * create_a_freeobj( FL_OBJECT * ob ) { FL_OBJECT *defobj = 0; defobj = fl_create_free( ob->type, ob->x, ob->y, ob->w, ob->h, ob->label, noop_handle ); return defobj; } #endif /*************************************** ***************************************/ void emit_freeobj_code( FILE * fp FL_UNUSED_ARG, FL_OBJECT * ob FL_UNUSED_ARG ) { } /*************************************** ***************************************/ void save_freeobj_attrib( FILE * fp, FL_OBJECT * ob ) { if ( ob->c_vdata ) fprintf( fp, " handler: %s\n", ( char * ) ob->c_vdata ); } /*************************************** ***************************************/ void handler_name_change_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { edited->c_vdata = fl_strdup( fl_get_input( ob ) ); } /* default free object handler name */ #define MAXFREEOBJ 16 /*************************************** ***************************************/ static char * get_free_handle( FL_OBJECT * ob, const char * name ) { static int n; static char buf[ 1024 ]; static FL_OBJECT *freeobj[ MAXFREEOBJ ]; int i, k; if ( ob->c_vdata ) strcpy( buf, ob->c_vdata ); else if ( name && *name ) sprintf( buf, "freeobj_%s_handle", name ); else if ( *ob->label ) sprintf( buf, "freeobj_%s_handle", ob->label ); else { for ( k = -1, i = 0; i < MAXFREEOBJ && k < 0; i++ ) if ( freeobj[ i ] == ob ) k = i; if ( k < 0 ) { k = ++n; freeobj[ k ] = ob; } sprintf( buf, "freeobj%d_handle", k ); } return buf; } #include "spec/freeobj_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_spinner.c0000644000175000017500000001750711253144551016204 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include "fd_main.h" #include "fd_spec.h" #include "private/pspinner.h" #include "spec/spinner_spec.h" extern FD_spinnerattrib *create_form_spinnerattrib( void ); static FD_spinnerattrib *spn_attrib; static SuperSPEC *spinner_spec; static void init_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_spinner_spec_fdform( void ) { if ( ! spn_attrib ) { spn_attrib = create_form_spinnerattrib( ); setup_how_return_menu( spn_attrib->returnsetting ); fl_set_menu_item_mode( spn_attrib->returnsetting, 5, FL_PUP_BOX | FL_PUP_GRAY ); fl_set_menu_item_mode( spn_attrib->returnsetting, 6, FL_PUP_BOX | FL_PUP_GRAY ); } return spn_attrib; } /*************************************** ***************************************/ void spinner_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { superspec_to_spec( spn_attrib->vdata ); init_spec( get_superspec( spn_attrib->vdata ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void init_spec( SuperSPEC * spec ) { fl_set_counter_value( spn_attrib->prec, spec->prec ); set_finput_value( spn_attrib->minval, spec->dmin, spec->prec ); set_finput_value( spn_attrib->maxval, spec->dmax, spec->prec ); set_finput_value( spn_attrib->initialval, spec->dval, spec->prec ); set_finput_value( spn_attrib->step, spec->dstep, spec->prec ); reset_how_return_menu( spn_attrib->returnsetting, spec->how_return ); } /*************************************** ***************************************/ int set_spinner_attrib( FL_OBJECT * ob ) { spn_attrib->vdata = ob; spinner_spec = get_superspec( ob ); if ( ob->type == FL_INT_SPINNER ) fl_hide_object( spn_attrib->prec ); else { fl_set_counter_step( spn_attrib->prec, 1, 2 ); fl_set_counter_bounds( spn_attrib->prec, 0, DBL_DIG ); fl_set_counter_precision( spn_attrib->prec, 0 ); fl_show_object( spn_attrib->prec ); } init_spec( spinner_spec ); return 0; } /*************************************** ***************************************/ void emit_spinner_code( FILE * fp, FL_OBJECT * obj ) { FL_OBJECT *defobj; SuperSPEC *spec, *defspec; if ( obj->objclass != FL_SPINNER ) return; /* Create a default object */ defobj = fl_create_spinner( obj->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( obj ); if ( spec->prec != defspec->prec ) fprintf( fp, " fl_set_spinner_precision( obj, %d );\n", spec->prec ); if ( spec->dmin != defspec->dmin || spec->dmax != defspec->dmax ) fprintf( fp, " fl_set_spinner_bounds( obj, %.*f, %.*f );\n", spec->prec, spec->dmin, spec->prec, spec->dmax ); if ( spec->dval != defspec->dval ) fprintf( fp, " fl_set_spinner_value( obj, %.*f );\n", spec->prec, spec->dval ); if ( spec->dstep != defspec->dstep ) fprintf( fp, " fl_set_spinner_step( obj, %.*f );\n", spec->prec, spec->dstep ); if ( obj->lsize != defobj->lsize ) fprintf( fp, " fl_set_object_lsize( fl_get_spinner_input( obj ), " "%s );\n", lsize_name( obj->lsize ) ); if ( obj->lstyle != defobj->lstyle ) fprintf( fp, " fl_set_object_lstyle( fl_get_spinner_input( obj ), " "%s );\n", style_name( obj->lstyle ) ); if ( obj->col1 != defobj->col1 || obj->col2 != defobj->col2 ) fprintf( fp, " fl_set_object_color( fl_get_spinner_input( obj ), " "%s, %s );\n", fli_query_colorname( obj->col1 ), fli_query_colorname( obj->col2 ) ); fl_free_object( defobj ); } /*************************************** ***************************************/ void save_spinner_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defspec, *spec; if ( ob->objclass != FL_SPINNER ) return; /* Create a default object */ defobj = fl_create_spinner( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( spec->dmin != defspec->dmin || spec->dmax != defspec->dmax ) fprintf( fp, " bounds: %.*f %.*f\n", spec->prec, spec->dmin, spec->prec, spec->dmax ); if ( spec->prec != defspec->prec ) fprintf( fp, " precision: %d\n", spec->prec ); if ( spec->dval != defspec->dval ) fprintf( fp, " value: %.*f\n", spec->prec, spec->dval ); if ( spec->dstep != defspec->dstep ) fprintf( fp, " step: %.*f\n", spec->prec, spec->dstep ); fl_free_object( defobj ); } /*************************************** ***************************************/ void spn_precision_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { double p = fl_get_counter_value( ob ); fl_set_spinner_precision( spn_attrib->vdata, p ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void spn_minmax_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double min = get_finput_value( spn_attrib->minval ); double max = get_finput_value( spn_attrib->maxval ); fl_set_spinner_bounds( spn_attrib->vdata, min, max ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void spn_stepchange_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double s1 = get_finput_value( spn_attrib->step ); fl_set_spinner_step( spn_attrib->vdata, s1 ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void spn_initialvalue_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double val = get_finput_value( spn_attrib->initialval ); fl_set_spinner_value( spn_attrib->vdata, val ); if ( val != fl_get_spinner_value( spn_attrib->vdata ) ) { spinner_spec->dval = fl_get_spinner_value( spn_attrib->vdata ); set_finput_value( spn_attrib->initialval, spinner_spec->dval, spinner_spec->prec ); } if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void spn_returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( spn_attrib->returnsetting, spn_attrib->vdata ); } #include "spec/spinner_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/Makefile.am0000644000175000017500000000206311246322761015706 0ustar jensjensinclude $(top_srcdir)/config/common.am CLEANFILES = fdesign.1 EXTRA_DIST = Change Readme fdesign.man SUBDIRS = fd fd4test notes spec xpm man_MANS = fdesign.1 fdesign.1: cp -p $(srcdir)/fdesign.man fdesign.1 # forms.h is a generated file INCLUDES = -I../lib -I../lib/include -I./xpm -I$(top_srcdir)/lib $(X_CFLAGS) bin_PROGRAMS = fdesign fdesign_LDADD = ../lib/libforms.la $(X_LIBS) $(X_PRE_LIBS) $(XPM_LIB) -lX11 $(LIBS) $(X_EXTRA_LIBS) fdesign_SOURCES = \ fd_attribs.c \ fd_control.c \ fd_fake.c \ fd_file.c \ fd_file_fun.c \ fd_forms.c \ fd_groups.c \ fd_help.c \ fd_help.h \ fd_initforms.c \ fd_main.c \ fd_main.h \ fd_names.c \ fd_objects.c \ fd_pallette.c \ fd_printC.c \ fd_rubber.c \ fd_select.c \ fd_spec.c \ fd_spec.h \ fd_super.c \ fd_util.c \ sp_browser.c \ sp_button.c \ sp_choice.c \ sp_counter.c \ sp_spinner.c \ sp_dial.c \ sp_freeobj.c \ sp_menu.c \ sp_pixmap.c \ sp_positioner.c \ sp_scrollbar.c \ sp_slider.c \ sp_twheel.c \ sp_xyplot.c \ sp_util.c \ xpm.h # viewforms.c \ # viewforms.h \ # viewforms_main.c xforms-1.0.93sp1/fdesign/Change0000644000175000017500000000200311171560225014750 0ustar jensjensV0.57 o. modified copyright o. added shift+tab to select prev selection (05/10/00) o. fixed a potential bad fp in get_xpm_stuff(). (10/18/99) o. enlarged xpm filename length etc. V0.56 o. fixed a File->Save bug that causes the confirmation popup. o. fixed a strangeness with type change that forgets the object attributes o. fixed a radio button confusion problem that turned out to be in the lib o. added scheme filter V0.55 o. added helper/tooltip handling. Fixed a bug with bitmapbutton o. added SECRETX_INPUT o. fixed a form load problem: fscanf() eats newline o. fixed a how_return problem for counter and dial. o. fixed a focus_data for pixmap problem (10/25/98) o. fixed a positioner ystep not written problem. o. fixed a segfault problem when failed to connetct o. fixed a group handling problem: not in class struct (9/29/98) V0.54 o. re-organized fd_objects.c a little o. Added thumbwheel o. Fixed a fd_pallete problem where a misplaced button screws up the re-scaling o. Added gridstyle support o. aded label button xforms-1.0.93sp1/fdesign/sp_counter.c0000644000175000017500000001717511253144535016210 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_counter.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting counter class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include #include "fd_main.h" #include "fd_spec.h" #include "private/pcounter.h" #include "spec/counter_spec.h" extern FD_counterattrib *create_form_counterattrib( void ); static FD_counterattrib *cnt_attrib; static SuperSPEC *counter_spec; static void init_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_counter_spec_fdform( void ) { if ( ! cnt_attrib ) { cnt_attrib = create_form_counterattrib( ); setup_how_return_menu( cnt_attrib->returnsetting ); fl_set_menu_item_mode( cnt_attrib->returnsetting, 5, FL_PUP_BOX | FL_PUP_GRAY ); fl_set_menu_item_mode( cnt_attrib->returnsetting, 6, FL_PUP_BOX | FL_PUP_GRAY ); } return cnt_attrib; } /*************************************** ***************************************/ void counter_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { superspec_to_spec( cnt_attrib->vdata ); init_spec( get_superspec( cnt_attrib->vdata ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void init_spec( SuperSPEC * spec ) { fl_set_counter_value( cnt_attrib->prec, spec->prec ); set_finput_value( cnt_attrib->minval, spec->min, spec->prec ); set_finput_value( cnt_attrib->maxval, spec->max, spec->prec ); set_finput_value( cnt_attrib->initialval, spec->val, spec->prec ); set_finput_value( cnt_attrib->step1, spec->sstep, spec->prec ); set_finput_value( cnt_attrib->step2, spec->lstep, spec->prec ); reset_how_return_menu( cnt_attrib->returnsetting, spec->how_return ); } /*************************************** ***************************************/ int set_counter_attrib( FL_OBJECT * ob ) { cnt_attrib->vdata = ob; counter_spec = get_superspec( ob ); fl_set_counter_precision( cnt_attrib->prec, 0 ); fl_set_counter_step( cnt_attrib->prec, 1, 2 ); fl_set_counter_bounds( cnt_attrib->prec, 0, DBL_DIG ); if ( ob->type == FL_SIMPLE_COUNTER ) fl_hide_object( cnt_attrib->step2 ); init_spec( counter_spec ); return 0; } /*************************************** ***************************************/ void emit_counter_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *spec, *defspec; if ( ob->objclass != FL_COUNTER ) return; /* create a default object */ defobj = fl_create_counter( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( spec->prec != defspec->prec ) fprintf( fp, " fl_set_counter_precision( obj, %d );\n", spec->prec ); if ( spec->min != defspec->min || spec->max != defspec->max ) fprintf( fp, " fl_set_counter_bounds( obj, %.*f, %.*f );\n", spec->prec, spec->min, spec->prec, spec->max ); if ( spec->val != defspec->val ) fprintf( fp, " fl_set_counter_value( obj, %.*f );\n", spec->prec, spec->val ); if ( spec->sstep != defspec->sstep || spec->lstep != defspec->lstep ) fprintf( fp, " fl_set_counter_step( obj, %.*f, %.*f );\n", spec->prec, spec->sstep, spec->prec, spec->lstep ); fl_free_object( defobj ); } /*************************************** ***************************************/ void save_counter_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defspec, *spec; if ( ob->objclass != FL_COUNTER ) return; /* Create a default object */ defobj = fl_create_counter( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( spec->min != defspec->min || spec->max != defspec->max ) fprintf( fp, " bounds: %.*f %.*f\n", spec->prec, spec->min, spec->prec, spec->max ); if ( spec->prec != defspec->prec ) fprintf( fp, " precision: %d\n", spec->prec ); if ( spec->val != defspec->val ) fprintf( fp, " value: %.*f\n", spec->prec, spec->val ); if ( spec->sstep != defspec->sstep ) fprintf( fp, " sstep: %.*f\n", spec->prec, spec->sstep ); if ( spec->lstep != defspec->lstep ) fprintf( fp, " lstep: %.*f\n", spec->prec, spec->lstep ); fl_free_object( defobj ); } /*************************************** ***************************************/ void cnt_precision_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { double p = fl_get_counter_value( ob ); fl_set_counter_precision( cnt_attrib->vdata, p ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void cnt_minmax_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double min = get_finput_value( cnt_attrib->minval ); double max = get_finput_value( cnt_attrib->maxval ); fl_set_counter_bounds( cnt_attrib->vdata, min, max ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void cnt_stepchange_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { float s1 = get_finput_value( cnt_attrib->step1 ); float s2 = get_finput_value( cnt_attrib->step2 ); fl_set_counter_step( cnt_attrib->vdata, s1, s2 ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void cnt_initialvalue_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double val = get_finput_value( cnt_attrib->initialval ); fl_set_counter_value( cnt_attrib->vdata, val ); if ( val != fl_get_counter_value( cnt_attrib->vdata ) ) { counter_spec->val = fl_get_counter_value( cnt_attrib->vdata ); set_finput_value( cnt_attrib->initialval, counter_spec->val, counter_spec->prec ); } if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void cnt_returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( cnt_attrib->returnsetting, cnt_attrib->vdata ); } #include "spec/counter_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_super.c0000644000175000017500000004505311301354620015622 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_super.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * translation between superspec and spec */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "private/pslider.h" #include "private/pbrowser.h" #include "private/ppositioner.h" #include "private/pcounter.h" #include "private/pspinner.h" #include "private/pscrollbar.h" #include "private/pdial.h" #include "private/pxyplot.h" #include "private/pchoice.h" #include "private/pmenu.h" /*************************************** ***************************************/ SuperSPEC * get_superspec( FL_OBJECT * ob ) { SuperSPEC *sp = ob->u_vdata; return sp ? sp : spec_to_superspec( ob ); } /*************************************** ***************************************/ SuperSPEC * spec_to_superspec( FL_OBJECT * ob ) { SuperSPEC *spp; int i; int n; if ( ! ob->u_vdata ) { ob->u_vdata = spp = fl_calloc( 1, sizeof *spp ); spp->content = NULL; spp->shortcut = NULL; spp->callback = NULL; spp->mode = NULL; spp->mval = NULL; spp->cspecv = NULL; spp->new_menuapi = 0; } else spp = ob->u_vdata; spp->how_return = ob->how_return; if ( ob->objclass == FL_BROWSER ) { FLI_BROWSER_SPEC *sp = ob->spec; spp->h_pref = sp->h_pref; spp->v_pref = sp->v_pref; for ( i = 1; i <= spp->nlines; i++ ) { fl_safe_free( spp->content[ i ] ); fl_safe_free( spp->shortcut[ i ] ); fl_safe_free( spp->callback[ i ] ); } n = fl_get_browser_maxline( ob ); spp->content = fl_realloc( spp->content, ( n + 1 ) * sizeof *spp->content ); spp->shortcut = fl_realloc( spp->shortcut, ( n + 1 ) * sizeof *spp->shortcut ); spp->callback = fl_realloc( spp->callback, ( n + 1 ) * sizeof *spp->callback ); spp->mode = fl_realloc( spp->mode, ( n + 1 ) * sizeof *spp->mode ); spp->mval = fl_realloc( spp->mval, ( n + 1 ) * sizeof *spp->mval ); spp->nlines = n; for ( i = 1; i <= n; i++ ) { spp->content[ i ] = fl_strdup( fl_get_browser_line( ob, i ) ); spp->shortcut[ i ] = spp->callback[ i ] = NULL; } } else if ( ob->objclass == FL_CHOICE ) { FLI_CHOICE_SPEC *sp = ob->spec; for ( i = 1; i <= spp->nlines; i++ ) { fl_safe_free( spp->content[ i ] ); fl_safe_free( spp->shortcut[ i ] ); } n = spp->nlines = sp->numitems; spp->content = fl_realloc( spp->content, ( n + 1 ) * sizeof *spp->content ); spp->shortcut = fl_realloc( spp->shortcut, ( n + 1 ) * sizeof *spp->shortcut ); spp->callback = fl_realloc( spp->callback, ( n + 1 ) * sizeof *spp->callback ); spp->mode = fl_realloc( spp->mode, ( n + 1 ) * sizeof *spp->mode ); spp->mval = fl_realloc( spp->mval, ( n + 1 ) * sizeof *spp->mval ); spp->align = sp->align; spp->int_val = sp->val; for ( i = 1; i <= n; i++ ) { spp->mode[ i ] = sp->mode[ i ]; spp->content[ i ] = fl_strdup( fl_get_choice_item_text( ob, i ) ); if ( sp->shortcut[ i ] ) spp->shortcut[ i ] = fl_strdup( sp->shortcut[ i ] ); else spp->shortcut[ i ] = NULL; } } else if ( ob->objclass == FL_MENU ) { FLI_MENU_SPEC *sp = ob->spec; for ( i = 1; i <= spp->nlines; i++ ) { fl_safe_free( spp->content[ i ] ); fl_safe_free( spp->shortcut[ i ] ); fl_safe_free( spp->callback[ i ] ); } n = spp->nlines = sp->numitems; spp->content = fl_realloc( spp->content, ( n + 1 ) * sizeof *spp->content ); spp->shortcut = fl_realloc( spp->shortcut, ( n + 1 ) * sizeof *spp->shortcut ); spp->callback = fl_realloc( spp->callback, ( n + 1 ) * sizeof *spp->callback ); spp->mode = fl_realloc( spp->mode, ( n + 1 ) * sizeof *spp->mode ); spp->mval = fl_realloc( spp->mval, ( n + 1 ) * sizeof *spp->mval ); for ( i = 1; i <= n; i++ ) { spp->mode[ i ] = sp->mode[ i ]; spp->mval[ i ] = sp->mval[ i ]; spp->content[ i ] = fl_strdup( fl_get_menu_item_text( ob, sp->mval[ i ] ) ); if ( sp->shortcut[ i ] ) spp->shortcut[ i ] = fl_strdup( sp->shortcut[ i ] ); else spp->shortcut[ i ] = NULL; if ( sp->cb[ i ] ) spp->callback[ i ] = fl_strdup( ( char * ) sp->cb[ i ] ); else spp->callback[ i ] = NULL; } } else if ( ob->objclass == FL_SLIDER || ob->objclass == FL_VALSLIDER || ob->objclass == FL_THUMBWHEEL ) { FLI_SLIDER_SPEC *sp = ob->spec; spp->val = sp->val; spp->min = sp->min; spp->max = sp->max; spp->step = sp->step; spp->prec = sp->prec; spp->ldelta = sp->ldelta; spp->rdelta = sp->rdelta; spp->slsize = sp->slsize; } else if ( ISBUTTON( ob->objclass ) || ob->objclass == FL_PIXMAP || ob->objclass == FL_BITMAP ) { FL_BUTTON_SPEC *sp = ob->spec; IconInfo *info; spp->mbuttons = 0; for ( i = 0; i < 5; i++ ) if ( sp->react_to[ i ] ) spp->mbuttons |= 1 << i; spp->int_val = sp->val; if ( ! spp->cspecv ) { info = spp->cspecv = fl_calloc( 1, sizeof *info ); info->show_focus = 1; info->dx = info->dy = 3; info->align = FL_ALIGN_CENTER; info->fullpath = 1; } info = spp->cspecv; if ( ob->objclass == FL_PIXMAPBUTTON || ob->objclass == FL_BITMAPBUTTON || ob->objclass == FL_PIXMAP || ob->objclass == FL_BITMAP ) { spp->align = info->align; spp->dx = info->dx; spp->dy = info->dy; spp->show_focus = info->show_focus; spp->use_data = info->use_data; spp->fullpath = info->fullpath; strcpy( spp->filename, info->filename ); strcpy( spp->data, info->data ); strcpy( spp->focus_filename, info->focus_filename ); strcpy( spp->helper, info->helper ); strcpy( spp->focus_data, info->focus_data ); strcpy( spp->width, info->width ); strcpy( spp->height, info->height ); } } else if ( ob->objclass == FL_POSITIONER ) { FLI_POSITIONER_SPEC *sp = ob->spec; spp->xstep = sp->xstep; spp->ystep = sp->ystep; spp->xmin = sp->xmin; spp->xmax = sp->xmax; spp->xval = sp->xval; spp->ymin = sp->ymin; spp->ymax = sp->ymax; spp->yval = sp->yval; } else if ( ob->objclass == FL_COUNTER ) { FLI_COUNTER_SPEC *sp = ob->spec; spp->val = sp->val; spp->lstep = sp->lstep; spp->sstep = sp->sstep; spp->min = sp->min; spp->max = sp->max; spp->prec = sp->prec; } else if ( ob->objclass == FL_SPINNER ) { spp->dval = fl_get_spinner_value( ob ); fl_get_spinner_bounds( ob, &spp->dmin, &spp->dmax ); spp->dstep = fl_get_spinner_step( ob ); spp->prec = fl_get_spinner_precision( ob ); } else if ( ob->objclass == FL_DIAL ) { FLI_DIAL_SPEC *sp = ob->spec; spp->min = sp->min; spp->max = sp->max; spp->val = sp->val; spp->step = sp->step; spp->thetai = sp->thetai; spp->thetaf = sp->thetaf; spp->direction = sp->direction; } else if ( ob->objclass == FL_XYPLOT ) { FLI_XYPLOT_SPEC *sp = ob->spec; spp->xmajor = sp->xmajor; spp->xminor = sp->xminor; spp->ymajor = sp->ymajor; spp->yminor = sp->yminor; spp->xscale = sp->xscale; spp->yscale = sp->yscale; spp->xgrid = sp->xgrid; spp->ygrid = sp->ygrid; spp->grid_linestyle = sp->grid_linestyle; spp->xbase = sp->xbase; spp->ybase = sp->ybase; spp->mark_active = sp->mark_active; } else if ( ob->objclass == FL_SCROLLBAR ) { FLI_SCROLLBAR_SPEC *scbsp = ob->spec; FLI_SLIDER_SPEC *sp = scbsp->slider->spec; spp->val = sp->val; spp->min = sp->min; spp->max = sp->max; spp->prec = sp->prec; spp->step = sp->step; spp->slsize = sp->slsize; spp->ldelta = sp->ldelta; spp->rdelta = sp->rdelta; } return spp; } /*************************************** ***************************************/ void * superspec_to_spec( FL_OBJECT * ob ) { void *v = ob->spec; SuperSPEC *spp = ob->u_vdata; int i = 0; if ( ! spp ) return v; if ( ob->objclass == FL_BROWSER ) { FLI_BROWSER_SPEC *sp = ob->spec; fl_clear_browser( ob ); sp->h_pref = spp->h_pref; sp->v_pref = spp->v_pref; for ( i = 1; i <= spp->nlines; i++ ) fl_addto_browser( ob, spp->content[ i ] ); } else if ( ob->objclass == FL_CHOICE ) { fl_clear_choice( ob ); ( ( FLI_CHOICE_SPEC * ) ob->spec)->align = spp->align; for ( i = 1; i <= spp->nlines; i++ ) { fl_addto_choice( ob, spp->content[ i ] ); fl_set_choice_item_mode( ob, i, spp->mode[ i ] ); if ( spp->shortcut[ i ] ) fl_set_choice_item_shortcut( ob, i, spp->shortcut[ i ] ); } if ( spp->nlines >= spp->int_val ) fl_set_choice( ob, spp->int_val ); } else if ( ob->objclass == FL_MENU ) { fl_clear_menu( ob ); for ( i = 1; i <= spp->nlines; i++ ) { fl_addto_menu( ob, spp->content[ i ] ); fl_set_menu_item_mode( ob, i, spp->mode[ i ] ); if ( spp->shortcut[ i ] ) fl_set_menu_item_shortcut( ob, i, spp->shortcut[ i ] ); if ( spp->callback[ i ] ) fl_set_menu_item_callback( ob, i, ( FL_PUP_CB ) fl_strdup( spp->callback[ i ] ) ); if ( spp->mval[ i ] != i ) fl_set_menu_item_id( ob, i, spp->mval[ i ] ); } } else if ( ob->objclass == FL_SLIDER || ob->objclass == FL_VALSLIDER || ob->objclass == FL_THUMBWHEEL) { FLI_SLIDER_SPEC *sp = ob->spec; sp->val = spp->val; sp->min = spp->min; sp->max = spp->max; sp->step = spp->step; sp->prec = spp->prec; sp->ldelta = spp->ldelta; sp->rdelta = spp->rdelta; sp->slsize = spp->slsize; } else if ( ISBUTTON(ob->objclass) || ob->objclass == FL_PIXMAP || ob->objclass == FL_BITMAP ) { FL_BUTTON_SPEC *sp = ob->spec; IconInfo *info = spp->cspecv; for ( i = 0; i < 5; i++ ) sp->react_to[ i ] = ( spp->mbuttons & ( 1 << i ) ) != 0; if ( ISBUTTON( ob->objclass ) ) fl_set_button_mouse_buttons( ob, spp->mbuttons ); sp->val = spp->int_val; if ( ISBUTTON( ob->objclass ) ) fl_set_button( ob, sp->val ); if ( ob->objclass == FL_PIXMAPBUTTON || ob->objclass == FL_BITMAPBUTTON || ob->objclass == FL_PIXMAP || ob->objclass == FL_BITMAP ) { info->align = spp->align; info->dx = spp->dx; info->dy = spp->dy; info->show_focus = spp->show_focus; info->use_data = spp->use_data; info->fullpath = spp->fullpath; strcpy( info->filename, spp->filename ); strcpy( info->data, spp->data ); strcpy( info->focus_filename, spp->focus_filename ); strcpy( info->helper, spp->helper ); strcpy( info->focus_data, spp->focus_data ); strcpy( info->width, spp->width ); strcpy( info->height, spp->height ); if ( ob->objclass == FL_PIXMAPBUTTON || ob->objclass == FL_PIXMAP ) { fl_set_pixmap_align( ob, info->align | FL_ALIGN_INSIDE, info->dx, info->dy ); fl_set_pixmapbutton_focus_outline( ob, info->show_focus ); } if ( *info->filename ) { if ( ob->objclass == FL_PIXMAPBUTTON || ob->objclass == FL_PIXMAP ) { fl_set_pixmap_file( ob, info->filename ); if ( *info->focus_filename ) fl_set_pixmapbutton_focus_file( ob, info->focus_filename ); } else fl_set_bitmap_file( ob, info->filename ); } } if ( info->helper[ 0 ] ) fl_set_object_helper( ob, get_helper( info->helper ) ); } else if ( ob->objclass == FL_POSITIONER ) { FLI_POSITIONER_SPEC *sp = ob->spec; sp->xstep = spp->xstep; sp->ystep = spp->ystep; sp->xmin = spp->xmin; sp->xmax = spp->xmax; sp->xval = spp->xval; sp->ymin = spp->ymin; sp->ymax = spp->ymax; sp->yval = spp->yval; } else if ( ob->objclass == FL_COUNTER ) { FLI_COUNTER_SPEC *sp = ob->spec; sp->val = spp->val; sp->sstep = spp->sstep; sp->lstep = spp->lstep; sp->min = spp->min; sp->max = spp->max; sp->prec = spp->prec; } else if ( ob->objclass == FL_SPINNER ) { fl_set_spinner_value( ob, spp->dval ); fl_set_spinner_bounds( ob, spp->dmin, spp->dmax ); fl_set_spinner_step( ob, spp->dstep ); fl_set_spinner_precision( ob, spp->prec ); } else if ( ob->objclass == FL_DIAL ) { FLI_DIAL_SPEC *sp = ob->spec; sp->min = spp->min; sp->max = spp->max; sp->val = spp->val; sp->step = spp->step; sp->thetai = spp->thetai; sp->thetaf = spp->thetaf; sp->direction = spp->direction; } else if ( ob->objclass == FL_XYPLOT ) { FLI_XYPLOT_SPEC *sp = ob->spec; sp->xmajor = spp->xmajor; sp->xminor = spp->xminor; sp->ymajor = spp->ymajor; sp->yminor = spp->yminor; sp->xscale = spp->xscale; sp->yscale = spp->yscale; sp->xgrid = spp->xgrid; sp->ygrid = spp->ygrid; sp->xbase = spp->xbase; sp->ybase = spp->ybase; sp->grid_linestyle = spp->grid_linestyle; sp->mark_active = spp->mark_active; } else if ( ob->objclass == FL_SCROLLBAR ) { FLI_SCROLLBAR_SPEC *scbsp = ob->spec; FLI_SLIDER_SPEC *sp = scbsp->slider->spec; sp->val = spp->val; sp->min = spp->min; sp->max = spp->max; sp->prec = spp->prec; sp->step = spp->step; sp->slsize = spp->slsize; sp->ldelta = spp->ldelta; sp->rdelta = spp->rdelta; } return v; } static int keep_content = 1; /*************************************** ***************************************/ void copy_superspec( FL_OBJECT * target, FL_OBJECT * src ) { SuperSPEC *t, *s; void *tmp; int i; t = get_superspec( target ); s = get_superspec( src ); if ( ! t || ! s ) { M_err( "CopySuperSPEC", "null spec" ); return; } tmp = t->cspecv; *t = *s; t->cspecv = tmp; if ( ! keep_content ) { for ( i = 1; i <= t->nlines; i++ ) { t->content[ i ] = NULL; t->mode[ i ] = 0; t->shortcut[ i ] = NULL; } t->nlines = 0; } else { if ( s->nlines ) { if ( s->mode ) t->mode = fl_calloc( s->nlines + 1, sizeof *t->mode ); if ( s->content ) t->content = fl_calloc( s->nlines + 1, sizeof * t->content); if ( s->shortcut ) t->shortcut = fl_calloc( s->nlines + 1, sizeof *t->shortcut ); } for ( i = 1; i <= s->nlines; i++ ) { t->mode[ i ] = s->mode[ i ]; t->content[ i ] = fl_strdup( s->content[ i ] ); if ( s->shortcut[ i ] ) t->shortcut[ i ] = fl_strdup( s->shortcut[ i ] ); } if ( t->cspecv && s->cspecv && t->cspecv_size ) memcpy( t->cspecv, s->cspecv, t->cspecv_size ); } superspec_to_spec( target ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/spec/0000755000175000017500000000000011377311602014600 5ustar jensjensxforms-1.0.93sp1/fdesign/spec/freeobj_spec.h0000644000175000017500000000107111213475541017400 0ustar jensjens/** Header file generated by fdesign on Tue Jun 9 17:10:25 2009.**/ #ifndef FD_freeobjattrib_h_ #define FD_freeobjattrib_h_ #include /** Callbacks, globals and object handlers **/ extern void handler_name_change_cb( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * freeobjattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * background; FL_OBJECT * hname; } FD_freeobjattrib; extern FD_freeobjattrib * create_form_freeobjattrib( void ); #endif /* FD_freeobjattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/menu_spec.fd0000644000175000017500000001433511222630626017076 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: menuattrib Width: 520 Height: 270 Number of Objects: 18 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 520 270 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 15 20 480 230 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Menu Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 25 65 190 170 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Item Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 225 67 111 140 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Action shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 353 70 120 140 boxtype: FL_DOWN_BOX colors: FL_WHITE FL_YELLOW alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CurrentItems: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: content_br callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 35 90 170 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: EditItem shortcut: #E resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input callback: argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 82 84 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Add shortcut: #A resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: add_menu_item_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 143 84 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Delete shortcut: #D resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: delete_menu_item_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 172 84 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Change shortcut: #C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: change_menu_item_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 320 220 82 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: ClearField shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: clear_menu_field_cb argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 230 220 24 27 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: AutoClear shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: auto_clear callback: argument: value: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 112 84 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Replace shortcut: #R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: replace_menu_item_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 106 133 98 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Mode shortcut: #M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: mode callback: argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 35 133 70 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Shortcut shortcut: #S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: shortcut callback: argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 35 176 170 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Callback shortcut: #b resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: item_cb callback: argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 280 21 35 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Use Struct shortcut: #U resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: new_menuapi callback: new_menuapi_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 365 25 75 22 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: scope callback: menuentry_scope_cb argument: 0 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 90 210 110 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: MenuID shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: id callback: argument: 0 bounds: 1.0 1000000.0 value: 1.0 sstep: 1.0 lstep: 10.0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/button_spec.c0000644000175000017500000000725411213475541017303 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "button_spec.h" /*************************************** ***************************************/ FD_buttonattrib * create_form_buttonattrib( void ) { FL_OBJECT *obj; FD_buttonattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->buttonattrib = fl_bgn_form( FL_NO_BOX, 540, 280 ); fdui->background = obj = fl_add_box( FL_FLAT_BOX, 0, 0, 540, 280, "" ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 20, 20, 490, 240, "Button Attributes" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fdui->initialval = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 160, 60, 30, 30, "Initially Set" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, initialval_change, 0 ); fdui->filename = obj = fl_add_input( FL_NORMAL_INPUT, 160, 110, 210, 25, "Icon File" ); fl_set_object_callback( obj, iconbutton_filename_change, 0 ); fdui->pixalign = obj = fl_add_choice( FL_NORMAL_CHOICE2, 280, 70, 155, 25, "" ); fl_set_object_callback( obj, pixalign_change, 0 ); fdui->showfocus = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 160, 80, 30, 30, "Show Focus" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, showfocus_change, 0 ); fl_set_button( obj, 1 ); fdui->browse = obj = fl_add_button( FL_NORMAL_BUTTON, 370, 110, 66, 25, "Browse ...." ); fl_set_button_shortcut( obj, "#B", 1 ); fl_set_object_callback( obj, lookfor_pixmapfile_cb, 0 ); fdui->use_data = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 175, 175, 30, 30, "Use Data" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, usedata_change, 0 ); fdui->fullpath = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 275, 175, 30, 30, "Full Path" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, fullpath_cb, 0 ); fdui->focus_filename = obj = fl_add_input( FL_NORMAL_INPUT, 160, 145, 210, 25, "Focus icon File" ); fl_set_object_callback( obj, focusiconbutton_filename_change, 0 ); fdui->browse2 = obj = fl_add_button( FL_NORMAL_BUTTON, 372, 145, 66, 25, "Browse ...." ); fl_set_object_callback( obj, lookfor_pixmapfile_cb, 1 ); fdui->tooltip = obj = fl_add_input( FL_NORMAL_INPUT, 160, 215, 240, 28, "Helper/tooltip" ); fl_set_object_callback( obj, helper_change_cb, 0 ); fdui->mbuttons_label = obj = fl_add_text( FL_NORMAL_TEXT, 60, 40, 100, 20, "Mouse buttons" ); fl_set_object_lalign( obj, FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); fdui->react_left = obj = fl_add_roundbutton( FL_PUSH_BUTTON, 160, 40, 20, 20, "Left" ); fl_set_object_callback( obj, react_to_button, 0 ); fl_set_button( obj, 1 ); fdui->react_middle = obj = fl_add_roundbutton( FL_PUSH_BUTTON, 210, 40, 20, 20, "Middle" ); fl_set_object_callback( obj, react_to_button, 1 ); fl_set_button( obj, 1 ); fdui->react_right = obj = fl_add_roundbutton( FL_PUSH_BUTTON, 280, 40, 20, 20, "Right" ); fl_set_object_callback( obj, react_to_button, 2 ); fl_set_button( obj, 1 ); fdui->react_up = obj = fl_add_roundbutton( FL_PUSH_BUTTON, 340, 40, 20, 20, "Up" ); fl_set_object_callback( obj, react_to_button, 3 ); fl_set_button( obj, 1 ); fdui->react_down = obj = fl_add_roundbutton( FL_PUSH_BUTTON, 390, 40, 20, 20, "Down" ); fl_set_object_callback( obj, react_to_button, 4 ); fl_set_button( obj, 1 ); fl_end_form( ); fdui->buttonattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/spec/spinner_spec.c0000644000175000017500000000447411252275717017455 0ustar jensjens/* Form definition file generated by fdesign */ #include #include "spinner_spec.h" /*************************************** ***************************************/ FD_spinnerattrib * create_form_spinnerattrib( void ) { FL_OBJECT *obj; FD_spinnerattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->spinnerattrib = fl_bgn_form( FL_NO_BOX, 540, 280 ); fdui->background = obj = fl_add_box( FL_FLAT_BOX, 0, 0, 540, 280, " " ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 25, 20, 485, 235, " Spinner Attributes" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->prec = obj = fl_add_counter( FL_SIMPLE_COUNTER, 65, 170, 135, 25, " Precision" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, spn_precision_cb, 0 ); fdui->minval = obj = fl_add_input( FL_FLOAT_INPUT, 340, 60, 92, 24, "Spinner Min." ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, spn_minmax_change, 0 ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->maxval = obj = fl_add_input( FL_FLOAT_INPUT, 340, 100, 92, 24, "Spinner Max." ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, spn_minmax_change, 0 ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->returnsetting = obj = fl_add_menu( FL_PULLDOWN_MENU, 60, 80, 138, 24, " Return Setting" ); fl_set_object_boxtype( obj, FL_UP_BOX ); fl_set_object_callback( obj, spn_returnsetting_change, 0 ); fdui->initialval = obj = fl_add_input( FL_FLOAT_INPUT, 340, 150, 92, 24, "Initial Value" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, spn_initialvalue_change, 0 ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fdui->step = obj = fl_add_input( FL_FLOAT_INPUT, 340, 200, 92, 24, "Step size" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_callback( obj, spn_stepchange_cb, 0 ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); fl_end_form( ); fdui->spinnerattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/spec/menu_spec.h0000644000175000017500000000201211222630754016723 0ustar jensjens/** Header file generated by fdesign on Wed Jul 1 11:52:44 2009.**/ #ifndef FD_menuattrib_h_ #define FD_menuattrib_h_ #include /** Callbacks, globals and object handlers **/ extern void add_menu_item_cb( FL_OBJECT *, long ); extern void delete_menu_item_cb( FL_OBJECT *, long ); extern void change_menu_item_cb( FL_OBJECT *, long ); extern void clear_menu_field_cb( FL_OBJECT *, long ); extern void replace_menu_item_cb( FL_OBJECT *, long ); extern void new_menuapi_cb( FL_OBJECT *, long ); extern void menuentry_scope_cb( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * menuattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * content_br; FL_OBJECT * input; FL_OBJECT * auto_clear; FL_OBJECT * mode; FL_OBJECT * shortcut; FL_OBJECT * item_cb; FL_OBJECT * new_menuapi; FL_OBJECT * scope; FL_OBJECT * id; } FD_menuattrib; extern FD_menuattrib * create_form_menuattrib( void ); #endif /* FD_menuattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/scrollbar_spec.h0000644000175000017500000000163411245063550017752 0ustar jensjens/** Header file generated with fdesign on Sat Aug 22 23:46:12 2009.**/ #ifndef FD_scrollbarattrib_h_ #define FD_scrollbarattrib_h_ /** Callbacks, globals and object handlers **/ extern void scb_minmax_change(FL_OBJECT *, long); extern void scb_returnsetting_change(FL_OBJECT *, long); extern void scb_initialvalue_change(FL_OBJECT *, long); extern void scb_slsize_change(FL_OBJECT *, long); extern void scb_step_change(FL_OBJECT *, long); extern void scb_delta_change(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM *scrollbarattrib; void *vdata; char *cdata; long ldata; FL_OBJECT *background; FL_OBJECT *minval; FL_OBJECT *maxval; FL_OBJECT *returnsetting; FL_OBJECT *initial_val; FL_OBJECT *slsize; FL_OBJECT *step; FL_OBJECT *ldelta; FL_OBJECT *rdelta; } FD_scrollbarattrib; extern FD_scrollbarattrib * create_form_scrollbarattrib(void); #endif /* FD_scrollbarattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/button_spec.h0000644000175000017500000000265411213475541017307 0ustar jensjens/** Header file generated by fdesign on Tue Jun 9 17:10:25 2009.**/ #ifndef FD_buttonattrib_h_ #define FD_buttonattrib_h_ #include /** Callbacks, globals and object handlers **/ extern void initialval_change( FL_OBJECT *, long ); extern void iconbutton_filename_change( FL_OBJECT *, long ); extern void pixalign_change( FL_OBJECT *, long ); extern void showfocus_change( FL_OBJECT *, long ); extern void lookfor_pixmapfile_cb( FL_OBJECT *, long ); extern void usedata_change( FL_OBJECT *, long ); extern void fullpath_cb( FL_OBJECT *, long ); extern void focusiconbutton_filename_change( FL_OBJECT *, long ); extern void helper_change_cb( FL_OBJECT *, long ); extern void react_to_button( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * buttonattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * background; FL_OBJECT * initialval; FL_OBJECT * filename; FL_OBJECT * pixalign; FL_OBJECT * showfocus; FL_OBJECT * browse; FL_OBJECT * use_data; FL_OBJECT * fullpath; FL_OBJECT * focus_filename; FL_OBJECT * browse2; FL_OBJECT * tooltip; FL_OBJECT * mbuttons_label; FL_OBJECT * react_left; FL_OBJECT * react_middle; FL_OBJECT * react_right; FL_OBJECT * react_up; FL_OBJECT * react_down; } FD_buttonattrib; extern FD_buttonattrib * create_form_buttonattrib( void ); #endif /* FD_buttonattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/spinner_spec.h0000644000175000017500000000160611252275717017454 0ustar jensjens/* Header file generated by fdesign on Fri Sep 11 00:21:03 2009 */ #ifndef FD_spinnerattrib_h_ #define FD_spinnerattrib_h_ #include /* Callbacks, globals and object handlers */ extern void spn_precision_cb( FL_OBJECT *, long ); extern void spn_minmax_change( FL_OBJECT *, long ); extern void spn_returnsetting_change( FL_OBJECT *, long ); extern void spn_initialvalue_change( FL_OBJECT *, long ); extern void spn_stepchange_cb( FL_OBJECT *, long ); /* Forms and Objects */ typedef struct { FL_FORM * spinnerattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * background; FL_OBJECT * prec; FL_OBJECT * minval; FL_OBJECT * maxval; FL_OBJECT * returnsetting; FL_OBJECT * initialval; FL_OBJECT * step; } FD_spinnerattrib; extern FD_spinnerattrib * create_form_spinnerattrib( void ); #endif /* FD_spinnerattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/browser_spec.fd0000644000175000017500000001301211245063550017605 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: browserattrib Width: 520 Height: 270 Number of Objects: 16 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 520 270 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 15 20 480 230 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Browser Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 225 57 111 140 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Action shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 353 55 120 150 boxtype: FL_DOWN_BOX colors: FL_WHITE FL_YELLOW alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Current Items: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: content_br callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 35 67 170 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: EditItem shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 72 84 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Add shortcut: #A resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: add_item_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 133 84 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Delete shortcut: #D resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: delete_item_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 162 84 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Insert shortcut: #I resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: insert_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 95 175 90 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: #H resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hscb_pref callback: hscb_pref_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 95 147 90 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: #v resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: vscb_pref callback: vscb_pref_cb argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 140 210 138 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: br_returnsetting_change argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 120 101 82 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: ClearField shortcut: #l resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: clear_field_cb argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 35 99 24 27 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: AutoClear shortcut: #u resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: auto_clear callback: argument: value: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 102 84 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Replace shortcut: #R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: replace_item_cb argument: 0 -------------------- class: FL_BOX type: NO_BOX box: 33 176 62 22 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_RIGHT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: H\010Scrollbar shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: NO_BOX box: 32 148 62 22 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_RIGHT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: V\010Scrollbar shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/browser_spec.c0000644000175000017500000000662111245063550017446 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "browser_spec.h" /*************************************** ***************************************/ FD_browserattrib * create_form_browserattrib( void ) { FL_OBJECT *obj; FD_browserattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->browserattrib = fl_bgn_form( FL_NO_BOX, 520, 270 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 520, 270, "" ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 15, 20, 480, 230, "Browser Attributes" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 225, 57, 111, 140, "Action" ); fdui->content_br = obj = fl_add_browser( FL_HOLD_BROWSER, 353, 55, 120, 150, "Current Items:" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fdui->input = obj = fl_add_input( FL_NORMAL_INPUT, 35, 67, 170, 25, "EditItem" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fl_set_object_return( obj, FL_RETURN_END_CHANGED ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 72, 84, 26, "Add" ); fl_set_button_shortcut( obj, "^A", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, add_item_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 133, 84, 24, "Delete" ); fl_set_button_shortcut( obj, "^D", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, delete_item_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 162, 84, 24, "Insert" ); fl_set_button_shortcut( obj, "^I", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, insert_cb, 0 ); fdui->hscb_pref = obj = fl_add_choice( FL_NORMAL_CHOICE2, 95, 175, 90, 24, "" ); fl_set_object_shortcut( obj, "^H", 1 ); fl_set_object_callback( obj, hscb_pref_cb, 0 ); fdui->vscb_pref = obj = fl_add_choice( FL_NORMAL_CHOICE2, 95, 147, 90, 24, "" ); fl_set_object_shortcut( obj, "^V", 1 ); fl_set_object_callback( obj, vscb_pref_cb, 0 ); fdui->returnsetting = obj = fl_add_menu( FL_PULLDOWN_MENU, 140, 210, 138, 24, "Return Setting" ); fl_set_object_boxtype( obj, FL_UP_BOX ); fl_set_object_callback( obj, br_returnsetting_change, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 120, 101, 82, 24, "ClearField" ); fl_set_button_shortcut( obj, "^L", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, clear_field_cb, 0 ); fdui->auto_clear = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 35, 99, 24, 27, "AutoClear" ); fl_set_button_shortcut( obj, "^U", 1 ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_button( obj, 1 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 102, 84, 26, "Replace" ); fl_set_button_shortcut( obj, "^R", 1 ); fl_set_object_lalign( obj, FL_ALIGN_CENTER ); fl_set_object_callback( obj, replace_item_cb, 0 ); obj = fl_add_box( FL_NO_BOX, 33, 176, 62, 22, "H\010Scrollbar" ); fl_set_object_lalign( obj, FL_ALIGN_RIGHT | FL_ALIGN_INSIDE ); obj = fl_add_box( FL_NO_BOX, 32, 148, 62, 22, "V\010Scrollbar" ); fl_set_object_lalign( obj, FL_ALIGN_RIGHT | FL_ALIGN_INSIDE ); fl_end_form( ); fdui->browserattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/spec/twheel_spec.c0000644000175000017500000000400711245063550017247 0ustar jensjens/* Form definition file generated with fdesign. */ #include "forms.h" #include #include "twheel_spec.h" FD_twheelattrib *create_form_twheelattrib(void) { FL_OBJECT *obj; FD_twheelattrib *fdui = (FD_twheelattrib *) fl_calloc(1, sizeof(*fdui)); int old_bw = fl_get_border_width(); fl_set_border_width(-1); fdui->twheelattrib = fl_bgn_form(FL_NO_BOX, 540, 280); fdui->background = obj = fl_add_box(FL_FLAT_BOX,0,0,540,280,""); obj = fl_add_labelframe(FL_ENGRAVED_FRAME,30,20,470,240,"Thumbwheel Attributes"); fl_set_object_lsize(obj,FL_MEDIUM_SIZE); fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE); fdui->prec = obj = fl_add_counter(FL_NORMAL_COUNTER,330,145,114,23,"Precision"); fl_set_object_lalign(obj,FL_ALIGN_TOP); fl_set_object_callback(obj,twheel_adjust_precision,0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, 0, 0); fl_set_counter_step(obj, 0, 0); fdui->minval = obj = fl_add_input(FL_FLOAT_INPUT,210,80,82,25,"Minimum Value"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,twheel_minmax_change,0); fdui->maxval = obj = fl_add_input(FL_FLOAT_INPUT,210,111,82,25,"Maximum Value"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,twheel_minmax_change,0); fdui->returnsetting = obj = fl_add_menu(FL_PULLDOWN_MENU,320,90,143,24,"Return Setting"); fl_set_object_boxtype(obj,FL_UP_BOX); fl_set_object_lstyle(obj,FL_NORMAL_STYLE); fl_set_object_callback(obj,twheel_returnsetting_change,0); fdui->initial_val = obj = fl_add_input(FL_FLOAT_INPUT,210,143,82,25,"Initial Value"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,twheel_initialvalue_change,0); fdui->step = obj = fl_add_input(FL_FLOAT_INPUT,210,175,82,25,"StepSize"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,twheel_step_change,0); fl_end_form(); fdui->twheelattrib->fdui = fdui; fl_set_border_width(old_bw); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/fdesign/spec/choice_spec.c0000644000175000017500000000715311222630760017214 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "choice_spec.h" /*************************************** ***************************************/ FD_choiceattrib * create_form_choiceattrib( void ) { FL_OBJECT *obj; FD_choiceattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->choiceattrib = fl_bgn_form( FL_NO_BOX, 520, 270 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 520, 270, "" ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 15, 20, 480, 230, "Choice Attributes" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 25, 80, 190, 120, "Item Attributes" ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 225, 82, 111, 140, "Action" ); fdui->content_br = obj = fl_add_browser( FL_HOLD_BROWSER, 353, 85, 120, 140, "CurrentItems:" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fdui->input = obj = fl_add_input( FL_NORMAL_INPUT, 35, 107, 170, 25, "EditItem" ); fl_set_input_shortcut( obj, "#E", 1 ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 97, 84, 26, "Add" ); fl_set_button_shortcut( obj, "#A", 1 ); fl_set_object_callback( obj, add_choice_item_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 158, 84, 24, "Delete" ); fl_set_button_shortcut( obj, "#D", 1 ); fl_set_object_callback( obj, delete_choice_item_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 187, 84, 24, "Change" ); fl_set_button_shortcut( obj, "#C", 1 ); fl_set_object_callback( obj, change_choice_item_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 115, 207, 82, 24, "ClearField" ); fl_set_button_shortcut( obj, "#F", 1 ); fl_set_object_callback( obj, clear_choice_field_cb, 0 ); fdui->auto_clear = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 30, 205, 24, 27, "AutoClear" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_button( obj, 1 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 127, 84, 26, "Replace" ); fl_set_button_shortcut( obj, "#R", 1 ); fl_set_object_callback( obj, replace_choice_item_cb, 0 ); fdui->mode = obj = fl_add_choice( FL_NORMAL_CHOICE2, 106, 155, 98, 25, "Mode" ); fl_set_object_shortcut( obj, "#M", 1 ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fdui->shortcut = obj = fl_add_input( FL_NORMAL_INPUT, 35, 155, 70, 25, "Shortcut" ); fl_set_input_shortcut( obj, "#S", 1 ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fdui->align = obj = fl_add_choice( FL_NORMAL_CHOICE2, 45, 39, 150, 24, "" ); fl_set_object_callback( obj, choice_align_cb, 0 ); fdui->val = obj = fl_add_counter( FL_NORMAL_COUNTER, 365, 42, 100, 18, "Initial Choice" ); fl_set_object_lalign( obj, FL_ALIGN_TOP ); fl_set_object_callback( obj, choice_val_cb, 0 ); fl_set_counter_precision( obj, 0 ); fl_set_counter_value( obj, 1 ); fl_set_counter_step( obj, 1, 2 ); fl_set_counter_return( obj, FL_RETURN_CHANGED ); fdui->new_menuapi = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 210, 39, 70, 25, "Use Struct" ); fl_set_button_shortcut( obj, "#U", 1 ); fl_set_object_callback( obj, use_struct_cb, 0 ); fdui->scope = obj = fl_add_choice( FL_NORMAL_CHOICE2, 290, 40, 65, 22, "" ); fl_set_object_callback( obj, choiceentry_scope_cb, 0 ); fl_end_form( ); fdui->choiceattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/spec/dial_spec.c0000644000175000017500000000440311245063550016670 0ustar jensjens/* Form definition file generated with fdesign. */ #include "forms.h" #include #include "dial_spec.h" FD_dialattrib *create_form_dialattrib(void) { FL_OBJECT *obj; FD_dialattrib *fdui = (FD_dialattrib *) fl_calloc(1, sizeof(*fdui)); int old_bw = fl_get_border_width(); fl_set_border_width(-1); fdui->dialattrib = fl_bgn_form(FL_NO_BOX, 540, 280); fdui->background = obj = fl_add_box(FL_FLAT_BOX,0,0,540,280,""); fdui->returnsetting = obj = fl_add_menu(FL_PULLDOWN_MENU,305,90,138,24,"Return Setting"); fl_set_object_boxtype(obj,FL_UP_BOX); fl_set_object_lstyle(obj,FL_NORMAL_STYLE); fl_set_object_callback(obj,dial_returnsetting_change,0); fdui->minval = obj = fl_add_input(FL_FLOAT_INPUT,195,45,92,24,"Dial Min"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,dial_minmax_change,0); fdui->maxval = obj = fl_add_input(FL_FLOAT_INPUT,195,77,92,24,"DialMax"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,dial_minmax_change,0); fdui->initialval = obj = fl_add_input(FL_FLOAT_INPUT,195,109,92,24,"Initial Value"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,dial_initialvalue_change,0); fdui->step = obj = fl_add_input(FL_FLOAT_INPUT,195,141,92,24,"Dial Step"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,dial_stepchange_cb,0); fdui->thetai = obj = fl_add_input(FL_FLOAT_INPUT,195,173,92,24,"Min. Angle"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,dial_thetachange_cb,0); fdui->thetaf = obj = fl_add_input(FL_FLOAT_INPUT,195,205,92,24,"Max. Angle"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,dial_thetachange_cb,1); fdui->dir = obj = fl_add_choice(FL_NORMAL_CHOICE2,306,155,134,25,"Direction"); fl_set_object_lalign(obj,FL_ALIGN_TOP); fl_set_object_callback(obj,dir_cb,0); obj = fl_add_labelframe(FL_ENGRAVED_FRAME,30,15,480,240,"Dial Attributes"); fl_set_object_lcolor(obj,FL_DARKVIOLET); fl_set_object_lsize(obj,FL_MEDIUM_SIZE); fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE+FL_EMBOSSED_STYLE); fl_end_form(); fdui->dialattrib->fdui = fdui; fl_set_border_width(old_bw); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/fdesign/spec/slider_spec.h0000644000175000017500000000166611245063550017256 0ustar jensjens/** Header file generated with fdesign on Sat Aug 22 23:46:34 2009.**/ #ifndef FD_sliderattrib_h_ #define FD_sliderattrib_h_ /** Callbacks, globals and object handlers **/ extern void adjust_precision(FL_OBJECT *, long); extern void minmax_change(FL_OBJECT *, long); extern void returnsetting_change(FL_OBJECT *, long); extern void initialvalue_change(FL_OBJECT *, long); extern void slsize_change(FL_OBJECT *, long); extern void step_change(FL_OBJECT *, long); extern void increment_change(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM *sliderattrib; void *vdata; char *cdata; long ldata; FL_OBJECT *background; FL_OBJECT *prec; FL_OBJECT *minval; FL_OBJECT *maxval; FL_OBJECT *returnsetting; FL_OBJECT *initial_val; FL_OBJECT *slsize; FL_OBJECT *step; FL_OBJECT *ldelta; FL_OBJECT *rdelta; } FD_sliderattrib; extern FD_sliderattrib * create_form_sliderattrib(void); #endif /* FD_sliderattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/pixmap_spec.h0000644000175000017500000000157111213475541017267 0ustar jensjens/** Header file generated by fdesign on Tue Jun 9 17:10:25 2009.**/ #ifndef FD_pixmapattrib_h_ #define FD_pixmapattrib_h_ #include /** Callbacks, globals and object handlers **/ extern void pixmap_filename_change( FL_OBJECT *, long ); extern void pixmapalign_change( FL_OBJECT *, long ); extern void pixmaplookfor_pixmapfile_cb( FL_OBJECT *, long ); extern void pixmapusedata_change( FL_OBJECT *, long ); extern void pixmapfullpath_cb( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * pixmapattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * background; FL_OBJECT * filename; FL_OBJECT * pixalign; FL_OBJECT * browse; FL_OBJECT * use_data; FL_OBJECT * fullpath; } FD_pixmapattrib; extern FD_pixmapattrib * create_form_pixmapattrib( void ); #endif /* FD_pixmapattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/slider_spec.c0000644000175000017500000000501011245063550017234 0ustar jensjens/* Form definition file generated with fdesign. */ #include "forms.h" #include #include "slider_spec.h" FD_sliderattrib *create_form_sliderattrib(void) { FL_OBJECT *obj; FD_sliderattrib *fdui = (FD_sliderattrib *) fl_calloc(1, sizeof(*fdui)); int old_bw = fl_get_border_width(); fl_set_border_width(-1); fdui->sliderattrib = fl_bgn_form(FL_NO_BOX, 540, 280); fdui->background = obj = fl_add_box(FL_FLAT_BOX,0,0,540,280,""); obj = fl_add_labelframe(FL_ENGRAVED_FRAME,30,20,470,240,"Slider Attributes"); fl_set_object_lsize(obj,FL_MEDIUM_SIZE); fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE); fdui->prec = obj = fl_add_counter(FL_NORMAL_COUNTER,335,135,114,23,"Precision"); fl_set_object_lalign(obj,FL_ALIGN_TOP); fl_set_object_callback(obj,adjust_precision,0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, 0, 0); fl_set_counter_step(obj, 0, 0); fdui->minval = obj = fl_add_input(FL_FLOAT_INPUT,205,41,82,25,"Value at bottom/left"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,minmax_change,0); fdui->maxval = obj = fl_add_input(FL_FLOAT_INPUT,205,72,82,25,"Value at top/right"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,minmax_change,0); fdui->returnsetting = obj = fl_add_menu(FL_PULLDOWN_MENU,325,80,143,24,"Return Setting"); fl_set_object_boxtype(obj,FL_UP_BOX); fl_set_object_lstyle(obj,FL_NORMAL_STYLE); fl_set_object_callback(obj,returnsetting_change,0); fdui->initial_val = obj = fl_add_input(FL_FLOAT_INPUT,205,104,82,25,"Initial Value"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,initialvalue_change,0); fdui->slsize = obj = fl_add_input(FL_FLOAT_INPUT,205,136,82,25,"Slider Size"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,slsize_change,0); fdui->step = obj = fl_add_input(FL_FLOAT_INPUT,205,166,82,25,"StepSize"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,step_change,0); fdui->ldelta = obj = fl_add_input(FL_FLOAT_INPUT,205,196,82,25,"Leftmouse Increment"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,increment_change,0); fdui->rdelta = obj = fl_add_input(FL_FLOAT_INPUT,205,226,82,25,"Rightmouse Increment"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,increment_change,0); fl_end_form(); fdui->sliderattrib->fdui = fdui; fl_set_border_width(old_bw); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/fdesign/spec/counter_spec.fd0000644000175000017500000000645211245063550017613 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: counterattrib Width: 540 Height: 280 Number of Objects: 9 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 25 20 485 235 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Counter Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 60 150 145 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Precision shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: prec callback: cnt_precision_cb argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 52 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Counter Min shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: minval callback: cnt_minmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 87 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Counter Max shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: maxval callback: cnt_minmax_change argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 61 70 138 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: cnt_returnsetting_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 122 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Initial Value shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initialval callback: cnt_initialvalue_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 157 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Sml.Step Size shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: step1 callback: cnt_stepchange_cb argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 192 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Lg. Step Size shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: step2 callback: cnt_stepchange_cb argument: 1 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/Makefile.am0000644000175000017500000000142611171560225016636 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = browser_spec.c \ browser_spec.fd \ browser_spec.h \ button_spec.c \ button_spec.fd \ button_spec.h \ choice_spec.c \ choice_spec.fd \ choice_spec.h \ counter_spec.c \ counter_spec.fd \ counter_spec.h \ dial_spec.c \ dial_spec.fd \ dial_spec.h \ freeobj_spec.c \ freeobj_spec.fd \ freeobj_spec.h \ free_spec.c \ free_spec.fd \ free_spec.h \ menu_spec.c \ menu_spec.fd \ menu_spec.h \ pixmap_spec.c \ pixmap_spec.fd \ pixmap_spec.h \ positioner_spec.c \ positioner_spec.fd \ positioner_spec.h \ scrollbar_spec.c \ scrollbar_spec.fd \ scrollbar_spec.h \ slider_spec.c \ slider_spec.fd \ slider_spec.h \ twheel_spec.c \ twheel_spec.fd \ twheel_spec.h \ xyplot_spec.c \ xyplot_spec.fd \ xyplot_spec.h xforms-1.0.93sp1/fdesign/spec/positioner_spec.c0000644000175000017500000000513211245063550020152 0ustar jensjens/* Form definition file generated with fdesign. */ #include "forms.h" #include #include "positioner_spec.h" FD_posattrib *create_form_posattrib(void) { FL_OBJECT *obj; FD_posattrib *fdui = (FD_posattrib *) fl_calloc(1, sizeof(*fdui)); int old_bw = fl_get_border_width(); fl_set_border_width(-1); fdui->posattrib = fl_bgn_form(FL_NO_BOX, 540, 280); fdui->background = obj = fl_add_box(FL_FLAT_BOX,0,0,540,280,""); obj = fl_add_labelframe(FL_ENGRAVED_FRAME,30,20,475,235,"Positioner Attributes"); fl_set_object_lsize(obj,FL_MEDIUM_SIZE); fl_set_object_lstyle(obj,FL_TIMESBOLD_STYLE); fdui->returnsetting = obj = fl_add_menu(FL_PULLDOWN_MENU,195,55,138,24,"Return Setting"); fl_set_object_boxtype(obj,FL_UP_BOX); fl_set_object_lstyle(obj,FL_NORMAL_STYLE); fl_set_object_callback(obj,pos_returnsetting_change,0); fdui->xminval = obj = fl_add_input(FL_FLOAT_INPUT,170,95,92,24,"Xmin(left)"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,pos_xminmax_change,0); fdui->xmaxval = obj = fl_add_input(FL_FLOAT_INPUT,170,131,92,24,"Xmax(right)"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,pos_xminmax_change,0); fdui->initialxval = obj = fl_add_input(FL_FLOAT_INPUT,170,168,92,24,"Initial XValue"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,pos_initialxvalue_change,0); fdui->xstep = obj = fl_add_input(FL_FLOAT_INPUT,170,205,92,24,"X StepSize"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,pos_xstepchange_cb,0); fdui->yminval = obj = fl_add_input(FL_FLOAT_INPUT,275,95,92,24,"Ymin(bottom)"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_RIGHT); fl_set_object_callback(obj,pos_yminmax_change,0); fdui->ymaxval = obj = fl_add_input(FL_FLOAT_INPUT,275,131,92,24,"Ymax(top)"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_RIGHT); fl_set_object_callback(obj,pos_yminmax_change,0); fdui->initialyval = obj = fl_add_input(FL_FLOAT_INPUT,275,168,92,24,"Initial YValue"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_RIGHT); fl_set_object_callback(obj,pos_initialyvalue_change,0); fdui->ystep = obj = fl_add_input(FL_FLOAT_INPUT,275,205,92,24,"YStepSize"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_RIGHT); fl_set_object_callback(obj,pos_ystepchange_cb,0); fl_end_form(); fdui->posattrib->fdui = fdui; fl_set_border_width(old_bw); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/fdesign/spec/dial_spec.h0000644000175000017500000000162111245063550016674 0ustar jensjens/** Header file generated with fdesign on Sat Aug 22 23:44:56 2009.**/ #ifndef FD_dialattrib_h_ #define FD_dialattrib_h_ /** Callbacks, globals and object handlers **/ extern void dial_returnsetting_change(FL_OBJECT *, long); extern void dial_minmax_change(FL_OBJECT *, long); extern void dial_initialvalue_change(FL_OBJECT *, long); extern void dial_stepchange_cb(FL_OBJECT *, long); extern void dial_thetachange_cb(FL_OBJECT *, long); extern void dir_cb(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM * dialattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * background; FL_OBJECT * returnsetting; FL_OBJECT * minval; FL_OBJECT * maxval; FL_OBJECT * initialval; FL_OBJECT * step; FL_OBJECT * thetai; FL_OBJECT * thetaf; FL_OBJECT * dir; } FD_dialattrib; extern FD_dialattrib * create_form_dialattrib(void); #endif /* FD_dialattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/xyplot_spec.h0000644000175000017500000000207511245063550017326 0ustar jensjens/** Header file generated with fdesign on Sat Aug 22 23:47:12 2009.**/ #ifndef FD_xyplotattrib_h_ #define FD_xyplotattrib_h_ /** Callbacks, globals and object handlers **/ extern void grid_change_cb(FL_OBJECT *, long); extern void xscale_change_cb(FL_OBJECT *, long); extern void yscale_change_cb(FL_OBJECT *, long); extern void ymajorminor_change_cb(FL_OBJECT *, long); extern void xmajorminor_change_cb(FL_OBJECT *, long); extern void xyplot_returnsetting_change(FL_OBJECT *, long); extern void gridstyle_change_cb(FL_OBJECT *, long); extern void markactive_change_cb(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM *xyplotattrib; void *vdata; char *cdata; long ldata; FL_OBJECT *xgrid; FL_OBJECT *ygrid; FL_OBJECT *xscale; FL_OBJECT *yscale; FL_OBJECT *ymajor; FL_OBJECT *yminor; FL_OBJECT *xmajor; FL_OBJECT *xminor; FL_OBJECT *xbase; FL_OBJECT *ybase; FL_OBJECT *how_return; FL_OBJECT *gridstyle; FL_OBJECT *mark_active; } FD_xyplotattrib; extern FD_xyplotattrib * create_form_xyplotattrib(void); #endif /* FD_xyplotattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/dial_spec.fd0000644000175000017500000000721311245063550017041 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: dialattrib Width: 540 Height: 280 Number of Objects: 10 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 305 90 138 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: dial_returnsetting_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 195 45 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Dial Min shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: minval callback: dial_minmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 195 77 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: DialMax shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: maxval callback: dial_minmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 195 109 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Initial Value shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initialval callback: dial_initialvalue_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 195 141 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Dial Step shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: step callback: dial_stepchange_cb argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 195 173 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Min. Angle shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: thetai callback: dial_thetachange_cb argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 195 205 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Max. Angle shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: thetaf callback: dial_thetachange_cb argument: 1 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 306 155 134 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Direction shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: dir callback: dir_cb argument: 0 -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 30 15 480 240 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_TIMESBOLD_STYLE+FL_EMBOSSED_STYLE size: FL_MEDIUM_SIZE lcol: FL_DARKVIOLET label: Dial Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/spinner_spec.fd0000644000175000017500000000616411252275666017625 0ustar jensjensMagic: 14000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 SnapGrid: 5 =============== FORM =============== Name: spinnerattrib Width: 540 Height: 280 Number of Objects: 8 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 25 20 485 235 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_LEFT_TOP style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Spinner Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_COUNTER type: SIMPLE_COUNTER box: 65 170 135 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Precision shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: prec callback: spn_precision_cb argument: 0 return: FL_RETURN_CHANGED -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 60 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Spinner Min. shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: minval callback: spn_minmax_change argument: 0 return: FL_RETURN_END_CHANGED -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 100 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Spinner Max. shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: maxval callback: spn_minmax_change argument: 0 return: FL_RETURN_END_CHANGED -------------------- class: FL_MENU type: PULLDOWN_MENU box: 60 80 138 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: spn_returnsetting_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 150 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Initial Value shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initialval callback: spn_initialvalue_change argument: 0 return: FL_RETURN_END_CHANGED -------------------- class: FL_INPUT type: FLOAT_INPUT box: 340 200 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Step size shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: step callback: spn_stepchange_cb argument: 0 return: FL_RETURN_END_CHANGED ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/scrollbar_spec.fd0000644000175000017500000000724711245063550020122 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: scrollbarattrib Width: 525 Height: 280 Number of Objects: 10 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 525 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 20 15 470 245 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Scrollbar Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: FLOAT_INPUT box: 190 35 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Value at bottom/left shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: minval callback: scb_minmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 190 64 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Value at top/right shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: maxval callback: scb_minmax_change argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 310 110 143 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: scb_returnsetting_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 190 94 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Initial Value shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initial_val callback: scb_initialvalue_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 190 123 82 26 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Scrollbar Size shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: slsize callback: scb_slsize_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 190 154 82 27 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Step Size shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: step callback: scb_step_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 191 185 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Leftmouse Increment shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: ldelta callback: scb_delta_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 191 215 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Rightmouse Increment shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: rdelta callback: scb_delta_change argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/button_spec.fd0000644000175000017500000001471711171560225017451 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: buttonattrib Width: 540 Height: 280 Number of Objects: 18 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 20 20 490 240 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_TIMESBOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Button Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 160 60 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Initially Set shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initialval callback: initialval_change argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 160 110 210 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Icon File shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: filename callback: iconbutton_filename_change argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 280 70 155 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pixalign callback: pixalign_change argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 160 80 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Show Focus shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: showfocus callback: showfocus_change argument: 0 value: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 370 110 66 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Browse .... shortcut: #B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browse callback: lookfor_pixmapfile_cb argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 175 175 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Use Data shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: use_data callback: usedata_change argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 275 175 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Full Path shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: fullpath callback: fullpath_cb argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 160 145 210 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Focus icon File shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: focus_filename callback: focusiconbutton_filename_change argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 372 145 66 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Browse .... shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browse2 callback: lookfor_pixmapfile_cb argument: 1 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 160 215 240 28 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Helper/tooltip shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: tooltip callback: helper_change_cb argument: 0 -------------------- class: FL_TEXT type: NORMAL_TEXT box: 60 40 100 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER | FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Mouse buttons shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: mbuttons_label callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 160 40 20 20 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Left shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: react_left callback: react_to_button argument: 0 value: 1 -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 210 40 20 20 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Middle shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: react_middle callback: react_to_button argument: 1 value: 1 -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 280 40 20 20 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Right shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: react_right callback: react_to_button argument: 2 value: 1 -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 340 40 20 20 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Up shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: react_up callback: react_to_button argument: 3 value: 1 -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 390 40 20 20 boxtype: FL_NO_BOX colors: FL_MCOL FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Down shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: react_down callback: react_to_button argument: 4 value: 1 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/pixmap_spec.fd0000644000175000017500000000521711171560225017427 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: pixmapattrib Width: 540 Height: 280 Number of Objects: 7 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 20 20 490 240 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_TIMESBOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Pixmap Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 160 113 210 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Bitmap/Pixmap File shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: filename callback: pixmap_filename_change argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 282 60 155 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pixalign callback: pixmapalign_change argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 372 113 66 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Browse .... shortcut: #B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browse callback: pixmaplookfor_pixmapfile_cb argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 175 155 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Use Data shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: use_data callback: pixmapusedata_change argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 275 155 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Full Path shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: fullpath callback: pixmapfullpath_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/freeobj_spec.fd0000644000175000017500000000242111171560225017537 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: freeobjattrib Width: 540 Height: 280 Number of Objects: 3 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 20 20 490 240 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Free Object Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 145 110 280 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Freeobject Handler shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hname callback: handler_name_change_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/menu_spec.c0000644000175000017500000000705211222630754016727 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "menu_spec.h" /*************************************** ***************************************/ FD_menuattrib * create_form_menuattrib( void ) { FL_OBJECT *obj; FD_menuattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->menuattrib = fl_bgn_form( FL_NO_BOX, 520, 270 ); obj = fl_add_box( FL_FLAT_BOX, 0, 0, 520, 270, "" ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 15, 20, 480, 230, "Menu Attributes" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 25, 65, 190, 170, "Item Attributes" ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 225, 67, 111, 140, "Action" ); fdui->content_br = obj = fl_add_browser( FL_HOLD_BROWSER, 353, 70, 120, 140, "CurrentItems:" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fdui->input = obj = fl_add_input( FL_NORMAL_INPUT, 35, 90, 170, 25, "EditItem" ); fl_set_input_shortcut( obj, "#E", 1 ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 82, 84, 26, "Add" ); fl_set_button_shortcut( obj, "#A", 1 ); fl_set_object_callback( obj, add_menu_item_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 143, 84, 24, "Delete" ); fl_set_button_shortcut( obj, "#D", 1 ); fl_set_object_callback( obj, delete_menu_item_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 172, 84, 24, "Change" ); fl_set_button_shortcut( obj, "#C", 1 ); fl_set_object_callback( obj, change_menu_item_cb, 0 ); obj = fl_add_button( FL_NORMAL_BUTTON, 320, 220, 82, 24, "ClearField" ); fl_set_object_callback( obj, clear_menu_field_cb, 0 ); fdui->auto_clear = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 230, 220, 24, 27, "AutoClear" ); fl_set_object_color( obj, FL_COL1, FL_BLUE ); fl_set_button( obj, 1 ); obj = fl_add_button( FL_NORMAL_BUTTON, 235, 112, 84, 26, "Replace" ); fl_set_button_shortcut( obj, "#R", 1 ); fl_set_object_callback( obj, replace_menu_item_cb, 0 ); fdui->mode = obj = fl_add_choice( FL_NORMAL_CHOICE2, 106, 133, 98, 25, "Mode" ); fl_set_object_shortcut( obj, "#M", 1 ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fdui->shortcut = obj = fl_add_input( FL_NORMAL_INPUT, 35, 133, 70, 25, "Shortcut" ); fl_set_input_shortcut( obj, "#S", 1 ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fdui->item_cb = obj = fl_add_input( FL_NORMAL_INPUT, 35, 176, 170, 25, "Callback" ); fl_set_input_shortcut( obj, "#B", 1 ); fl_set_object_lalign( obj, FL_ALIGN_LEFT_TOP ); fdui->new_menuapi = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 280, 21, 35, 30, "Use Struct" ); fl_set_button_shortcut( obj, "#U", 1 ); fl_set_object_callback( obj, new_menuapi_cb, 0 ); fdui->scope = obj = fl_add_choice( FL_NORMAL_CHOICE2, 365, 25, 75, 22, "" ); fl_set_object_callback( obj, menuentry_scope_cb, 0 ); fdui->id = obj = fl_add_counter( FL_NORMAL_COUNTER, 90, 210, 110, 20, "MenuID" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_counter_bounds( obj, 1.0, 1000000.0 ); fl_set_counter_value( obj, 1.0 ); fl_set_counter_step( obj, 1.0, 10.0 ); fl_set_counter_return( obj, FL_RETURN_CHANGED ); fl_end_form( ); fdui->menuattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/spec/free_spec.h0000644000175000017500000000200611213475541016704 0ustar jensjens/** Header file generated by fdesign on Tue Jun 9 17:10:25 2009.**/ #ifndef FD_buttonattrib_h_ #define FD_buttonattrib_h_ #include /** Callbacks, globals and object handlers **/ extern void initialval_change( FL_OBJECT *, long ); extern void iconbutton_filename_change( FL_OBJECT *, long ); extern void pixalign_change( FL_OBJECT *, long ); extern void showfocus_change( FL_OBJECT *, long ); extern void lookfor_pixmapfile_cb( FL_OBJECT *, long ); extern void usedata_change( FL_OBJECT *, long ); extern void fullpath_cb( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * buttonattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * background; FL_OBJECT * initialval; FL_OBJECT * filename; FL_OBJECT * pixalign; FL_OBJECT * showfocus; FL_OBJECT * browse; FL_OBJECT * use_data; FL_OBJECT * fullpath; } FD_buttonattrib; extern FD_buttonattrib * create_form_buttonattrib( void ); #endif /* FD_buttonattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/freeobj_spec.c0000644000175000017500000000203511213475541017374 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "freeobj_spec.h" /*************************************** ***************************************/ FD_freeobjattrib * create_form_freeobjattrib( void ) { FL_OBJECT *obj; FD_freeobjattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->freeobjattrib = fl_bgn_form( FL_NO_BOX, 540, 280 ); fdui->background = obj = fl_add_box( FL_FLAT_BOX, 0, 0, 540, 280, "" ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 20, 20, 490, 240, "Free Object Attributes" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_BOLD_STYLE ); fdui->hname = obj = fl_add_input( FL_NORMAL_INPUT, 145, 110, 280, 30, "Freeobject Handler" ); fl_set_object_callback( obj, handler_name_change_cb, 0 ); fl_end_form( ); fdui->freeobjattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/spec/scrollbar_spec.c0000644000175000017500000000442511245063550017746 0ustar jensjens/* Form definition file generated with fdesign. */ #include "forms.h" #include #include "scrollbar_spec.h" FD_scrollbarattrib *create_form_scrollbarattrib(void) { FL_OBJECT *obj; FD_scrollbarattrib *fdui = (FD_scrollbarattrib *) fl_calloc(1, sizeof(*fdui)); int old_bw = fl_get_border_width(); fl_set_border_width(-1); fdui->scrollbarattrib = fl_bgn_form(FL_NO_BOX, 525, 280); fdui->background = obj = fl_add_box(FL_FLAT_BOX,0,0,525,280,""); obj = fl_add_labelframe(FL_ENGRAVED_FRAME,20,15,470,245,"Scrollbar Attributes"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); fdui->minval = obj = fl_add_input(FL_FLOAT_INPUT,190,35,82,25,"Value at bottom/left"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,scb_minmax_change,0); fdui->maxval = obj = fl_add_input(FL_FLOAT_INPUT,190,64,82,25,"Value at top/right"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,scb_minmax_change,0); fdui->returnsetting = obj = fl_add_menu(FL_PULLDOWN_MENU,310,110,143,24,"Return Setting"); fl_set_object_boxtype(obj,FL_UP_BOX); fl_set_object_lstyle(obj,FL_NORMAL_STYLE); fl_set_object_callback(obj,scb_returnsetting_change,0); fdui->initial_val = obj = fl_add_input(FL_FLOAT_INPUT,190,94,82,25,"Initial Value"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,scb_initialvalue_change,0); fdui->slsize = obj = fl_add_input(FL_FLOAT_INPUT,190,123,82,26,"Scrollbar Size"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,scb_slsize_change,0); fdui->step = obj = fl_add_input(FL_FLOAT_INPUT,190,154,82,27,"Step Size"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,scb_step_change,0); fdui->ldelta = obj = fl_add_input(FL_FLOAT_INPUT,191,185,82,25,"Leftmouse Increment"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,scb_delta_change,0); fdui->rdelta = obj = fl_add_input(FL_FLOAT_INPUT,191,215,82,25,"Rightmouse Increment"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,scb_delta_change,0); fl_end_form(); fdui->scrollbarattrib->fdui = fdui; fl_set_border_width(old_bw); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/fdesign/spec/choice_spec.fd0000644000175000017500000001437411222630647017372 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: choiceattrib Width: 520 Height: 270 Number of Objects: 18 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 520 270 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 15 20 480 230 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Choice Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 25 80 190 120 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Item Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 225 82 111 140 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Action shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 353 85 120 140 boxtype: FL_DOWN_BOX colors: FL_WHITE FL_YELLOW alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: CurrentItems: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: content_br callback: argument: -------------------- class: FL_INPUT type: NORMAL_INPUT box: 35 107 170 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: EditItem shortcut: #E resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input callback: argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 97 84 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Add shortcut: #A resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: add_choice_item_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 158 84 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Delete shortcut: #D resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: delete_choice_item_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 187 84 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Change shortcut: #C resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: change_choice_item_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 115 207 82 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: ClearField shortcut: #F resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: clear_choice_field_cb argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 30 205 24 27 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: AutoClear shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: auto_clear callback: argument: value: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 127 84 26 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Replace shortcut: #R resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: replace_choice_item_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 106 155 98 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Mode shortcut: #M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: mode callback: argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 35 155 70 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Shortcut shortcut: #S resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: shortcut callback: argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 45 39 150 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: align callback: choice_align_cb argument: 0 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 365 42 100 18 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Initial Choice shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: val callback: choice_val_cb argument: 0 precision: 0 value: 1 sstep: 1 lstep: 2 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 210 39 70 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Use Struct shortcut: #U resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: new_menuapi callback: use_struct_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 290 40 65 22 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: scope callback: choiceentry_scope_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/xyplot_spec.c0000644000175000017500000000631311245063550017320 0ustar jensjens/* Form definition file generated with fdesign. */ #include "forms.h" #include #include "xyplot_spec.h" FD_xyplotattrib *create_form_xyplotattrib(void) { FL_OBJECT *obj; FD_xyplotattrib *fdui = (FD_xyplotattrib *) fl_calloc(1, sizeof(*fdui)); int old_bw = fl_get_border_width(); fl_set_border_width(-1); fdui->xyplotattrib = fl_bgn_form(FL_NO_BOX, 520, 270); obj = fl_add_box(FL_FLAT_BOX,0,0,520,270,""); obj = fl_add_labelframe(FL_ENGRAVED_FRAME,10,20,500,240,"XYPlot Attributes"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); fdui->xgrid = obj = fl_add_choice(FL_NORMAL_CHOICE2,70,60,85,23,"XGrid"); fl_set_object_callback(obj,grid_change_cb,0); fdui->ygrid = obj = fl_add_choice(FL_NORMAL_CHOICE2,70,90,85,23,"YGrid"); fl_set_object_callback(obj,grid_change_cb,0); fdui->xscale = obj = fl_add_choice(FL_NORMAL_CHOICE2,70,170,85,23,"XScale"); fl_set_object_callback(obj,xscale_change_cb,0); fdui->yscale = obj = fl_add_choice(FL_NORMAL_CHOICE2,70,210,85,23,"YScale"); fl_set_object_callback(obj,yscale_change_cb,0); fdui->ymajor = obj = fl_add_counter(FL_NORMAL_COUNTER,370,160,115,20,"YMajor"); fl_set_object_callback(obj,ymajorminor_change_cb,0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, -1, 20); fl_set_counter_value(obj, 1); fl_set_counter_step(obj, 1, 2); fdui->yminor = obj = fl_add_counter(FL_NORMAL_COUNTER,370,200,115,20,"YMinor"); fl_set_object_callback(obj,ymajorminor_change_cb,0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, 0, 10); fl_set_counter_value(obj, 1); fl_set_counter_step(obj, 1, 2); fdui->xmajor = obj = fl_add_counter(FL_NORMAL_COUNTER,370,70,115,20,"XMajor"); fl_set_object_callback(obj,xmajorminor_change_cb,0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, -1, 20); fl_set_counter_value(obj, 1); fl_set_counter_step(obj, 1, 2); fdui->xminor = obj = fl_add_counter(FL_NORMAL_COUNTER,370,110,115,20,"XMinor"); fl_set_object_callback(obj,xmajorminor_change_cb,0); fl_set_counter_precision(obj, 0); fl_set_counter_bounds(obj, 0, 10); fl_set_counter_value(obj, 1); fl_set_counter_step(obj, 1, 2); fdui->xbase = obj = fl_add_input(FL_FLOAT_INPUT,160,170,39,23,"xbase"); fl_set_object_lalign(obj,FL_ALIGN_RIGHT); fl_set_object_callback(obj,xscale_change_cb,0); fdui->ybase = obj = fl_add_input(FL_FLOAT_INPUT,158,210,39,23,"ybase"); fl_set_object_lalign(obj,FL_ALIGN_RIGHT); fl_set_object_callback(obj,yscale_change_cb,0); fdui->how_return = obj = fl_add_menu(FL_PULLDOWN_MENU,193,29,150,22,"Return Setting"); fl_set_object_boxtype(obj,FL_UP_BOX); fl_set_object_lstyle(obj,FL_NORMAL_STYLE); fl_set_object_callback(obj,xyplot_returnsetting_change,0); fdui->gridstyle = obj = fl_add_choice(FL_NORMAL_CHOICE2,70,120,85,23,"Style"); fl_set_object_callback(obj,gridstyle_change_cb,0); fdui->mark_active = obj = fl_add_checkbutton(FL_PUSH_BUTTON,230,80,100,25,"MarkActive"); fl_set_object_callback(obj,markactive_change_cb,0); fl_end_form(); fdui->xyplotattrib->fdui = fdui; fl_set_border_width(old_bw); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/fdesign/spec/free_spec.fd0000644000175000017500000000651311171560225017052 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: buttonattrib Width: 540 Height: 280 Number of Objects: 9 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 20 20 490 240 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_TIMESBOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Button Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 170 55 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Initially Set shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initialval callback: initialval_change argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 160 113 210 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Bitmap/Pixmap File shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: filename callback: iconbutton_filename_change argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 282 60 155 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: pixalign callback: pixalign_change argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 170 80 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Show Focus shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: showfocus callback: showfocus_change argument: 0 value: 1 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 372 113 66 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Browse .... shortcut: #B resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browse callback: lookfor_pixmapfile_cb argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 175 155 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Use Data shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: use_data callback: usedata_change argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 275 155 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Full Path shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: fullpath callback: fullpath_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/pixmap_spec.c0000644000175000017500000000341511213475541017261 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "pixmap_spec.h" /*************************************** ***************************************/ FD_pixmapattrib * create_form_pixmapattrib( void ) { FL_OBJECT *obj; FD_pixmapattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->pixmapattrib = fl_bgn_form( FL_NO_BOX, 540, 280 ); fdui->background = obj = fl_add_box( FL_FLAT_BOX, 0, 0, 540, 280, "" ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 20, 20, 490, 240, "Pixmap Attributes" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fdui->filename = obj = fl_add_input( FL_NORMAL_INPUT, 160, 113, 210, 25, "Bitmap/Pixmap File" ); fl_set_object_callback( obj, pixmap_filename_change, 0 ); fdui->pixalign = obj = fl_add_choice( FL_NORMAL_CHOICE2, 282, 60, 155, 25, "" ); fl_set_object_callback( obj, pixmapalign_change, 0 ); fdui->browse = obj = fl_add_button( FL_NORMAL_BUTTON, 372, 113, 66, 25, "Browse ...." ); fl_set_button_shortcut( obj, "#B", 1 ); fl_set_object_callback( obj, pixmaplookfor_pixmapfile_cb, 0 ); fdui->use_data = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 175, 155, 30, 30, "Use Data" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, pixmapusedata_change, 0 ); fdui->fullpath = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 275, 155, 30, 30, "Full Path" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, pixmapfullpath_cb, 0 ); fl_end_form( ); fdui->pixmapattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/spec/twheel_spec.fd0000644000175000017500000000604211245063550017417 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: twheelattrib Width: 540 Height: 280 Number of Objects: 8 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 30 20 470 240 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_TIMESBOLD_STYLE size: FL_MEDIUM_SIZE lcol: FL_BLACK label: Thumbwheel Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 330 145 114 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Precision shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: prec callback: twheel_adjust_precision argument: 0 bounds: 0 0 precision: 0 sstep: 0 lstep: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 210 80 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Minimum Value shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: minval callback: twheel_minmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 210 111 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Maximum Value shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: maxval callback: twheel_minmax_change argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 320 90 143 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: twheel_returnsetting_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 210 143 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Initial Value shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initial_val callback: twheel_initialvalue_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 210 175 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: StepSize shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: step callback: twheel_step_change argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/choice_spec.h0000644000175000017500000000220411222630760017211 0ustar jensjens/** Header file generated by fdesign on Wed Jul 1 11:52:48 2009.**/ #ifndef FD_choiceattrib_h_ #define FD_choiceattrib_h_ #include /** Callbacks, globals and object handlers **/ extern void add_choice_item_cb( FL_OBJECT *, long ); extern void delete_choice_item_cb( FL_OBJECT *, long ); extern void change_choice_item_cb( FL_OBJECT *, long ); extern void clear_choice_field_cb( FL_OBJECT *, long ); extern void replace_choice_item_cb( FL_OBJECT *, long ); extern void choice_align_cb( FL_OBJECT *, long ); extern void choice_val_cb( FL_OBJECT *, long ); extern void use_struct_cb( FL_OBJECT *, long ); extern void choiceentry_scope_cb( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * choiceattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * content_br; FL_OBJECT * input; FL_OBJECT * auto_clear; FL_OBJECT * mode; FL_OBJECT * shortcut; FL_OBJECT * align; FL_OBJECT * val; FL_OBJECT * new_menuapi; FL_OBJECT * scope; } FD_choiceattrib; extern FD_choiceattrib * create_form_choiceattrib( void ); #endif /* FD_choiceattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/.cvsignore0000644000175000017500000000002511171560225016574 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/fdesign/spec/counter_spec.c0000644000175000017500000000414111245063550017435 0ustar jensjens/* Form definition file generated with fdesign. */ #include "forms.h" #include #include "counter_spec.h" FD_counterattrib *create_form_counterattrib(void) { FL_OBJECT *obj; FD_counterattrib *fdui = (FD_counterattrib *) fl_calloc(1, sizeof(*fdui)); int old_bw = fl_get_border_width(); fl_set_border_width(-1); fdui->counterattrib = fl_bgn_form(FL_NO_BOX, 540, 280); fdui->background = obj = fl_add_box(FL_FLAT_BOX,0,0,540,280,""); obj = fl_add_labelframe(FL_ENGRAVED_FRAME,25,20,485,235,"Counter Attributes"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); fdui->prec = obj = fl_add_counter(FL_NORMAL_COUNTER,60,150,145,23,"Precision"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_TOP); fl_set_object_callback(obj,cnt_precision_cb,0); fdui->minval = obj = fl_add_input(FL_FLOAT_INPUT,340,52,92,24,"Counter Min"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,cnt_minmax_change,0); fdui->maxval = obj = fl_add_input(FL_FLOAT_INPUT,340,87,92,24,"Counter Max"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,cnt_minmax_change,0); fdui->returnsetting = obj = fl_add_menu(FL_PULLDOWN_MENU,61,70,138,24,"Return Setting"); fl_set_object_boxtype(obj,FL_UP_BOX); fl_set_object_lstyle(obj,FL_NORMAL_STYLE); fl_set_object_callback(obj,cnt_returnsetting_change,0); fdui->initialval = obj = fl_add_input(FL_FLOAT_INPUT,340,122,92,24,"Initial Value"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,cnt_initialvalue_change,0); fdui->step1 = obj = fl_add_input(FL_FLOAT_INPUT,340,157,92,24,"Sml.Step Size"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,cnt_stepchange_cb,0); fdui->step2 = obj = fl_add_input(FL_FLOAT_INPUT,340,192,92,24,"Lg. Step Size"); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,cnt_stepchange_cb,1); fl_end_form(); fdui->counterattrib->fdui = fdui; fl_set_border_width(old_bw); return fdui; } /*---------------------------------------*/ xforms-1.0.93sp1/fdesign/spec/browser_spec.h0000644000175000017500000000177011245063550017453 0ustar jensjens/** Header file generated by fdesign on Sun Aug 23 11:55:18 2009 **/ #ifndef FD_browserattrib_h_ #define FD_browserattrib_h_ #include /** Callbacks, globals and object handlers **/ extern void add_item_cb( FL_OBJECT *, long ); extern void delete_item_cb( FL_OBJECT *, long ); extern void insert_cb( FL_OBJECT *, long ); extern void hscb_pref_cb( FL_OBJECT *, long ); extern void vscb_pref_cb( FL_OBJECT *, long ); extern void br_returnsetting_change( FL_OBJECT *, long ); extern void clear_field_cb( FL_OBJECT *, long ); extern void replace_item_cb( FL_OBJECT *, long ); /**** Forms and Objects ****/ typedef struct { FL_FORM * browserattrib; void * vdata; char * cdata; long ldata; FL_OBJECT * content_br; FL_OBJECT * input; FL_OBJECT * hscb_pref; FL_OBJECT * vscb_pref; FL_OBJECT * returnsetting; FL_OBJECT * auto_clear; } FD_browserattrib; extern FD_browserattrib * create_form_browserattrib( void ); #endif /* FD_browserattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/xyplot_spec.fd0000644000175000017500000001305411245063550017467 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: xyplotattrib Width: 520 Height: 270 Number of Objects: 15 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 520 270 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 10 20 500 240 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: XYPlot Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 70 60 85 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: XGrid shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xgrid callback: grid_change_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 70 90 85 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: YGrid shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: ygrid callback: grid_change_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 70 170 85 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: XScale shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xscale callback: xscale_change_cb argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 70 210 85 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: YScale shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: yscale callback: yscale_change_cb argument: 0 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 370 160 115 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: YMajor shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: ymajor callback: ymajorminor_change_cb argument: 0 bounds: -1 20 precision: 0 value: 1 sstep: 1 lstep: 2 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 370 200 115 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: YMinor shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: yminor callback: ymajorminor_change_cb argument: 0 bounds: 0 10 precision: 0 value: 1 sstep: 1 lstep: 2 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 370 70 115 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: XMajor shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xmajor callback: xmajorminor_change_cb argument: 0 bounds: -1 20 precision: 0 value: 1 sstep: 1 lstep: 2 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 370 110 115 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: XMinor shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xminor callback: xmajorminor_change_cb argument: 0 bounds: 0 10 precision: 0 value: 1 sstep: 1 lstep: 2 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 160 170 39 23 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: xbase shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xbase callback: xscale_change_cb argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 158 210 39 23 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: ybase shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: ybase callback: yscale_change_cb argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 193 29 150 22 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: how_return callback: xyplot_returnsetting_change argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 70 120 85 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Style shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: gridstyle callback: gridstyle_change_cb argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 230 80 100 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: MarkActive shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: mark_active callback: markactive_change_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/counter_spec.h0000644000175000017500000000150711245063550017445 0ustar jensjens/** Header file generated with fdesign on Sat Aug 22 23:45:21 2009.**/ #ifndef FD_counterattrib_h_ #define FD_counterattrib_h_ /** Callbacks, globals and object handlers **/ extern void cnt_precision_cb(FL_OBJECT *, long); extern void cnt_minmax_change(FL_OBJECT *, long); extern void cnt_returnsetting_change(FL_OBJECT *, long); extern void cnt_initialvalue_change(FL_OBJECT *, long); extern void cnt_stepchange_cb(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM *counterattrib; void *vdata; char *cdata; long ldata; FL_OBJECT *background; FL_OBJECT *prec; FL_OBJECT *minval; FL_OBJECT *maxval; FL_OBJECT *returnsetting; FL_OBJECT *initialval; FL_OBJECT *step1; FL_OBJECT *step2; } FD_counterattrib; extern FD_counterattrib * create_form_counterattrib(void); #endif /* FD_counterattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/free_spec.c0000644000175000017500000000426011213475541016703 0ustar jensjens/* Form definition file generated by fdesign. */ #include #include "free_spec.h" /*************************************** ***************************************/ FD_buttonattrib * create_form_buttonattrib( void ) { FL_OBJECT *obj; FD_buttonattrib *fdui = fl_malloc( sizeof *fdui ); int old_bw = fl_get_border_width( ); fl_set_border_width( -1 ); fdui->vdata = fdui->cdata = NULL; fdui->ldata = 0; fdui->buttonattrib = fl_bgn_form( FL_NO_BOX, 540, 280 ); fdui->background = obj = fl_add_box( FL_FLAT_BOX, 0, 0, 540, 280, "" ); obj = fl_add_labelframe( FL_ENGRAVED_FRAME, 20, 20, 490, 240, "Button Attributes" ); fl_set_object_lsize( obj, FL_NORMAL_SIZE ); fl_set_object_lstyle( obj, FL_TIMESBOLD_STYLE ); fdui->initialval = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 170, 55, 30, 30, "Initially Set" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, initialval_change, 0 ); fdui->filename = obj = fl_add_input( FL_NORMAL_INPUT, 160, 113, 210, 25, "Bitmap/Pixmap File" ); fl_set_object_callback( obj, iconbutton_filename_change, 0 ); fdui->pixalign = obj = fl_add_choice( FL_NORMAL_CHOICE2, 282, 60, 155, 25, "" ); fl_set_object_callback( obj, pixalign_change, 0 ); fdui->showfocus = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 170, 80, 30, 30, "Show Focus" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, showfocus_change, 0 ); fl_set_button( obj, 1 ); fdui->browse = obj = fl_add_button( FL_NORMAL_BUTTON, 372, 113, 66, 25, "Browse ...." ); fl_set_button_shortcut( obj, "#B", 1 ); fl_set_object_callback( obj, lookfor_pixmapfile_cb, 0 ); fdui->use_data = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 175, 155, 30, 30, "Use Data" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, usedata_change, 0 ); fdui->fullpath = obj = fl_add_checkbutton( FL_PUSH_BUTTON, 275, 155, 30, 30, "Full Path" ); fl_set_object_lalign( obj, FL_ALIGN_LEFT ); fl_set_object_callback( obj, fullpath_cb, 0 ); fl_end_form( ); fdui->buttonattrib->fdui = fdui; fl_set_border_width( old_bw ); return fdui; } xforms-1.0.93sp1/fdesign/spec/slider_spec.fd0000644000175000017500000001002311245063550017403 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: sliderattrib Width: 540 Height: 280 Number of Objects: 11 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 30 20 470 240 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_TIMESBOLD_STYLE size: FL_MEDIUM_SIZE lcol: FL_BLACK label: Slider Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 335 135 114 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_TOP style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Precision shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: prec callback: adjust_precision argument: 0 bounds: 0 0 precision: 0 sstep: 0 lstep: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 205 41 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Value at bottom/left shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: minval callback: minmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 205 72 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Value at top/right shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: maxval callback: minmax_change argument: 0 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 325 80 143 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: returnsetting_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 205 104 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Initial Value shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initial_val callback: initialvalue_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 205 136 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Slider Size shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: slsize callback: slsize_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 205 166 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: StepSize shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: step callback: step_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 205 196 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Leftmouse Increment shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: ldelta callback: increment_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 205 226 82 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Rightmouse Increment shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: rdelta callback: increment_change argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/positioner_spec.h0000644000175000017500000000172011245063550020156 0ustar jensjens/** Header file generated with fdesign on Sat Aug 22 23:45:56 2009.**/ #ifndef FD_posattrib_h_ #define FD_posattrib_h_ /** Callbacks, globals and object handlers **/ extern void pos_returnsetting_change(FL_OBJECT *, long); extern void pos_xminmax_change(FL_OBJECT *, long); extern void pos_initialxvalue_change(FL_OBJECT *, long); extern void pos_xstepchange_cb(FL_OBJECT *, long); extern void pos_yminmax_change(FL_OBJECT *, long); extern void pos_initialyvalue_change(FL_OBJECT *, long); extern void pos_ystepchange_cb(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM *posattrib; void *vdata; char *cdata; long ldata; FL_OBJECT *background; FL_OBJECT *returnsetting; FL_OBJECT *xminval; FL_OBJECT *xmaxval; FL_OBJECT *initialxval; FL_OBJECT *xstep; FL_OBJECT *yminval; FL_OBJECT *ymaxval; FL_OBJECT *initialyval; FL_OBJECT *ystep; } FD_posattrib; extern FD_posattrib * create_form_posattrib(void); #endif /* FD_posattrib_h_ */ xforms-1.0.93sp1/fdesign/spec/Makefile.in0000644000175000017500000002534111377311602016652 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = fdesign/spec ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = browser_spec.c \ browser_spec.fd \ browser_spec.h \ button_spec.c \ button_spec.fd \ button_spec.h \ choice_spec.c \ choice_spec.fd \ choice_spec.h \ counter_spec.c \ counter_spec.fd \ counter_spec.h \ dial_spec.c \ dial_spec.fd \ dial_spec.h \ freeobj_spec.c \ freeobj_spec.fd \ freeobj_spec.h \ free_spec.c \ free_spec.fd \ free_spec.h \ menu_spec.c \ menu_spec.fd \ menu_spec.h \ pixmap_spec.c \ pixmap_spec.fd \ pixmap_spec.h \ positioner_spec.c \ positioner_spec.fd \ positioner_spec.h \ scrollbar_spec.c \ scrollbar_spec.fd \ scrollbar_spec.h \ slider_spec.c \ slider_spec.fd \ slider_spec.h \ twheel_spec.c \ twheel_spec.fd \ twheel_spec.h \ xyplot_spec.c \ xyplot_spec.fd \ xyplot_spec.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fdesign/spec/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fdesign/spec/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/fdesign/spec/positioner_spec.fd0000644000175000017500000000777211245063550020335 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: posattrib Width: 540 Height: 280 Number of Objects: 11 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 540 280 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 30 20 475 235 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_TIMESBOLD_STYLE size: FL_MEDIUM_SIZE lcol: FL_BLACK label: Positioner Attributes shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 195 55 138 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Return Setting shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: returnsetting callback: pos_returnsetting_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 170 95 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Xmin(left) shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xminval callback: pos_xminmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 170 131 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Xmax(right) shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xmaxval callback: pos_xminmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 170 168 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Initial XValue shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initialxval callback: pos_initialxvalue_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 170 205 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: X StepSize shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: xstep callback: pos_xstepchange_cb argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 275 95 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Ymin(bottom) shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: yminval callback: pos_yminmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 275 131 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Ymax(top) shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: ymaxval callback: pos_yminmax_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 275 168 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Initial YValue shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: initialyval callback: pos_initialyvalue_change argument: 0 -------------------- class: FL_INPUT type: FLOAT_INPUT box: 275 205 92 24 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: YStepSize shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: ystep callback: pos_ystepchange_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/fdesign/spec/twheel_spec.h0000644000175000017500000000147611245063550017263 0ustar jensjens/** Header file generated with fdesign on Sat Aug 22 23:46:53 2009.**/ #ifndef FD_twheelattrib_h_ #define FD_twheelattrib_h_ /** Callbacks, globals and object handlers **/ extern void twheel_adjust_precision(FL_OBJECT *, long); extern void twheel_minmax_change(FL_OBJECT *, long); extern void twheel_returnsetting_change(FL_OBJECT *, long); extern void twheel_initialvalue_change(FL_OBJECT *, long); extern void twheel_step_change(FL_OBJECT *, long); /**** Forms and Objects ****/ typedef struct { FL_FORM *twheelattrib; void *vdata; char *cdata; long ldata; FL_OBJECT *background; FL_OBJECT *prec; FL_OBJECT *minval; FL_OBJECT *maxval; FL_OBJECT *returnsetting; FL_OBJECT *initial_val; FL_OBJECT *step; } FD_twheelattrib; extern FD_twheelattrib * create_form_twheelattrib(void); #endif /* FD_twheelattrib_h_ */ xforms-1.0.93sp1/fdesign/fd_file.c0000644000175000017500000005411111252412363015402 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_file.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * This file is part of the Form Designer. * * It contains the routines to save and load forms in the internal * format used by the form designer. This is readable ASCII. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "fd_main.h" #include "fd_spec.h" #include #include #include /* Writes an obj description to a file. Note externally the coordinate * system always starts from lower-left corner of the screen */ #if 0 #define OBJ_Y(ob) ob->form->h - ob->y - ob->h #else #define OBJ_Y(ob) obj->y #endif /*************************************** ***************************************/ static void save_object( FILE * fl, FL_OBJECT * obj ) { char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; char *label; double sc = get_conversion_factor( ); FL_OBJECT *defobj, fake_obj; if ( obj->parent ) return; defobj = find_class_default( obj->objclass, obj->type ); get_object_name( obj, name, cbname, argname ); fprintf( fl, "\n--------------------\n" ); fprintf( fl, "class: %s\n", class_name( obj->objclass ) ); fprintf( fl, "type: %s\n", find_type_name( obj->objclass, obj->type ) ); fake_obj.x = obj->x; fake_obj.y = obj->y; fake_obj.w = obj->w; fake_obj.h = obj->h; fl_scale_object( &fake_obj, sc, sc ); fprintf( fl, "box: %d %d %d %d\n", fake_obj.x, fake_obj.y, fake_obj.w, fake_obj.h ); fprintf( fl, "boxtype: %s\n", boxtype_name( obj->boxtype ) ); fprintf( fl, "colors: %s %s\n", fli_query_colorname( obj->col1 ), fli_query_colorname( obj->col2 ) ); fprintf( fl, "alignment: %s\n", align_name( obj->align, 0 ) ); fprintf( fl, "style: %s\n", style_name( obj->lstyle ) ); fprintf( fl, "size: %s\n", lsize_name( obj->lsize ) ); fprintf( fl, "lcol: %s\n", fli_query_colorname( obj->lcol ) ); label = get_label( obj, 0 ); fprintf( fl, "label: %s\n", label ); fl_free( label ); fprintf( fl, "shortcut: %s\n", get_shortcut_string( obj ) ); fprintf( fl, "resize: %s\n", resize_name( obj->resize ) ); fprintf( fl, "gravity: %s %s\n", gravity_name( obj->nwgravity ), gravity_name( obj->segravity ) ); fprintf( fl, "name: %s\n", name ); fprintf( fl, "callback: %s\n", cbname ); fprintf( fl, "argument: %s\n", argname ); if ( ! defobj || obj->how_return != defobj->how_return ) fprintf( fl, "return: %s\n", get_how_return_name( obj->how_return, 0 ) ); save_objclass_spec_info( fl, obj ); } /* * X version changed color systemtically, need to do a translation * from old fd files on the fly */ typedef struct { int oldval, newval; } Trantable; static Trantable tcolor[ ] = { { 0, FL_BLACK }, { 1, FL_RED }, { 2, FL_GREEN }, { 3, FL_YELLOW }, { 4, FL_BLUE }, { 5, FL_MAGENTA }, { 6, FL_CYAN }, { 7, FL_WHITE }, { 8, FL_BOTTOM_BCOL }, /* approx */ { 9, FL_INDIANRED }, { 10, FL_PALEGREEN }, { 11, FL_PALEGREEN }, { 12, FL_SLATEBLUE }, { 35, FL_RIGHT_BCOL }, { 36, FL_RIGHT_BCOL }, /* approx */ { 37, FL_RIGHT_BCOL }, /* approx */ { 40, FL_BOTTOM_BCOL }, { 47, FL_COL1 }, { 49, FL_MCOL }, { 51, FL_TOP_BCOL }, { 55, FL_LEFT_BCOL } }; static Trantable tclass[ ] = { { 1, FL_BOX }, { 2, FL_TEXT }, { 3, FL_BITMAP }, { 4, FL_CHART }, { 11, FL_BUTTON }, { 12, FL_LIGHTBUTTON }, { 13, FL_ROUNDBUTTON }, { 21, FL_SLIDER }, { 22, FL_DIAL }, { 23, FL_POSITIONER }, { 24, FL_VALSLIDER }, { 25, FL_COUNTER }, { 31, FL_INPUT }, { 41, FL_MENU }, { 42, FL_CHOICE }, { 61, FL_CLOCK }, { 62, FL_TIMER }, { 71, FL_BROWSER }, { 101, FL_FREE }, { 10000, FL_BEGIN_GROUP }, { 20000, FL_END_GROUP } }; static Trantable talign[] = { { 0, FL_ALIGN_TOP }, { 1, FL_ALIGN_BOTTOM }, { 2, FL_ALIGN_LEFT }, { 3, FL_ALIGN_RIGHT }, { 4, FL_ALIGN_CENTER } }; static Trantable tbtype[ ] = { { 0, FL_NO_BOX }, { 1, FL_UP_BOX }, { 2, FL_DOWN_BOX }, { 3, FL_FLAT_BOX }, { 4, FL_BORDER_BOX }, { 5, FL_SHADOW_BOX }, { 6, FL_FRAME_BOX }, { 7, FL_ROUNDED_BOX }, { 8, FL_RFLAT_BOX }, { 9, FL_RSHADOW_BOX } }; /*************************************** ***************************************/ static int do_trans( Trantable * tab, int n, int old ) { Trantable *p = tab, *q; for ( q = p + n; p < q; p++ ) if ( p->oldval == old ) return p->newval; return old; } #define new_class( o ) do_trans( tclass, sizeof tclass / sizeof *tclass, ( o ) ) #define new_color( o ) do_trans( tcolor, sizeof tcolor / sizeof *tcolor, ( o ) ) #define new_align( o ) do_trans( talign, sizeof talign / sizeof *talign, ( o ) ) #define new_btype( o ) do_trans( tbtype, sizeof tbtype / sizeof *tbtype, ( o ) ) /*************************************** ***************************************/ static int ff_read_boxtype( FL_OBJECT * obj ) { int r; if ( ( r = ff_read( "%b", &obj->boxtype ) ) < 0 ) return ff_err( "Can't read expected object boxtype" ); if ( r == 0 ) return ff_err( "\"boxtype\" key without value" ); if ( fd_magic == MAGIC2 ) obj->boxtype = new_btype( obj->boxtype ); return 0; } /*************************************** ***************************************/ static int ff_read_colors( FL_OBJECT * obj ) { int r; if ( ( r = ff_read( "%c%c", &obj->col1, &obj->col2 ) ) < 0 ) return ff_err( "Can't read expected object colors" ); if ( r != 2 ) return ff_err( "\"colors\" key without two object colors" ); if ( fd_magic == MAGIC2 ) { obj->col1 = new_color( obj->col1 ); obj->col2 = new_color( obj->col2 ); } return 0; } /*************************************** ***************************************/ static int ff_read_alignment( FL_OBJECT * obj ) { int r; if ( ( r = ff_read( "%a", &obj->align ) ) < 0 ) return ff_err( "Can't read expected object alignment" ); if ( r == 0 ) return ff_err( "\"alignment\" key without or invalid value" ); if ( fd_magic == MAGIC2 ) obj->align = new_align( obj->align ); return 0; } /*************************************** ***************************************/ static int ff_read_lstyle( FL_OBJECT * obj ) { int r; if ( ( r = ff_read( "%p", &obj->lstyle ) ) < 0 ) return ff_err( "Can't read expected object label style" ); if ( r == 0 ) return ff_err( "\"style\" key without or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_lsize( FL_OBJECT * obj ) { int r; if ( ( r = ff_read( "%q", &obj->lsize ) ) < 0 ) return ff_err( "Can't read expected object label size" ); if ( r == 0 ) return ff_err( "\"size\" key without or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_lcol( FL_OBJECT * obj ) { int r; if ( ( r = ff_read( "%c", &obj->lcol ) ) < 0 ) return ff_err( "Can't read expected object label color" ); if ( r == 0 ) return ff_err( "\"lcol\" key without or invalid value" ); if ( fd_magic == MAGIC2 ) obj->lcol = new_color( obj->lcol ); return 0; } /*************************************** ***************************************/ static int ff_read_resize( FL_OBJECT * obj ) { int r; if ( ( r = ff_read( "%r", &obj->resize ) ) < 0 ) return ff_err( "Can't read expected object resize value" ); if ( r == 0 ) return ff_err( "\"resize\" key without or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_label( FL_OBJECT * obj ) { int r; char *label; if ( ( r = ff_read( "%S", &label ) ) < 0 ) return ff_err( "Can't read expected object label" ); if ( r == 1 ) { set_label( obj, label ); fl_safe_free( label ); } return 0; } /*************************************** ***************************************/ static int ff_read_shortcut( FL_OBJECT * obj ) { int r; char *shortcut; if ( ( r = ff_read( "%s", &shortcut ) ) < 0 ) return ff_err( "Can't read expected object shortcut" ); if ( r == 1 ) { set_shortcut( obj, shortcut ); fl_safe_free( shortcut ); } return 0; } /*************************************** ***************************************/ static int ff_read_callback( FL_OBJECT * obj ) { int r; char *cbname; if ( ( r = ff_read( "%v", &cbname ) ) < 0 ) return ff_err( "Can't read expected object callback" ); if ( r == 1 ) { set_object_name( obj, NULL, cbname, NULL ); fl_safe_free( cbname ); } return 0; } /*************************************** ***************************************/ static int ff_read_name( FL_OBJECT * obj ) { int r; char *name; if ( ( r = ff_read( "%s", &name ) ) < 0 ) return ff_err( "Can't read expected object name" ); if ( r == 1 ) { set_object_name( obj, name, NULL, NULL ); fl_safe_free( name ); } return 0; } /*************************************** ***************************************/ static int ff_read_gravity( FL_OBJECT * obj ) { int r; if ( ( r = ff_read( "%g%g", &obj->nwgravity, &obj->segravity ) ) < 0 ) return ff_err( "Can't read expected object gravity values" ); if ( r != 2 ) { if ( r == 0 ) ff_err( "\"gravity\" key without valid values" ); if ( r == 1 ) ff_err( "\"gravity\" key with only one valid value" ); return FF_READ_FAILURE; } return 0; } /*************************************** ***************************************/ static int ff_read_argument( FL_OBJECT * obj ) { int r; char *arg; if ( ( r = ff_read( "%s", &arg ) ) < 0 ) return ff_err( "Can't read expected object callback argument" ); if ( r == 1 ) { set_object_name( obj, NULL, NULL, arg ); fl_safe_free( arg ); } return 0; } /*************************************** ***************************************/ static int ff_read_return( FL_OBJECT * obj ) { int r; char *return_name; int ret; if ( ( r = ff_read( "%s", &return_name ) ) < 0 ) return ff_err( "Can't read expected object return" ); if ( r == 0 ) return ff_err( "\"return\" key with no or invalid value" ); ret = get_how_return_val( return_name ); fl_safe_free( return_name ); if ( ret == -1 ) return ff_err( "Invalid value for \"return\" key" ); fl_set_object_return( obj, ret ); return 0; } /*************************************** ***************************************/ typedef int ( * obj_attr_func )( FL_OBJECT * ); typedef struct { const char * name; obj_attr_func func; } obj_attr_handlers; static obj_attr_handlers attr_array[ ] = { { "boxtype", ff_read_boxtype }, { "colors", ff_read_colors }, { "alignment", ff_read_alignment }, { "style", ff_read_lstyle }, { "lstyle", ff_read_lstyle }, { "size", ff_read_lsize }, { "lsize", ff_read_lsize }, { "lcol", ff_read_lcol }, { "resize", ff_read_resize }, { "label", ff_read_label }, { "shortcut", ff_read_shortcut }, { "callback", ff_read_callback }, { "name", ff_read_name }, { "gravity", ff_read_gravity }, { "argument", ff_read_argument }, { "return", ff_read_return } }; /*************************************** * Reads all information from a .fd file until it's * detected that there's either a new form or object * or the last line of the file has been reached. * When called the first key for an object, "class:" * already has been read from the file. ***************************************/ static int load_object( void ) { int objclass; char *type_name; int type; FL_Coord x, y, w, h; char *key, *p; FL_OBJECT *obj; int r; /* Start with trying to read the minmal information needed. First we want the object class */ if ( ! ff_read( "%o", &objclass ) < 0 ) return ff_err( "Expected object class" ); if ( fd_magic == MAGIC2 ) objclass = new_class( objclass ); /* Next we need the object type. normally this is a string except for pseudo-objects that start and ed a group */ if ( ! ( objclass == FL_BEGIN_GROUP || objclass == FL_END_GROUP ) ) { if ( ff_read( "%k%t", &key, &type_name ) < 2 || strcmp( key, "type" ) ) { fl_safe_free( key ); return ff_err( "Expected object type" ); } fl_safe_free( key ); if ( ( type = find_type_value( objclass, type_name ) ) < 0 ) { char *tmp = fli_print_to_string( "Invalid type \"%s\" for object " "class", type_name ); fl_safe_free( type_name ); ff_err( tmp ); fl_safe_free( type_name ); return FF_READ_FAILURE; } fl_free( type_name ); } else { if ( ff_read( "%k%d", &key, &type ) < 2 || strcmp( key, "type" ) ) { fl_safe_free( key ); return ff_err( "Expected object type" ); } } fl_safe_free( key ); /* As the third thing the size of the object (following the "box" key) is required, exceptions are the pseudo-objectst that start and end a group, they may have less values */ if ( ! ( objclass == FL_BEGIN_GROUP || objclass == FL_END_GROUP ) ) { if ( ( r = ff_read( "%k%D%D%U%U", &key, &x, &y, &w, &h ) ) < 5 || strcmp( key, "box" ) ) { fl_safe_free( key ); if ( r == 0 ) ff_err( "Expected object box size" ); else { char *msg = fli_print_to_string( "Expected object box sizes " "as 4 values, found %d valid " "ones", r - 1 ); ff_err( msg ); fl_safe_free( msg ); } return FF_READ_FAILURE; } } else { /* For start and end of group we get either 1 or 4 values */ r = ff_read( "%k%D%d%U%U", &key, &x, &y, &w, &h ); if ( ( r != 2 && r != 5 ) || strcmp( key, "box" ) ) { fl_safe_free( key ); return ff_err( "Expected object box size with 1 or 4 valid" "values" ); } } fl_free( key ); if ( cur_form && fd_magic < MAGIC4 ) y = cur_form->h - y - h; /* Create the new object */ if ( ! ( obj = add_an_object( objclass, type, x, y, w, h ) ) ) return ff_err( "Failed to create an object" ); /* Now read the optional attributes, order is irrelevant except that all general object attributes must come before those specific to the type of the object and here we only look for the general ones */ while ( 1 ) { size_t i; if ( ( r = ff_read( "%k", &key ) ) < 0 ) return ff_err( "Failed to read expected key" ); if ( r == 0 || ! strcmp( key, "Name" ) || ! strcmp( key, "class" ) ) break; for ( i = 0; i < sizeof attr_array / sizeof *attr_array; i++ ) if ( ! strcmp( key, attr_array[ i ].name ) ) { fl_safe_free( key ); if ( attr_array[ i ].func( obj ) == FF_READ_FAILURE ) return FF_READ_FAILURE; break; } if ( i == sizeof attr_array / sizeof *attr_array ) break; } /* Some extra adjustments for spinner objects (this is a hack but avoiding it would require a complete change of how fdesign works) */ if ( obj->objclass == FL_SPINNER ) { FL_OBJECT *subobj = fl_get_spinner_input( obj ); subobj->col1 = obj->col1; subobj->col2 = obj->col2; subobj->lstyle = obj->lstyle; subobj->lsize = obj->lsize; } /* If the key read isn't "Name" or "class" (indicating the start of the next form or object) it must be an object specific key */ if ( r == 1 && strcmp( key, "Name" ) && strcmp( key, "class" ) ) r = load_objclass_spec_info( obj, key ); else { /* If a key could be read continue, otherwise this must be (nearly) the end of the file and the name of the main function must be readable (or something is wrong) */ if ( r == 1 ) r = ! strcmp( key, "class" ) ? FF_AT_START_OF_OBJECT : FF_AT_START_OF_FORM; else { if ( ff_read( "%v", &p ) < 1 ) return ff_err( "Expected main function name, not found here" ); fli_sstrcpy( main_name, p, MAX_VAR_LEN ); fl_safe_free( p ); r = FF_AT_END_OF_FILE; } fl_safe_free( key ); } fli_handle_object( obj, FL_ATTRIB, 0, 0, 0, NULL, 0 ); return r; } /*************************************** * Saves a form definition to the file ***************************************/ void write_form( FILE * fl, FL_FORM * form, char fname[ ] ) { int onumb; FL_OBJECT *obj; fprintf( fl, "\n=============== FORM ===============\n" ); fprintf( fl, "Name: %s\n", fname ); fprintf( fl, "Width: %d\n", convert_u( form->w ) ); fprintf( fl, "Height: %d\n", convert_u( form->h ) ); /* print the object number */ for ( onumb = 0, obj = form->first->next; obj; obj = obj->next ) onumb += obj->parent == NULL; fprintf( fl, "Number of Objects: %d\n", onumb ); /* print the objects */ obj = form->first->next; while ( obj != NULL ) { save_object( fl, obj ); obj = obj->next; } } /*************************************** * Reads all information about a form from an .fd file until * it's detected that a new form starts or the last line of * the file has been reached. When we arrive here the "Name:" * key as well as the name of the form itself already have been * read in. We return when we detect that a new form starts * (due to the "Mame:" key or the last line of the file should * have been reached. ***************************************/ int read_form( void ) { char *key; float w = -1.0, h = -1.0; int num_objects = -1; int r; int i; /* Try to read information pertinent to the form (name already has been read in) until the first key for an object in the form ("class:") is found */ while ( 1 ) { if ( ff_read( "%k", &key ) < 1 ) return ff_err( "Invalid format of file" ); if ( ! strcmp( key, "class" ) ) { fl_safe_free( key ); break; } else if ( ! strcmp( key, "Width" ) ) { fl_safe_free( key ); if ( ff_read( "%f", &w ) < 1 ) return ff_err( "Can't read expected form width" ); if ( w < 0.0 ) return ff_err( "Invalid negative form width" ); } else if ( ! strcmp( key, "Height" ) ) { fl_safe_free( key ); if ( ff_read( "%f", &h ) < 1 ) return ff_err( "Can't read expected form height" ); if ( h < 0.0 ) return ff_err( "Invalid negative form height" ); } else if ( ! strcmp( key, "Number of Objects" ) ) { fl_safe_free( key ); if ( ff_read( "%d", &num_objects ) < 1 ) return ff_err( "Can't read expected number of objects in " "form" ); if ( num_objects <= 0 ) return ff_err( "Invalid number of objects, must be at " "least 1" ); } } /* Before continuing with reading the form's objects check that at least width, height and number of objects in form were found */ if ( w < 0.0 ) return ff_err( "Width of form not found" ); if ( h < 0.0 ) return ff_err( "Height of form not found" ); if ( num_objects < 0 ) return ff_err( "Number of objects in form not found" ); /* Create the new form */ cur_form = fl_bgn_form( FL_NO_BOX, ( FL_Coord ) w, ( FL_Coord ) h ); fl_end_form( ); /* Read all objects until next form starts or end file seems to have been reached */ r = FF_AT_START_OF_OBJECT; for ( i = 0; i < num_objects && r == FF_AT_START_OF_OBJECT; i++ ) r = load_object( ); if ( r == FF_READ_FAILURE ) return FF_READ_FAILURE; if ( r == FF_AT_START_OF_OBJECT ) return ff_err( "More objects found than expected" ); if ( i < num_objects ) return ff_err( "Less objects found than expected" ); return r; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_fake.c0000644000175000017500000001753411247055071015404 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_fake.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. *. * Fdesign is not capable of handing real canvas classes. Here * we use frame/box classes to simulate the appearance of a canvas */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "fd_main.h" /*************************************** ***************************************/ static int handle_simu_canvas( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { int ftype; switch ( event ) { case FL_DRAW: fl_drw_box( FL_FLAT_BOX, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); ftype = fli_boxtype2frametype( ob->boxtype ); fl_drw_frame( ftype, ob->x, ob->y, ob->w, ob->h, ob->col2, ob->bw ); fl_drw_text( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); break; case FL_DRAWLABEL: if ( ob->align != FL_ALIGN_CENTER ) fl_drw_text( ob->align, ob->x, ob->y, ob->w, ob->h, ob->lcol, ob->lstyle, ob->lsize, ob->label ); break; } return 0; } /*************************************** ***************************************/ FL_OBJECT * fl_create_simu_canvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_make_object( FL_CANVAS, type, x, y, w, h, label, handle_simu_canvas ); ob->boxtype = FL_CANVAS_BOXTYPE; ob->col1 = FL_NoColor; ob->col2 = FL_BLACK; ob->lcol = FL_LCOL; ob->align = FL_ALIGN_CENTER; ob->active = 0; ob->spec = fl_calloc( 1, sizeof *ob->spec ); return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_simu_canvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_create_simu_canvas( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** * glcanvas ***************************************/ FL_OBJECT * fl_create_simu_glcanvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_make_object( FL_GLCANVAS, type, x, y, w, h, label, handle_simu_canvas ); ob->boxtype = FL_CANVAS_BOXTYPE; ob->col1 = FL_NoColor; ob->col2 = FL_BLACK; ob->lcol = FL_LCOL; ob->align = FL_ALIGN_CENTER; ob->active = 0; ob->spec = fl_calloc( 1, sizeof *ob->spec ); return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_simu_glcanvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_create_simu_glcanvas( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** * fake tabfolder ***************************************/ static int handle_tabfolder( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { if ( event == FL_DRAW ) { fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); fl_draw_object_label( ob ); } return 0; } /*************************************** ***************************************/ FL_OBJECT * fl_create_ntabfolder( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_make_object( FL_NTABFOLDER, type, x, y, w, h, label, handle_tabfolder ); ob->boxtype = FL_UP_BOX; ob->resize = FL_RESIZE_NONE; ob->col1 = FL_COL1; ob->col2 = FL_COL1; ob->align = FL_ALIGN_LEFT_TOP; return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_ntabfolder( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_ntabfolder( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** * fake formbrowser ***************************************/ static int handle_formbrowser( FL_OBJECT * ob, int event, FL_Coord mx FL_UNUSED_ARG, FL_Coord my FL_UNUSED_ARG, int key FL_UNUSED_ARG, void * ev FL_UNUSED_ARG ) { if ( event == FL_DRAW ) { fl_drw_box( ob->boxtype, ob->x, ob->y, ob->w, ob->h, ob->col1, ob->bw ); fl_draw_object_label( ob ); } return 0; } /*************************************** ***************************************/ FL_OBJECT * fl_create_nformbrowser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; ob = fl_make_object( FL_FORMBROWSER, type, x, y, w, h, label, handle_formbrowser ); ob->boxtype = FL_DOWN_BOX; ob->resize = FL_RESIZE_NONE; ob->col1 = FL_COL1; ob->col2 = FL_COL1; ob->align = FL_ALIGN_BOTTOM; return ob; } /*************************************** ***************************************/ FL_OBJECT * fl_add_nformbrowser( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_nformbrowser( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_pallette.c0000644000175000017500000001211311247055071016274 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_pallette.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * handles the object pallette */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "fd/pallette.h" #include "fd_main.h" #include static FD_pmain *pmain; typedef struct { FL_OBJECT * ob; /* the object (radio button) handle */ int cls; /* the obj class it represents */ } Entry; static Entry *entries; static int nentries; /*************************************** ***************************************/ static void init_entry_table( FL_FORM * form ) { FL_OBJECT *ob; int i; if ( ! entries ) entries = fl_calloc( 1, MAXCLASSES * sizeof *entries ); /* we obtain the class by looking at the callback function */ for ( i = 0, ob = form->first; i < MAXCLASSES && ob; ob = ob->next, i++ ) if ( ob->object_callback ) { entries[ nentries ].ob = ob; entries[ nentries ].cls = ob->argument; nentries++; } if ( i >= MAXCLASSES ) fprintf( stderr, "fd_pallette - Internal Error: MAXCLASSES " "too small?\n"); } /*************************************** ***************************************/ static FL_FORM * create_all( void ) { FD_buttform *bf; FD_staticform *sf; FD_valuatorform *vf; FD_choiceform *cf; FD_miscform *mf; if ( pmain ) return pmain->pmain; pmain = create_form_pmain( ); bf = create_form_buttform( ); sf = create_form_staticform( ); vf = create_form_valuatorform( ); cf = create_form_choiceform( ); mf = create_form_miscform( ); fl_addto_tabfolder( pmain->folder, " Static ", sf->staticform ); init_entry_table( sf->staticform ); fl_addto_tabfolder( pmain->folder, " Button ", bf->buttform ); init_entry_table( bf->buttform ); fl_addto_tabfolder( pmain->folder, " Valuator ", vf->valuatorform ); init_entry_table( vf->valuatorform ); fl_addto_tabfolder( pmain->folder, " Choice ", cf->choiceform ); init_entry_table( cf->choiceform ); fl_addto_tabfolder( pmain->folder, " Misc. ", mf->miscform ); init_entry_table( mf->miscform ); return pmain->pmain; } /*************************************** ***************************************/ void dismiss_pallete( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { fl_hide_form( ob->form ); reset_pallette_menu_status( ); } /*************************************** ***************************************/ void hide_pallette( void ) { FL_FORM *form = create_all( ); if ( form->visible ) fl_hide_form( form ); } /*************************************** ***************************************/ void show_pallette( void ) { FL_FORM *form = create_all( ); static int first = 1; if ( first ) { fl_set_form_position( form, -form->w - 50, 20 ); first = 0; } select_pallette_entry( cur_class ); fl_show_form( form, FL_PLACE_POSITION, FL_TRANSIENT, "Pallette" ); } /*************************************** * all pallette entries are radio buttons ***************************************/ void pallette_entry_callback( FL_OBJECT * ob, long data ) { if ( pmain->vdata && ( ( FL_OBJECT * ) pmain->vdata )->form != ob->form ) fl_set_button( pmain->vdata, 0 ); pmain->vdata = ob; pmain->ldata = data; /* selects the object in the object browser */ select_object_by_class( data ); } /*************************************** ***************************************/ void reset_pallette( void ) { if ( pmain && pmain->vdata ) { fl_set_button( pmain->vdata, 0 ); pmain->vdata = 0; } } /*************************************** * this function will be called if object browser is selected ***************************************/ void select_pallette_entry( int cls ) { int i; if ( ! entries || cls < 0 ) return; for ( i = 0; i < nentries; i++ ) if ( entries[ i ].cls == cls ) { fl_set_folder( pmain->folder, entries[ i ].ob->form ); fl_set_button( entries[ i ].ob, 1 ); break; } } #include "fd/pallette.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_dial.c0000644000175000017500000002023611252274044015430 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_dial.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting dial class specific attributes. We hang the spec * structure on ob->u_vdata. The real spec ob->spec is affected * by testing and can't be used. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "private/pdial.h" #include "spec/dial_spec.h" extern FD_dialattrib *create_form_dialattrib( void ); static FD_dialattrib *dial_attrib; static SuperSPEC *dial_spec; static void show_spec(SuperSPEC *); #define VN( a ) { a, #a } static FLI_VN_PAIR dial_dir[ ] = { VN( FL_DIAL_CW ), VN( FL_DIAL_CCW ), { -1, NULL } }; /*************************************** ***************************************/ int get_direction_value( const char * s ) { return fli_get_vn_value( dial_dir, s ); } /*************************************** ***************************************/ void * get_dial_spec_fdform( void ) { if ( ! dial_attrib ) { dial_attrib = create_form_dialattrib( ); fl_addto_choice( dial_attrib->dir, dial_dir[ 0 ].name ); fl_addto_choice( dial_attrib->dir, dial_dir[ 1 ].name ); setup_how_return_menu( dial_attrib->returnsetting ); fl_set_menu_item_mode( dial_attrib->returnsetting, 5, FL_PUP_BOX | FL_PUP_GRAY ); fl_set_menu_item_mode( dial_attrib->returnsetting, 6, FL_PUP_BOX | FL_PUP_GRAY ); } return dial_attrib; } /*************************************** ***************************************/ void dial_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *edited = dial_attrib->vdata; superspec_to_spec( edited ); show_spec( get_superspec( edited ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec ) { set_finput_value( dial_attrib->minval, spec->min, -1 ); set_finput_value( dial_attrib->maxval, spec->max, -1 ); set_finput_value( dial_attrib->initialval, spec->val, -1 ); set_finput_value( dial_attrib->thetai, spec->thetai, -1 ); set_finput_value( dial_attrib->thetaf, spec->thetaf, -1 ); set_finput_value( dial_attrib->step, spec->step, -1 ); fl_set_choice_text( dial_attrib->dir, fli_get_vn_name( dial_dir, spec->direction ) ); reset_how_return_menu( dial_attrib->returnsetting, spec->how_return ); } /*************************************** ***************************************/ int set_dial_attrib( FL_OBJECT * ob ) { dial_attrib->vdata = ob; dial_spec = get_superspec( ob ); show_spec( dial_spec ); return 0; } /*************************************** ***************************************/ void emit_dial_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *sp, *defspec; if ( ob->objclass != FL_DIAL ) return; /* create a default object */ defobj = fl_create_dial( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->min != defspec->min || sp->max != defspec->max ) fprintf( fp, " fl_set_dial_bounds( obj, %g, %g );\n", sp->min, sp->max ); if ( sp->thetai != defspec->thetai || sp->thetaf != defspec->thetaf ) fprintf( fp, " fl_set_dial_angles( obj, %g, %g );\n", sp->thetai, sp->thetaf ); if ( sp->val != defspec->val ) fprintf( fp, " fl_set_dial_value( obj, %g );\n", sp->val ); if ( sp->step != defspec->step ) fprintf( fp, " fl_set_dial_step( obj, %g );\n", sp->step ); if ( sp->direction != defspec->direction ) fprintf( fp, " fl_set_dial_direction( obj, %s );\n", fli_get_vn_name( dial_dir, sp->direction ) ); fl_free_object( defobj ); } /*************************************** ***************************************/ void save_dial_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defspec, *spec; if ( ob->objclass != FL_DIAL ) return; /* create a default object */ defobj = fl_create_dial( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( spec->min != defspec->min || spec->max != defspec->max ) fprintf( fp, " bounds: %g %g\n", spec->min, spec->max ); if ( spec->thetai != defspec->thetai || spec->thetaf != defspec->thetaf ) fprintf( fp, " angles: %g %g\n", spec->thetai, spec->thetaf ); if ( spec->val != defspec->val ) fprintf( fp, " value: %g\n", spec->val ); if ( spec->step != defspec->step ) fprintf( fp, " step: %g\n", spec->step ); if ( spec->direction != defspec->direction ) fprintf( fp, " dir: %s\n", fli_get_vn_name( dial_dir, spec->direction ) ); fl_free_object( defobj ); } /*************************************** ***************************************/ void dial_minmax_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double min = get_finput_value( dial_attrib->minval ); double max = get_finput_value( dial_attrib->maxval ); fl_set_dial_bounds( dial_attrib->vdata, min, max ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void dial_thetachange_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double t1 = get_finput_value( dial_attrib->thetai ); double t2 = get_finput_value( dial_attrib->thetaf ); fl_set_dial_angles( dial_attrib->vdata, t1, t2 ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void dial_stepchange_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { float s = get_finput_value( dial_attrib->step ); fl_set_dial_step( dial_attrib->vdata, s ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void dial_initialvalue_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double val = get_finput_value( dial_attrib->initialval ); fl_set_dial_value( dial_attrib->vdata, val ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** * direction change ***************************************/ void dir_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { int dir = fl_get_choice( ob ) - 1; if ( dir >= 0 ) { fl_set_dial_direction( dial_attrib->vdata, dial_dir[ dir ].val ); if ( auto_apply ) redraw_the_form( 0 ); } } /*************************************** ***************************************/ void dial_returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( dial_attrib->returnsetting, dial_attrib->vdata ); } #include "spec/dial_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_forms.c0000644000175000017500000005133711322333353015617 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_forms.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * This file is part of the Forms Designer. * * It contains the routines that maintain the collection of * forms on which the program is working. It contains the callback * routines to add forms, change their name, remove them ,etc. * It also contains the routine to draw them and the basic routines * for loading and saving forms. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "fd_main.h" #include #include #include #include static FRM *forms = NULL; /* The forms */ int fnumb = 0; FL_FORM *cur_form = NULL; /* The current form */ /*************************************** * Returns the number of the form ***************************************/ static int get_form_numb( FL_FORM * form ) { int i; for ( i = 0; i < fnumb; i++ ) if ( forms[ i ].form == form ) return i; return -1; } /*************************************** * Sets the current form to numb, to NULL when numb = -1 ***************************************/ static void set_form( int numb ) { if ( numb == -1 ) { cur_form = NULL; fl_deselect_browser( fd_control->formbrowser ); } else { cur_form = forms[ numb ].form; set_bounding_box( 0, 0, cur_form->w, cur_form->h ); fl_select_browser_line( fd_control->formbrowser, numb + 1 ); fl_winstepsize( main_window, 1, 1 ); fl_winresize( main_window, cur_form->w, cur_form->h ); if ( fl_display ) XSync( fl_display, 0 ); } clear_selection( ); fillin_groups( ); redraw_the_form( 1 ); } /*************************************** * Change current form background. Called when the main window is resized ***************************************/ void reshape_form_background( FL_Coord neww, FL_Coord newh ) { if ( cur_form && cur_form->first ) { cur_form->w_hr = cur_form->w = cur_form->first->next->w = cur_form->first->next->fr1 = cur_form->first->next->fl2 = neww; cur_form->h_hr = cur_form->h = cur_form->first->next->h = cur_form->first->next->fb1 = cur_form->first->next->ft2 = newh; set_bounding_box( 0, 0, neww, newh ); } } /**** CALLBACK ROUTINES ****/ /*************************************** * Callback routine that is called when the user selects another form * to work on. ***************************************/ void form_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { set_form( fl_get_browser( fd_control->formbrowser ) - 1 ); } /*************************************** * Callback routine called when the user adds a form. ***************************************/ void addform_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { float w = 0, h = 0; FL_Coord xx, yy; static int form_seq; const char *s; const char *sp; FRM *new_forms; new_forms = fl_realloc( forms, ( fnumb + 1 ) * sizeof *forms ); if ( ! new_forms ) { fl_show_alert( "Too many forms", "Running out of memory for forms", NULL, 0 ); return; } else forms = new_forms; /* Make old form invisible */ set_form( -1 ); /* Get boundary */ fl_deactivate_form( fd_control->control ); fl_get_win_size( main_window, &xx, &yy ); set_bounding_box( 0, 0, xx, yy ); w = xx; h = yy; get_new_form_name: if ( ! ( s = fl_show_input( "Enter form name (must be usable as " "a C variable):", "" ) ) || ! *s ) { fl_activate_form( fd_control->control ); return; } if ( ! isascii( ( unsigned char ) *s ) || ! ( isalpha( ( unsigned char ) *s ) || *s == '_' ) ) { fl_show_alert( "Error", "Invalid C identifier specified for form " "name:", s, 0 ); goto get_new_form_name; } for ( sp = s + 1; *sp; sp++ ) if ( ! isascii( ( unsigned char ) *sp ) || ! ( isalnum( ( unsigned char ) *sp ) || *sp == '_' ) ) { fl_show_alert( "Error", "Invalid C identifier specified for form " "name:", s, 0 ); goto get_new_form_name; } /* Create the form */ cur_form = forms[ fnumb ].form = fl_bgn_form( FL_NO_BOX, w, h ); fl_end_form( ); add_an_object( FL_BOX, FL_UP_BOX, 0, 0, w, h ); fl_set_form_dblbuffer( cur_form, 1 ); /* Get form name and add it */ strcpy( forms[ fnumb ].fname, s ); if ( ! forms[ fnumb ].fname[ 0 ] ) sprintf( forms[ fnumb ].fname, "form%d", form_seq++ ); fl_add_browser_line( fd_control->formbrowser, forms[ fnumb ].fname ); /* finish off */ set_form( fnumb++ ); fl_activate_form( fd_control->control ); changed = FL_TRUE; } /*************************************** * Callback routine invoked when the user wants to change the name ***************************************/ void changename_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { int fn = get_form_numb( cur_form ); const char *s; const char *sp; if ( cur_form == NULL || fn == -1 ) return; get_changed_form_name: if ( ! ( s = fl_show_input( "Enter form name (must be usable as " "a C variable):", forms[ fn ].fname ) ) || ! *s ) return; if ( ! isascii( ( unsigned char ) *s ) || ! ( isalpha( ( unsigned char ) *s ) || *s == '_' ) ) { fl_show_alert( "Error", "Invalid C identifier specified for form " "name:", s, 0 ); goto get_changed_form_name; } for ( sp = s + 1; *sp; sp++ ) if ( ! isascii( ( unsigned char ) *sp ) || ! ( isalnum( ( unsigned char ) *sp ) || *sp == '_' ) ) { fl_show_alert( "Error", "Invalid C identifier specified for form " "name:", s, 0 ); goto get_changed_form_name; } fli_sstrcpy( forms[ fn ].fname, s, MAX_VAR_LEN ); fl_replace_browser_line( fd_control->formbrowser, fn + 1, forms[ fn ].fname ); changed = FL_TRUE; } /*************************************** * Callback routine invoked when the user wants to change the forms size ***************************************/ void changesize_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { FL_OBJECT *retobj; int fn = get_form_numb( cur_form ); if ( cur_form == NULL || fn == -1 ) return; /* While this form is shown no other should be operational (the user still can resize the forms window, that will automatically set the width and height spinners) */ fl_deactivate_all_forms( ); /* Set up the width and height spinner objects to show the sizes of the current form */ fl_set_spinner_value( fd_resize->width, cur_form->w ); fl_set_spinner_value( fd_resize->height, cur_form->h ); fl_show_form( fd_resize->resize, FL_PLACE_HOTSPOT, FL_TRANSIENT, "Form size" ); fl_update_display( 0 ); fl_winfocus( fd_resize->resize->window ); /* Loop until user clicks the "Dismiss" button */ while ( ( retobj = fl_do_only_forms( ) ) != fd_resize->quit ) { int w; int h; if ( retobj != fd_resize->set_size ) continue; /* User has clicked on the "Set new size" button */ w = FL_nint( fl_get_spinner_value( fd_resize->width ) ); h = FL_nint( fl_get_spinner_value( fd_resize->height ) ); fl_set_spinner_value( fd_resize->width, w ); fl_set_spinner_value( fd_resize->height, h ); if ( w == cur_form->w && h == cur_form->h ) continue; XResizeWindow( flx->display, main_window, w, h ); if ( cur_form && ( cur_form->w > w || cur_form->h > h ) ) { reshape_form_background( w, h ); redraw_the_form( 1 ); } changed = FL_TRUE; } fl_hide_form( fd_resize->resize ); fl_activate_all_forms( ); } /*************************************** * Callback routine called to delete a form ***************************************/ void deleteform_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { int i, fn = get_form_numb( cur_form ); if ( cur_form == NULL || fn == -1 ) return; if ( ! fl_show_question( "Delete current form?", 1 ) ) return; fl_delete_browser_line( fd_control->formbrowser, fn + 1 ); for ( i = fn; i < fnumb - 1; i++ ) forms[ i ] = forms[ i + 1 ]; fnumb--; set_form( -1 ); changed = 1; } /**** DRAWING FORMS ****/ /*************************************** * Redraws the form in main window. 'back' indicates whether the background * should be redrawn (when not double-buffering). This avoids flashing. ***************************************/ void redraw_the_form( int back ) { if ( main_window == 0 ) return; fl_winset( main_window ); /* It's possible to have a NULL cur_form, e.g. when adding */ if ( back && ! cur_form ) fd_clear( 0, 0, winw + 1, winh + 1 ); if ( cur_form != NULL ) { cur_form->window = main_window; cur_form->visible = 1; fl_set_form_dblbuffer( cur_form, 1 ); fl_redraw_form( cur_form ); cur_form->window = 0; cur_form->visible = 0; draw_selbox( ); } } /**** LOADING AND SAVING ****/ int fd_magic; /*************************************** ***************************************/ char * append_fd_suffix( const char * fn ) { size_t l = strlen( fn ); char *fname = fl_malloc( l + 4 ); strcpy( fname, fn ); if ( l < 3 || strcmp( fname + l - 3, ".fd" ) ) strcat( fname, ".fd" ); return fname; } /*************************************** * Reads in the very first part of a .fd file ***************************************/ static int load_fd_header( void ) { char *p; int nforms = -1; /* Line with "magic" number must come first, followed by some boilerplate text */ if ( ff_read( "%k", &p ) <= 0 || strcmp( p, "Magic" ) || ff_read( "%d", &fd_magic ) <= 0 || ( fd_magic != MAGIC2 && fd_magic != MAGIC3 && fd_magic != MAGIC4 && fd_magic != MAGIC5 ) ) return ff_err( "Wrong type of file" ); if ( fd_magic != MAGIC5 ) { char *tmp = ff_get_filename_copy( ); if ( ! fdopt.conv_only ) fl_show_alert2( 0, "Warning:\fFile %s\nwas created with an older " "fdesign version,\nthe new output file may not be " "compatible.", tmp ); else M_warn( "", "Warning: File %s was created with an older fdesign " "version, the new output file may not be compatible", tmp ); fl_safe_free( tmp ); } if ( ff_read( "Internal Form Definition File" ) < 0 || ff_read( "(do not change)" ) < 0 ) return ff_err( "Invalid format of file" ); /* Now follows a set of keyword/value pairs. The key "Name" marks the end of the header and the start of the first form definition */ while ( 1 ) { if ( ff_read( "%k", &p ) <= 0 ) return ff_err( "Invalid format of file" ); if ( ! strcmp( p, "Number of forms" ) ) { if ( ff_read( "%d", &nforms ) <= 0 ) return ff_err( "Expected number of forms" ); if ( nforms <= 0 ) return ff_err( "Invalid number of forms" ); } else if ( ! strcmp( p, "Unit of measure" ) ) { if ( ff_read( "%x", &fdopt.unit ) < 0 ) return ff_err( "Expected valid unit of measure" ); fli_cntl.coordUnit = fdopt.unit; /* make_obj uses this */ } else if ( ! strcmp( p, "SnapGrid" ) || ! strcmp( p, "Snap" ) ) { int snap_size; if ( ff_read( "%d", &snap_size ) < 0 ) return ff_err( "Expected snap size" ); if ( snap_size < 0 ) return ff_err( "Invalid snap size" ); set_snap_size( snap_size, 1 ); } else if ( ! strcmp( p, "Border Width" ) ) { int bw; if ( ff_read( "%d", &bw ) < 0 ) return ff_err( "Expected border width" ); if ( bw != FL_BOUND_WIDTH ) fl_set_border_width( fd_bwidth = bw ); } else if ( ! strcmp( p, "Name" ) ) { if ( nforms < 0 ) return ff_err( "Number of forms is missing" ); return nforms; } else return ff_err( "Invalid format of file" ); } return ff_err( "Invalid format of file" ); } /*************************************** * Loads or merges a file with form definitions ***************************************/ int load_forms( int merge, const char * str, int record ) { int i, saved_unit = fdopt.unit, r, nforms; FRM *new_forms; char *fname, *tmp; /* Try to open the .fd file */ if ( ff_get_fd_file( str, merge ) < 0 ) return -1; if ( ! merge ) { fnumb = 0; fl_clear_browser( fd_control->formbrowser ); } /* Try to read the header of the file (must indicate that there's at least one form */ if ( ( nforms = load_fd_header( ) ) <= 0 ) return -1; if ( ! ( new_forms = fl_realloc( forms, ( fnumb + nforms ) * sizeof *forms ) ) ) return ff_err( "Can't load file, running out of memory" ); forms = new_forms; fname = ff_get_filename_copy( ); /* Now read in all forms - we have already read in the "Name:" key that starts a new form */ r = FF_AT_START_OF_FORM; for ( i = 0; i < nforms && r == FF_AT_START_OF_FORM; i++ ) { char *p; /* First thing to read is the name of the form (which must not be an empty string) */ if ( ff_read( "%v", &p ) < 1 ) { fl_free( fname ); return ff_err( "Failed to read expected form name" ); } if ( ! p || ! *p ) { fl_safe_free( p ); return ff_err( "Expected name of the form" ); } fli_sstrcpy( forms[ fnumb ].fname, p, sizeof forms[ fnumb ].fname ); fl_safe_free( p ); /* Having gotten the name read all the remaining information. We then should either end up at the start of a new form or at the end of the file */ if ( ( r = read_form( ) ) == FF_AT_START_OF_FORM || r == FF_AT_END_OF_FILE ) { forms[ fnumb ].form = cur_form; fl_add_browser_line( fd_control->formbrowser, forms[ fnumb ].fname ); fnumb++; } } /* Check if we're really at the end of the file and as many forms have been found as we were led to expect */ if ( r == FF_AT_START_OF_FORM ) { fl_free( fname ); return ff_err( "More forms found than expected" ); } else if ( r != FF_READ_FAILURE && i < nforms ) { ff_err( "Less forms found than expected" ); fl_free( fname ); return -1; } /* Everything's dandy and we're done with the file */ ff_close( ); set_form( fnumb > 0 ? 0 : -1 ); if ( merge ) changed = 1; else if ( record && ( tmp = strrchr( fname, '/' ) ) ) { fl_safe_free( loadedfile ); *tmp = '\0'; loadedfile = fl_strdup( fname ); } if ( ! merge ) { fl_safe_free( loadedfile_fullpath ); loadedfile_fullpath = fl_strdup( fname ); } fl_free( fname ); /* Reset active coordinate system to pixel */ fli_cntl.coordUnit = FL_COORD_PIXEL; /* Force output the same as input when converting directly. The reason is we don't know the screen DPI. */ if ( ! fdopt.conv_only ) fdopt.unit = saved_unit; fd_magic = 0; return 0; } /*************************************** * Saves the form definitions, returns whether saved ***************************************/ int save_forms( const char *str ) { int i, snap; FILE *fn; char fname[ 1024 ], filename[ 1024 ]; Conv *conv; fl_use_fselector( SAVE_FSELECTOR ); /* Get the filename if necessary */ if ( ! str || ! * str ) str = fl_show_fselector( "Filename to save forms to", "", "*.fd", loadedfile ); if ( ! str ) return 0; /* cancel */ if ( ! *str ) { fl_show_alert( "No forms were saved.", "", "", 0 ); return 0; } /* Remove .fd if required */ strcpy( filename, str ); i = strlen( filename ) - 1; if ( strcmp( filename + i - 2, ".fd" ) == 0 ) filename[ i - 2 ] = '\0'; strcpy( fname, filename ); /* On conversion there's need to (re)save the .fd file. It messes up Makefile rules */ if ( fdopt.conv_only ) goto emit_code; /* Make the .fd file. */ strcat( fname, ".fd" ); make_backup( fname ); if ( ( fn = fopen( fname, "w" ) ) == 0 ) { fl_show_alert( "Cannot create definition file!!", "", "", 1 ); return 0; } snap = get_step_size( ) + 0.1; fprintf( fn, "Magic: %d\n\n", MAGIC5 ); fprintf( fn, "Internal Form Definition File\n" ); fprintf( fn, " (do not change)\n\n" ); fprintf( fn, "Number of forms: %d\n", fnumb ); fprintf( fn, "Unit of measure: %s\n", unit_name( fdopt.unit ) ); if ( fd_bwidth != FL_BOUND_WIDTH && fd_bwidth ) fprintf( fn, "Border Width: %d\n", fd_bwidth ); if ( snap != 10 ) fprintf( fn, "SnapGrid: %d\n", snap ); for ( i = 0; i < fnumb; i++ ) write_form( fn, forms[ i ].form, forms[ i ].fname ); fprintf( fn, "\n==============================\n%s\n", main_name ); fclose( fn ); emit_code: /* If no code is desired, return */ if ( ! fdopt.emit_code ) return 1; conv = convertor + fdopt.language; /* some converter works on the c code */ if ( conv->need_c_code ) convertor[ FD_C ].convert( filename, forms, fnumb ); if ( conv->convert ) return conv->convert( filename, forms, fnumb ); else if ( conv->extern_convertor ) { char cmdbuf[ 1024 ]; char optbuf[ 512 ]; int status; *optbuf = '\0'; if ( fdopt.emit_main ) strcat( optbuf, "-main " ); if ( fdopt.emit_cb ) strcat( optbuf, "-callback " ); if ( fdopt.altformat ) strcat( optbuf, "-altformat " ); if ( fdopt.compensate ) strcat( optbuf, "-compensate " ); if ( fdopt.output_dir ) { strcat( optbuf, "-dir " ); strcat( optbuf, fdopt.output_dir ); } sprintf( cmdbuf, "%s %s%s", conv->extern_convertor, optbuf, filename ); M_warn( "Convert", "Executing %s", cmdbuf ); if ( fdopt.conv_only ) { if ( ( status = system( cmdbuf ) ) ) M_err( "Output", "Error executing %s\n", cmdbuf ); } else { fl_clear_command_log( ); if ( ( status = fl_exe_command( cmdbuf, 1 ) ) ) { fl_addto_command_log( "\nerror executing " ); fl_addto_command_log( cmdbuf ); fl_show_command_log( FL_FULLBORDER ); } } return status == 0; } else { fprintf( stderr, "Convertor %s for %s not found\n", conv->extern_convertor, conv->lang_name ); return 0; } return 1; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_menu.c0000644000175000017500000003657511302221532015466 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_menu.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Setting menu class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "private/pmenu.h" #include "spec/menu_spec.h" #include extern FD_menuattrib *create_form_menuattrib( void ); static FD_menuattrib *menu_attrib; static SuperSPEC *menu_spec; static void show_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_menu_spec_fdform( void ) { if ( ! menu_attrib ) { menu_attrib = create_form_menuattrib( ); fl_addto_choice( menu_attrib->mode, get_pupmode_string( ) ); fl_addto_choice( menu_attrib->scope, "local|global" ); fl_set_choice_item_shortcut( menu_attrib->mode, 1, "Nn#N" ); fl_set_choice_item_shortcut( menu_attrib->mode, 1, "Gg#G" ); fl_set_choice_item_shortcut( menu_attrib->mode, 1, "Bb#B" ); fl_set_choice_item_shortcut( menu_attrib->mode, 1, "Cc#C" ); fl_set_choice_item_shortcut( menu_attrib->mode, 1, "Rr#R" ); fl_set_browser_dblclick_callback( menu_attrib->content_br, change_menu_item_cb, 0 ); } return menu_attrib; } /*************************************** ***************************************/ void menu_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *edited = menu_attrib->vdata; superspec_to_spec( edited ); show_spec( get_superspec( edited ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static const char * int_out( FL_OBJECT * ob FL_UNUSED_ARG, double val, int prec FL_UNUSED_ARG ) { static char buf[ 8 ]; sprintf( buf, "%d", ( int ) ( val + 0.5 ) ); return buf; } /*************************************** ***************************************/ static void show_spec( SuperSPEC * sp ) { int i; int mval = sp->nlines + 1; fl_freeze_form( menu_attrib->content_br->form ); fl_set_button( menu_attrib->new_menuapi, sp->new_menuapi ); fl_clear_browser( menu_attrib->content_br ); for ( i = 1; i <= sp->nlines; i++ ) { fl_add_browser_line( menu_attrib->content_br, sp->content[ i ] ); if ( sp->mval[ i ] >= mval ) mval = sp->mval[ i ] + 1; } fl_set_choice( menu_attrib->scope, sp->global_scope + 1 ); if ( sp->new_menuapi ) fl_hide_object( menu_attrib->id ); else fl_show_object( menu_attrib->id ); fl_set_counter_filter( menu_attrib->id, int_out ); fl_set_counter_value( menu_attrib->id, sp->nlines + 1 ); fl_unfreeze_form( menu_attrib->content_br->form ); } /*************************************** ***************************************/ int set_menu_attrib( FL_OBJECT * ob ) { menu_attrib->vdata = ob; menu_spec = get_superspec( ob ); superspec_to_spec( ob ); show_spec( menu_spec ); return 0; } /*************************************** * create a name for the [menu|choice]_entry API and hang it off * sp->misc_char ***************************************/ static char * get_pupentry_name( FL_OBJECT * ob ) { static int n = 0; char pupname[ 128 ], *p; char objname[ 128 ], cbname[ 128 ], argname[ 128 ]; char *what = ob->objclass == FL_MENU ? "fdmenu" : "fdchoice"; SuperSPEC *sp = get_superspec(ob); int i; if ( ! sp->new_menuapi || sp->nlines <= 0 ) return ""; if ( sp->misc_char && *sp->misc_char ) return sp->misc_char; get_object_name( ob, objname, cbname, argname ); if ( objname[ 0 ] ) sprintf( pupname, "%s_%s_%d", what, objname, n ); else if ( *ob->label ) sprintf( pupname, "%s_%s_%d", what, ob->label, n ); else sprintf( pupname, "%s_%d", what, n ); n++; /* Get rid of illegal chars */ for ( i = 0, p = pupname; *p; p++ ) if (isalnum( ( int ) *p ) || *p == '_' ) pupname[ i++ ] = *p; pupname[ i++ ] = '\0'; sp->misc_char = fl_strdup( pupname ); return sp->misc_char; } /*************************************** * emit things that are needed before code emission (file scope) ***************************************/ void emit_menu_header( FILE * fp, FL_OBJECT * ob ) { SuperSPEC *sp = get_superspec( ob ); int i; if ( ! sp->new_menuapi || sp->nlines <= 0 ) return; get_pupentry_name( ob ); fprintf( fp, "\n%sFL_PUP_ENTRY %s[ ] = {\n", sp->global_scope ? "" : "static ", sp->misc_char ); fprintf( fp, " /* itemtext callback shortcut mode */\n" ); for ( i = 1; i <= sp->nlines; i++ ) fprintf( fp, " { \"%s\", %s, \"%s\", %s, { 0, 0 } },\n", sp->content[ i ], ( sp->callback[ i ] && *sp->callback[ i ] ) ? ( char * ) sp->callback[ i ] : "NULL", sp->shortcut[ i ] ? sp->shortcut[ i ] : "", get_pupmode_name( sp->mode[ i ] ) ); /* sentinel */ fprintf( fp, " { NULL, 0, NULL, 0, { 0, 0 } }\n};\n\n"); } /*************************************** * Emit menu item callback prototypes or function definitions ***************************************/ void emit_menu_item_callback_headers( FILE * fn, FL_OBJECT * ob, int code ) { SuperSPEC *sp = get_superspec( ob ); int i; if ( sp->new_menuapi || sp->nlines <= 0 ) return; for ( i = 1; i <= sp->nlines; i++ ) { if ( ! sp->callback[ i ] ) continue; if ( ! code ) fprintf( fn, "extern int %s( int );\n", sp->callback[ i ] ); else { fprintf( fn, "/***************************************\n" " ***************************************/\n\n" ); fprintf( fn, "int %s( int menu_item_ID )\n{\n", sp->callback[ i ] ); fprintf( fn, " /* fill-in code for menu item callback */\n\n" " return menu_item_ID;\n}\n\n\n" ); } } } /*************************************** * emit header info that is global in nature ***************************************/ void emit_menu_global( FILE * fp, FL_OBJECT * ob ) { SuperSPEC *sp = get_superspec( ob ); if ( ! sp->new_menuapi || sp->nlines <= 0 || ! sp->global_scope ) return; get_pupentry_name( ob ); fprintf( fp, "extern FL_PUP_ENTRY %s[ ];\n", sp->misc_char ); } /*************************************** ***************************************/ void emit_menu_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *sp, *defsp; int i; /* create a default object */ defobj = fl_create_menu( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->nlines == 0 ) return; if ( sp->new_menuapi ) fprintf( fp, " fl_set_menu_entries( obj, %s );\n", sp->misc_char ); else for ( i = 1; i <= sp->nlines; i++ ) { fprintf( fp, " fl_addto_menu( obj, \"%s\" );\n", sp->content[ i ] ); if ( sp->mode[ i ] != defsp->mode[ i ] ) fprintf(fp, " fl_set_menu_item_mode( obj, %d, %s );\n", i, get_pupmode_name( sp->mode[ i ] ) ); if ( sp->shortcut[ i ] && *sp->shortcut[ i ] ) fprintf( fp, " fl_set_menu_item_shortcut( obj, %d, \"%s\" );\n", i, sp->shortcut[ i ] ); if ( sp->callback[ i ] && *sp->callback[ i ] ) fprintf( fp, " fl_set_menu_item_callback( obj, %d, %s );\n", i, sp->callback[ i ] ); if ( sp->mval[ i ] != i ) fprintf( fp, " fl_set_menu_item_id( obj, %d, %d );\n", i, sp->mval[ i ] ); } } /*************************************** ***************************************/ void save_menu_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defsp, *sp; int i; /* create a default object */ defobj = fl_create_menu( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->new_menuapi != defsp->new_menuapi ) fprintf( fp, " struct: %d\n", sp->new_menuapi ); if ( sp->global_scope != defsp->global_scope ) fprintf( fp, " global: %d\n", sp->global_scope ); for ( i = 1; i <= sp->nlines; i++ ) { fprintf( fp, " content: %s\n", sp->content[i]); if ( sp->mval[ i ] != i ) fprintf( fp, " id: %d\n", sp->mval[ i ] ); if ( sp->mode[ i ] != defsp->mode[ i ] ) fprintf( fp, " mode: %s\n", get_pupmode_name(sp->mode[ i ] ) ); if ( sp->shortcut[ i ] && *sp->shortcut[ i ] ) fprintf( fp, " shortcut: %s\n", sp->shortcut[ i ] ); if ( sp->callback[ i ] ) fprintf( fp, " callback: %s\n", sp->callback[ i ] ); } } /* * attributes callbacks */ /*************************************** * callbacks and freeobj handles for form choiceattrib ***************************************/ void add_menu_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_menuattrib *ui = ob->form->fdui; const char *s = fl_get_input( ui->input ); const char *sc = fl_get_input( ui->shortcut ); const char *mode = fl_get_choice_text( ui->mode ); const char *item_cb = fl_get_input( ui->item_cb ); int mval = fl_get_counter_value( ui->id ); if ( s && *s ) { FLI_MENU_SPEC *sp = ( ( FL_OBJECT * ) ui->vdata )->spec; int i, k; fl_addto_browser( ui->content_br, s ); i = fl_addto_menu( ui->vdata, s ); k = sp->mval[ i ]; fl_set_menu_item_shortcut( ui->vdata, k, sc ); fl_set_menu_item_mode( ui->vdata, k, get_pupmode_value( mode ) ); fl_safe_free( sp->cb[ i ] ); if ( item_cb && *item_cb ) fl_set_menu_item_callback( ui->vdata, k, ( FL_PUP_CB ) fl_strdup( item_cb ) ); if ( k != mval ) fl_set_menu_item_id( ui->vdata, i, mval ); if ( fl_get_button( ui->auto_clear ) ) clear_menu_field_cb( ui->auto_clear, 0 ); if ( auto_apply ) redraw_the_form( 0 ); } } /*************************************** ***************************************/ void replace_menu_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_menuattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); const char *s = fl_get_input( ui->input ); const char *sc = fl_get_input( ui->shortcut ); const char *mode = fl_get_choice_text( ui->mode ); const char *item_cb = fl_get_input( ui->item_cb ); int mval = fl_get_counter_value( ui->id ); if ( *s && i > 0 ) { FLI_MENU_SPEC *sp = ( ( FL_OBJECT * ) ui->vdata )->spec; int k; fl_replace_browser_line( ui->content_br, i, s ); k = sp->mval[ i ]; fl_replace_menu_item( ui->vdata, k, s ); fl_set_menu_item_shortcut( ui->vdata, k, sc ); fl_set_menu_item_mode( ui->vdata, k, get_pupmode_value( mode ) ); fl_safe_free( sp->cb[ i ] ); if ( item_cb && *item_cb ) fl_set_menu_item_callback( ui->vdata, k, ( FL_PUP_CB ) fl_strdup( item_cb ) ); if ( k != mval ) fl_set_menu_item_id( ui->vdata, i, mval ); if ( fl_get_button( ui->auto_clear ) ) clear_menu_field_cb( ui->auto_clear, 0 ); } if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void delete_menu_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_menuattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); if ( i > 0 ) { FLI_MENU_SPEC *sp = ( ( FL_OBJECT * ) ui->vdata )->spec; fl_delete_browser_line( ui->content_br, i ); fl_safe_free( sp->cb[ i ] ); fl_delete_menu_item( ui->vdata, sp->mval[ i ] ); if ( auto_apply ) redraw_the_form( 0 ); } } /*************************************** ***************************************/ void change_menu_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_menuattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); FL_OBJECT *edited = ui->vdata; FLI_MENU_SPEC *sp = edited->spec; if ( i > 0 ) { fl_set_input( ui->input, fl_get_browser_line( ui->content_br, i ) ); if ( sp->shortcut[ i ] ) fl_set_input( ui->shortcut, sp->shortcut[ i ] ); fl_set_choice_text( ui->mode, get_pupmode_name( sp->mode[ i ] ) + 3 ); if ( sp->cb[ i ] ) fl_set_input( ui->item_cb, ( char * ) sp->cb[ i ] ); else fl_set_input( ui->item_cb, "" ); fl_set_counter_value( ui->id, sp->mval[ i ] ); } } /*************************************** ***************************************/ void clear_menu_field_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_menuattrib *ui = ob->form->fdui; int i; FLI_MENU_SPEC *sp = ( ( FL_OBJECT * ) ui->vdata )->spec; int mval = sp->numitems + 1; fl_set_input( ui->input, "" ); fl_set_input( ui->shortcut, "" ); fl_set_choice( ui->mode, 1 ); fl_set_input( ui->item_cb, "" ); for ( i = 1; i <= sp->numitems; i++ ) if ( sp->mval[ i ] >= mval ) mval = sp->mval[ i ] + 1; fl_set_counter_value( ui->id, mval ); } /*************************************** ***************************************/ void new_menuapi_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_menuattrib *ui = ob->form->fdui; menu_spec->new_menuapi = fl_get_button( ob ); if ( menu_spec->new_menuapi ) fl_hide_object( ui->id ); else fl_show_object( ui->id ); } /*************************************** ***************************************/ void menuentry_scope_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { menu_spec->global_scope = ( fl_get_choice( ob ) - 1 ) > 0; } #include "spec/menu_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_positioner.c0000644000175000017500000002021211252274055016706 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_positioner.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting counter class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "private/ppositioner.h" #include "spec/positioner_spec.h" extern FD_posattrib *create_form_posattrib( void ); static FD_posattrib *pos_attrib; static SuperSPEC *pos_spec; static void init_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_pos_spec_fdform( void ) { if ( ! pos_attrib ) { pos_attrib = create_form_posattrib( ); setup_how_return_menu( pos_attrib->returnsetting ); fl_set_menu_item_mode( pos_attrib->returnsetting, 5, FL_PUP_BOX | FL_PUP_GRAY ); fl_set_menu_item_mode( pos_attrib->returnsetting, 6, FL_PUP_BOX | FL_PUP_GRAY ); } return pos_attrib; } /*************************************** ***************************************/ void pos_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { superspec_to_spec( pos_attrib->vdata ); init_spec(get_superspec( pos_attrib->vdata ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void init_spec( SuperSPEC * spec ) { set_finput_value( pos_attrib->xminval, spec->xmin, -1 ); set_finput_value( pos_attrib->xmaxval, spec->xmax, -1 ); set_finput_value( pos_attrib->yminval, spec->ymin, -1 ); set_finput_value( pos_attrib->ymaxval, spec->ymax, -1 ); set_finput_value( pos_attrib->initialxval, spec->xval, -1 ); set_finput_value( pos_attrib->initialyval, spec->yval, -1 ); set_finput_value( pos_attrib->xstep, spec->xstep, -1 ); set_finput_value( pos_attrib->ystep, spec->ystep, -1 ); reset_how_return_menu( pos_attrib->returnsetting, spec->how_return ); } /*************************************** ***************************************/ int set_pos_attrib( FL_OBJECT * ob ) { pos_attrib->vdata = ob; pos_spec = get_superspec( ob ); init_spec( pos_spec ); return 0; } /*************************************** ***************************************/ void emit_pos_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *spec, *defspec; if ( ob->objclass != FL_POSITIONER ) return; /* create a default object */ defobj = fl_create_positioner( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( spec->xmin != defspec->xmin || spec->xmax != defspec->xmax ) fprintf( fp, " fl_set_positioner_xbounds( obj, %g, %g );\n", spec->xmin, spec->xmax ); if ( spec->ymin != defspec->ymin || spec->ymax != defspec->ymax ) fprintf( fp, " fl_set_positioner_ybounds( obj, %g, %g );\n", spec->ymin, spec->ymax ); if ( spec->xval != defspec->xval ) fprintf( fp, " fl_set_positioner_xvalue( obj, %g );\n", spec->xval ); if ( spec->yval != defspec->yval ) fprintf( fp, " fl_set_positioner_yvalue( obj, %g );\n", spec->yval ); if ( spec->xstep != defspec->xstep ) fprintf( fp, " fl_set_positioner_xstep( obj, %g );\n", spec->xstep ); if ( spec->ystep != defspec->ystep ) fprintf( fp, " fl_set_positioner_ystep( obj, %g );\n", spec->ystep ); fl_free_object( defobj ); } /*************************************** ***************************************/ void save_pos_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defspec, *spec; if ( ob->objclass != FL_POSITIONER ) return; /* create a default object */ defobj = fl_create_positioner( ob->type, 0, 0, 0, 0, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( spec->xmin != defspec->xmin || spec->xmax != defspec->xmax ) fprintf( fp, " xbounds: %g %g\n", spec->xmin, spec->xmax ); if ( spec->ymin != defspec->ymin || spec->ymax != defspec->ymax ) fprintf( fp, " ybounds: %g %g\n", spec->ymin, spec->ymax ); if ( spec->xval != defspec->xval ) fprintf( fp, " xvalue: %g\n", spec->xval ); if ( spec->yval != defspec->yval ) fprintf( fp, " yvalue: %g\n", spec->yval ); if ( spec->xstep != defspec->xstep ) fprintf( fp, " xstep: %g\n", spec->xstep ); if ( spec->ystep != defspec->ystep ) fprintf( fp, " ystep: %g\n", spec->ystep ); fl_free_object( defobj ); } /*************************************** ***************************************/ void pos_xminmax_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double min = get_finput_value( pos_attrib->xminval ); double max = get_finput_value( pos_attrib->xmaxval ); fl_set_positioner_xbounds( pos_attrib->vdata, min, max ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void pos_yminmax_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double min = get_finput_value( pos_attrib->yminval ); double max = get_finput_value( pos_attrib->ymaxval ); fl_set_positioner_ybounds( pos_attrib->vdata, min, max ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void pos_xstepchange_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { float s = get_finput_value( pos_attrib->xstep ); fl_set_positioner_xstep( pos_attrib->vdata, s ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void pos_ystepchange_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { float s = get_finput_value( pos_attrib->ystep ); fl_set_positioner_ystep( pos_attrib->vdata, s ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void pos_initialxvalue_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double val = get_finput_value( pos_attrib->initialxval ); fl_set_positioner_xvalue( pos_attrib->vdata, val ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void pos_initialyvalue_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG) { double val = get_finput_value( pos_attrib->initialyval ); fl_set_positioner_yvalue( pos_attrib->vdata, val ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void pos_returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( pos_attrib->returnsetting, pos_attrib->vdata ); } #include "spec/positioner_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_button.c0000644000175000017500000004776311247055071016051 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_button.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting button class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include #include "spec/button_spec.h" extern FD_buttonattrib *create_form_buttonattrib( void ); static FD_buttonattrib *bt_attrib; static SuperSPEC *button_spec; static IconInfo *info; static void show_spec( SuperSPEC * ); static void get_data_name( FL_OBJECT *, IconInfo * ); static FL_OBJECT *edited; /*************************************** ***************************************/ void * get_button_spec_fdform( void ) { if ( ! bt_attrib ) { bt_attrib = create_form_buttonattrib( ); fl_addto_choice( bt_attrib->pixalign, align_name( FL_ALIGN_CENTER, 0 ) ); fl_addto_choice( bt_attrib->pixalign, align_name( FL_ALIGN_TOP, 0 ) ); fl_addto_choice( bt_attrib->pixalign, align_name( FL_ALIGN_BOTTOM, 0 ) ); fl_addto_choice( bt_attrib->pixalign, align_name( FL_ALIGN_LEFT, 0 ) ); fl_addto_choice( bt_attrib->pixalign, align_name( FL_ALIGN_RIGHT, 0 ) ); fl_set_input_return( bt_attrib->filename, FL_RETURN_END ); fl_set_input_return( bt_attrib->focus_filename, FL_RETURN_END ); fl_set_input_return( bt_attrib->tooltip, FL_RETURN_END ); } return bt_attrib; } /*************************************** ***************************************/ void button_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *bedited = bt_attrib->vdata; superspec_to_spec( bedited ); show_spec( get_superspec( bedited ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec ) { info = spec->cspecv; fl_set_button( bt_attrib->react_left, spec->mbuttons & 1 ); fl_set_button( bt_attrib->react_middle, spec->mbuttons & 2 ); fl_set_button( bt_attrib->react_right, spec->mbuttons & 4 ); fl_set_button( bt_attrib->react_up, spec->mbuttons & 8 ); fl_set_button( bt_attrib->react_down, spec->mbuttons & 16); fl_set_button( bt_attrib->initialval, spec->int_val ); fl_set_button( bt_attrib->use_data, spec->use_data ); fl_set_button( bt_attrib->fullpath, spec->fullpath ); fl_set_button( bt_attrib->showfocus, info->show_focus ); fl_set_choice_text( bt_attrib->pixalign, align_name( info->align, 0 ) ); fl_set_input( bt_attrib->filename, info->filename ); fl_set_input( bt_attrib->focus_filename, info->focus_filename ); fl_set_input( bt_attrib->tooltip, info->helper ); } #define IsIconButton( cls ) \ ( ( cls ) == FL_BITMAPBUTTON || ( cls ) == FL_PIXMAPBUTTON ) /*************************************** ***************************************/ int set_button_attrib( FL_OBJECT * ob ) { bt_attrib->vdata = edited = ob; button_spec = get_superspec( ob ); info = button_spec->cspecv; if ( ! info ) { M_err( "ButtonAttrib", "internal error" ); return -1; } fl_show_object( bt_attrib->mbuttons_label ); fl_show_object( bt_attrib->react_left ); fl_show_object( bt_attrib->react_middle ); fl_show_object( bt_attrib->react_right ); fl_show_object( bt_attrib->react_up ); fl_show_object( bt_attrib->react_down ); if ( ob->type == FL_PUSH_BUTTON || ob->type == FL_RADIO_BUTTON ) fl_show_object( bt_attrib->initialval ); else fl_hide_object( bt_attrib->initialval ); if ( ob->objclass == FL_PIXMAPBUTTON || ob->objclass == FL_BITMAPBUTTON ) { fl_show_object( bt_attrib->filename ); fl_show_object( bt_attrib->browse ); fl_show_object( bt_attrib->use_data ); fl_show_object( bt_attrib->fullpath ); fl_show_object( bt_attrib->tooltip ); ( ob->objclass == FL_PIXMAPBUTTON ? fl_show_object : fl_hide_object )( bt_attrib->focus_filename ); ( ob->objclass == FL_PIXMAPBUTTON ? fl_show_object : fl_hide_object )( bt_attrib->browse2 ); } else { fl_hide_object( bt_attrib->filename ); fl_hide_object( bt_attrib->focus_filename ); fl_hide_object( bt_attrib->browse ); fl_hide_object( bt_attrib->browse2 ); fl_hide_object( bt_attrib->use_data ); fl_hide_object( bt_attrib->fullpath ); fl_hide_object( bt_attrib->tooltip ); } if ( ob->objclass == FL_PIXMAPBUTTON ) { fl_show_object( bt_attrib->pixalign ); fl_show_object( bt_attrib->showfocus ); } else { fl_hide_object( bt_attrib->pixalign ); fl_hide_object( bt_attrib->showfocus ); } show_spec( button_spec ); return 0; } /*************************************** ***************************************/ static FL_OBJECT * create_a_button( FL_OBJECT * ob ) { FL_OBJECT *defobj = NULL; /* create a default object */ if ( ob->objclass == FL_BUTTON ) defobj = fl_create_button( ob->type, 0, 0, 0, 0, "" ); else if ( ob->objclass == FL_BITMAPBUTTON ) defobj = fl_create_bitmapbutton( ob->type, 0, 0, 0, 0, "" ); else if ( ob->objclass == FL_PIXMAPBUTTON ) defobj = fl_create_pixmapbutton( ob->type, 0, 0, 0, 0, "" ); else if ( ob->objclass == FL_ROUNDBUTTON ) defobj = fl_create_roundbutton( ob->type, 0, 0, 0, 0, "" ); else if ( ob->objclass == FL_LABELBUTTON ) defobj = fl_create_labelbutton( ob->type, 0, 0, 0, 0, "" ); else if ( ob->objclass == FL_LIGHTBUTTON ) defobj = fl_create_lightbutton( ob->type, 0, 0, 0, 0, "" ); else if ( ob->objclass == FL_CHECKBUTTON ) defobj = fl_create_checkbutton( ob->type, 0, 0, 0, 0, "" ); else if ( ob->objclass == FL_ROUND3DBUTTON ) defobj = fl_create_round3dbutton( ob->type, 0, 0, 0, 0, "" ); else fprintf( stderr, "Unknown Button Class: %d\n", ob->objclass ); return defobj; } /*************************************** ***************************************/ static const char * file_tail( const char *full ) { char *p; if ( ( p = strrchr( full, '/' ) ) ) return p + 1; return full; } /*************************************** ***************************************/ void emit_button_header( FILE * fp, FL_OBJECT * ob ) { SuperSPEC *spec; char buf[ 512 ]; if ( ob->objclass != FL_PIXMAPBUTTON && ob->objclass != FL_BITMAPBUTTON ) return; spec = get_superspec( ob ); info = spec->cspecv; if ( info->use_data && info->data[ 0 ] && info->filename[ 0 ] ) { if ( info->fullpath ) sprintf( buf, "#include \"%s\"", info->filename ); else sprintf( buf, "#include \"%s\"", file_tail( info->filename ) ); if ( ! is_duplicate_info( ob, buf ) ) fprintf( fp, "%s\n", buf ); if ( info->focus_filename[ 0 ] ) { if ( info->fullpath ) sprintf( buf, "#include \"%s\"", info->focus_filename ); else sprintf( buf, "#include \"%s\"", file_tail( info->focus_filename ) ); if ( ! is_duplicate_info( ob, buf ) ) fprintf( fp, "%s\n", buf ); } } } /*************************************** ***************************************/ void emit_button_code( FILE * fp, FL_OBJECT * ob ) { SuperSPEC *btspec, *defspec; FL_OBJECT *defobj; IconInfo *definfo; if ( ! ISBUTTON( ob->objclass ) || ! ( defobj = create_a_button( ob ) ) ) return; defspec = get_superspec( defobj ); btspec = get_superspec( ob ); if ( btspec->mbuttons != defspec->mbuttons ) fprintf( fp, " fl_set_button_mouse_buttons( obj, %d );\n", btspec->mbuttons ); if ( btspec->int_val != defspec->int_val ) fprintf( fp, " fl_set_button( obj, %d );\n", btspec->int_val ); if ( ! ( info = btspec->cspecv ) ) return; if ( info->helper[ 0 ] ) fprintf( fp, " fl_set_object_helper( obj, \"%s\" );\n", info->helper ); definfo = defspec->cspecv; if ( info->filename[ 0 ] && ! info->use_data ) { fprintf( fp, " fl_set_%sbutton_file( obj, \"%s\" );\n", ob->objclass == FL_PIXMAPBUTTON ? "pixmap" : "bitmap", info->filename ); if ( info->focus_filename[ 0 ] ) fprintf( fp, " fl_set_%sbutton_focus_file( obj, \"%s\" );\n", ob->objclass == FL_PIXMAPBUTTON ? "pixmap" : "bitmap", info->focus_filename ); } if ( info->align != definfo->align && ob->objclass == FL_PIXMAPBUTTON ) { fprintf( fp, " fl_set_pixmapbutton_align( obj, %s, %d, %d );\n", align_name( info->align | FL_ALIGN_INSIDE, 1 ), info->dx, info->dy ); } if ( info->data[ 0 ] && info->use_data && info->filename[ 0 ] ) { if ( ob->objclass == FL_PIXMAPBUTTON ) fprintf( fp, " fl_set_pixmapbutton_data( obj, %s );\n", info->data ); else fprintf( fp, " fl_set_bitmapbutton_data( obj, %s, %s, " "( unsigned char * ) %s );\n", info->width, info->height, info->data ); if ( info->focus_filename[ 0 ] ) fprintf( fp, " fl_set_pixmapbutton_focus_data( obj, %s );\n", info->focus_data ); } if ( info->show_focus != definfo->show_focus && ob->objclass == FL_PIXMAPBUTTON ) fprintf( fp, " fl_set_pixmapbutton_focus_outline( obj, %d );\n", info->show_focus ); fl_free_object( defobj ); } /*************************************** ***************************************/ void save_button_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defspec, *btspec; IconInfo *definfo; if (!ISBUTTON(ob->objclass) || !(defobj = create_a_button(ob))) return; defspec = get_superspec(defobj); definfo = defspec->cspecv; btspec = get_superspec(ob); info = btspec->cspecv; if ( btspec->mbuttons != defspec->mbuttons ) fprintf( fp, " mbuttons: %d\n", btspec->mbuttons ); if ( btspec->int_val != defspec->int_val ) fprintf( fp, " value: %d\n", btspec->int_val ); if ( ! info || ! definfo ) { M_err( "SaveButtonAttrib", "internal error" ); return; } get_data_name( ob, info ); if ( info->filename[ 0 ] ) { fprintf( fp, " file: %s\n", info->filename ); if ( info->focus_filename[ 0 ] ) fprintf( fp, " focus_file: %s\n", info->focus_filename ); fprintf( fp, " fullpath: %d\n", info->fullpath ); } if ( info->align != definfo->align ) fprintf( fp, " align: %s\n", align_name( info->align | FL_ALIGN_INSIDE, 0 ) ); if ( info->show_focus != definfo->show_focus ) fprintf( fp, " focus: %d\n", info->show_focus ); if ( info->data[ 0 ] && info->filename[ 0 ] ) { fprintf( fp, " data: %s\n", info->data ); if ( info->focus_data[ 0 ] ) fprintf( fp, " focus_data: %s\n", info->focus_data ); } if ( info->width[ 0 ] ) fprintf( fp, " width: %s\n", info->width ); if ( info->height[ 0 ] ) fprintf( fp, " height: %s\n", info->height ); if ( info->helper[ 0 ] ) fprintf( fp, " helper: %s\n", info->helper ); fl_free_object( defobj ); } /*************************************** ***************************************/ void usedata_change( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { info->use_data = fl_get_button( ob ); } /*************************************** ***************************************/ void fullpath_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { info->fullpath = fl_get_button( ob ); } /*************************************** ***************************************/ void react_to_button( FL_OBJECT * ob, long data ) { unsigned int mb; fl_get_button_mouse_buttons( edited, &mb ); if ( fl_get_button( ob ) ) mb |= 1 << data; else mb &= ~ ( 1 << data ); fl_set_button_mouse_buttons( edited, mb ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void initialval_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_set_button( edited, fl_get_button( bt_attrib->initialval ) ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void showfocus_change( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { info->show_focus = fl_get_button( ob ); fl_set_pixmapbutton_focus_outline( edited, info->show_focus ); } /*************************************** ***************************************/ void iconbutton_filename_change( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( ! IsIconButton( edited->objclass ) ) return; strcpy( info->filename, fl_get_input( ob ) ); if ( info->filename[ 0 ] ) { ( edited->objclass == FL_PIXMAPBUTTON ? fl_set_pixmapbutton_file : fl_set_bitmapbutton_file ) ( edited, info->filename ); } else { /* show the default crab */ if ( edited->objclass == FL_PIXMAPBUTTON ) set_testing_pixmap( edited ); } if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void focusiconbutton_filename_change( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { if ( ! IsIconButton( edited->objclass ) ) return; strcpy( info->focus_filename, fl_get_input( ob ) ); if ( info->filename[ 0 ] ) { ( edited->objclass == FL_PIXMAPBUTTON ? fl_set_pixmapbutton_focus_file : fl_set_bitmapbutton_file ) ( edited, info->focus_filename ); } } /*************************************** ***************************************/ char * get_helper( char * s ) { static char helper[ 256 ]; char *p; for ( p = helper; *s; s++, p++ ) { if ( *s == '\\' && *( s + 1 ) == 'n' ) { *p = '\n'; s++; } else *p = *s; } return helper; } /*************************************** ***************************************/ void helper_change_cb( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { strcpy( info->helper, fl_get_input( obj ) ); if ( info->helper[ 0 ] ) fl_set_object_helper( edited, get_helper( info->helper ) ); } /*************************************** ***************************************/ void pixalign_change( FL_OBJECT * obj, long data FL_UNUSED_ARG ) { const char *s = fl_get_choice_text( obj ); if ( ! s ) return; info->align = align_val( s ); /* Don't allow outside align */ fl_set_pixmap_align( edited, info->align | FL_ALIGN_INSIDE, info->dx, info->dy ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ static int loadfile( const char * file, void * data ) { char buf[ 512 ]; char *cwd = fli_getcwd( buf, sizeof buf - 2 ); const char *s = strstr( file, cwd ); FL_OBJECT *ob; if ( ! s ) s = file; else s = file + strlen( cwd ) + 1; ob = ( data && * ( long * ) data ) ? bt_attrib->focus_filename : bt_attrib->filename; fl_set_input( ob, s ); fl_call_object_callback( ob ); return 1; } /*************************************** ***************************************/ void lookfor_pixmapfile_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data ) { fl_use_fselector( XPM_FSELECTOR ); fl_set_fselector_placement( FL_PLACE_MOUSE ); fl_set_fselector_callback( loadfile, &data ); fl_show_fselector( "XPM file", "", edited->objclass == FL_PIXMAPBUTTON ? "*.xpm" : "*.xbm", "" ); } /*************************************** * read the specified xpm/xbm filename, and return the data name * and size ***************************************/ static void get_xpm_stuff( char * inbuf, FILE * fp ) { char buf[ 256 ], *p; int done = 0; if ( ! fp ) { M_warn( "GetXPMStuff", "fp==NULL" ); return; } while ( fgets( buf, sizeof buf - 1, fp ) && ! done ) { if ( ( p = strstr( buf, "static char" ) ) ) { char *q = inbuf; *p += 11; while ( *p && *++p != '*' ) /* empty */; while ( *p && *++p != '[' ) { if ( ! isspace( ( int ) *p ) ) *q++ = *p; } *q = '\0'; } } } /*************************************** ***************************************/ static void get_xbm_stuff( IconInfo * in, FILE * fp FL_UNUSED_ARG ) { char buf[ 512 ], *p; strcpy( buf, in->filename ); if ( ( p = strrchr(buf, '/' ) ) ) strcpy( buf, ++p ); if ( ( p = strrchr( buf, '.' ) ) ) *p = '\0'; strcat( strcpy( in->width, buf ) , "_width" ); strcat( strcpy( in->height, buf ), "_height" ); strcat( strcpy( in->data, buf ), "_bits" ); } /*************************************** ***************************************/ static void get_data_name( FL_OBJECT * ob, IconInfo * inf ) { FILE *fp = NULL, *focus_fp = NULL; if ( ob->objclass != FL_BITMAPBUTTON && ob->objclass != FL_PIXMAPBUTTON ) { *inf->filename = '\0'; *inf->focus_filename = '\0'; *inf->width = '\0'; *inf->height = '\0'; return; } if ( ! inf->use_data ) { *inf->data = *inf->width = *inf->height = '\0'; return; } if ( inf->filename[ 0 ] && ! ( fp = fopen( inf->filename, "r" ) ) ) { fprintf( stderr, "Can't open %s\n", inf->filename ); /* wipe the icon file only if there isn't anything we can do */ if ( ! inf->use_data || ! *inf->data ) *inf->filename = '\0'; } if ( inf->focus_filename[ 0 ] && ! ( focus_fp = fopen( inf->focus_filename, "r" ) ) ) { fprintf( stderr, "Can't open focusfile %s\n", inf->focus_filename ); if ( ! inf->use_data || ! *inf->focus_data ) *inf->focus_filename = '\0'; } if ( ob->objclass == FL_PIXMAPBUTTON ) { get_xpm_stuff( inf->data, fp ); get_xpm_stuff( inf->focus_data, focus_fp ); } else get_xbm_stuff( inf, fp ); if ( fp ) fclose( fp ); if ( focus_fp ) fclose( focus_fp ); } #include "spec/button_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_initforms.c0000644000175000017500000001260611247055071016503 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_initforms.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * create and initialize all control panels */ #ifdef HAVE_CONFIG_H #include #endif #include "fd_main.h" #include "flinternal.h" #include "fd/ui_attrib.h" /* from directory fd */ #include "fd/ui_theforms.h" /* from directory fd */ FD_control *fd_control; FD_test *fd_test; FD_align *fd_align; FD_resize *fd_resize; FD_helpform *fd_help; FD_attrib *fd_attrib; FD_generic_attrib *fd_generic_attrib; FD_nullattrib *fd_nullattrib; extern int fd_helpfontsize; extern int fd_align_fontsize, fd_type_fontsize; static void init_helpform( void ); static void init_controlform( void ); static void init_attribform( void ); static void init_testform( void ); /*************************************** ***************************************/ void create_the_forms( void ) { static int init; if ( init ) { fprintf( stderr, "fd forms already initialized\n" ); return; } init = 1; fd_control = create_form_control( ); init_controlform( ); /* GUI */ control_init( fd_control ); /* menu */ fd_attrib = create_form_attrib( ); fd_generic_attrib = create_form_generic_attrib( ); fd_nullattrib = create_form_nullattrib( ); init_attribform( ); fd_test = create_form_test( ); init_testform( ); fd_align = create_form_align( ); init_align( ); fd_resize = create_form_resize( ); /* help form */ fd_help = create_form_helpform( ); init_helpform( ); } /*************************************** * Conditionally modify the basic color of attribute form ***************************************/ void modify_attrib_basic_color( FL_COLOR col1, FL_COLOR col2 ) { fl_set_object_color( fd_generic_attrib->text[ 0 ], col1, col2 ); fl_set_object_color( fd_generic_attrib->text[ 1 ], col1, col2 ); fl_set_object_color( fd_generic_attrib->text[ 2 ], col1, col2 ); fl_set_object_color( fd_generic_attrib->text[ 3 ], col1, col2 ); fl_set_object_color( fd_generic_attrib->background, col1, col2 ); } /*************************************** ***************************************/ void clearlog_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_clear_browser( fd_test->browser ); } /*************************************** ***************************************/ static void init_helpform( void ) { fl_adjust_form_size( fd_help->helpform ); fl_set_form_position( fd_help->helpform, -1, 1 ); /* load one help */ fl_set_button( fd_help->vbutt, 1 ); fl_call_object_callback( fd_help->vbutt ); } /*************************************** ***************************************/ static void init_controlform( void ) { /* sort of auto-resizing depending on the font size */ if ( fli_cntl.buttonFontSize > FL_DEFAULT_SIZE ) { fd_align_fontsize = FL_SMALL_SIZE; fd_type_fontsize = FL_SMALL_SIZE; } if ( fd_control->objectbrowser->lsize > FL_NORMAL_SIZE ) { fl_set_object_lsize( fd_control->objectbrowser, FL_NORMAL_SIZE ); fl_set_object_lsize( fd_control->formbrowser, FL_NORMAL_SIZE ); fl_set_object_lsize( fd_control->groupbrowser, FL_NORMAL_SIZE ); } fl_fit_object_label( fd_control->renameform, 1, 0 ); fl_fit_object_label( fd_control->resizeform, 1, 0 ); fl_fit_object_label( fd_control->objectmenu, -3, 0 ); } /*************************************** ***************************************/ static void init_attribform( void ) { int a = 1; if ( fl_get_visual_depth( ) <= 2 ) modify_attrib_basic_color( FL_WHITE, FL_WHITE ); fl_adjust_form_size( fd_attrib->attrib ); fl_fit_object_label( fd_attrib->readyobj, 12, 1 ); fd_attrib->attrib->y = 5; fl_get_resource( "autoApply", "AutoApply", FL_BOOL, "1", &a, 0 ); fl_set_button( fd_attrib->autoapplyobj, a ); fl_call_object_callback( fd_attrib->autoapplyobj ); fl_set_tabfolder_autofit( fd_attrib->attrib_folder, FL_ENLARGE_ONLY ); fl_addto_tabfolder( fd_attrib->attrib_folder, " Generic ", fd_generic_attrib->generic_attrib ); fl_addto_tabfolder( fd_attrib->attrib_folder, " Spec ", fd_nullattrib->nullattrib ); } /*************************************** ***************************************/ static void init_testform( void ) { fl_fit_object_label( fd_test->stoptesting, 2, 1 ); fl_set_object_dblbuffer( fd_test->browser, 1 ); } #include "fd/ui_attrib.c" #include "fd/ui_theforms.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_spec.h0000644000175000017500000001644211247055071015432 0ustar jensjens/* * * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifndef FD_SPEC_H_ #define FD_SPEC_H_ extern void set_finput_value( FL_OBJECT *, double, int ); extern double get_finput_value( FL_OBJECT * ); /* Slider and value slider */ extern void *get_slider_spec_fdform( void ); extern void slider_spec_restore( FL_OBJECT *, long ); extern int set_slider_attrib( FL_OBJECT * ); extern void save_slider_attrib( FILE *, FL_OBJECT * ); extern void emit_slider_code( FILE *, FL_OBJECT *); /* Scrollbar */ extern void *get_scrollbar_spec_fdform( void ); extern void scrollbar_spec_restore( FL_OBJECT *, long ); extern int set_scrollbar_attrib( FL_OBJECT * ); extern void save_scrollbar_attrib( FILE *, FL_OBJECT * ); extern void emit_scrollbar_code( FILE *, FL_OBJECT * ); /* Thumbwheel */ extern void *get_twheel_spec_fdform( void ); extern void twheel_spec_restore( FL_OBJECT *, long ); extern int set_twheel_attrib( FL_OBJECT * ); extern void save_twheel_attrib( FILE *, FL_OBJECT * ); extern void emit_twheel_code( FILE *, FL_OBJECT * ); /* Browser */ extern void *get_browser_spec_fdform( void ); extern void browser_spec_restore( FL_OBJECT *, long ); extern int set_browser_attrib( FL_OBJECT * ); extern void save_browser_attrib( FILE *, FL_OBJECT * ); extern void emit_browser_code( FILE *, FL_OBJECT * ); /* Choice */ extern void *get_choice_spec_fdform( void ); extern void choice_spec_restore( FL_OBJECT *, long ); extern int set_choice_attrib( FL_OBJECT * ); extern void save_choice_attrib( FILE *, FL_OBJECT * ); extern void emit_choice_code( FILE *, FL_OBJECT * ); /* Menu */ extern void *get_menu_spec_fdform( void ); extern void menu_spec_restore( FL_OBJECT *, long ); extern int set_menu_attrib( FL_OBJECT * ); extern void save_menu_attrib( FILE *, FL_OBJECT * ); extern void emit_menu_code( FILE *, FL_OBJECT * ); extern void emit_menu_header( FILE *, FL_OBJECT * ); extern void emit_menu_global( FILE *, FL_OBJECT * ); extern void emit_menu_item_callback_headers( FILE * fn, FL_OBJECT * ob, int code ); /* Counters */ extern void *get_counter_spec_fdform( void ); extern void counter_spec_restore( FL_OBJECT *, long ); extern int set_counter_attrib( FL_OBJECT * ); extern void save_counter_attrib( FILE *, FL_OBJECT * ); extern void emit_counter_code( FILE *, FL_OBJECT * ); /* Spiners */ extern void *get_spinner_spec_fdform( void ); extern void spinner_spec_restore( FL_OBJECT *, long ); extern int set_spinner_attrib( FL_OBJECT * ); extern void save_spinner_attrib( FILE *, FL_OBJECT * ); extern void emit_spinner_code( FILE *, FL_OBJECT * ); /* Dials */ extern void *get_dial_spec_fdform( void ); extern void dial_spec_restore( FL_OBJECT *, long ); extern int set_dial_attrib( FL_OBJECT * ); extern void save_dial_attrib( FILE *, FL_OBJECT * ); extern void emit_dial_code( FILE *, FL_OBJECT * ); /* Positioner */ extern void *get_pos_spec_fdform( void ); extern void pos_spec_restore( FL_OBJECT *, long ); extern int set_pos_attrib( FL_OBJECT * ); extern void save_pos_attrib( FILE *, FL_OBJECT * ); extern void emit_pos_code( FILE *, FL_OBJECT * ); /* Xyplot */ extern void *get_xyplot_spec_fdform( void ); extern void xyplot_spec_restore( FL_OBJECT *, long ); extern int set_xyplot_attrib( FL_OBJECT * ); extern void save_xyplot_attrib( FILE *, FL_OBJECT * ); extern void emit_xyplot_code( FILE *, FL_OBJECT * ); /* Free */ extern void *get_freeobj_spec_fdform( void ); extern void freeobj_spec_restore( FL_OBJECT *, long ); extern int set_freeobj_attrib( FL_OBJECT * ); extern void save_freeobj_attrib( FILE *, FL_OBJECT * ); extern void emit_freeobj_code( FILE *, FL_OBJECT * ); /* All buttons */ extern void *get_button_spec_fdform( void ); extern void destroy_button_spec_fdform( void * ); extern void button_spec_restore( FL_OBJECT *, long ); extern int set_button_attrib( FL_OBJECT * ); extern void save_button_attrib( FILE *, FL_OBJECT * ); extern void emit_button_code( FILE *, FL_OBJECT * ); extern void emit_button_header( FILE *, FL_OBJECT * ); /* Pixmap/bitmap */ extern void *get_pixmap_spec_fdform( void ); extern void destroy_pixmap_spec_fdform( void * ); extern void pixmap_spec_restore( FL_OBJECT *, long ); extern int set_pixmap_attrib( FL_OBJECT * ); extern void save_pixmap_attrib( FILE *, FL_OBJECT * ); extern void emit_pixmap_code( FILE *, FL_OBJECT * ); extern void emit_pixmap_header( FILE *, FL_OBJECT * ); extern const char *get_scrollbar_pref_name( int ); extern int get_scrollbar_pref_value( const char * ); extern const char *get_scrollbar_pref_string( void ); extern const char *get_scale_name( int ); extern int get_scale_value( const char * ); extern const char *get_scale_string( void ); extern const char *get_grid_name( int ); extern int get_grid_value( const char * ); extern const char *get_grid_string( void ); extern const char *get_linestyle_name( int ); extern int get_linestyle_value( const char * ); extern const char *get_linestyle_string( void ); extern const char *get_pupmode_name( int ); extern int get_pupmode_value( const char * ); extern const char *get_pupmode_string( void ); extern int get_direction_value( const char * ); #endif /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_spec.c0000644000175000017500000012434111247722324015425 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_spec.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Driver for setting object specific info */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include #include #define MAXOBJCLASS 8 typedef struct { int objclass[ MAXOBJCLASS ]; void * ( * get_fdform )( void ); /* spec form */ int ( * set_spec )( FL_OBJECT * ); /* interaction */ void ( * restore_spec )( FL_OBJECT *, long ); /* how to resotre */ void ( * save_attrib )( FILE *, FL_OBJECT * ); /* write to .fd */ void ( * emit_code )( FILE *, FL_OBJECT * ); /* write fl code */ void ( * emit_header )( FILE *, FL_OBJECT * ); /* write fl code */ void ( * emit_global )( FILE *, FL_OBJECT * ); /* write fl code */ void * vdata; } ObjSPEC; static ObjSPEC objspec[ ] = { { { FL_SLIDER, FL_VALSLIDER }, get_slider_spec_fdform, set_slider_attrib, slider_spec_restore, save_slider_attrib, emit_slider_code, NULL, NULL, NULL }, { { FL_COUNTER }, get_counter_spec_fdform, set_counter_attrib, counter_spec_restore, save_counter_attrib, emit_counter_code, NULL, NULL, NULL }, { { FL_SPINNER }, get_spinner_spec_fdform, set_spinner_attrib, spinner_spec_restore, save_spinner_attrib, emit_spinner_code, NULL, NULL, NULL }, { { FL_DIAL }, get_dial_spec_fdform, set_dial_attrib, dial_spec_restore, save_dial_attrib, emit_dial_code, NULL, NULL, NULL }, { { FL_POSITIONER }, get_pos_spec_fdform, set_pos_attrib, pos_spec_restore, save_pos_attrib, emit_pos_code, NULL, NULL, NULL }, { { FL_THUMBWHEEL }, get_twheel_spec_fdform, set_twheel_attrib, twheel_spec_restore, save_twheel_attrib, emit_twheel_code, NULL, NULL, NULL }, { { FL_PIXMAPBUTTON, FL_BITMAPBUTTON, FL_BUTTON, FL_CHECKBUTTON, FL_ROUNDBUTTON, FL_LIGHTBUTTON, FL_ROUND3DBUTTON, FL_LABELBUTTON }, get_button_spec_fdform, set_button_attrib, button_spec_restore, save_button_attrib, emit_button_code, emit_button_header, NULL, NULL }, { { FL_PIXMAP, FL_BITMAP }, get_pixmap_spec_fdform, set_pixmap_attrib, pixmap_spec_restore, save_pixmap_attrib, emit_pixmap_code, emit_pixmap_header, NULL, NULL }, { { FL_SCROLLBAR }, get_scrollbar_spec_fdform, set_scrollbar_attrib, scrollbar_spec_restore, save_scrollbar_attrib, emit_scrollbar_code, NULL, NULL, NULL }, { { FL_BROWSER }, get_browser_spec_fdform, set_browser_attrib, browser_spec_restore, save_browser_attrib, emit_browser_code, NULL, NULL, NULL }, { { FL_CHOICE }, get_choice_spec_fdform, set_choice_attrib, choice_spec_restore, save_choice_attrib, emit_choice_code, emit_menu_header, emit_menu_global, NULL }, { { FL_MENU }, get_menu_spec_fdform, set_menu_attrib, menu_spec_restore, save_menu_attrib, emit_menu_code, emit_menu_header, emit_menu_global, NULL }, { { FL_XYPLOT }, get_xyplot_spec_fdform, set_xyplot_attrib, xyplot_spec_restore, save_xyplot_attrib, emit_xyplot_code, NULL, NULL, NULL }, { { FL_FREE }, get_freeobj_spec_fdform, set_freeobj_attrib, freeobj_spec_restore, save_freeobj_attrib, emit_freeobj_code, NULL, NULL, NULL }, { { -1 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL /* sentinel */ } }; /*************************************** * Check if ob has spec info functions ***************************************/ static ObjSPEC * find_entry( FL_OBJECT * ob ) { ObjSPEC *attrib = objspec; int *cls; for ( ; ob && attrib->objclass[ 0 ] >= 0; attrib++ ) { cls = attrib->objclass; for ( ; *cls > 0; cls++ ) if ( *cls == ob->objclass ) return attrib; } return 0; } /*************************************** * Callback function for SPEC folder. Entry point from fd_attrib.c ***************************************/ void set_objclass_spec_attributes( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { ObjSPEC *spec; FD_Any *fd; fl_freeze_form( fd_attrib->attrib ); if ( ( spec = find_entry( ob ) ) ) { spec->vdata = fd = spec->get_fdform( ); if ( spec->set_spec( ob ) >= 0 ) { if ( ( spec->set_spec( ob ) >= 0 ) ) fl_set_object_callback( fd_attrib->restoreobj, spec->restore_spec, 0 ); fl_replace_folder_bynumber( fd_attrib->attrib_folder, 2, fd->form ); } else fl_replace_folder_bynumber( fd_attrib->attrib_folder, 2, fd_nullattrib->nullattrib ); } else fl_replace_folder_bynumber( fd_attrib->attrib_folder, 2, fd_nullattrib->nullattrib ); fl_unfreeze_form( fd_attrib->attrib ); } /*************************************** ***************************************/ void cleanup_spec( FL_OBJECT * ob ) { ObjSPEC *attrib = find_entry( ob ); if ( attrib && attrib->vdata ) attrib->vdata = NULL; } /*************************************** ***************************************/ void save_objclass_spec_info( FILE * fp, FL_OBJECT * ob ) { ObjSPEC *attrib = find_entry( ob ); if ( attrib && attrib->save_attrib ) attrib->save_attrib( fp, ob ); else M_warn( "save info", " class %d unknown", ob->objclass ); } /*************************************** ***************************************/ static int ff_read_sp_bounds( FL_OBJECT * obj, SuperSPEC * sp ) { int r; if ( ( obj->objclass == FL_SPINNER && ( r = ff_read( "%F%F", &sp->dmin, &sp->dmax ) ) < 0 ) || ( obj->objclass != FL_SPINNER && ( r = ff_read( "%f%f", &sp->min, &sp->max ) ) < 0 ) ) return ff_err( "Can't read expected object bounds" ); if ( r == 0 ) return ff_err( "\"bounds\" key with no or invalid values" ); else if ( r == 1 ) return ff_err( "\"bounds\" key with only one (valid) value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_precision( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d", &sp->prec ) ) < 0 ) return ff_err( "Can't read expected object precision" ); if ( r == 0 ) return ff_err( "\"precision\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_increment( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f%f", &sp->ldelta, &sp->rdelta) ) < 0 ) return ff_err( "Can't read expected object increment values" ); if ( r == 0 ) return ff_err( "\"increment\" key with no or invalid values" ); else if ( r == 1 ) return ff_err( "\"increment\" key with only one valid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_value( FL_OBJECT * obj, SuperSPEC * sp ) { int r; if ( ISBUTTON( obj->objclass ) || ISCHOICE( obj->objclass ) ) { if ( ( r = ff_read( "%d", &sp->int_val ) ) < 0 ) return ff_err( "Can't read expected object value" ); if ( ISBUTTON( obj->objclass ) ) fl_set_button( obj, sp->int_val ); } else if ( obj->objclass == FL_SPINNER ) { if ( ( r = ff_read( "%F", &sp->dval ) ) < 0 ) return ff_err( "Can't read expected object value" ); } else if ( ( r = ff_read( "%f", &sp->val ) ) < 0 ) return ff_err( "Can't read expected object value" ); if ( r == 0 ) return ff_err( "\"value\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_slsize( FL_OBJECT * ob FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f", &sp->slsize ) ) < 0 ) return ff_err( "Can't read expected object slider size" ); if ( r == 0 ) return ff_err( "\"slsize\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_step( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( obj->objclass == FL_SPINNER && ( r = ff_read( "%F", &sp->dstep ) ) < 0 ) || ( obj->objclass != FL_SPINNER && ( r = ff_read( "%f", &sp->step ) ) < 0 ) ) return ff_err( "Can't read expected object step" ); if ( r == 0 ) return ff_err( "\"step\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_h_pref( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; int i; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object h_pref" ); if ( r == 0 ) return ff_err( "\"h_pref\" key with no or invalid value" ); i = get_scrollbar_pref_value( p ); fl_safe_free( p ); if ( i < 0 ) return ff_err( "Invalid value for \"h_pref\" key" ); sp->h_pref = i; return 0; } /*************************************** ***************************************/ static int ff_read_sp_v_pref( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; int i; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object v_pref" ); if ( r == 0 ) return ff_err( "\"v_pref\" key with no or invalid value" ); i = get_scrollbar_pref_value( p ); fl_safe_free( p ); if ( i < 0 ) return ff_err( "Invalid value for \"v_pref\" key" ); sp->v_pref = i; return 0; } /*************************************** ***************************************/ static int ff_read_sp_sstep( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f", &sp->sstep ) ) < 0 ) return ff_err( "Can't read expected object small step" ); if ( r == 0 ) return ff_err( "\"sstep\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_lstep( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f", &sp->lstep ) ) < 0 ) return ff_err( "Can't read expected object large step" ); if ( r == 0 ) return ff_err( "\"lstep\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_xbounds( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f%f", &sp->xmin, &sp->xmax ) ) < 0 ) return ff_err( "Can't read expected object xbounds" ); if ( r == 0 ) return ff_err( "\"xbounds\" key with no or invalid values" ); else if ( r == 1 ) return ff_err( "\"xbounds\" key with only one valid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_ybounds( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f%f", &sp->ymin, &sp->ymax ) ) < 0 ) return ff_err( "Can't read expected object ybounds" ); if ( r == 0 ) return ff_err( "\"ybounds\" key with no or invalid values" ); else if ( r == 1 ) return ff_err( "\"ybounds\" key with only one valid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_xvalue( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f", &sp->xval ) ) < 0 ) return ff_err( "Can't read expected object xvalue" ); if ( r == 0 ) return ff_err( "\"xvalue\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_yvalue( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f", &sp->yval ) ) < 0 ) return ff_err( "Can't read expected object yvalue" ); if ( r == 0 ) return ff_err( "\"yvalue\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_xstep( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f", &sp->xstep ) ) < 0 ) return ff_err( "Can't read expected object xstep" ); if ( r == 0 ) return ff_err( "\"xstep\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_ystep( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f", &sp->ystep ) ) < 0 ) return ff_err( "Can't read expected object ystep" ); if ( r == 0 ) return ff_err( "\"ystep\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_angles( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f%f", &sp->thetai, &sp->thetaf ) ) < 0 ) return ff_err( "Can't read expected object angles" ); if ( r == 0 ) return ff_err( "\"angles\" key with no or invalid values" ); else if ( r == 1 ) return ff_err( "\"angles\" key with only one valid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_mbuttons( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d", &sp->mbuttons ) ) < 0 ) return ff_err( "Can't read expected object mbuttons setting" ); if ( r == 0 ) return ff_err( "\"mbuttons\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_initial_val( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%f", &sp->val ) ) < 0 ) return ff_err( "Can't read expected object initial value" ); if ( r == 0 ) return ff_err( "\"initial_val\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_content( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%S", &p ) ) < 0 ) return ff_err( "Can't read expected object content" ); ++sp->nlines; sp->content = fl_realloc( sp->content, ( sp->nlines + 1 ) * sizeof *sp->content ); sp->shortcut = fl_realloc( sp->shortcut, ( sp->nlines + 1 ) * sizeof *sp->shortcut ); sp->callback = fl_realloc( sp->callback, ( sp->nlines + 1 ) * sizeof *sp->callback ); sp->mode = fl_realloc( sp->mode, ( sp->nlines + 1 ) * sizeof *sp->mode ); sp->mval = fl_realloc( sp->mval, ( sp->nlines + 1 ) * sizeof *sp->mval ); sp->content[ sp->nlines ] = p; sp->shortcut[ sp->nlines ] = NULL; sp->callback[ sp->nlines ] = NULL; sp->mode[ sp->nlines ] = 0; sp->mval[ sp->nlines ] = sp->nlines; return 0; } /*************************************** ***************************************/ static int ff_read_sp_mode( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; int i; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object mode" ); if ( r == 0 ) return ff_err( "\"mode\" key with no or invalid value" ); i = get_pupmode_value( p ); fl_safe_free( p ); if ( i < 0 ) return ff_err( "Invalid value for \"mode\" key" ); sp->mode[ sp->nlines ] = i; return 0; } /*************************************** ***************************************/ static int ff_read_sp_shortcut( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%s", &p) ) < 0 ) return ff_err( "Can't read expected object shortcut" ); sp->shortcut[ sp->nlines ] = p; return 0; } /*************************************** ***************************************/ static int ff_read_sp_callback( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%v", &p) ) < 0 ) return ff_err( "Can't read expected object callback" ); sp->callback[ sp->nlines ] = p; return 0; } /*************************************** ***************************************/ static int ff_read_sp_id( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d", sp->mval + sp->nlines ) ) < 0 ) return ff_err( "Can't read expected object id" ); if ( r == 0 ) return ff_err( "\"id\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_file( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%S", &p ) ) < 0 ) return ff_err( "Can't read expected object \"file\" attribute" ); if ( strlen( p ) >= sizeof sp->filename ) return ff_err( "Filename for \"file\" key too long" ); strcpy( sp->filename, p ); fl_safe_free( p ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_focus_file( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%S", &p ) ) < 0 ) return ff_err( "Can't read expected object \"focus\" attribute" ); if ( strlen( p ) >= sizeof sp->focus_filename ) return ff_err( "Filename for \"focus_file\" key too long" ); strcpy( sp->focus_filename, p ); fl_safe_free( p ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_handler( FL_OBJECT * obj, SuperSPEC * sp FL_UNUSED_ARG ) { int r; char *p; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object handler" ); if ( r == 0 ) return ff_err( "\"handler\" key with no or invalid value" ); obj->c_vdata = p; return 0; } /*************************************** ***************************************/ static int ff_read_sp_data( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object data attribute" ); strcpy( sp->data, p ); fl_safe_free( p ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_focus_data( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object focus_data attribute" ); strcpy( sp->focus_data, p ); fl_safe_free( p ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_fullpath( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d", &sp->fullpath) ) < 0 ) return ff_err( "Can't read expected object fullpath attribute" ); if ( r == 0 ) return ff_err( "\"fullpath\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_width( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object width attribute" ); strcpy( sp->width, p ); fl_safe_free( p ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_height( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object height attribute" ); strcpy( sp->height, p ); fl_safe_free( p ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_helper( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; if ( ( r = ff_read( "%S", &p ) ) < 0 ) return ff_err( "Can't read expected object helper attribute" ); if ( strlen( p ) >= sizeof sp->helper ) return ff_err( "Text for \"helper\" key too long" ); strcpy( sp->helper, p ); fl_safe_free( p ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_align( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%a", &sp->align ) ) < 0 ) return ff_err( "Can't read expected object align attribute" ); if ( r == 0 ) return ff_err( "\"align\" key with no or invalid value" ); sp->align &= ~FL_ALIGN_INSIDE; return 0; } /*************************************** ***************************************/ static int ff_read_sp_struct( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d", &sp->new_menuapi ) ) < 0 ) return ff_err( "Can't read expected object struct attribute" ); if ( r == 0 ) return ff_err( "\"struct\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_global( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d", &sp->global_scope ) ) < 0 ) return ff_err( "Can't read expected object global attribute" ); if ( r == 0 ) return ff_err( "\"global\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_focus( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d", &sp->show_focus ) ) < 0 ) return ff_err( "Can't read expected object focus attribute" ); if ( r == 0 ) return ff_err( "\"focus\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_xtics( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d%d", &sp->xmajor, &sp->xminor ) ) < 0 ) return ff_err( "Can't read expected object xtics values" ); if ( r == 0 ) return ff_err( "\"xtics\" key with no or invalid values" ); else if ( r == 1 ) return ff_err( "\"xtics\" key with only one valid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_ytics( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d%d", &sp->ymajor, &sp->yminor ) ) < 0 ) return ff_err( "Can't read expected object ytics values" ); if ( r == 0 ) return ff_err( "\"ytics\" key with no or invalid values" ); else if ( r == 1 ) return ff_err( "\"ytics\" key with only one valid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_xscale( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; int xscale; if ( ( r = ff_read( "%s%f", &p, &sp->xbase ) ) < 0 ) return ff_err( "Can't read expected object xscale values" ); if ( r == 0 ) return ff_err( "\"yscale\" key with no or invalid values" ); xscale = get_scale_value( p ); fl_safe_free( p ); if ( xscale < 0 ) return ff_err( "Invalid value for first value for \"xscale\" key" ); sp->xscale = xscale; if ( r == 1 ) return ff_err( "\"xscale\" key with only one valid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_yscale( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; int yscale; if ( ( r = ff_read( "%s%f", &p, &sp->ybase ) ) < 0 ) return ff_err( "Can't read expected object yscale values" ); if ( r == 0 ) return ff_err( "\"yscale\" key with no or invalid values" ); yscale = get_scale_value( p ); fl_safe_free( p ); if ( yscale < 0 ) return ff_err( "Invalid value for first value for \"yscale\" key" ); sp->yscale = yscale; if ( r == 1 ) return ff_err( "\"yscale\" key with only one valid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_grid( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p1, *p2; int g; if ( ( r = ff_read( "%v%v", &p1, &p2) ) < 0 ) return ff_err( "Can't read expected object grid attribute" ); if ( r == 0 ) return ff_err( "\"grid\" key with no or invalid values" ); g = get_grid_value( p1 ); fl_safe_free( p1 ); if ( g < 0 ) return ff_err( "Invalid first value for \"grid\" key" ); sp->xgrid = g; if ( r != 2 ) return ff_err( "\"grid\" key with only one valid value" ); g = get_grid_value( p2 ); fl_safe_free( p2 ); if ( g < 0 ) return ff_err( "Invalid second value for \"grid\" key" ); sp->ygrid = g; return 0; } /*************************************** ***************************************/ static int ff_read_sp_gridstyle( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; int g; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object gridstyle attribute" ); if ( r == 0 ) return ff_err( "\"gridstyle\" key with no or invalid value" ); g = get_linestyle_value( p ); fl_safe_free( p ); if ( g < 0 ) return ff_err( "Invalid value for \"gridstyle\" key" ); sp->grid_linestyle = g; return 0; } /*************************************** ***************************************/ static int ff_read_sp_markactive( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; if ( ( r = ff_read( "%d", &sp->mark_active ) ) < 0 ) return ff_err( "Can't read expected object markactive attribute" ); if ( r == 0 ) return ff_err( "\"markactive\" key with no or invalid value" ); return 0; } /*************************************** ***************************************/ static int ff_read_sp_dir( FL_OBJECT * obj FL_UNUSED_ARG, SuperSPEC * sp ) { int r; char *p; int dir; if ( ( r = ff_read( "%v", &p ) ) < 0 ) return ff_err( "Can't read expected object dir attribute" ); if ( r == 0 ) return ff_err( "\"dir\" key with no or invalid value" ); dir = get_direction_value( p ); fl_safe_free( p ); if ( dir < 0 ) return ff_err( "Invalid value for \"dir\" key" ); sp->direction = dir; return 0; } /*************************************** * Duplication of code in fd_file.c since in older versions * the return setting was considered an "object specific" * attribute ***************************************/ static int ff_read_sp_return( FL_OBJECT * obj, SuperSPEC * sp ) { int r; char *return_name; int ret; if ( ( r = ff_read( "%s", &return_name ) ) < 0 ) return ff_err( "Can't read expected object return" ); if ( r == 0 ) return ff_err( "\"return\" key with no or invalid value" ); ret = get_how_return_val( return_name ); fl_safe_free( return_name ); if ( ret == -1 ) return ff_err( "Invalid value for \"return\" key" ); fl_set_object_return( obj, ret ); sp->how_return = obj->how_return; return 0; } /*************************************** ***************************************/ typedef int ( * spec_attr_func )( FL_OBJECT *, SuperSPEC * ); typedef struct { const char * name; spec_attr_func func; } spec_attr_handlers; static spec_attr_handlers attr_array[ ] = { { "bounds", ff_read_sp_bounds }, { "precision", ff_read_sp_precision }, { "increment", ff_read_sp_increment }, { "value", ff_read_sp_value }, { "slsize", ff_read_sp_slsize }, { "step", ff_read_sp_step }, { "h_pref", ff_read_sp_h_pref }, { "v_pref", ff_read_sp_v_pref }, { "sstep", ff_read_sp_sstep }, { "lstep", ff_read_sp_lstep }, { "xbounds", ff_read_sp_xbounds }, { "ybounds", ff_read_sp_ybounds }, { "xvalue", ff_read_sp_xvalue }, { "yvalue", ff_read_sp_yvalue }, { "xstep", ff_read_sp_xstep }, { "ystep", ff_read_sp_ystep }, { "angles", ff_read_sp_angles }, { "mbuttons", ff_read_sp_mbuttons }, { "initial_val", ff_read_sp_initial_val }, { "content", ff_read_sp_content }, { "mode", ff_read_sp_mode }, { "shortcut", ff_read_sp_shortcut }, { "callback", ff_read_sp_callback }, { "id", ff_read_sp_id }, { "file", ff_read_sp_file }, { "focus_file", ff_read_sp_focus_file }, { "handler", ff_read_sp_handler }, { "data", ff_read_sp_data }, { "focus_data", ff_read_sp_focus_data }, { "fullpath", ff_read_sp_fullpath }, { "width", ff_read_sp_width }, { "height", ff_read_sp_height }, { "helper", ff_read_sp_helper }, { "align", ff_read_sp_align }, { "struct", ff_read_sp_struct }, { "global", ff_read_sp_global }, { "focus", ff_read_sp_focus }, { "xtics", ff_read_sp_xtics }, { "ytics", ff_read_sp_ytics }, { "xscale", ff_read_sp_xscale }, { "yscale", ff_read_sp_yscale }, { "grid", ff_read_sp_grid }, { "gridstyle", ff_read_sp_gridstyle }, { "markactive", ff_read_sp_markactive }, { "dir", ff_read_sp_dir }, { "return", ff_read_sp_return } }; /*************************************** * If we don't know what to do with object specific informations skip them. * This way we (hopefully) remain compatible with later versions ***************************************/ static int skip_spec_info( char * key ) { char *rest, *p; int r; /* Skip everything up to either the start of the next form or object or the end of the file */ do { fl_safe_free( key ); if ( ff_read( "%s", &rest ) < 0 ) return ff_err( "Failed to read from file" ); fl_safe_free( rest ); if ( ( r = ff_read( "%k", &key ) ) < 0 ) return ff_err( "Failed to read from file" ); } while ( r != 0 && strcmp( key, "Name" ) && strcmp( key, "class" ) ); /* Check if we arrived at the start of a form or class */ if ( ! strcmp( key, "Name" ) ) { fl_safe_free( key ); return FF_AT_START_OF_FORM; } else if ( ! strcmp( key, "class" ) ) { fl_safe_free( key ); return FF_AT_START_OF_OBJECT; } /* Otherwise we now have to look for the name of the main function */ if ( ff_read( "%v", &p ) < 1 ) return ff_err( "Expected main function name, not found here" ); else { fli_sstrcpy( main_name, p, MAX_VAR_LEN ); fl_safe_free( p ); } return FF_AT_END_OF_FILE; } /*************************************** * Function for reading in object specific information ***************************************/ int load_objclass_spec_info( FL_OBJECT * obj, char * key ) { int r; size_t i; char *p; SuperSPEC *sp = get_superspec( obj ); if ( ! find_entry( obj ) ) return skip_spec_info( key ); /* Loop until no more object specific key is found. Note: when we arrive here the first key already has been read in! */ do { for ( i = 0; i < sizeof attr_array / sizeof *attr_array; i++ ) if ( ! strcmp( key, attr_array[ i ].name ) ) { fl_safe_free( key ); if ( attr_array[ i ].func( obj, sp ) == FF_READ_FAILURE ) return FF_READ_FAILURE; break; } /* An unexpected key has read, give up */ if ( i >= sizeof attr_array / sizeof *attr_array ) { char *tmp = fli_print_to_string( "Read invalid object specific " "key \"%s\"", key ); fl_safe_free( key ); ff_err( tmp ); fl_safe_free( tmp ); return FF_READ_FAILURE; } fl_safe_free( key ); if ( ( r = ff_read( "%k", &key ) ) < 0 ) return ff_err( "Failed to read from file" ); } while ( r != 0 && strcmp( key, "Name" ) && strcmp( key, "class" ) ); if ( *sp->data ) sp->use_data = 1; superspec_to_spec( obj ); /* Check if we should be at the last line of the file and then read name of main function */ if ( r == 0 ) { if ( ff_read( "%v", &p ) < 1 ) return ff_err( "Expected main function name, not found here" ); else { fli_sstrcpy( main_name, p, MAX_VAR_LEN ); fl_safe_free( p ); } return FF_AT_END_OF_FILE; } /* Otherwise we should be at start of new object... */ if ( ! strcmp( key, "class" ) ) { fl_safe_free( key ); return FF_AT_START_OF_OBJECT; } /* ...or start of new form */ fl_safe_free( key ); return FF_AT_START_OF_FORM; } /*************************************** * Emit (file scope) variable code ***************************************/ void emit_objclass_spec_header( FILE * fp, FL_OBJECT * ob ) { ObjSPEC *attrib = find_entry( ob ); if ( attrib && attrib->emit_header ) attrib->emit_header( fp, ob ); } /*************************************** * Emit global variable declarations ***************************************/ void emit_objclass_spec_global( FILE * fp, FL_OBJECT * ob ) { ObjSPEC *attrib = find_entry( ob ); if ( attrib && attrib->emit_global ) attrib->emit_global( fp, ob ); } /*************************************** ***************************************/ void emit_objclass_spec_info( FILE * fp, FL_OBJECT * ob ) { ObjSPEC *attrib = find_entry( ob ); if ( attrib && attrib->emit_code ) attrib->emit_code( fp, ob ); else M_warn( "emit code", " class %d unknown", ob->objclass ); } /*************************************** ***************************************/ int has_class_spec_info( FL_OBJECT * ob ) { return find_entry( ob ) != NULL; } /* Utilities */ /*************************************** ***************************************/ void set_finput_value( FL_OBJECT * ob, double f, int prec) { char buf[ 64 ]; if ( prec >= 0 ) { if ( fabs( f ) < 1.0e38 && fabs( f ) > 1.0e-38 ) sprintf( buf, "%.*f", prec, f ); else sprintf( buf, "%.*g", prec, f ); } else sprintf( buf, "%g", f ); fl_set_input( ob, buf ); } /*************************************** ***************************************/ double get_finput_value( FL_OBJECT * ob ) { double f = 0; const char *s = fl_get_input( ob ); if ( s && *s ) sscanf( s, "%lf", &f ); return f; } /* scrollbar preference settings */ #define VN( v ) { v, #v } static FLI_VN_PAIR scrbpref[ ] = { VN( FL_OFF ), VN( FL_ON ), VN( FL_AUTO ), { -1, NULL } }; /* must be in the same order as the above */ /*************************************** ***************************************/ const char * get_scrollbar_pref_string( void ) { return "Off|On|Auto "; } /*************************************** ***************************************/ const char * get_scrollbar_pref_name( int a ) { return fli_get_vn_name( scrbpref, a ); } /*************************************** ***************************************/ int get_scrollbar_pref_value( const char * s ) { return fli_get_vn_value( scrbpref, s ); } /* xyplot scale */ static FLI_VN_PAIR scale_vn[ ] = { VN( FL_LINEAR ), VN( FL_LOG ), { -1, NULL } }; /*************************************** ***************************************/ const char * get_scale_name( int a ) { return fli_get_vn_name( scale_vn, a ); } /*************************************** ***************************************/ int get_scale_value( const char * s ) { return fli_get_vn_value( scale_vn, s ); } /*************************************** ***************************************/ const char * get_scale_string( void ) { return "Linear|Log"; } /* xyplot grid */ static FLI_VN_PAIR grid_vn[ ] = { VN( FL_GRID_NONE ), VN( FL_GRID_MAJOR ), VN( FL_GRID_MINOR ), { -1, NULL } }; /*************************************** ***************************************/ const char * get_grid_name( int a ) { return fli_get_vn_name( grid_vn, a ); } /*************************************** ***************************************/ int get_grid_value( const char * s ) { return fli_get_vn_value( grid_vn, s ); } /*************************************** ***************************************/ const char * get_grid_string( void ) { return "None|Major|Minor"; } /* line style string stuff */ static FLI_VN_PAIR linestyle[ ] = { VN( FL_SOLID ), VN( FL_USERDASH ), VN( FL_USERDOUBLEDASH ), VN( FL_DOT ), VN( FL_DOTDASH ), VN( FL_DASH ), VN( FL_LONGDASH ), { -1, NULL } }; /*************************************** ***************************************/ const char * get_linestyle_string( void ) { return "Solid|UserDash|DoubleDash|Dot|DotDash|Dash|LongDash"; } /*************************************** ***************************************/ const char * get_linestyle_name( int a ) { return fli_get_vn_name( linestyle, a ); } /*************************************** ***************************************/ int get_linestyle_value( const char * s ) { return fli_get_vn_value( linestyle, s ); } /* popup mode */ static FLI_VN_PAIR pupmode[ ] = { VN( FL_PUP_NONE ), VN( FL_PUP_GRAY ), VN( FL_PUP_BOX ), VN( FL_PUP_CHECK ), VN( FL_PUP_RADIO ), { -1, NULL } }; /*************************************** ***************************************/ const char * get_pupmode_string( void ) { return "PUP_NONE|PUP_GRAY|PUP_BOX|PUP_CHECK|PUP_RADIO"; } /*************************************** ***************************************/ const char * get_pupmode_name( int a ) { return fli_get_vn_name( pupmode, a ); } /*************************************** ***************************************/ int get_pupmode_value( const char * s ) { char buf[ 32 ]; strcpy( buf, s ); if ( *buf != 'F' ) strcat( strcpy( buf, "FL_" ), s ); return fli_get_vn_value( pupmode, buf ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_util.c0000644000175000017500000001704711317770461015510 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include /*************************************** * Returns a string suitable to be passed to fl_set_menu() which then * initializes the menu for selection of the return type of an object. * In the calling code some of the entries typically must be disabled, * which can be done with a call of fl_set_menu_item_mode() with the * menu object as the first, the menu item number as the second and * 'FL_PUP_BOX | FL_PUP_GRAY' as the third argument. ***************************************/ void setup_how_return_menu( FL_OBJECT * obj ) { fl_set_menu( obj, "Never%b|" /* menu item 1 */ "End & Changed%b|" /* menu item 2 */ "Whenever Changed%b|" /* menu item 3 */ "At End%b|" /* menu item 4 */ "On Selection%b|" /* menu item 5 */ "On Deselection%b|" /* menu item 6 */ "Always%b" ); /* menu item 7 */ } /*************************************** * Sets the check boxes of the menu entries of a menu as set up with * the string returned by set_up_how_return_menu() (see above) according * to the return settings of an object. ***************************************/ void reset_how_return_menu( FL_OBJECT * menu, unsigned int how_return ) { int i; unsigned int modes[ 8 ]; for ( i = 1; i <= 7; i++ ) { modes[ i ] = fl_get_menu_item_mode( menu, i ) & FL_PUP_GRAY; fl_set_menu_item_mode( menu, i, modes[ i ] | FL_PUP_BOX ); } if ( how_return == FL_RETURN_NONE ) fl_set_menu_item_mode( menu, 1, modes[ 1 ] | FL_PUP_BOX | FL_PUP_CHECK ); else if ( how_return == FL_RETURN_ALWAYS ) fl_set_menu_item_mode( menu, 7, modes[ 7 ] | FL_PUP_BOX | FL_PUP_CHECK ); else { if ( how_return & FL_RETURN_END_CHANGED ) fl_set_menu_item_mode( menu, 2, modes[ 2 ] | FL_PUP_BOX | FL_PUP_CHECK ); if ( how_return & FL_RETURN_CHANGED ) fl_set_menu_item_mode( menu, 3, modes[ 3 ] | FL_PUP_BOX | FL_PUP_CHECK ); if ( how_return & FL_RETURN_END ) fl_set_menu_item_mode( menu, 4, modes[ 4 ] | FL_PUP_BOX | FL_PUP_CHECK ); if ( how_return & FL_RETURN_SELECTION ) fl_set_menu_item_mode( menu, 5, modes[ 5 ] | FL_PUP_BOX | FL_PUP_CHECK ); if ( how_return & FL_RETURN_DESELECTION ) fl_set_menu_item_mode( menu, 6, modes[ 6 ] | FL_PUP_BOX | FL_PUP_CHECK ); } } /*************************************** ***************************************/ void handle_how_return_changes( FL_OBJECT * menu, FL_OBJECT * target ) { SuperSPEC *sp = target->u_vdata; int hr = FL_RETURN_NONE; if ( fl_get_menu_item_mode( menu, 1 ) & FL_PUP_CHECK && target->how_return != FL_RETURN_NONE ) /* empty */ ; else if ( fl_get_menu_item_mode( menu, 7 ) & FL_PUP_CHECK && target->how_return != FL_RETURN_ALWAYS ) hr = FL_RETURN_ALWAYS; else { if ( fl_get_menu_item_mode( menu, 2 ) & FL_PUP_CHECK && ! ( target->how_return & FL_RETURN_END_CHANGED ) ) hr = FL_RETURN_END_CHANGED; else { if ( fl_get_menu_item_mode( menu, 3 ) & FL_PUP_CHECK ) hr |= FL_RETURN_CHANGED; if ( fl_get_menu_item_mode( menu, 4 ) & FL_PUP_CHECK ) hr |= FL_RETURN_END; } if ( fl_get_menu_item_mode( menu, 5 ) & FL_PUP_CHECK ) hr |= FL_RETURN_SELECTION; if ( fl_get_menu_item_mode( menu, 6 ) & FL_PUP_CHECK ) hr |= FL_RETURN_DESELECTION; } fl_set_object_return( target, hr ); sp->how_return = target->how_return; reset_how_return_menu( menu, sp->how_return ); } /*************************************** ***************************************/ #define VN( v ) { v, #v } static FLI_VN_PAIR howreturn[ ] = { VN( FL_RETURN_NONE ), VN( FL_RETURN_END_CHANGED ), VN( FL_RETURN_CHANGED ), VN( FL_RETURN_END ), VN( FL_RETURN_SELECTION ), VN( FL_RETURN_DESELECTION ), VN( FL_RETURN_ALWAYS ), { -1, NULL } }; /*************************************** ***************************************/ int get_how_return_val( const char * s ) { char *tmp = fl_strdup( s ), *p = strtok( tmp, "|" ), *st; int val = 0; while ( p ) { while ( *p && isspace( ( int ) *p ) ) p++; st = p; while ( *p && ! isspace( ( int ) *p ) ) p++; *p = '\0'; if ( ! strcmp( st, "FL_RETURN_NONE" ) ) { val = FL_RETURN_NONE; break; } else if ( ! strcmp( st, "FL_RETURN_ALWAYS" ) ) { val = FL_RETURN_ALWAYS; break; } else if ( ! strcmp( st, "FL_RETURN_END_CHANGED" ) ) { val |= FL_RETURN_END_CHANGED; val &= ~ ( FL_RETURN_CHANGED | FL_RETURN_END ); } else if ( ! strcmp( st, "FL_RETURN_CHANGED" ) ) { val |= FL_RETURN_CHANGED; val &= ~ FL_RETURN_END_CHANGED; } else if ( ! strcmp( st, "FL_RETURN_END" ) ) { val |= FL_RETURN_END; val &= ~ FL_RETURN_END_CHANGED; } else if ( ! strcmp( st, "FL_RETURN_SELECTION" ) ) val |= FL_RETURN_SELECTION; else if ( ! strcmp( st, "FL_RETURN_DESELECTION" ) ) val |= FL_RETURN_DESELECTION; val |= fli_get_vn_value( howreturn, st ); p = strtok( NULL, "|" ); } fl_safe_free( tmp ); return val; } /*************************************** * Returns a string suitable for output in a C file (with 'withspaces' * set to 1) or a .fd file (with 'withspaces' set to 0) of the return * setting of an object as passed as the first argument. ***************************************/ const char * get_how_return_name( unsigned int how_return, int with_spaces ) { static char buf[ 256 ]; FLI_VN_PAIR *hr = howreturn; if ( how_return == FL_RETURN_ALWAYS ) return "FL_RETURN_ALWAYS"; if ( how_return == FL_RETURN_NONE ) return "FL_RETURN_NONE"; *buf = '\0'; while ( ( ++hr )->val != ( int ) FL_RETURN_ALWAYS ) { if ( how_return & hr->val ) strcat( strcat( buf, with_spaces ? " | " : "|" ), hr->name ); } return buf + ( with_spaces ? 3 : 1 ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/Readme0000644000175000017500000000013211171560225014761 0ustar jensjens fdesign is the XForms GUI builder/designer. type fdesgin -help for brief help messages. xforms-1.0.93sp1/fdesign/.cvsignore0000644000175000017500000000006311171560225015644 0ustar jensjensfdesign fdesign.1 Makefile Makefile.in .deps .libs xforms-1.0.93sp1/fdesign/fd_groups.c0000644000175000017500000001276211375037165016021 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_groups.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * This file is part of the Form Designer. * * It maintains a list of groups in the form. Each group can be * assigned a name. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "include/forms.h" #include "fd_main.h" #include "fd/ui_theforms.h" /**** Data Structure maintaining groups in current form ****/ static FL_OBJECT **begobj = NULL; /* Begin objects of the groups */ /**** Call-back routines ****/ /*************************************** * Sets the current group in the form ***************************************/ void group_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { int nn = fl_get_browser( fd_control->groupbrowser ); if ( nn > 0 ) addgroupto_selection( begobj[ nn ] ); else if ( nn < 0 ) deletegroupfrom_selection( begobj[ -nn ] ); redraw_the_form( 0 ); } /*************************************** * Changes the name of the current group ***************************************/ void changegroupname_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; int i, numb = 0; const char *s; const char *sp; if ( cur_form == NULL ) return; for ( i = 1; i <= fl_get_browser_maxline( fd_control->groupbrowser ); i++ ) if ( fl_isselected_browser_line( fd_control->groupbrowser, i ) ) { if ( numb != 0 ) { fl_show_messages( "Cannot change name of multiple groups" ); return; } numb = i; } if ( numb == 0 ) { fl_show_messages( "No group is selected" ); return; } get_object_name( begobj[ numb ], name, cbname, argname ); get_changed_group_name: if ( ! ( s = fl_show_input( "Enter group name (must be usable as " "a C variable):", name ) ) || ! *s ) return; if ( ! isascii( ( unsigned char ) *s ) || ! ( isalpha( ( unsigned char ) *s ) || *s == '_' ) ) { fl_show_alert( "Error", "Invalid C identifier specified for group " "name:", s, 0 ); goto get_changed_group_name; } for ( sp = s + 1; *sp; sp++ ) if ( ! isascii( ( unsigned char ) *sp ) || ! ( isalnum( ( unsigned char ) *sp ) || *sp == '_' ) ) { fl_show_alert( "Error", "Invalid C identifier specified for group " "name:", s, 0 ); goto get_changed_group_name; } strcpy( name, s ); set_object_name( begobj[ numb ], name, cbname, argname ); fillin_groups( ); changed = 1; } /*************************************** * Fills in the current list of groups ***************************************/ void fillin_groups( void ) { char name[ MAX_VAR_LEN ], cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; FL_OBJECT *obj, *obj2; int i; if ( cur_form == NULL ) { fl_clear_browser( fd_control->groupbrowser ); return; } fl_freeze_form( fd_control->groupbrowser->form ); fl_clear_browser( fd_control->groupbrowser ); /* Check whether groups are empty. */ obj = cur_form->first; while ( obj != NULL ) { obj2 = obj; obj = obj->next; if ( obj2->objclass == FL_END_GROUP && obj2->prev != NULL && obj2->prev->objclass == FL_BEGIN_GROUP ) { fl_delete_object( obj2->prev ); fl_delete_object( obj2 ); } } /* Put the still existing groups in the list */ for ( i = 0, obj = cur_form->first; obj; obj = obj->next ) if ( obj->objclass == FL_BEGIN_GROUP ) i++; if ( i > 0 ) { begobj = fl_realloc( begobj, ( i + 1 ) * sizeof *begobj ); for ( i = 1, obj = cur_form->first; obj; obj = obj->next ) if ( obj->objclass == FL_BEGIN_GROUP ) { begobj[ i ] = obj; get_object_name( obj, name, cbname, argname ); if ( ! *name ) strcpy( name, "" ); fl_add_browser_line( fd_control->groupbrowser, name ); if ( is_selected( obj ) ) fl_select_browser_line( fd_control->groupbrowser, i ); } else if ( obj->objclass == FL_END_GROUP ) i++; } fl_unfreeze_form( fd_control->groupbrowser->form ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/xpm/0000755000175000017500000000000011377311602014452 5ustar jensjensxforms-1.0.93sp1/fdesign/xpm/picture1.xbm0000644000175000017500000000160011171560225016712 0ustar jensjens#define picture1_width 32 #define picture1_height 32 static unsigned char picture1_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x18, 0x64, 0x6f, 0xf6, 0x26, 0x0a, 0x00, 0x00, 0x50, 0xf2, 0xff, 0xff, 0x4f, 0x14, 0x04, 0x00, 0x28, 0x14, 0x0e, 0x00, 0x28, 0x10, 0x32, 0x00, 0x08, 0x94, 0x03, 0x00, 0x08, 0xf4, 0x04, 0x00, 0x08, 0xb0, 0x08, 0x00, 0x08, 0x34, 0x01, 0x00, 0x28, 0x34, 0x01, 0x00, 0x28, 0x12, 0x00, 0x40, 0x48, 0x12, 0x20, 0xa6, 0x48, 0x14, 0x50, 0x11, 0x29, 0x14, 0x50, 0x48, 0x2a, 0x10, 0x27, 0xac, 0x0e, 0xd4, 0x71, 0xe8, 0x0a, 0x74, 0x20, 0xa8, 0x0a, 0x14, 0x20, 0x00, 0x08, 0x10, 0x50, 0x00, 0x08, 0x14, 0x00, 0x00, 0x28, 0x14, 0x00, 0x00, 0x28, 0xf2, 0xff, 0xff, 0x4f, 0x0a, 0x00, 0x00, 0x50, 0x64, 0x6f, 0xf6, 0x26, 0x18, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xforms-1.0.93sp1/fdesign/xpm/glcan.xpm0000644000175000017500000000403111171560225016261 0ustar jensjens/* XPM */ static char *glcan_pixels[] = { "40 39 16 1", "` c black", "a c #0b070a", "b c #5d3d6b", "c c #70c6ab", "d c #d1ccdc", "e c #09080a", "f c #0c0706", "g c #7f89d3", "h c #0f2430", "i c #d43ca3", "j c #0b090b", "k c #3889ac", "l c #0c070d", "m c #0b0551", "n c #090b10", "o c None", "````````````````````````````````````````", "````````````````````````````````````````", "````````````````````````````````````````", "````````````````````````````````````````", "nnoojejejjjjjjjjjjjjjjnnjffffjjjfffjlleo", "hhnooeejejjjjjjjjjjjjjeoffffennnnofflllo", "bcbhonjejjjjjjjjjjjjjjooffflnnhmhnoflnno", "hccbhojeejjjjajjjjjjjjeejjlnhbgkmhojlnjo", "bcckbhofjnnnfleoojlljffjonnhgddkmmnllloo", "bccckbhoennelleoojlllfjnnhkdddgkmmmlaleo", "bcdcckbhofllnnlaaaljafnnbgddddgkmmmnonlo", "bcddckkkhjfjnnllllaajenbddddddgmmmmmnnll", "bcdddckkbhoooellllfoenhddddddgkmmmmmmnll", "bcdddcckkkhnofalllffenbdddddggkmmmmmmhlf", "hccddcckkkkhnojenafjnhgddddgggkkmmmmmmnf", "hccddccckkkbhhonnjfonbddggkggkkgkmmmmmno", "hcccccccckkkkbhnnefongdgggkgkkkkkkmmmmno", "hccccddccckkkkbhnnlnhggkkkggggkkkgkmmmno", "hkcccdddcckkkbbgbbhlhkkgkkkgggkkkkgkmmnn", "hkccdddccckggdiiiiibhhkkkkggkgkgggkkmmnn", "hkccccccccgdddddiiiiihmkkgkkkkgggkkkgmnl", "hkcccccccdddddddiiiiiihmgkgkkkkkkkkggbof", "hkkccccccddddddddiiiiibhbgkkkkkkkkgkmmjf", "hkkkkckkdddddddddiiiiibhhbkkkgkkkkmnnnen", "nhbkkkkbdddddddddiiiiiiblhkkggkkmhnfflen", "fohhhhhbdddddddddiiiiiiblnhkgkmnallffaje", "oooooojhdddddddddiiiiiiblonnhnnlajjajjej", "ejjjejlhdddddddddiiiiiiblneanojajjjjjjej", "jjejallhddddddddiiiiiiibloolneaajjjjjjjj", "jjjafllhgddddddiiiiiiibbloallnjjjjjjjejj", "jejjflnnbiiidiiiiiiiiibhloalnnfajjjjjjjj", "jjeaajnlbiiiiiiiiiiiibblaollnefajjjjejjj", "jjjjojonlbiiiiiiiiibbbhloollnnfajjjejeje", "jjjaajooalbiiiiiiiibblleoollnnfajjjjjjjj", "jjejjffooolbbbbbbbbblfleooannefajjjjjjjj", "jejjjjjjejalllhhlllaljejejjjeejjjjjjjjjj", "````````````````````````````````````````", "````````````````````````````````````````", "````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/crab.xpm0000644000175000017500000000377311171560225016120 0ustar jensjens/* XPM */ static char * crab[] = { /* crab pixmap * width height ncolors chars_per_pixel */ "28 28 6 2 ", ". c None m white s None ", "x c orange m black s s_orange ", "* c #ff72c2 m black s s_#ff72c2 ", "+ c SteelBlue m white s s_SteelBlue ", "G c black m black s s_black ", "a c LightGrey m white s s_LightGrey ", /* pixels */ ". . . . . . * * * * . . . . . . . . . * * * * . . . . . ", ". . . . + * x x * . . . . . . . . . . + * x x * . . . . ", ". . . + * x x * . . . . . . . . . . . . + * x x * . . . ", ". . + * x * . . . * . . . . . . . . . * . . + * x * . . ", ". . + * x * . . + * . . . . . . . . + * . . + * x * . . ", ". . + * x * . + * * . . . . . . . . + * * . + * x * . . ", ". . + * x * + * * . . . . . . . . . . + * * + * x * . . ", ". . + * x * * * . . . . . . . . . . . . + * * x x * . . ", ". . . + * x * . . + * . . . . . . + * . . + * x * . . . ", ". . . + * x . . + * . + * * . * * . + * . . + x * . . . ", ". . . . + x . . + * . + * * . * * . + * . . + x . . . . ", ". . . . + x . . . + * + * * * * * + * . . . + x . . . . ", ". . . . + * x . . + * * * * * * * * * . . + x * . . . . ", ". . . . . + * x * * * * x x x x x * * * * x * . . . . . ", ". . . . + + + * * x x x x x x x x x x x x * . . . . . . ", ". . + + * x x x x x x x x x x x x x x x x x x * x . . . ", ". + * x x a + * * x x x x x x x x x x x * * a G * x * . ", "+ * x . . . + * * x x x x x x x x x x x * * G . . . x * ", ". . . . . . + * * x x x x x x x x x x x * * . . . . . . ", ". . . . . + * * x x x x x x x x x x x x x * * . . . . . ", ". . . + * x x x * x x x x x x x x x x x * x x x * . . . ", ". . + * x a a + * * x x x x x x x x x * * a a a x * . . ", ". + * x G G G + * * x x x x x x x x x * * a G G G x * . ", ". + * G . . . + * x * x x x x x x x * x * a G . . . * . ", ". . . . . . + * x a * * * x x x * * * a x * G . . . . . ", ". . . . . + * x a G a a * * * * * a a G a x * G . . . . ", ". . . . . + x a G . G G a a a a a G G . G G x a G . . . ", ". . . . . + x a G . . . G G G G G . . . . . x a G . . . " } ; xforms-1.0.93sp1/fdesign/xpm/picture.xbm0000644000175000017500000000157511171560225016644 0ustar jensjens#define picture_width 32 #define picture_height 32 static unsigned char picture_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x18, 0x64, 0x6f, 0xf6, 0x26, 0x0a, 0x00, 0x00, 0x50, 0xf2, 0xff, 0xff, 0x4f, 0x14, 0x04, 0x00, 0x28, 0x14, 0x0e, 0x00, 0x28, 0x10, 0x32, 0x00, 0x08, 0x94, 0x03, 0x00, 0x08, 0xf4, 0x04, 0x00, 0x08, 0xb0, 0x08, 0x00, 0x08, 0x34, 0x01, 0x00, 0x28, 0x34, 0x01, 0x00, 0x28, 0x12, 0x00, 0x40, 0x48, 0x12, 0x20, 0xa6, 0x48, 0x14, 0x50, 0x11, 0x29, 0x14, 0x50, 0x48, 0x2a, 0x10, 0x27, 0xac, 0x0e, 0xd4, 0x71, 0xe8, 0x0a, 0x74, 0x20, 0xa8, 0x0a, 0x14, 0x20, 0x00, 0x08, 0x10, 0x50, 0x00, 0x08, 0x14, 0x00, 0x00, 0x28, 0x14, 0x00, 0x00, 0x28, 0xf2, 0xff, 0xff, 0x4f, 0x0a, 0x00, 0x00, 0x50, 0x64, 0x6f, 0xf6, 0x26, 0x18, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xforms-1.0.93sp1/fdesign/xpm/clock.xpm0000644000175000017500000000455011171560225016276 0ustar jensjens/* XPM */ static char *clock_pixels[] = { "55 38 6 1", "` c None", "a c gray87", "b c #cecece", "c c #282828", "d c #6d6d6d", "e c gray35", "```````````````````````````````````````````````````````", "````````````````````````````b``````````````````````````", "```````````````````````bbbbbbbbbbb`````````````````````", "````````````````````bbbbbbbbdbbbbbbbb``````````````````", "``````````````````bbbbbddddaddddddbbbbb````````````````", "`````````````````bbbbdddddddddddddddbbbb```````````````", "````````````````bbbdadddddddddddddadddbbb``````````````", "```````````````bbbdddddddddddddddddddddbee`````````````", "``````````````bbadddddddddddddddddddddddeee````````````", "`````````````bbbdadddddadddddddddddddddddeee```````````", "`````````````bbdddaadddaadddddddddddddddddee```````````", "````````````bbddaddcadddacddddddddddddaddddee``````````", "````````````bbddddddcaddaacddddddddddddddddee``````````", "```````````bbbddddddddadaacdddddddddaaaadddeee`````````", "```````````bbddddddddddaaeacddaaaaaaaaddddddee`````````", "```````````bbdddddddddddcaaaaaeaaaadddccccddee`````````", "```````````bbdddddddddddaaaaaaadccccccccddddee`````````", "```````````bbdadddddddddddaaaccccccccdddadddee`````````", "```````````bbdddddddddddddcacccccdddddddddddee`````````", "```````````bbdddddddddddddddcccdddddddddddddee`````````", "```````````bbddddddddddddddddcddddddddddddddee`````````", "```````````bbdddddddddddddddddddddddddddddddee`````````", "```````````bbdddddddddddddddddddddddddddddddee`````````", "```````````bbdddddddddddddddddddddddddddddddee`````````", "```````````bbbddadddddddddddddddddddddaddddeee`````````", "````````````bbdddddddddddddddddddddddddddddee``````````", "````````````bbdddddddddddddddddddddddddddddee``````````", "`````````````bbdddddddddddddddddddddddddddee```````````", "`````````````bbbdddddadddddddddddadddddddeee```````````", "``````````````bbbdddddddddddddddddddddddeee````````````", "```````````````bbedddddddddadddddddddddeee`````````````", "````````````````eeedddddddddddddddddddeee``````````````", "`````````````````eeeedddddddddddddddeeee```````````````", "``````````````````eeeeedddddddddddeeeee````````````````", "````````````````````eeeeeeeeeeeeeeeee``````````````````", "```````````````````````eeeeeeeeeee`````````````````````", "```````````````````````````````````````````````````````", "```````````````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/vals.xpm0000644000175000017500000000404311171560225016145 0ustar jensjens/* XPM */ static char *vals_pixels[] = { "60 30 6 1", "` c black", "a c None", "b c gray87", "c c #cecece", "d c #282828", "e c gray35", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeea", "aadaaaaaaaaaaaaaaaabdaaaaaaaaaaaacccccccccccaaaaaaaaaaaaaaba", "aadaaaaaaaaaaaaaaaabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaaaaaaaaaaaaaaabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaaa``aaaaa```aabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaa`aa`aaaa`aaaabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaa`aa`aaaa``aaabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaa`aa`aaaaaa`aabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaa`aa`aaaaaa`aabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaaa``aa`aa``aaabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaaaaaaaaaaaaaaabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaaaaaaaaaaaaaaabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaaaaaaaaaaaaaaabdaaaaaaaaaaaabaaaaaaaaaadaaaaaaaaaaaaaba", "aadaaaaaaaaaaaaaaaabdaaaaaaaaaaaabeeeeeeeeeedaaaaaaaaaaaaaba", "aabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbba", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/porsche.xpm0000644000175000017500000001101511171560225016640 0ustar jensjens/* XPM */ static char * porsche[] = { /* porsche pixmap * width height ncolors chars_per_pixel */ "64 64 4 1 ", " c None m None s s_slateblue ", ". c yellow m white s s_yellow ", "r c red m white s s_red ", "b c black m black s s_black ", /* pixels */ " ", " ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb............................................bb ", " bb..bbbb..bbbb..bbbb..bbbb..bbbb..b..b..bbbb..bb ", " bb..b..b..b..b..b..b..b..b..b..b..b..b..b.....bb ", " bb..b..b..b..b..b..b..b.....b.....b..b..b.....bb ", " bb..bbbb..b..b..bbb...bbbb..b.....bbbb..bbbb..bb ", " bb..b.....b..b..b..b.....b..b.....b..b..b.....bb ", " bb..b.....b..b..b..b..b..b..b..b..b..b..b.....bb ", " bb..b.....bbbb..b..b..bbbb..bbbb..b..b..bbbb..bb ", " bb............................................bb ", " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb.....................bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb......b...b...bb.....bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb.....b...b...b....b..bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb....bb..bb.bbbbbbb...bbbbbbbbbbbbbbbbbbbbbbbbb ", " bb...bbbbbbbb......bb..bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb..bbbb...............bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb.bbb.................bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb..........b..b.......bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb.....b...b..b........bbrrrrrrrrrrrrrrrrrrrrrbb ", " bb....b...b..b..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb....b.bbbbbbbbb..............bbbbbbbbbbbbbbbbb ", " bb...bbbb.......bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ", " bb..bbb.........b..............bbbbbbbbbbbbbbbbb ", " bb.bbb..........b...bbb........bbbbbbbbbbbbbbbbb ", " bb.........b..b.b..bbbbb.......bbbbbbbbbbbbbbbbb ", " bb.....b..b..b..b..b.bbb.....b.brrrrrrrrrrrrrrbb ", " bb....b..b..b..bb....bbb....bb.brrrrrrrrrrrrrrbb ", " bb...bb.bbbbbbb.b....bbb....bb.brrrrrrrrrrrrrrbb ", " bb..bbbbb......bb...bbbbb...b..brrrrrrrrrrrrrrbb ", " bb.bbb..........b.bbbbbbbbbbb..brrrrrrrrrrrrrrbb ", " bb..............b.b.bbbbbbbbb..brrrrrrrrrrrrrrbb ", " bbbbbbbbbbbbbbbbb.b.b....bbbb..bbbbbbbbbbbbbbbbb ", " bbbbbbbbbbbbbbbbb...b.....b.b..b..............bb ", " bbbbbbbbbbbbbbbbb........bb.bb.b...b..b.......bb ", " bbbbbbbbbbbbbbbb........b..b..b..b..b...b...bb ", " bbbbbbbbbbbbbbbb.......b..b...b.b..b...b....bb ", " bbbbbbbbbbbbbbbbb............b.bbbbbbbbbb...bb ", " bbrrrrrrrrrrrrrrb..........bbbb........bb.bb ", " bbrrrrrrrrrrrrrrrb........bbbb............bb ", " bbrrrrrrrrrrrrrrrbbbbbbbb.......b..b....bb ", " bbrrrrrrrrrrrrrrrrrrbb.....b...b..b..b..bb ", " bbrrrrrrrrrrrrrrrrrbb....b...b..b..b..bb ", " bbrrrrrrrrrrrrrrrrrbb...bb.bbbbbbbb...bb ", " bbbbbbbbbbbbbbbbbbbb...bbbb......bb.bb ", " bbbbbbbbbbbbbbbbbbb..bbb...........b ", " bbbbbbbbbbbbbbbbbbb.bbb...........bb ", " bbbbbbbbbbbbbbbbbb..............bb ", " bbbbbbbbbbbbbbbbb...b.b.b.....bb ", " bbbbbbbbbbbbbbbb..b.b.b..b..bb ", " bbrrrrrrrrrrrbb..bbbbbbb..bb ", " bbrrrrrrrrrrbb.bbb....b.bb ", " bbrrrrrrrrrbb.bb......bb ", " bbbrrrrrrrbb.......bbb ", " bbbbrrrrrbb.....bbbb ", " bbbbrrrbb...bbbb ", " bbbbrbb.bbbb ", " bbbbbbbb ", " bbbb ", " bb ", " " } ; xforms-1.0.93sp1/fdesign/xpm/r3dbut.xpm0000644000175000017500000000410111171560225016376 0ustar jensjens/* XPM */ static char *r3dbut_pixels[] = { " 65 29 4 1", "` c None", "a c #cecece", "b c blue", "c c gray35", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "``````````````````````c``````````````````````````````````````````", "```````````````````ccccccc```````````````````````````````````````", "`````````````````ccccc`ccccc`````````````````````````````````````", "````````````````ccc```````caa````````````````````````````````````", "````````````````cc````b````aa````````````````````````````````````", "```````````````cc```bbbbb```aa```````````````````````````````````", "```````````````cc``bbbbbbb``aa```````````````````````````````````", "```````````````cc``bbbbbbb``aa```````````````````````````````````", "``````````````cc``bbbbbbbb``aa```````````````````````````````````", "```````````````cc``bbbbbbb``aa```````````````````````````````````", "```````````````cc``bbbbbbb``aa```````````````````````````````````", "```````````````cc```bbbbb```aa```````````````````````````````````", "````````````````cc`````````aa````````````````````````````````````", "````````````````caa```````aaa````````````````````````````````````", "`````````````````aaaaaaaaaaa`````````````````````````````````````", "```````````````````aaaaaaa```````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/vcenter.xbm0000644000175000017500000000071211171560225016627 0ustar jensjens#define vcenter_width 20 #define vcenter_height 20 static char vcenter_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x80, 0x1f, 0x00, 0x9f, 0x1f, 0x00, 0x9f, 0x9f, 0x0f, 0x9f, 0x9f, 0x0f, 0x9f, 0x9f, 0x0f, 0x9f, 0x9f, 0x0f, 0x9f, 0x9f, 0x0f, 0x9f, 0x9f, 0x0f, 0x9f, 0x1f, 0x00, 0x80, 0x1f, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xforms-1.0.93sp1/fdesign/xpm/chart.xpm0000644000175000017500000000454311171560225016306 0ustar jensjens/* XPM */ static char *chart_pixels[] = { " 55 38 6 1", "` c black", "a c yellow", "b c green", "c c None", "d c magenta", "e c blue", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccc`````````ccccccccccccccccccccccccccc", "ccccccccccccccccccc`aaaaaaa`ccccccccccccccccccccccccccc", "ccccccccccccccccccc`aaaaaaa`ccccccccccccccccccccccccccc", "ccccccccccccccccccc`aaaaaaa`ccccccccccccccccccccccccccc", "ccccccccccccccccccc`aaaaaaa`ccccccc`````````ccccccccccc", "ccccccccccc`````````aaaaaaa`ccccccc`ddddddd`ccccccccccc", "ccccccccccc`bbbbbbb`aaaaaaa`ccccccc`ddddddd`ccccccccccc", "ccccccccccc`bbbbbbb`aaaaaaa`ccccccc`ddddddd`ccccccccccc", "ccccccccccc`bbbbbbb`aaaaaaa`````````ddddddd`ccccccccccc", "ccccccccccc`bbbbbbb`aaaaaaa`eeeeeee`ddddddd`ccccccccccc", "ccccccccccc``````````````````````````````````cccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccc`cc`cccc`cc`cccc`cc`cccc`cc`cccccccccccccccccccccc", "cccccccc`ccccccc`ccccccc`cccccc``cccccc``ccccccc`cccccc", "ccccc`c```c`c`````c`c`````c`c`````c`cc````cccccc`cccccc", "ccccc`cc`c`c```c`c`c```c`c`c```c```c`c```c`cccc``cccccc", "ccccc`cc`c`````c`c`````c`c`````c`c```c`c```ccc````ccccc", "ccccc`cc`c`cc``c`c`cc``c`c`cc````c`ccc`c```ccccc`cccccc", "ccccc`cc`cc````c`c`````c`c```````````c```c`ccccc`cccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "ccccccccccccccccccccccccccccccccccccccccccccccccccccccc" }; xforms-1.0.93sp1/fdesign/xpm/nomail.xbm0000644000175000017500000000640711171560225016447 0ustar jensjens#define nomail_width 64 #define nomail_height 64 static unsigned char nomail_bits[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x0e, 0xc0, 0x00, 0x00, 0x80, 0x01, 0x00, 0xc0, 0x01, 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, 0x38, 0x00, 0x00, 0x02, 0x00, 0x80, 0x01, 0x00, 0x06, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0xc0, 0x1f, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0x30, 0x60, 0x00, 0x00, 0x08, 0x00, 0x80, 0x01, 0x08, 0x80, 0x00, 0x00, 0x08, 0x00, 0x80, 0x01, 0x04, 0x07, 0x01, 0x00, 0x10, 0x00, 0x80, 0x01, 0x82, 0x0f, 0x02, 0x00, 0x10, 0x00, 0x80, 0x01, 0x82, 0x0f, 0x02, 0x00, 0x10, 0x00, 0x80, 0x01, 0x01, 0x07, 0x04, 0x00, 0x20, 0x00, 0x80, 0x01, 0x01, 0x00, 0x04, 0x00, 0x20, 0x00, 0x80, 0x81, 0x00, 0x00, 0x08, 0x00, 0x26, 0x00, 0x80, 0x81, 0x00, 0x00, 0x08, 0x80, 0x27, 0x00, 0x80, 0x81, 0x00, 0x00, 0x08, 0xe0, 0x27, 0x00, 0x80, 0x81, 0x22, 0xa2, 0x08, 0xd8, 0x27, 0x00, 0x80, 0x41, 0x36, 0xa5, 0x10, 0xc6, 0x27, 0x00, 0x80, 0x41, 0xaa, 0xa8, 0x90, 0xc1, 0x27, 0x00, 0x80, 0x41, 0xaa, 0xaf, 0x90, 0xc1, 0x27, 0x00, 0x80, 0x41, 0xa2, 0xa8, 0x10, 0xc0, 0x27, 0x00, 0x80, 0x41, 0xa2, 0xa8, 0x17, 0xc0, 0x21, 0x00, 0x80, 0x41, 0x00, 0x00, 0x10, 0x40, 0x20, 0x00, 0x80, 0x41, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x80, 0x41, 0xfe, 0xff, 0x17, 0x00, 0x20, 0x00, 0x80, 0x41, 0x00, 0x00, 0x10, 0x00, 0x30, 0x00, 0x80, 0x41, 0xfe, 0xff, 0x17, 0x00, 0x3c, 0x0e, 0x80, 0x41, 0x00, 0x00, 0x10, 0x00, 0x0f, 0x11, 0x80, 0x41, 0x00, 0x00, 0x10, 0xc0, 0x1b, 0x11, 0x80, 0x41, 0x00, 0x00, 0x10, 0xf0, 0xe4, 0x10, 0x80, 0x41, 0x00, 0x00, 0x10, 0x3c, 0x84, 0x08, 0x80, 0x41, 0x00, 0x00, 0x10, 0x0f, 0x88, 0x3c, 0x80, 0x41, 0x00, 0x00, 0xd0, 0x03, 0xf0, 0x43, 0x80, 0x41, 0x00, 0x00, 0xf0, 0x01, 0x8c, 0x43, 0x80, 0xc1, 0xff, 0xff, 0x3f, 0x01, 0x82, 0x24, 0x80, 0xc1, 0xff, 0xff, 0x1f, 0x01, 0x82, 0x18, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0xfc, 0x08, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x20, 0x09, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x10, 0x06, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x10, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x08, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x08, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0xb4, 0x3f, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x0e, 0x28, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x03, 0x16, 0x80, 0x01, 0x00, 0x02, 0x02, 0x81, 0xc0, 0x11, 0x80, 0x01, 0x00, 0x02, 0x02, 0x41, 0x38, 0x08, 0x80, 0x01, 0x00, 0x02, 0x02, 0x21, 0x04, 0x04, 0x80, 0x01, 0x00, 0x02, 0x02, 0x11, 0x03, 0x02, 0x80, 0x01, 0x00, 0x02, 0x02, 0xc9, 0x80, 0x01, 0x80, 0x01, 0x00, 0x02, 0x02, 0x25, 0x60, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x13, 0x18, 0x00, 0x80, 0x01, 0x00, 0x02, 0x02, 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x02, 0xc2, 0xfe, 0x00, 0x00, 0x80, 0x01, 0x00, 0x02, 0x32, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; xforms-1.0.93sp1/fdesign/xpm/hcenter.xbm0000644000175000017500000000071211171560225016611 0ustar jensjens#define hcenter_width 20 #define hcenter_height 20 static char hcenter_bits[] = { 0xf0, 0xff, 0x00, 0xf0, 0xff, 0x00, 0xf0, 0xff, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0xfc, 0xff, 0x03, 0xfc, 0xff, 0x03, 0xfc, 0xff, 0x03}; xforms-1.0.93sp1/fdesign/xpm/Makefile.am0000644000175000017500000000117211171560225016506 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = allbutton.fd \ bm1.xbm \ bottom.xbm \ box.xpm \ br.xpm \ butt.xpm \ chart.xpm \ check.xpm \ choice.fd \ choice.xpm \ clock.xpm \ cnt.xpm \ crab_focus.xpm \ crab.xpm \ dial.xpm \ fd_logo.xpm \ frame.xpm \ glcan.xpm \ hcenter.xbm \ left.xbm \ lightb.xpm \ menu.xpm \ misc.fd \ nomail.xbm \ picture1.xbm \ picture.xbm \ porsche.xpm \ pos.xpm \ r3dbut.xpm \ right.xbm \ roundb.xpm \ scb.xpm \ sld.xpm \ static.fd \ tab.xpm \ text.xpm \ timer.xpm \ top.xbm \ twheel.xpm \ val.fd \ vals.xpm \ vcenter.xbm \ xconq1.xpm \ xconq.xpm \ xyplot.xpm xforms-1.0.93sp1/fdesign/xpm/xconq.xpm0000644000175000017500000000254011171560225016330 0ustar jensjens/* XPM */ static char * xconq [] = { "32 32 5 1", " s None c None g4 None", ". m black c black g4 black", "X m white c SkyBlue g4 grey80", "o m white c LightGray g4 grey50", "O m white c OliveDrab g4 grey40", " ", " . ", " ..X.. ", " ..XXXXX.. ", " ..XXXXXXXXX.. ", " ..XXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXX.XXXXXXX.. ", " .XXXXXXXXXXXXXXXXXXX.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXX..........XXXXXX. ", " .XXXXXXXXXX...oooooooo.XXXXXX. ", " .X..........ooooooooo..XXXXXX. ", " .XXXXXXXXXX.................X. ", " .XXXXXXX...............oooo.X. ", " .XXXXXX..oooooooooooooooooo.X. ", " .XXXXXX....................XX. ", " .XXXXXXX..o.o.o.o.o.o.oo..XXX. ", " .XXXXXXXX................XXXX. ", " .............................. ", " .OOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", " ..OO.O.O.O.O.O.O.O.O.O.O.O.OO. ", " ..O.O.O.O.O.O.O.O.O.O.O.O.. ", " ..OO.O.O.O.O.O.O.O.OO.. ", " ..O.O.O.O.O.O.O.O.. ", " ..OO.O.O.O.OO.. ", " ..O.O.O.O.. ", " ..OOO.. ", " ... "}; xforms-1.0.93sp1/fdesign/xpm/frame.xpm0000644000175000017500000000417211171560225016275 0ustar jensjens/* XPM */ static char *frame_pixels[] = { "55 34 6 1", "` c black", "a c None", "b c gray87", "c c #cecece", "d c #282828", "e c gray35", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa`aaa`a```aa````aaa`aaaaaaaaaaaaaaaaaaaaaa", "aaeeeeeeeaaaaa```a``aaa`a`a`a`a`a`aaaeeeeeeeeeeeeeeeeea", "aadccccccaaaaa`aaa`aa```a`a`a`a```aaacccccccccccccccaba", "aadbaaaaaaaaaa`aaa`aa`a`a`a`a`a`aaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaa`aaa`aa``a``a`a`aa``aaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadba", "aadbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedba", "aabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbba", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/box.xpm0000644000175000017500000000430411171560225015770 0ustar jensjens/* XPM */ static char *box_pixels[] = { "54 36 6 1", "` c black", "a c None", "b c gray87", "c c #cecece", "d c #282828", "e c gray35", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaacccccccccccccccccccccccccccccccccccccccccaaaaaaa", "aaaaaabccccccccccccccccccccccccccccccccccccccccdaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaa`a``aaa```aa`aaa`aaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaa``aa`a`aaa`aa`a`aaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaa`aaa`a`aaa`aaa`aaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaa`aaa`a`aaa`aa`a`aaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaa``aa`a`aaa`a`aaa`aaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaa`a``aaa```aa`aaa`aaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaa", "aaaaaabbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeddaaaaaa", "aaaaaabeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/pos.xpm0000644000175000017500000000411211171560225015776 0ustar jensjens/* XPM */ static char *pos_pixels[] = { "56 33 5 1", "` c None", "a c gray87", "b c blue", "c c #282828", "d c gray35", "````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````", "````dddddddddddddddddddddddddddddddddddddddddddddddd````", "````c``````````````````````````````````````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c`bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb`a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c```````````````````````````````b``````````````a````", "````c``````````````````````````````````````````````a````", "````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa````", "````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/scb.xpm0000644000175000017500000000342711171560225015754 0ustar jensjens/* XPM */ static char *scb_pixels[] = { " 60 26 5 1", "` c None", "a c gray87", "b c #cecece", "c c #282828", "d c gray35", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "`ddddddddddddddddddddddddddddddddddddddddddddddddddddddddd``", "`c```````````````````````````````````````````````````````a``", "`c`````````bc````````bbbbbbbbbbbbbbbb`````````ac`````````a``", "`c````````bbc````````a```````````````c````````acc````````a``", "`c``````bb``c````````a`ac``ac``ac````c````````a``cc``````a``", "`c````bb````c````````a`ac``ac``ac````c````````a````cc````a``", "`c``bb``````c````````a`ac``ac``ac````c````````a``````cc``a``", "`c`dd```````c````````a`ac``ac``ac````c````````a```````d``a``", "`c```dd`````c````````a`ac``ac``ac````c````````a`````dd```a``", "`c`````dd```c````````a`ac``ac``ac````c````````a```dd`````a``", "`c```````dd`c````````a```````````````c````````a`dd```````a``", "`c`````````d`````````adddddddddddddddc````````dd`````````a``", "`c```````````````````````````````````````````````````````a``", "`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa``", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````", "````````````````````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/butt.xpm0000644000175000017500000000414411171560225016160 0ustar jensjens/* XPM */ static char *butt_pixels[] = { " 65 29 5 1", "` c None", "a c gray87", "b c #cecece", "c c #282828", "d c gray35", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "``````bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb````````", "``````abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aa````````````````````````````````````````````````cc```````", "``````aaddddddddddddddddddddddddddddddddddddddddddddddddcc```````", "``````addddddddddddddddddddddddddddddddddddddddddddddddddc```````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/timer.xpm0000644000175000017500000000207111171560225016317 0ustar jensjens/* XPM */ static char *timer_pixels[] = { "40 22 2 1", "+ c #040204 g grey1 ", "a c #a4a2a4 g grey63 ", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaa++aaaaaaa+++aaaaa++aaaaaa+++aaaaaa", "aaaaa+++aaaaaa+++++aaaa++aaaaa+++++aaaaa", "aaaaaa++aaaaaa+aa++aaa+++aaaaa+aa++aaaaa", "aaaaaa++aaa++aaaa++aa+a++aaaaaaaa++aaaaa", "aaaaaa++aaa++aaaa+aaa+a++aaaaaaaa+aaaaaa", "aaaaaa++aaaaaaaa+aaa++a++aaaaaaa+aaaaaaa", "aaaaaa++aaaaaaa+aa+a++++++aaaaa+aa+aaaaa", "aaaaaa++aaa++a+++++aaaa++aa++a+++++aaaaa", "aaaaa++++aa++a+++++aaaa++aa++a+++++aaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", }; xforms-1.0.93sp1/fdesign/xpm/static.fd0000644000175000017500000000720011171560225016252 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 5 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: frame Width: 55 Height: 34 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 55 34 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME box: 3 5 50 25 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: Frame shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: clock Width: 55 Height: 38 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 55 38 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CLOCK type: ANALOG_CLOCK box: 10 2 36 35 boxtype: FL_OVAL3D_UPBOX colors: FL_INACTIVE FL_BOTTOM_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: chart Width: 55 Height: 38 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 55 38 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHART type: BAR_CHART box: 4 2 47 34 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: text Width: 54 Height: 36 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 54 36 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 7 8 40 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Text shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: box Width: 54 Height: 36 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 54 36 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 6 6 42 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fdesign/xpm/cnt.xpm0000644000175000017500000000374511171560225015774 0ustar jensjens/* XPM */ static char *cnt_pixels[] = { "64 27 7 1", "` c black", "a c None", "b c gray87", "c c #cecece", "d c blue", "e c #282828", "f c gray35", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "cccccccccacccccccccafffffffffffffffffffffffcccccccccacccccccccaa", "baaaaaaaaebaaaaaaaaeeaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaebaaaaaaaaea", "baaaaaaaaebaaaaaaaaeeaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaebaaaaaaaaea", "baaaaaaaaebaaaaaaaaeeaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaebaaaaaaaaea", "baaaaaaaaebaaaaaaaaeeaaaaaa``aaaaa``aaaaaabbaaaaaaaaebaaaaaaaaea", "baaa``aaaebaaaaa`aaeeaaaaa`aa`aaaaaa`aaaaabbaaa`aaaaebaa``aaaaea", "baa```aaaebaaaa``aaeeaaaaa`aa`aaaa``aaaaaabbaaa``aaaebaa```aaaea", "ba`d``aaaebaaa`d`aaeeaaaaa`aa`aaaaaa`aaaaabbaaa`d`aaebaa``d`aaea", "baa```aaaebaaaa``aaeeaaaaa`aa`aaaaaa`aaaaabbaaa``aaaebaa```aaaea", "baaa``aaaebaaaaa`aaeeaaaaaa``aa`aa``aaaaaabbaaa`aaaaebaa``aaaaea", "baaaaaaaaebaaaaaaaaeeaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaebaaaaaaaaea", "baaaaaaaaebaaaaaaaaeeaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaebaaaaaaaaea", "baaaaaaaaebaaaaaaaaeeaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaebaaaaaaaaea", "bffffffffebffffffffebbbbbbbbbbbbbbbbbbbbbbbbffffffffebffffffffea", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/fd_logo.xpm0000644000175000017500000000454511171560225016620 0ustar jensjens/* XPM */ static char *fd_logo_pixels[] = { /* fd logo * width height ncolors chars_per_pixel */ "64 32 4 1 ", "b c None m None", "` c #ff6144 m White", "a c #cecece m None", "c c #282828 m None", /* pixels */ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbaaaaaaaabbaaaaabbaaaaaaabbaaaabbbaaaabbbbbbbbbbbbbbb", "bbbbbbbbbbbba```````caa````cba``````cba```cbaa```cbbbbbbbbbbbbbb", "bbbbbbbbbbbbbc``cc``ca``cc``cbc``cc``cbc```ca```ccbbbbbbbbbbbbbb", "bbbbbbbbbbbbba``cac`c``ccbc``ca``ca``cba```ca```cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbba``c`ccc``cbba``ca``ca``cba```c`c``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbba````cba``cbba``ca`````ccba`c```c``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbba``c`cba``cbba``ca``c``cbba`c```c``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbba``cccba``cbaa``ca``cc``cba`cc`cc``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbbaa``cbbbbc``ca``cca``cac``ca`ca`ca``cbbbbbbbbbbbbbbb", "bbbbbbbbbbbba````cbbbbc````cca````c```````ccc````cbbbbbbbbbbbbbb", "bbbbbbbbbbbbbcccccbbbbbcccccbbcccccccccccccbbcccccbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "aaaaaabbaaaaaaaabaaaaaaaaaaabbaaaaaabaaaabaaaaaaaaaaaaaaaaaaabbb", "``````cba```````ca`````c````caa```c`ca```ca```c```````c``````cbb", "c``cc``cbc``cc``c``cc``cc``cca``cc``cbc```cc`ccc``cc``cc``cc``cb", "a``cbc``ca``cac`c``cbc`ca``ca``ccbc`cba```ca`cba``cac`ca``ca``cb", "a``cba``ca``c`ccc```cacca``ca``cbbbccba`c``c`cba``c`ccca``ca``cb", "a``cba``ca````cbbc````cba``ca``caaaaaba`c``c`cba````cbba`````ccb", "a``cba``ca``c`caaacc```ca``ca``ca````ca`cc```cba``c`caba``c``cbb", "a``caa``ca``ccc`c`cbc``ca``ca``cbc``cca`ca```cba``ccc`ca``cc``cb", "a``ca``cca``ca``c``ca``ca``cbc``ca``caa`cbc``caa``ca``ca``cac``c", "``````cca```````c`````cc````cbc````cca```cbc`ca```````c````c````", "cccccccbbccccccccccccccbcccccbbcccccbbccccbbccbccccccccccccccccc", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" }; xforms-1.0.93sp1/fdesign/xpm/left.xbm0000644000175000017500000000070111171560225016111 0ustar jensjens#define left_width 20 #define left_height 20 static char left_bits[] = { 0xfe, 0x07, 0x00, 0xfe, 0x07, 0x00, 0xfe, 0x07, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0xfe, 0xff, 0x0f, 0xfe, 0xff, 0x0f, 0xfe, 0xff, 0x0f, 0xfe, 0xff, 0x0f, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0xfe, 0xff, 0x01, 0xfe, 0xff, 0x01, 0xfe, 0xff, 0x01}; xforms-1.0.93sp1/fdesign/xpm/bottom.xbm0000644000175000017500000000070711171560225016471 0ustar jensjens#define bottom_width 20 #define bottom_height 20 static char bottom_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x3f, 0x00, 0x3f, 0x3f, 0x00, 0x3f, 0x3f, 0x0f, 0x3f, 0x3f, 0x0f, 0x3f, 0x3f, 0x0f, 0x3f, 0x3f, 0x0f, 0x3f, 0x3f, 0x0f, 0x00, 0x00, 0x00}; xforms-1.0.93sp1/fdesign/xpm/choice.xpm0000644000175000017500000000560511171560225016437 0ustar jensjens/* XPM */ static char *choice_pixels[] = { "54 48 6 1", "` c black", "a c None", "b c gray87", "c c #cecece", "d c #282828", "e c gray35", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "ccccccccccccccccccccccccccccccccccccccccccccccccccccaa", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaada", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaada", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaada", "baaaaaaaaaa`aaaaaaaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaada", "baaaaaaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaccccccccccccaaada", "baaaaaa``aa`a``aaa```aa`aa``aaa``aaaabaaaaaaaaaaadaada", "baaaaa`aa`a``aa`a`aaa`a`a`aa`a`aa`aaabaaaaaaaaaaadaada", "baaaaa`aaaa`aaa`a`aaa`a`a`aaaa````aaabaaaaaaaaaaadaada", "baaaaa`aaaa`aaa`a`aaa`a`a`aaaa`aaaaaabaaaaaaaaaaadaada", "baaaaa`aa`a`aaa`a`aaa`a`a`aa`a`aa`aaabeeeeeeeeeeedaada", "baaaaaa``aa`aaa`aa```aa`aa``aaa``aaaaaaaaaaaaaaaaaaada", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaada", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaada", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaada", "beeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeda", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/roundb.xpm0000644000175000017500000000410411171560225016467 0ustar jensjens/* XPM */ static char *roundb_pixels[] = { "65 29 4 1", "` c black", "a c None", "b c blue", "c c gray", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaa`````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaa``ccccc``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa`cc`````cc`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaa`cc`bbbbb`cc`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaa`cc`bbbbbbb`cc`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaa`c`bbbbbbbbb`c`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaa`c`bbbbbbbbbbb`c`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaa`c`bbbbbbbbbbb`c`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaa`c`bbbbbbbbbbb`c`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaa`c`bbbbbbbbbbb`c`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaa`c`bbbbbbbbbbb`c`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaa`c`bbbbbbbbb`c`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaa`cc`bbbbbbb`cc`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaa`cc`bbbbb`cc`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa`cc`````cc`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaa``ccccc``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaa`````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/crab_focus.xpm0000644000175000017500000000377311171560225017317 0ustar jensjens/* XPM */ static char * crab_focus[] = { /* crab pixmap * width height ncolors chars_per_pixel */ "28 28 6 2 ", ". c None m white s None ", "x c red m black s s_red ", "* c #ff72c2 m black s s_#ff72c2 ", "+ c SteelBlue m white s s_SteelBlue ", "G c black m black s s_black ", "a c LightGrey m white s s_LightGrey ", /* pixels */ ". . . . . . * * * * . . . . . . . . . * * * * . . . . . ", ". . . . + * x x * . . . . . . . . . . + * x x * . . . . ", ". . . + * x x * . . . . . . . . . . . . + * x x * . . . ", ". . + * x * . . . * . . . . . . . . . * . . + * x * . . ", ". . + * x * . . + * . . . . . . . . + * . . + * x * . . ", ". . + * x * . + * * . . . . . . . . + * * . + * x * . . ", ". . + * x * + * * . . . . . . . . . . + * * + * x * . . ", ". . + * x * * * . . . . . . . . . . . . + * * x x * . . ", ". . . + * x * . . + * . . . . . . + * . . + * x * . . . ", ". . . + * x . . + * . + * * . * * . + * . . + x * . . . ", ". . . . + x . . + * . + * * . * * . + * . . + x . . . . ", ". . . . + x . . . + * + * * * * * + * . . . + x . . . . ", ". . . . + * x . . + * * * * * * * * * . . + x * . . . . ", ". . . . . + * x * * * * x x x x x * * * * x * . . . . . ", ". . . . + + + * * x x x x x x x x x x x x * . . . . . . ", ". . + + * x x x x x x x x x x x x x x x x x x * x . . . ", ". + * x x a + * * x x x x x x x x x x x * * a G * x * . ", "+ * x . . . + * * x x x x x x x x x x x * * G . . . x * ", ". . . . . . + * * x x x x x x x x x x x * * . . . . . . ", ". . . . . + * * x x x x x x x x x x x x x * * . . . . . ", ". . . + * x x x * x x x x x x x x x x x * x x x * . . . ", ". . + * x a a + * * x x x x x x x x x * * a a a x * . . ", ". + * x G G G + * * x x x x x x x x x * * a G G G x * . ", ". + * G . . . + * x * x x x x x x x * x * a G . . . * . ", ". . . . . . + * x a * * * x x x * * * a x * G . . . . . ", ". . . . . + * x a G a a * * * * * a a G a x * G . . . . ", ". . . . . + x a G . G G a a a a a G G . G G x a G . . . ", ". . . . . + x a G . . . G G G G G . . . . . x a G . . . " } ; xforms-1.0.93sp1/fdesign/xpm/misc.fd0000644000175000017500000000423111171560225015717 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 2 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: form0 Width: 59 Height: 35 Number of Objects: 4 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 59 35 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: NO_BOX box: 3 2 18 10 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_TIMES_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: A shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: UP_BOX box: 2 10 55 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BOX type: NO_BOX box: 21 2 19 8 boxtype: FL_NO_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_TIMES_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: B shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: xy Width: 54 Height: 30 Number of Objects: 2 -------------------- class: FL_BOX type: BORDER_BOX box: 0 0 54 30 boxtype: FL_BORDER_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_XYPLOT type: NORMAL_XYPLOT box: 0 0 55 30 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: xtics: -1 2 ytics: -1 2 ============================== create_the_forms xforms-1.0.93sp1/fdesign/xpm/menu.xpm0000644000175000017500000000436511171560225016153 0ustar jensjens/* XPM */ static char *menu_pixels[] = { "54 38 2 1", "` c black", "a c None", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaa``aaaaa``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaa```aaa```aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaa```aaa```aa```aa`a``aa``a``aaaaaaaaaaaaaa", "aaaaaaaaaaaaa````a````a``a``a``a``a``a``aaaaaaaaaaaaaa", "aaaaaaaaaaaaa``a`a`a``a`````a``a``a``a``aaaaaaaaaaaaaa", "aaaaaaaaaaaaa``a```a``a``aaaa``a``a``a``aaaaaaaaaaaaaa", "aaaaaaaaaaaaa``aa`aa``a``a``a``a``a``a``aaaaaaaaaaaaaa", "aaaaaaaaaaaaa``aa`aa``aa```aa``a``aa``a`aaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/dial.xpm0000644000175000017500000000344411171560225016115 0ustar jensjens/* XPM */ static char *dial_pixels[] = { "46 34 4 1", "` c None", "a c #cecece", "b c #282828", "c c gray35", "``````````````````````````````````````````````", "``````````````````````````````````````````````", "````````````````````aaaaaaa```````````````````", "`````````````````aaa```````aaa````````````````", "```````````````aa`````````````aa``````````````", "``````````````a`````````````````a`````````````", "`````````````a`bb````````````````a````````````", "````````````abbbbb````````````````c```````````", "```````````a``bbbbb````````````````c``````````", "``````````a````bbbbb````````````````c`````````", "``````````a````bbbbbb```````````````c`````````", "`````````a``````bbbb`````````````````c````````", "`````````a```````bb``````````````````c````````", "`````````a```````````````````````````c````````", "````````a`````````````````````````````c```````", "````````a`````````````````````````````c```````", "````````a`````````````````````````````c```````", "````````a`````````````````````````````c```````", "````````a`````````````````````````````c```````", "````````a`````````````````````````````c```````", "````````a`````````````````````````````c```````", "`````````a```````````````````````````c````````", "`````````a```````````````````````````c````````", "`````````a```````````````````````````c````````", "``````````a`````````````````````````c`````````", "``````````a`````````````````````````c`````````", "```````````a```````````````````````c``````````", "````````````a`````````````````````c```````````", "`````````````c```````````````````c````````````", "``````````````c`````````````````c`````````````", "```````````````cc`````````````cc``````````````", "`````````````````ccc```````ccc````````````````", "````````````````````ccccccc```````````````````", "``````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/val.fd0000644000175000017500000001134211171560225015547 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 6 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: form0 Width: 61 Height: 26 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 61 26 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SLIDER type: HOR_BROWSER_SLIDER box: 2 5 57 14 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.20 =============== FORM =============== Name: valslider Width: 60 Height: 30 Number of Objects: 3 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 60 30 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 2 7 18 15 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: 0.5 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SLIDER type: HOR_SLIDER box: 20 7 39 15 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: scb Width: 60 Height: 26 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 60 26 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SCROLLBAR type: HOR_THIN_SCROLLBAR box: 1 6 57 14 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 0.57 =============== FORM =============== Name: dial Width: 46 Height: 34 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 46 34 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_DIAL type: NORMAL_DIAL box: 5 0 36 34 boxtype: FL_UP_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.4 =============== FORM =============== Name: counter Width: 64 Height: 27 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 64 27 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 0 5 63 14 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 0.3 =============== FORM =============== Name: pos Width: 56 Height: 33 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 56 33 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 4 4 48 26 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: xvalue: 0.7 yvalue: 0.6 ============================== create_the_forms xforms-1.0.93sp1/fdesign/xpm/.cvsignore0000644000175000017500000000002511171560225016446 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/fdesign/xpm/twheel.xpm0000644000175000017500000000430311171560225016467 0ustar jensjens/* XPM */ static char *twheel[] = { /* width height num_colors chars_per_pixel */ " 66 28 9 1", /* colors */ ". c #000000", "# c #bebebe", "a c #a1a1a1", "b c #cecece", "c c #282828", "d c #595959", "e c #dedede", "f c #aeaeae", "g c #959595", /* pixels */ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaa........................................................aaaaa", "aaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaa", "aaaaa.aaccc...........................................cccaaa.aaaaa", "aaaaa.aaccc...........................................cccgaa.aaaaa", "aaaaa.aacccgggggbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbgggcccgaa.aaaaa", "aaaaa.aacccgdg#gdgg#gdaa#adaffefcfffefcaaa#adag#gdg#gdcccgaa.aaaaa", "aaaaa.aacccgdg#gdgg#gdaa#adaffefcfffefcaaa#adag#gdg#gdcccgaa.aaaaa", "aaaaa.aacccgdg#gdgg#gdaa#adaffefcfffefcaaa#adag#gdg#gdcccgaa.aaaaa", "aaaaa.aacccgdg#gdgg#gdaa#adaffefcfffefcaaa#adag#gdg#gdcccgaa.aaaaa", "aaaaa.aacccgdg#gdgg#gdaa#adaffefcfffefcaaa#adag#gdg#gdcccgaa.aaaaa", "aaaaa.aacccgdg#gdgg#gdaa#adaffefcfffefcaaa#adag#gdg#gdcccgaa.aaaaa", "aaaaa.aacccgdg#gdgg#gdaa#adaffefcfffefcaaa#adag#gdg#gdcccgaa.aaaaa", "aaaaa.aacccgdg#gdgg#gdaa#adaffefcfffefcaaa#adag#gdg#gdcccgaa.aaaaa", "aaaaa.aacccgg.........................................cccgaa.aaaaa", "aaaaa.aaccc...........................................cccgaa.aaaaa", "aaaaa.aa.................................................aaa.aaaaa", "aaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaa", "aaaaa........................................................aaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/text.xpm0000644000175000017500000000420111171560225016160 0ustar jensjens/* XPM */ static char *text_pixels[] = { "54 36 2 1", "` c black", "a c None", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaa``````aaaaaaaaaaaaaa``aaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa``aaaaaaaaaaaaaaaa``aaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa``aaaa```aa``aa``a```aaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa``aaa``a``aa````aa``aaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa``aaa`````aaa``aaa``aaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa``aaa``aaaaa````aa``aaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa``aaa``a``a``aa``a``aaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa``aaaa```aa``aa``aa``aaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/xconq1.xpm0000644000175000017500000000253611171560225016416 0ustar jensjens/* XPM */ static char * xconq1 [] = { "32 32 5 1", " s None c None g4 None", ". m black c black g4 black", "X m white c Blue g4 grey80", "o m white c LightGray g4 grey50", "O m white c OliveDrab g4 grey40", " ", " . ", " ..X.. ", " ..XXXXX.. ", " ..XXXXXXXXX.. ", " ..XXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXXXXXX.. ", " ..XXXXXXXXXXXXXXXXX.XXXXXXX.. ", " .XXXXXXXXXXXXXXXXXXX.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXXXXXXX.X.XXXXXXXX. ", " .XXXXXXXXXXXX..........XXXXXX. ", " .XXXXXXXXXX...oooooooo.XXXXXX. ", " .X..........ooooooooo..XXXXXX. ", " .XXXXXXXXXX.................X. ", " .XXXXXXX...............oooo.X. ", " .XXXXXX..oooooooooooooooooo.X. ", " .XXXXXX....................XX. ", " .XXXXXXX..o.o.o.o.o.o.oo..XXX. ", " .XXXXXXXX................XXXX. ", " .............................. ", " .OOOOOOOOOOOOOOOOOOOOOOOOOOOO. ", " ..OO.O.O.O.O.O.O.O.O.O.O.O.OO. ", " ..O.O.O.O.O.O.O.O.O.O.O.O.. ", " ..OO.O.O.O.O.O.O.O.OO.. ", " ..O.O.O.O.O.O.O.O.. ", " ..OO.O.O.O.OO.. ", " ..O.O.O.O.. ", " ..OOO.. ", " ... "}; xforms-1.0.93sp1/fdesign/xpm/right.xbm0000644000175000017500000000070411171560225016277 0ustar jensjens#define right_width 20 #define right_height 20 static char right_bits[] = { 0x00, 0xff, 0x0f, 0x00, 0xff, 0x0f, 0x00, 0xff, 0x0f, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0xf8, 0xff, 0x0f, 0xf8, 0xff, 0x0f, 0xf8, 0xff, 0x0f}; xforms-1.0.93sp1/fdesign/xpm/choice.fd0000644000175000017500000000706711171560225016230 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 3 Unit of measure: FL_COORD_PIXEL Border Width: -1 =============== FORM =============== Name: form0 Width: 54 Height: 54 Number of Objects: 6 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 54 54 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BEGIN_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: grp callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 2 2 40 40 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: brower1\nbrowser2\nbrowser3\nbrowser4 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_SCROLLBAR type: VERT_THIN_SCROLLBAR box: 42 2 10 40 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 1.00 -------------------- class: FL_SCROLLBAR type: HOR_THIN_SCROLLBAR box: 2 42 40 10 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: slsize: 1.00 -------------------- class: FL_END_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: choice Width: 54 Height: 48 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 54 48 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 0 10 53 16 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: content: choice value: 1 =============== FORM =============== Name: menu Width: 54 Height: 38 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 54 38 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_MENU type: PULLDOWN_MENU box: 4 2 46 18 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fdesign/xpm/lightb.xpm0000644000175000017500000000415111171560225016451 0ustar jensjens/* XPM */ static char *lightb_pixels[] = { "65 29 6 1 ", "` c None ", "a c gray87 ", "b c #cecece", "c c blue ", "d c #282828", "e c gray35", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````", "````bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb`````````", "````abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbd````````", "````aa`````````````````````````````````````````````````dd````````", "````aa`````````````````````````````````````````````````dd````````", "````aa`````````````````````````````````````````````````dd````````", "````aa```eeeeeeee``````````````````````````````````````dd````````", "````aa```deeeeeea``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddccccaa``````````````````````````````````````dd````````", "````aa```ddaaaaaa``````````````````````````````````````dd````````", "````aa```aaaaaaaa``````````````````````````````````````dd````````", "````aa`````````````````````````````````````````````````dd````````", "````aa`````````````````````````````````````````````````dd````````", "````aa`````````````````````````````````````````````````dd````````", "````aaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedd````````", "````aeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed````````", "`````````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/bm1.xbm0000644000175000017500000000042011171560225015634 0ustar jensjens#define bm1_width 16 #define bm1_height 16 static char bm1_bits[] = { 0xff, 0xff, 0xff, 0xa8, 0x83, 0x8d, 0x3b, 0xad, 0x3b, 0xff, 0xbb, 0xfe, 0xbb, 0xe0, 0x03, 0xc0, 0x3f, 0x80, 0x3f, 0x80, 0x3f, 0x80, 0x3f, 0x80, 0x0f, 0x80, 0x73, 0xc0, 0xff, 0xe0, 0xff, 0xff}; xforms-1.0.93sp1/fdesign/xpm/top.xbm0000644000175000017500000000067611171560225015774 0ustar jensjens#define top_width 20 #define top_height 20 static char top_bits[] = { 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x0f, 0x3f, 0x3f, 0x0f, 0x3f, 0x3f, 0x0f, 0x3f, 0x3f, 0x0f, 0x3f, 0x3f, 0x00, 0x3f, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xforms-1.0.93sp1/fdesign/xpm/check.xpm0000644000175000017500000000354211171560225016260 0ustar jensjens/* XPM */ static char *check_pixels[] = { "51 31 5 1 ", "` c None m None ", "a c gray87 m black ", "b c #cecece m black ", "c c #282828 m black ", "d c gray35 m black ", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````ab``````````````````````````````````", "``````````````aabb`````````````````````````````````", "`````````````aa``bb````````````````````````````````", "````````````aa````bb```````````````````````````````", "```````````aa``````bb``````````````````````````````", "``````````aa````````bb`````````````````````````````", "`````````dd``````````cc````````````````````````````", "``````````dd````````cc`````````````````````````````", "```````````dd``````cc``````````````````````````````", "````````````dd````cc```````````````````````````````", "`````````````dd``cc````````````````````````````````", "``````````````ddcc`````````````````````````````````", "```````````````dc``````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````", "```````````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/Makefile.in0000644000175000017500000002510211377311602016517 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = fdesign/xpm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = allbutton.fd \ bm1.xbm \ bottom.xbm \ box.xpm \ br.xpm \ butt.xpm \ chart.xpm \ check.xpm \ choice.fd \ choice.xpm \ clock.xpm \ cnt.xpm \ crab_focus.xpm \ crab.xpm \ dial.xpm \ fd_logo.xpm \ frame.xpm \ glcan.xpm \ hcenter.xbm \ left.xbm \ lightb.xpm \ menu.xpm \ misc.fd \ nomail.xbm \ picture1.xbm \ picture.xbm \ porsche.xpm \ pos.xpm \ r3dbut.xpm \ right.xbm \ roundb.xpm \ scb.xpm \ sld.xpm \ static.fd \ tab.xpm \ text.xpm \ timer.xpm \ top.xbm \ twheel.xpm \ val.fd \ vals.xpm \ vcenter.xbm \ xconq1.xpm \ xconq.xpm \ xyplot.xpm all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fdesign/xpm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fdesign/xpm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/fdesign/xpm/allbutton.fd0000644000175000017500000000572511171560225017001 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 4 Unit of measure: FL_COORD_PIXEL Border Width: -2 =============== FORM =============== Name: form0 Width: 65 Height: 29 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 65 29 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_LIGHTBUTTON type: PUSH_BUTTON box: 4 3 53 24 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: =============== FORM =============== Name: roundb Width: 65 Height: 29 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 65 29 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUNDBUTTON type: PUSH_BUTTON box: 7 0 50 29 boxtype: FL_NO_BOX colors: FL_MCOL FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 =============== FORM =============== Name: r3db Width: 65 Height: 29 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 65 29 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_ROUND3DBUTTON type: PUSH_BUTTON box: 10 0 50 29 boxtype: FL_NO_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 =============== FORM =============== Name: butt Width: 65 Height: 29 Number of Objects: 2 -------------------- class: FL_BOX type: FLAT_BOX box: 0 0 65 29 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 6 2 52 23 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ============================== create_the_forms xforms-1.0.93sp1/fdesign/xpm/xyplot.xpm0000644000175000017500000000343211171560225016540 0ustar jensjens/* XPM */ static char *xyplot_pixels[] = { "55 29 3 1", "` c black", "a c None", "b c blue", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aa```````````````````````````````````````````````````aa", "aa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`aa", "aa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`aa", "aa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`aa", "aa`aaaabaaaaaaabaaaaaaaaaaaaaaabaaaaaaabaaaaaaaaaaaa`aa", "aa`aaaabbaaaaabbaaaaaaaaaaaaaaabbaaaaabbaaaaaaaaaaaa`aa", "aa`aaaabbaaaaababaaaaaaaaaaaaaabbaaaaababaaaaaaaaaaa`aa", "aa`aaabaabaaabaabaaaaaaaaaaaaabaabaaabaabaaaaaaaaaaa`aa", "aa`aaabaabaaabaabaaaaaaaaaaaaabaabaaabaabaaaaaaaaaaa`aa", "aa`aaaaaabaaabaabaaaaaaaaaaaaabaabaaabaabaaaaaaaaaaa`aa", "aa`aaaaaabaaabaabaaaaaaaaaaaaabaabaaabaabaaaaaaaaaaa`aa", "aa`aaaaaabaaabaaabaaaaaaaaaaabaaabaaabaabaaaaaaaaaaa`aa", "aa`aaaaaaabaabaaabaaaaaaaaaaabaaaabaabaabaaaaaaaaaaa`aa", "aa`aaaaaaababaaaabaaaaaaaaaaabaaaababaaaabaaaaaaaaaa`aa", "aa`aaaaaaababaaaabaaaaaaaaaaabaaaababaaaabaaaaaaaaaa`aa", "aa`aaaaaaababaaaaabaaaaaaaaabaaaaababaaaabaaaaaaaaaa`aa", "aa`aaaaaaababaaaaabaaaaaaaaabaaaaababaaaabaaaaaaaaaa`aa", "aa`aaaaaaabbbaaaaabaaaaaaaaabaaaaabbbaaaabaaaaaaaaaa`aa", "aa`aaaaaaaaaaaaaaabaaaaaaaaabaaaaaaaaaaaabaaaaaaaaaa`aa", "aa`aaaaaaaaaaaaaaabaaaaaaaaabaaaaaaaaaaaaabaaaaaaaaa`aa", "aa`aaaaaaaaaaaaaaaababaaabaabaaaaaaaaaaaaababaaaabaa`aa", "aa`aaaaaaaaaaaaaaaabbabaabbbaaaaaaaaaaaaaababbaabaaa`aa", "aa`aaaaaaaaaaaaaaaabbabbbabbaaaaaaaaaaaaaaabaabbaaaa`aa", "aa`aaaaaaaaaaaaaaaabaaaaaaabaaaaaaaaaaaaaaabaaaaaaaa`aa", "aa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`aa", "aa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`aa", "aa```````````````````````````````````````````````````aa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/sld.xpm0000644000175000017500000000345311171560225015766 0ustar jensjens/* XPM */ static char *sld_pixels[] = { "61 26 5 1", "` c None", "a c gray87", "b c #cecece", "c c #282828", "d c gray35", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "``ddddddddddddddddddddddddddddddddddddddddddddddddddddddddd``", "``c`````````````````bbbbbbbbbbbbbbbbbbb```````````````````a``", "``c`````````````````a``````````````````c``````````````````a``", "``c`````````````````a```ac``ac``ac`````c``````````````````a``", "``c`````````````````a```ac``ac``ac`````c``````````````````a``", "``c`````````````````a```ac``ac``ac`````c``````````````````a``", "``c`````````````````a```ac``ac``ac`````c``````````````````a``", "``c`````````````````a```ac``ac``ac`````c``````````````````a``", "``c`````````````````a```ac``ac``ac`````c``````````````````a``", "``c`````````````````a```ac``ac``ac`````c``````````````````a``", "``c`````````````````a```ac``ac``ac`````c``````````````````a``", "``c`````````````````a``````````````````c``````````````````a``", "``c`````````````````addddddddddddddddddc``````````````````a``", "``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa``", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````", "`````````````````````````````````````````````````````````````" }; xforms-1.0.93sp1/fdesign/xpm/br.xpm0000644000175000017500000000633511171560225015611 0ustar jensjens/* XPM */ static char *br_pixels[] = { "54 54 6 1", "` c black", "a c None", "b c gray87", "c c #cecece", "d c #282828", "e c gray35", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdaaaaaaaabaa", "aadaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaa`aaaabdaaaaeaaabaa", "aadaaaaa```aa`a`a``aa`a`a`aa`aa`a`a``aaaabdaaabeaaabaa", "aadaaaaa`aa`a``a`aa`a`a`a`a`a`a``aaa`aaaabdaaabaeaabaa", "aadaaaaa`aa`a`aa`aa`a`a`a`a```a`aaaa`aaaabdaabaaeaabaa", "aadaaaaa`aa`a`aa`aa`aa`a`aa`aaa`aaaa`aaaabdaabaaaeabaa", "aadaaaaa```aa`aaa``aaa`a`aaa``a`aaaa`aaaabdaeeeeeaabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdaaaaaaaabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdacccccaabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdabaaaadabaa", "aadaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdabaaaadabaa", "aadaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa``bdabaaaadabaa", "aadaaaaa```aa`a`a``aa`a`a`aa``aa`aa`a``aabdabaaaadabaa", "aadaaaaa`aa`a``a`aa`a`a`a`a`aaa`a`a``aaaabdabaaaadabaa", "aadaaaaa`aa`a`aa`aa`a`a`a`aa``a```a`aaaa`bdababbadabaa", "aadaaaaa`aa`a`aa`aa`aa`a`aaaa`a`aaa`aaa`abdabaddadabaa", "aadaaaaa```aa`aaa``aaa`a`aa``aaa``a`aa```bdabaaaadabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdabaaaadabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdababbadabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdabaddadabaa", "aadaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdabaaaadabaa", "aadaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa``bdabaaaadabaa", "aadaaaaa```aa`a`a``aa`a`a`aa``aa`aa`a`aaabdababbadabaa", "aadaaaaa`aa`a``a`aa`a`a`a`a`aaa`a`a``aa``bdabaddadabaa", "aadaaaaa`aa`a`aa`aa`a`a`a`aa``a```a`aaaaabdabaaaadabaa", "aadaaaaa`aa`a`aa`aa`aa`a`aaaa`a`aaa`aaaaabdabaaaadabaa", "aadaaaaa```aa`aaa``aaa`a`aa``aaa``a`aaa``bdabaaaadabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdabaaaadabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdabaaaadabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdabeeeedabaa", "aadaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdaaaaaaaabaa", "aadaaaaa`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`bdacccccaabaa", "aadaaaaa```aa`a`a``aa`a`a`aa``aa`aa`a`aa`bdaabaaadabaa", "aadaaaaa`aa`a``a`aa`a`a`a`a`aaa`a`a``aa``bdaabaadaabaa", "aadaaaaa`aa`a`aa`aa`a`a`a`aa``a```a`aa```bdaaabadaabaa", "aadaaaaa`aa`a`aa`aa`aa`a`aaaa`a`aaa`aaaa`bdaaabdaaabaa", "aadaaaaa```aa`aaa``aaa`a`aa``aaa``a`aaaa`bdaaaadaaabaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdaaaaaaaabaa", "aabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaa", "aaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaaaaaaaaaaaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaa", "aadaaaaaadacccccccccccccccccccccaabaaaaaabaaaaaaaaaaaa", "aadaaaaccdabaaaaaaaaaaaaaaaaaaaadabddaaaabaaaaaaaaaaaa", "aadaaccaadabaaaabdaabdaabdaaaaaadabaaddaabaaaaaaaaaaaa", "aadaeeaaadabaaaabdaabdaabdaaaaaadabaaaeaabaaaaaaaaaaaa", "aadaaaeeadabaaaaaaaaaaaaaaaaaaaadabaeeaaabaaaaaaaaaaaa", "aadaaaaaeaabeeeeeeeeeeeeeeeeeeeedaeeaaaaabaaaaaaaaaaaa", "aadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaa", "aabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/xpm/tab.xpm0000644000175000017500000000450511171560225015751 0ustar jensjens/* XPM */ static char *tabfolder_pixels[] = { "59 35 6 1", "` c black", "a c None", "b c gray87", "c c #cecece", "d c #282828", "e c gray35", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaccccccccccccccaeaacccccccccccccccaeaaaaaaaaaaaaaaaaaaaa", "aaabaaaaaaaaaaaaaaaaebaaaaaa```aaaaaaaaeaaaaaaaaaaaaaaaaaaa", "aaabaaaaaaa`aaaaaaaaebaaaaaaa`a`aaaaaaaeaaaaaaaaaaaaaaaaaaa", "aaabaaaaaa`a`aaaaaaaebaaaaaaa``aaaaaaaaeaaaaaaaaaaaaaaaaaaa", "aaabaaaaaa```aaaaaaaebaaaaaaa`a`aaaaaaaeaaaaaaaaaaaaaaaaaaa", "aaabaaaaaa`a`aaaaaaaebaaaaaa```aaaaaaaaeaaaaaaaaaaaaaaaaaaa", "aaabaaaaa``a``aaaaaaebaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaa", "aaabaaaaaaaaaaaaaaaaebaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaa", "aacccccccccccccccccccbaaaaaaaaaaaaaaaaaeccccccccccccccccaaa", "aabaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaa", "aabeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }; xforms-1.0.93sp1/fdesign/fd_select.c0000644000175000017500000010574311375043430015753 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_select.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Part of the Form Designer. * * This file contains all routines and data types to maintain the current * selection and manipulate (move, scale) and draw it. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include #define MAXSEL 512 #define BackOBJ( ) cur_form->first->next static FL_OBJECT *selobj[ MAXSEL ]; /* The selected objects */ static int selnumb = 0; /* Their number */ int backf = FL_FALSE; /* Whether the selection is the backface */ static FL_OBJECT *tmpobj[ MAXSEL ]; /* A temporary list of objects */ static int tmpnumb = 0; /* Their number */ /*************************************** * Returns the index of a particular object. -1 if it is not selected ***************************************/ static int find_selobject( FL_OBJECT * obj ) { int i; for ( i = 0; i < selnumb; i++ ) if ( selobj[ i ] == obj ) return i; return -1; } /*************************************** * Cleans up the selection, ordering the objects and creating * groups if all elements are in there ***************************************/ static void cleanup_selection( void ) { FL_OBJECT *obj, *begobj = NULL; int i, tt, sel = -1; if ( cur_form == NULL ) { selnumb = 0; backf = FL_FALSE; return; } /* Figure out whether whole groups are selected */ obj = cur_form->first; while ( obj != NULL ) { if ( obj->objclass == FL_BEGIN_GROUP ) { sel = 1; begobj = obj; } else if ( obj->objclass == FL_END_GROUP ) { if ( sel ) { selobj[ selnumb++ ] = begobj; selobj[ selnumb++ ] = obj; } else { if ( ( tt = find_selobject( begobj ) ) != -1 ) selobj[ tt ] = NULL; if ( ( tt = find_selobject( obj ) ) != -1 ) selobj[ tt ] = NULL; } } else { if ( find_selobject( obj ) == -1 ) sel = 0; } obj = obj->next; } /* Make a new, ordered list of selected items, removing duplicates and NULL objects */ tmpnumb = 0; for ( obj = cur_form->first; obj != NULL; obj = obj->next ) if ( find_selobject( obj ) != -1 ) tmpobj[ tmpnumb++ ] = obj; for ( i = 0; i < tmpnumb; i++ ) selobj[ i ] = tmpobj[ i ]; selnumb = tmpnumb; fillin_groups( ); } /*************************************** * Returns whether object is selected ***************************************/ int is_selected( FL_OBJECT * obj ) { return find_selobject( obj ) != -1; } /*************************************** * Adds an object to the current selection ***************************************/ void addto_selection( FL_OBJECT * obj ) { if ( backf ) { M_warn( "", "ignoring object with backface" ); return; /* Don't add objects with backface */ } if ( selnumb == MAXSEL ) { fprintf( stderr, "Exceeding selection limits\n" ); return; } /* find the real parent */ while ( obj->parent ) obj = obj->parent; selobj[ selnumb++ ] = obj; cleanup_selection( ); } /*************************************** * Adds a group to the current selection ***************************************/ void addgroupto_selection( FL_OBJECT * obj ) { FL_OBJECT *ob; if ( backf ) return; /* Don't add objects with backface */ if ( obj->objclass != FL_BEGIN_GROUP ) return; for ( ob = obj; ob && ob->objclass != FL_END_GROUP; ob = ob->next ) { if ( selnumb == MAXSEL ) return; selobj[ selnumb++ ] = ob; } if ( ob != NULL ) selobj[ selnumb++ ] = ob; cleanup_selection( ); } /*************************************** * Removes an object from the selection (if present) ***************************************/ void deletefrom_selection( FL_OBJECT * obj ) { int ind = find_selobject( obj ); if ( ind != -1 ) selobj[ ind ] = NULL; cleanup_selection( ); } /*************************************** * Removes a group to the current selection ***************************************/ void deletegroupfrom_selection( FL_OBJECT * obj ) { FL_OBJECT *ob; int ind; if ( backf ) return; /* Don't remove objects with backface */ if ( obj->objclass != FL_BEGIN_GROUP ) return; for ( ob = obj; ob != NULL && ob->objclass != FL_END_GROUP; ob = ob->next ) if ( ( ind = find_selobject( ob ) ) != -1 ) selobj[ ind ] = NULL; cleanup_selection( ); } /*************************************** * Clears the complete selection ***************************************/ void clear_selection( void ) { selnumb = 0; backf = FL_FALSE; cleanup_selection( ); } /**** Helper procedures ****/ /*************************************** * Compute the bounding box of the selection ***************************************/ static void compute_selbox( float * x, float * y, float * w, float * h ) { int i; float x1 = 1.0e+37, y1 = 1.0e+37, x2 = - 1.0e+37, y2 = - 1.0e+37; for ( i = 0; i < selnumb; i++ ) if ( selobj[ i ]->objclass != FL_BEGIN_GROUP && selobj[ i ]->objclass != FL_END_GROUP ) { if ( selobj[ i ]->fl1 < x1 ) x1 = selobj[ i ]->fl1; if ( selobj[ i ]->ft1 < y1 ) y1 = selobj[ i ]->ft1; if ( selobj[ i ]->fl2 > x2 ) x2 = selobj[ i ]->fl2; if ( selobj[ i ]->ft2 > y2 ) y2 = selobj[ i ]->ft2; } *x = x1; *y = y1; *w = x2 - x1; *h = y2 - y1; } /*************************************** * Find position of the mouse mouse ***************************************/ static void find_mousepos( float * mx, float * my ) { if ( cur_form == NULL ) return; fl_winset( main_window ); get_mouse_pos( mx, my ); } /*************************************** * Returns the object under the mouse. ***************************************/ static FL_OBJECT * find_mouseobj( void ) { float xx, yy; if ( cur_form == NULL ) return NULL; find_mousepos( &xx, &yy ); return fli_find_last( cur_form, FLI_FIND_MOUSE, xx, yy ); } /**** Drawing routines ****/ #define HS 8 int hidden = FL_FALSE; /*************************************** * Draw the selection box ***************************************/ void draw_selbox( void ) { float x, y, w, h; int i; FL_OBJECT *ob; if ( selnumb == 0 ) return; /* Draw object boxes */ color( fd_red ); for ( i = 0; i < selnumb; i++ ) { ob = selobj[ i ]; if ( ob->objclass != FL_BEGIN_GROUP && ob->objclass != FL_END_GROUP ) rect( ob->x, ob->y, ob->x + ob->w - 1.0, ob->y + ob->h - 1.0 ); } if ( hidden ) return; /* Draw the total box */ compute_selbox( &x, &y, &w, &h ); show_geometry( x, y, w, h ); if ( ! backf ) { x -= 1.0; y -= 1.0; w += 2.0; h += 2.0; } color( fd_red ); rect( x, y, x + w - 1.0, y + h - 1.0 ); rectf( x, y, x + HS - 1.0, y + HS - 1.0 ); rectf( x + w - HS, y, x + w - 1.0, y + HS - 1.0 ); rectf( x + w - HS, y + h - HS, x + w - 1.0, y + h - 1.0 ); rectf( x, y + h - HS, x + HS - 1.0, y + h - 1.0 ); show_selmessage( selobj, selnumb ); } /**** Interaction handling ****/ /*************************************** * Handles the moving of the selection (by mouse) ***************************************/ int within_selection( float mx, float my ) { float x, y, w = 0.0, h = 0.0; if ( ! selnumb || ! cur_form || ! cur_form->first ) return 0; compute_selbox( &x, &y, &w, &h ); /* If backface, only within scale knob is considered within */ if ( selobj[ selnumb - 1 ] == BackOBJ( ) ) return mx >= x + w - HS && mx < x + w && my >= y + h - HS && my < y + h; return mx > x && mx < x + w && my > y && my < y + h; } /*************************************** ***************************************/ void handle_move( const XEvent * xev ) { float x, y, w, h; float mx, my; float ox, oy, ow, oh; FL_Coord xx, yy; int i, s; if ( cur_form == NULL ) return; fl_winset( main_window ); s = ShiftIsDown( xev->xbutton.state ); find_mousepos( &mx, &my ); compute_selbox( &x, &y, &w, &h ); if ( mx < x || mx > x + w || my < y || my > y + h ) return; /* not in box */ hidden = FL_TRUE; redraw_the_form( 0 ); if ( backf ) { if ( mx >= x + w - HS && my >= y + h - HS ) { fl_get_winsize( main_window, &xx, &yy ); set_bounding_box( 0.0, 0.0, xx, yy ); scale_box( &x, &y, &w, &h ); cur_form->w_hr = cur_form->w = w; cur_form->h_hr = cur_form->h = h; selobj[ 0 ]->fl1 = selobj[ 0 ]->w = w; selobj[ 0 ]->fl2 = selobj[ 0 ]->fl1 + w; selobj[ 0 ]->fr1 = cur_form->w_hr - selobj[ 0 ]->fl1; selobj[ 0 ]->fr2 = cur_form->w_hr - selobj[ 0 ]->fl2; selobj[ 0 ]->ft1 = selobj[ 0 ]->h = h; selobj[ 0 ]->ft2 = selobj[ 0 ]->ft1 + h; selobj[ 0 ]->fb1 = cur_form->h_hr - selobj[ 0 ]->ft1; selobj[ 0 ]->fb2 = cur_form->h_hr - selobj[ 0 ]->ft2; set_bounding_box( 0.0, 0.0, cur_form->w, cur_form->h ); fl_winresize( main_window, cur_form->w, cur_form->h ); fl_notify_object( selobj[ 0 ], FL_RESIZED ); } } else if ( s ) { copy_selection( ); paste_selection( ); } else { ox = x; oy = y; ow = w; oh = h; /* Show the rubberband box */ if ( mx <= x + HS && my <= y + HS ) { x += w; y += h; w = -w; h = -h; scale_box( &x, &y, &w, &h ); } else if ( mx <= x + HS && my >= y + h - HS ) { x += w; w = -w; scale_box( &x, &y, &w, &h ); } else if ( mx >= x + w - HS && my <= y + HS ) { y += h; h = -h; scale_box( &x, &y, &w, &h ); } else if ( mx >= x + w - HS && my >= y + h - HS ) scale_box( &x, &y, &w, &h ); else move_box( &x, &y, &w, &h, FL_TRUE ); /* Recompute object sizes */ for ( i = 0; i < selnumb; i++ ) { if ( selobj[ i ]->objclass != FL_BEGIN_GROUP && selobj[ i ]->objclass != FL_END_GROUP ) { selobj[ i ]->fl1 -= ox; selobj[ i ]->fl2 -= ox; selobj[ i ]->fr1 += ox; selobj[ i ]->fr2 += ox; selobj[ i ]->ft1 -= oy; selobj[ i ]->ft2 -= oy; selobj[ i ]->fb1 += oy; selobj[ i ]->fb2 += oy; fl_scale_object( selobj[ i ], w / ow, h / oh); selobj[ i ]->x = selobj[ i ]->fl1 += x; selobj[ i ]->fl2 += x; selobj[ i ]->fr1 -= x; selobj[ i ]->fr2 -= x; selobj[ i ]->y = selobj[ i ]->ft1 += y; selobj[ i ]->ft2 += y; selobj[ i ]->fb1 -= y; selobj[ i ]->fb2 -= y; fl_notify_object( selobj[ i ], FL_RESIZED ); } } } hidden = FL_FALSE; redraw_the_form( backf ); changed = FL_TRUE; } /*************************************** * We know how many pixles to move ***************************************/ void move_selection( FL_Coord dx, FL_Coord dy ) { int i; float x, y, w, h; float ox, oy; FL_OBJECT *ob; if ( ! cur_form || backf || selnumb == 0 ) return; compute_selbox( &x, &y, &w, &h ); ox = x; oy = y; if ( ( x += dx ) < 0 ) x = 0.0; else if ( x + w > winw ) x = winw - w; if ( ( y += dy ) < 0 ) y = 0.0; else if ( y + h > winh ) y = winh - h; if ( ( dx = x - ox ) == 0 && ( dy = y - oy ) == 0 ) return; for ( i = 0; i < selnumb; i++ ) { ob = selobj[ i ]; if ( ob->objclass != FL_BEGIN_GROUP && ob->objclass != FL_END_GROUP ) { ob->x += dx; ob->fl1 += dx; ob->fl2 += dx; ob->fr1 -= dx; ob->fr2 -= dx; ob->y += dy; ob->ft1 += dy; ob->ft2 += dy; ob->fb1 -= dy; ob->fb2 -= dy; fl_notify_object( ob, FL_RESIZED ); } } redraw_the_form( 1 ); changed = FL_TRUE; } /*************************************** * Change the selection size ***************************************/ #define MINSIZE 5 #define DELTA 0.2 void resize_selection( FL_Coord dx, FL_Coord dy ) { float x, y, w, h, ox, oy, ow, oh; float yscale, xscale; int i; if ( ! cur_form || selnumb == 0 ) return; compute_selbox(&x, &y, &w, &h); ox = x; oy = y; ow = w; oh = h; if ( backf ) { winw = fl_scrw; winh = fl_scrh; } if ( ( w += dx ) > winw) w = winw; else if ( w < MINSIZE ) w = MINSIZE; if ( ( h += dy ) > winh ) h = winh; else if ( h < MINSIZE ) h = MINSIZE; if ( w == ow && oh == h ) return; xscale = ( float ) w / ow; yscale = ( float ) h / oh; /* Recompute object sizes */ for ( i = 0; i < selnumb; i++ ) if ( selobj[ i ]->objclass != FL_BEGIN_GROUP && selobj[ i ]->objclass != FL_END_GROUP ) { selobj[ i ]->fl1 -= ox; selobj[ i ]->fl2 -= ox; selobj[ i ]->fr1 += ox; selobj[ i ]->fr2 += ox; selobj[ i ]->ft1 -= oy; selobj[ i ]->ft2 -= oy; selobj[ i ]->fb1 += oy; selobj[ i ]->fb2 += oy; fl_scale_object( selobj[ i ], xscale, yscale ); selobj[ i ]->x = selobj[ i ]->fl1 += x; selobj[ i ]->fl2 += x; selobj[ i ]->fr1 -= x; selobj[ i ]->fr2 -= x; selobj[ i ]->y = selobj[ i ]->ft1 += y; selobj[ i ]->ft2 += y; selobj[ i ]->fb1 -= y; selobj[ i ]->fb2 -= y; fl_notify_object( selobj[ i ], FL_RESIZED ); } if ( backf ) { cur_form->w_hr = cur_form->w = selobj[ 0 ]->w; cur_form->h_hr = cur_form->h = selobj[ 0 ]->h; fl_winresize( main_window, cur_form->w, cur_form->h ); } redraw_the_form( 1 ); changed = FL_TRUE; } /*************************************** * Handles the selection of objects ***************************************/ void handle_select( const XEvent * xev ) { int s; FL_OBJECT *obj, *mouseobj; float x, y, w, h; float stepsize; if ( cur_form == NULL || ! ( mouseobj = find_mouseobj( ) ) ) return; if ( ( s = ShiftIsDown( xev->xbutton.state ) ) ) /* Shift Push */ { if ( ! cur_form->first ) fprintf( stderr, "something is wrong\n" ); if ( mouseobj == BackOBJ( ) ) return; if ( find_selobject( mouseobj ) == -1 ) addto_selection( mouseobj ); else deletefrom_selection( mouseobj ); return; } clear_selection( ); find_mousepos( &x, &y ); w = 0.0; h = 0.0; stepsize = get_step_size( ); set_step_size( 0.0 ); if ( xev->type != ButtonRelease ) scale_box( &x, &y, &w, &h ); set_step_size( stepsize ); obj = BackOBJ( )->next; while ( obj != NULL ) { if ( obj->objclass != FL_BEGIN_GROUP && obj->objclass != FL_END_GROUP && obj->x >= x && obj->y >= y && obj->x + obj->w <= x + w && obj->y + obj->h <= y + h ) addto_selection( obj ); obj = obj->next; } if ( selnumb == 0 ) { if ( mouseobj == NULL ) return; else if ( mouseobj == BackOBJ( ) ) { addto_selection( mouseobj ); backf = FL_TRUE; } else addto_selection( mouseobj ); } } /*************************************** * Selects all objects in the form. ***************************************/ void select_all( void ) { FL_OBJECT *obj; if ( ! cur_form ) return; clear_selection( ); for ( obj = BackOBJ( )->next; obj != NULL; obj = obj->next ) if ( ! obj->parent ) selobj[ selnumb++ ] = obj; cleanup_selection( ); } /**** Operations on the selection ****/ /*************************************** * Clone curobj's attributes to the currently selected objects ***************************************/ void change_selected_objects( FL_OBJECT * curobj ) { int i; FL_OBJECT *ob; for ( i = 0; i < selnumb; i++ ) { ob = selobj[ i ]; if ( ob->objclass != FL_BEGIN_GROUP && ob->objclass != FL_END_GROUP ) { change_type( ob, curobj->type ); set_attribs( ob, curobj->boxtype, curobj->col1, curobj->col2, curobj->lcol, curobj->align, curobj->lsize, curobj->lstyle, ob->label ); set_miscattribs( ob, curobj->nwgravity, curobj->segravity, curobj->resize ); fli_handle_object( ob, FL_ATTRIB, 0, 0, 0, NULL, 0 ); } } } /*************************************** * Interactively change the attributes of the selection ***************************************/ void change_selection( void ) { FL_OBJECT *firstobj = NULL; int objclass = -1, i; FL_OBJECT *ob; if ( ! cur_form ) return; if ( selnumb == 0 ) { fl_show_alert( "", "Please select an object first", "by clicking the right button on the object", 0 ); return; } if ( selnumb == 1 ) change_object( selobj[ 0 ], FL_TRUE ); else { for ( i = 0; i < selnumb; i++ ) { ob = selobj[ i ]; if ( ob->objclass != FL_BEGIN_GROUP && ob->objclass != FL_END_GROUP ) { if ( firstobj == NULL ) { firstobj = ob; objclass = ob->objclass; } else if ( objclass != ob->objclass ) { fl_show_messages( "Selected objects have different " "classes" ); return; } } } if ( firstobj == NULL ) return; if ( ! change_object( firstobj, FL_FALSE ) ) return; change_selected_objects( firstobj ); } changed = 1; } /*************************************** * Aligns the objects in the selection ***************************************/ void align_selection( int dir ) { float x, y, w, h, gap, shift; int used[ MAXSEL ], current; int i, j; if ( backf || ! cur_form ) return; /* Cannot align the backface */ if ( selnumb <= 1 ) return; /* Nothing to align */ compute_selbox( &x, &y, &w, &h ); if ( dir == FD_HEQUAL ) /* Horizontal equal distance */ { gap = 0.0; for ( i = 0; i < selnumb; i++ ) gap += selobj[ i ]->w; gap = ( w - gap ) / ( selnumb - 1 ); for ( i = 0; i < selnumb; i++ ) used[ i ] = 0; for ( j = 0; j < selnumb; j++ ) { current = -1; for ( i = 0; i < selnumb; i++ ) if ( ! used[ i ] ) if ( current == -1 || selobj[ i ]->x < selobj[ current ]->x ) current = i; used[ current ] = 1; shift = x - selobj[ current ]->x; selobj[ current ]->x += shift; selobj[ current ]->fl1 += shift; selobj[ current ]->fl2 += shift; selobj[ current ]->fr1 -= shift; selobj[ current ]->fr2 -= shift; x += selobj[ current ]->w + gap; } } else if ( dir == FD_VEQUAL ) /* Vertical equal distance */ { gap = 0.0; for ( i = 0; i < selnumb; i++ ) gap += selobj[ i ]->h; gap = ( h - gap ) / ( selnumb - 1 ); for ( i = 0; i < selnumb; i++ ) used[ i ] = 0; for ( j = 0; j < selnumb; j++ ) { current = -1; for ( i = 0; i < selnumb; i++ ) if ( ! used[ i ] ) if ( current == -1 || selobj[ i ]->y < selobj[ current ]->y ) current = i; used[ current ] = 1; shift = y - selobj[ current ]->y; selobj[ current ]->y += shift; selobj[ current ]->ft1 += shift; selobj[ current ]->ft2 += shift; selobj[ current ]->fb1 -= shift; selobj[ current ]->fb2 -= shift; y += selobj[ current ]->h + gap; } } else for ( i = 0; i < selnumb; i++ ) { switch ( dir ) { case FD_LEFT: /* Left */ shift = x - selobj[ i ]->x; selobj[ i ]->x += shift; selobj[ i ]->fl1 += shift; selobj[ i ]->fl2 += shift; selobj[ i ]->fr1 -= shift; selobj[ i ]->fr2 -= shift; break; case FD_HCENTER: /* Center */ shift = x + w / 2.0 - selobj[ i ]->w / 2.0 - selobj[ i ]->x; selobj[ i ]->x += shift; selobj[ i ]->fl1 += shift; selobj[ i ]->fl2 += shift; selobj[ i ]->fr1 -= shift; selobj[ i ]->fr2 -= shift; break; case FD_RIGHT: /* Right */ shift = x + w - selobj[ i ]->w - selobj[ i ]->x; selobj[ i ]->x += shift; selobj[ i ]->fl1 += shift; selobj[ i ]->fl2 += shift; selobj[ i ]->fr1 -= shift; selobj[ i ]->fr2 -= shift; break; case FD_TOP: shift = y - selobj[ i ]->y; selobj[ i ]->y += shift; selobj[ i ]->ft1 += shift; selobj[ i ]->ft2 += shift; selobj[ i ]->fb1 -= shift; selobj[ i ]->fb2 -= shift; break; case FD_VCENTER: /* Center */ shift = y + h / 2.0 - selobj[ i ]->h / 2.0 - selobj[ i ]->y; selobj[ i ]->y += shift; selobj[ i ]->ft1 += shift; selobj[ i ]->ft2 += shift; selobj[ i ]->fb1 -= shift; selobj[ i ]->fb2 -= shift; break; case FD_BOTTOM: shift = y + h - selobj[ i ]->h - selobj[ i ]->y; selobj[ i ]->y += shift; selobj[ i ]->ft1 += shift; selobj[ i ]->ft2 += shift; selobj[ i ]->fb1 -= shift; selobj[ i ]->fb2 -= shift; break; } } redraw_the_form( 0 ); changed = 1; } /*************************************** * Shows all objects in the selection. ***************************************/ void show_selection( void ) { int i; if ( backf ) return; /* Cannot show the backface */ if ( ! cur_form ) return; for ( i = 0; i < selnumb; i++ ) fl_show_object( selobj[ i ] ); } /*************************************** * Hides all objects in the selection. ***************************************/ void hide_selection( void ) { int i; if ( backf ) return; /* Cannot hide the backface */ if ( ! cur_form ) return; for ( i = 0; i < selnumb; i++ ) fl_hide_object( selobj[ i ] ); } /*************************************** * Raises the selected objects ***************************************/ void raise_selection( void ) { int i; if ( backf ) return; /* Cannot raise the backface */ if ( ! cur_form ) return; for ( i = 0; i < selnumb; i++ ) { fl_delete_object( selobj[ i ] ); if ( selobj[ i ]->objclass != FL_BEGIN_GROUP && selobj[ i ]->objclass != FL_END_GROUP ) fl_add_object( cur_form, selobj[ i ] ); } changed = 1; } /*************************************** * Lowers the selection ***************************************/ void lower_selection( void ) { int i; if ( backf ) return; /* Cannot lower the backface. */ if ( ! cur_form ) return; for ( i = selnumb - 1; i >= 0; i-- ) { if ( selobj[ i ] != BackOBJ( )->next ) { fl_delete_object( selobj[ i ] ); fli_insert_object( selobj[ i ], BackOBJ( )->next ); } } changed = 1; } static FL_OBJECT *cutbuf[ MAXSEL ]; /* Buffered objects */ static int ncut = 0; /* and their number */ /*************************************** ***************************************/ static void clear_cutbuffer( void ) { for ( ; --ncut >= 0; ) { if ( cutbuf[ ncut ]->u_vdata ) fl_free( cutbuf[ ncut ]->u_vdata ); fl_free_object( cutbuf[ ncut ] ); } } /*************************************** * Removes all elements in the selection. ***************************************/ void cut_selection( void ) { int i; if (backf) return; /* Cannot cut the backface. */ if (! cur_form ) { fl_show_alert("Warning", "Please Add a form first", "", 0); return; } if ( selnumb == 0 ) return; clear_cutbuffer( ); /* Make new deletion and save it */ for ( i = 0; i < selnumb; i++ ) { fl_delete_object( selobj[ i ] ); cutbuf[ i ] = copy_object( selobj[ i ], 1 ); } ncut = selnumb; clear_selection( ); changed = 1; } /*************************************** * Pastes elements from buffer into form ***************************************/ void paste_selection(void) { FL_OBJECT *obj; float x, y, w, h, ox, oy, shift; int i; if ( ! cur_form || ncut == 0 ) return; is_pasting = 1; /* horrible hack */ /* Copy selection from buffer */ clear_selection( ); redraw_the_form( 0 ); for ( i = 0; i < ncut; i++ ) { if ( selobj[ i ]->objclass == FL_BEGIN_GROUP || selobj[ i ]->objclass == FL_END_GROUP ) continue; obj = copy_object( cutbuf[ i ], 1 ); /* Fix label: if underlining caused by cutbuf shortcut, remove it. Note can't use cutbuf as cutbuf does not contain shortcut info */ if ( obj->label && strchr( obj->label, *fl_ul_magic_char ) && selobj[ i ]->shortcut[ 0 ] ) { char *t, *b; b = t = fl_strdup( obj->label ); while ( ( b = strchr( b, *fl_ul_magic_char ) ) ) memmove( b, b + 1, strlen( b ) ); fl_set_object_label( obj, t ); fl_free( t ); } fl_add_object( cur_form, obj ); selobj[ selnumb++ ] = obj; } /* Move the selection to the correct place */ compute_selbox( &x, &y, &w, &h ); ox = x; oy = y; move_box( &x, &y, &w, &h, FL_FALSE ); /* Recompute object position */ for ( i = 0; i < selnumb; i++ ) if ( selobj[ i ]->objclass != FL_BEGIN_GROUP && selobj[ i ]->objclass != FL_END_GROUP) { shift = x - ox; selobj[ i ]->x += shift; selobj[ i ]->fl1 += shift; selobj[ i ]->fl2 += shift; selobj[ i ]->fr1 -= shift; selobj[ i ]->fr2 -= shift; shift = y - oy; selobj[ i ]->y += shift; selobj[ i ]->ft1 += shift; selobj[ i ]->ft2 += shift; selobj[ i ]->fb1 -= shift; selobj[ i ]->fb2 -= shift; fl_notify_object( selobj[ i ], FL_RESIZED ); } cleanup_selection( ); redraw_the_form( 0 ); changed = 1; is_pasting = 0; } /*************************************** * Copies all elements in the selection to the buffer ***************************************/ void copy_selection( void ) { FL_OBJECT *obj; int i; if ( backf || selnumb == 0 || ! cur_form ) return; clear_cutbuffer( ); /* Copy the objects */ for ( i = 0; i < selnumb; i++ ) { obj = copy_object( selobj[ i ], 0 ); cutbuf[ i ] = obj; } ncut = selnumb; } /*************************************** * Makes a copy of the current selection ***************************************/ void * dup_selection( void ) { FL_OBJECT **ob; int i; if ( ! selnumb ) return NULL; ob = fl_calloc( selnumb + 1, sizeof *ob ); for ( i = 0; i < selnumb; i++ ) ob[ i ] = copy_object( selobj[ i ], 1 ); return ob; } /*************************************** ***************************************/ void free_dupped_selection( void *a ) { FL_OBJECT **ob = a; for ( ; *ob; ob++ ) fl_free_object( *ob ); fl_free( a ); } /*************************************** * Changes the selection to a new list of objects and show it ***************************************/ void set_selection( void *a ) { FL_OBJECT *obj, **ob = a; int i; for ( i = 0; i < selnumb; i++ ) fl_delete_object( selobj[ i ] ); clear_selection( ); redraw_the_form( 0 ); for ( selnumb = 0; ob[ selnumb ]; selnumb++ ) { obj = copy_object( ob[ selnumb ], 1 ); if ( selobj[ i ]->objclass != FL_BEGIN_GROUP && selobj[ i ]->objclass != FL_END_GROUP ) fl_add_object( cur_form, obj ); selobj[ selnumb ] = obj; } redraw_the_form( 0 ); } /*************************************** ***************************************/ void next_selection( void ) { if ( ! cur_form || ! BackOBJ( ) ) return; do { if ( ! selnumb || ! selobj[ 0 ]->next ) selobj[ 0 ] = BackOBJ( )->next ? BackOBJ( )->next : BackOBJ( ); else if ( selnumb && selobj[ 0 ]->next ) selobj[ 0 ] = selobj[ 0 ]->next; } while ( selobj[ 0 ]->parent ); selnumb = 1; redraw_the_form( 0 ); } /*************************************** ***************************************/ void prev_selection( void ) { if ( ! cur_form || ! BackOBJ( ) ) return; do { if ( ! selnumb || ! selobj[ 0 ]->prev ) selobj[ 0 ] = BackOBJ( )->prev ? BackOBJ( )->prev : BackOBJ( ); else if ( selnumb && selobj[ 0 ]->prev ) selobj[ 0 ] = selobj[ 0 ]->prev; } while (selobj[ 0 ]->parent ); selnumb = 1; redraw_the_form( 0 ); } /*************************************** * Groups all elements in the selection into a group ***************************************/ void group_selection( void ) { int i; FL_OBJECT *obj; const char *s; const char *sp; if ( backf ) return; /* Cannot group the backface */ if ( ! cur_form || selnumb == 0 ) return; get_new_group_name: if ( ! ( s = fl_show_input( "Enter group name (must be usable as " "a C variable):", "" ) ) || ! *s ) return; if ( ! isascii( ( unsigned char ) *s ) || ! ( isalpha( ( unsigned char ) *s ) || *s == '_' ) ) { fl_show_alert( "Error", "Invalid C identifier specified for group " "name:", s, 0 ); goto get_new_group_name; } for ( sp = s + 1; *sp; sp++ ) if ( ! isascii( ( unsigned char ) *sp ) || ! ( isalnum( ( unsigned char ) *sp ) || *sp == '_' ) ) { fl_show_alert( "Error", "Invalid C identifier specified for group " "name:", s, 0 ); goto get_new_group_name; } obj = add_an_object( FL_BEGIN_GROUP, -1, 0, 0, 0, 0 ); for ( i = 0; i < selnumb; i++ ) { fl_delete_object( selobj[ i ] ); if ( selobj[ i ]->objclass != FL_BEGIN_GROUP && selobj[ i ]->objclass != FL_END_GROUP ) fl_add_object( cur_form, selobj[ i ] ); } add_an_object( FL_END_GROUP, -1, 0, 0, 0, 0 ); clear_selection( ); set_object_name( obj, s, "", "" ); addgroupto_selection( obj ); changed = 1; } /*************************************** * Removes begin and endgroups from the selection ***************************************/ void flatten_selection( void ) { int i; if ( backf ) return; /* Cannot flatten the backface */ if ( ! cur_form ) return; for ( i = 0; i < selnumb; i++ ) if ( selobj[ i ]->objclass == FL_BEGIN_GROUP || selobj[ i ]->objclass == FL_END_GROUP) { fl_delete_object( selobj[ i ] ); /* CAUSES PROBLEMS WITH NAMING fl_free_object(selobj[i]); */ selobj[ i ] = NULL; } cleanup_selection( ); changed = 1; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/notes/0000755000175000017500000000000011377311602014776 5ustar jensjensxforms-1.0.93sp1/fdesign/notes/Makefile.am0000644000175000017500000000007711171560225017035 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = spec_algo xforms-1.0.93sp1/fdesign/notes/.cvsignore0000644000175000017500000000002511171560225016772 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/fdesign/notes/Makefile.in0000644000175000017500000002401411377311602017044 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = fdesign/notes ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = spec_algo all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fdesign/notes/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fdesign/notes/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/fdesign/notes/spec_algo0000644000175000017500000000260411171560225016656 0ustar jensjens Here is how object specific info is initialized: ---------------------------------------------- As soon as an object is created, the object specific info is converted into a "superSpec", and this superspec thing is "hang" on the obj->u_vdata field. In editing mode: In object specifc editing, upon entry, we copy the superSpec into obj->spec, essentially wiping out all the testing residue and stuff put there for testing only. All the changes that occur while in the editing only apply to obj->spec, we never touch the superspec. Only when editing is done and accepted, we copy the spec into superSpec again. In case of cancel or restore, we copy superspec into obj->spec, which in effect undoes all the changes made. In testing mode: Object testing etc. only changes obj->spec, it never touches the superspec. In saving the spec info: We always save the spec info using superSPEC. In Loading the spec info: spec info is first loaded into a superspec, which is then transfered into obj->spec. For object like buttons where some of the information is not on the SPEC structure, we'll have to create the members on SuperSPEC as well as a seperate structure that "hangs off" of SuperSPEC. When modifying attributes, we modify this seperate structure as if it is part of the button. We copy this info SuperSPEC only if AcceptSpec. When save/emit, always do it from SuperSPEC xforms-1.0.93sp1/fdesign/fd_names.c0000644000175000017500000000755211247055071015600 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_names.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * This file is part of the Form Designer. * * It contains the routines that keep track of the names and * callback routines associated to the different objects. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "fd_main.h" /**** THE DATA STRUCTURE ****/ typedef struct { FL_OBJECT * obj; /* The object */ char name[ MAX_VAR_LEN ]; /* Its name (if any) */ char cbname[ MAX_VAR_LEN ]; /* Callback Routine */ char argname[ MAX_VAR_LEN ]; /* The argument */ } OBJ; #define MAXOBJ 1024 static OBJ objects[ MAXOBJ ]; /* The stored objects */ static int objnumb = 0; /* Their number */ /*************************************** * Returns the number of the object in the list ***************************************/ static int get_object_numb( const FL_OBJECT * obj ) { int i; for ( i = 0; i < objnumb; i++ ) if ( objects[ i ].obj == obj ) return i; return -1; } /*************************************** * Checks whether the names are correct C-names and don't occur already. ***************************************/ static void check_names( int on ) { /* Fill in argument if missing */ if ( *objects[ on ].cbname && ! *objects[ on ].argname) strcpy( objects[ on ].argname, "0" ); /* HAS TO BE EXTENDED */ } /**** ACTUAL ROUTINES ****/ /*************************************** * returns the names of an object ***************************************/ void get_object_name( const FL_OBJECT * obj, char * name, char * cbname, char * argname) { int on = get_object_numb( obj ); *name = '\0'; *cbname = '\0'; *argname = '\0'; if ( on == -1 ) return; strcpy( name, objects[ on ].name ); strcpy( cbname, objects[ on ].cbname ); strcpy( argname, objects[ on ].argname ); } /*************************************** * returns the names of an object ***************************************/ void set_object_name( FL_OBJECT * obj, const char * name, const char * cbname, const char * argname ) { int on = get_object_numb( obj ); if ( obj == NULL ) return; if ( on == -1 ) { if ( ( ! name || ! *name ) && ( ! cbname || ! *cbname ) && ( ! argname || ! *argname ) ) return; if ( objnumb >= MAXOBJ ) return; objects[ objnumb ].obj = obj; on = objnumb++; } if ( name ) fli_sstrcpy( objects[ on ].name, name, sizeof objects[ on ].name ); if ( cbname ) fli_sstrcpy( objects[ on ].cbname, cbname, sizeof objects[ on ].cbname ); if ( argname ) fli_sstrcpy( objects[ on ].argname, argname, sizeof objects[ on ].argname ); check_names( on ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fdesign.man0000644000175000017500000001224511264174650015773 0ustar jensjens.\" .\" Man page for Forms Designer .\" Use the following command to generate viewable man page .\" tbl fdesign.1 | {nt}roff -man .\" .\" ul | more -fsk to view .\" .\" .TH FDESIGN 1L "October 2009" "Version 1.0.92" "Forms Library" .SH NAME fdesign \- Forms Library User Interface Designer .\" .\" setup .de Cr .ie n (c) .el \(co .. .SH SYNOPSIS .if n fdesign .if t \{ .B fdesign \} [-xformoptions] [-options] [files] .SH DESCRIPTION .I fdesign is a GUI builder that helps the construction of graphical user interface in a WYSIWYG (what you see is what you get) way by allowing the user to directly manipulate various objects, such as buttons, sliders and menus etc. Once a satisfactory UI is constructed, the user can save the composed interface into an external file containing some program code. When compiled, linked with the .BR "Forms Library" , and executed, the generated code would, at run time (or print time for PostScript output), construct the exact same interfaces as those seen within .IR fdesign . A variety of output language is possible via external filters. As of this writing, C, perl, ada95, Fortran, pascal, and PostScript output filters are known to exist. .SH OPTIONS .I fdesign accepts all standard .B Forms Library command line options as well as the following: .TP 6 .B \-help Prints a brief summary of all command line options. This option does not require a connection to the X server. .TP .B \-version Prints the current version of .I fdesign and exits. .TP .BI \-geometry " geom" Specifies the prefered size and location of main working area in which the UI is to be constructed. .TP .BI \-convert " fdfile-list" This option prevents .I fdesign from attempting to make a connection to the X server. The file list following this flag is converted to C code directly. .TP .BI \-dir " destdir" output any converted files in \fIdestdir\fR. .TP .BI \-unit " pixel|point|mm|cp|cmm" selects the unit of measure for object geometries. For non-pixel unit, the interface created is screen resolution independent and may be desirable for many applications. Note that for typical screens, .I point (about 1/72 inch) and .I mm may be too coarse and subject to round-off errors. Use .I cp (centi-point, 100th of a point) and .I cmm (centi-mm) instead. .TP .B \-altformat selects an alternative format for the generated C code where global variables are used for the UI components. .TP .B \-main requests the output of main program template. .TP .B \-callback requests the output of callback function template. .TP .B \-compensate requests the emission of font/server resolution variation compensation code. .TP .BI \-I " headerfile" uses an alternative header file instead of the default forms.h in the output C code. .TP .B \-lax requests relaxed C syntax checking. .TP .B \-ps This option specifies that instead of emitting the c code for the user interface, PostScript code should be emitted. .TP .B \-ada This option requests ada95 code output .TP .B \-perl This option requests perl code output. .TP .B \-fortran This option requests Fortran code output. .TP .B \-pascal This option requests pascal code output. .TP .B \-nocode suppresses the output of UI code. Only the .fd file is written. .PP The most useful .B Forms Library command line options are .TP .BI \-display " host:dpy" This option specifies the X server to connect. .TP .BI \-flversion This option prints the version string of the .BR "Forms Library" , with which fdesign was build. .TP .BI \-name " appname" This option specifies the application name under which resources are to be obtained, instead of the executable name. .I appname should not contain . or *. .IR fdesign . .SH RESOURCES The program understands all of the .BR "Forms Library" 's resource names and classes as well as the following .TP 8 control.geometry (class Control.Geometry) specifies the geometry of the control panel. Currently the size is ignored. .TP unit (Unit) specifies the default unit of measure. Default is pixel. .TP attributes.geometry (class Attributes.Geometry) specifies the geometry of the object attributes panel. Currently the size is ignored. .TP align.geometry (class Align.Geometry) specifies the geometry of the object align panel. Currently the size is ignored. .TP xformsHeader (class XFormsHeader) specifies the header filename generated in the output C code. Default is forms.h .TP filter (class Filter) specifies post-processing filter (an external executable name). .TP language (class Language) specifies target language name. .PP Among the standard .B Forms Library resources, the following are most useful .TP xform.fontsize (class XFORM.FontSize) specifies the font size used for most object labels. .TP xform.pupfontsize (class XFORM.PupFontSize) specifies the font size used in pop-up menus. .TP xform.browserFontSize (class XFORM.BrowserFontSize) specifies the font size used for the text inside a browser. .SH SEE ALSO xforms(5), fd2ps(1L) .SH AUTHOR Copyright .Cr 1996-2002 T.C. Zhao and Mark Overmars .br Since 2002: GNU Lesser General Public License .br Maintainers: Jean-Marc Lasgouttes, Angus Leeming and Jens Thoms Toerring .SH HOME PAGE http://xforms-toolkit.org .br http://savannah.nongnu.org/projects/xforms/ xforms-1.0.93sp1/fdesign/sp_choice.c0000644000175000017500000002534111255635320015754 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_choice.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting choice class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "private/pchoice.h" #include "spec/choice_spec.h" extern FD_choiceattrib *create_form_choiceattrib( void ); static FD_choiceattrib *choice_attrib; static SuperSPEC *choice_spec; static void show_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_choice_spec_fdform( void ) { if ( ! choice_attrib ) { choice_attrib = create_form_choiceattrib( ); fl_addto_choice( choice_attrib->mode, get_pupmode_string( ) ); fl_addto_choice( choice_attrib->scope, "local|global" ); fl_set_choice_item_mode( choice_attrib->mode, 3, FL_PUP_GRAY ); fl_set_choice_item_mode( choice_attrib->mode, 4, FL_PUP_GRAY ); fl_set_choice_item_mode( choice_attrib->mode, 5, FL_PUP_GRAY ); fl_addto_choice( choice_attrib->align, align_name( FL_ALIGN_CENTER, 0 ) ); fl_addto_choice( choice_attrib->align, align_name( FL_ALIGN_TOP, 0 ) ); fl_addto_choice( choice_attrib->align, align_name( FL_ALIGN_BOTTOM, 0 ) ); fl_addto_choice( choice_attrib->align, align_name( FL_ALIGN_LEFT, 0 ) ); fl_addto_choice( choice_attrib->align, align_name( FL_ALIGN_RIGHT, 0 ) ); fl_set_browser_dblclick_callback( choice_attrib->content_br, change_choice_item_cb, 0 ); } return choice_attrib; } /*************************************** ***************************************/ void choice_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *edited = choice_attrib->vdata; superspec_to_spec( edited ); show_spec( get_superspec( edited ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec(SuperSPEC * sp) { int i; fl_freeze_form( choice_attrib->content_br->form ); fl_set_button( choice_attrib->new_menuapi, sp->new_menuapi ); fl_set_counter_value( choice_attrib->val, sp->int_val ); fl_set_choice_text( choice_attrib->align, align_name( sp->align, 0 ) ); fl_set_choice( choice_attrib->scope, sp->global_scope + 1 ); fl_clear_browser( choice_attrib->content_br ); for ( i = 1; i <= sp->nlines; i++ ) fl_add_browser_line( choice_attrib->content_br, sp->content[ i ] ); fl_unfreeze_form( choice_attrib->content_br->form ); } /*************************************** ***************************************/ int set_choice_attrib( FL_OBJECT * ob ) { choice_attrib->vdata = ob; choice_spec = get_superspec( ob ); superspec_to_spec( ob ); fl_set_counter_bounds( choice_attrib->val, 1, choice_spec->nlines >= 1 ? choice_spec->nlines : 1 ); show_spec( choice_spec ); return 0; } /*************************************** ***************************************/ void emit_choice_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *sp, *defsp; int i; /* Create a default object */ defobj = fl_create_choice( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->align != defsp->align ) fprintf( fp, " fl_set_choice_align( obj, %s );\n", align_name( sp->align, 1 ) ); if ( sp->nlines < 1 ) return; if ( sp->new_menuapi ) fprintf( fp, " fl_set_choice_entries( obj, %s );\n", sp->misc_char ); else for ( i = 1; i <= sp->nlines; i++ ) { fprintf( fp, " fl_addto_choice( obj, \"%s\" );\n", sp->content[ i ] ); if ( sp->mode[ i ] != defsp->mode[ i ] ) fprintf( fp, " fl_set_choice_item_mode( obj, %d, %s );\n", i, get_pupmode_name( sp->mode[ i ] ) ); if ( sp->shortcut[ i ] && *sp->shortcut[ i ] ) fprintf( fp, " fl_set_choice_item_shortcut( obj, %d, " "\"%s\" );\n", i, sp->shortcut[ i ] ); } if ( sp->int_val != defsp->int_val ) fprintf( fp, " fl_set_choice( obj, %d );\n", sp->int_val ); } /*************************************** ***************************************/ void save_choice_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defsp, *sp; int i; /* Create a default object */ defobj = fl_create_choice( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->align != defsp->align ) fprintf( fp, " align: %s\n", align_name( sp->align, 0 ) ); if ( sp->new_menuapi != defsp->new_menuapi ) fprintf( fp, " struct: %d\n", sp->new_menuapi ); for ( i = 1; i <= sp->nlines; i++ ) { fprintf( fp, " content: %s\n", sp->content[ i ] ); if ( sp->mode[ i ] != defsp->mode[ i ] ) fprintf( fp, " mode: %s\n", get_pupmode_name( sp->mode[ i ] ) ); if ( sp->shortcut[ i ] && *sp->shortcut[ i ] ) fprintf( fp, " shortcut: %s\n", sp->shortcut[ i ] ); } if ( sp->int_val != defsp->int_val ) fprintf( fp, " value: %d\n", sp->int_val ); } /* * attributes callbacks */ /*************************************** * Callbacks and freeobj handles for form choiceattrib ***************************************/ void add_choice_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_choiceattrib *ui = ob->form->fdui; const char *s = fl_get_input( ui->input ); const char *sc = fl_get_input( ui->shortcut ); const char *mode = fl_get_choice_text( ui->mode ); int i; if ( s && *s ) { fl_addto_browser( ui->content_br, s ); i = fl_addto_choice( ui->vdata, s ); fl_set_choice_item_shortcut( ui->vdata, i, sc ); fl_set_choice_item_mode( ui->vdata, i, get_pupmode_value( mode ) ); if ( fl_get_button( ui->auto_clear ) ) clear_choice_field_cb( ui->auto_clear, 0 ); if ( auto_apply ) redraw_the_form( 0 ); fl_set_counter_bounds( ui->val, 1, fl_get_choice_maxitems( ui->vdata ) ); } } /*************************************** ***************************************/ void replace_choice_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_choiceattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); const char *s = fl_get_input( ui->input ); const char *sc = fl_get_input( ui->shortcut ); const char *mode = fl_get_choice_text( ui->mode ); if ( *s && i > 0 ) { fl_replace_browser_line( ui->content_br, i, s ); fl_replace_choice( ui->vdata, i, s ); fl_set_choice_item_shortcut( ui->vdata, i, sc ); fl_set_choice_item_mode( ui->vdata, i, get_pupmode_value( mode ) ); if ( fl_get_button( ui->auto_clear ) ) clear_choice_field_cb( ui->auto_clear, 0 ); } if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void delete_choice_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_choiceattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); if ( i > 0 ) { fl_delete_browser_line( ui->content_br, i ); fl_delete_choice( ui->vdata, i ); if ( auto_apply ) redraw_the_form( 0 ); } } /*************************************** ***************************************/ void change_choice_item_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_choiceattrib *ui = ob->form->fdui; int i = fl_get_browser( ui->content_br ); FL_OBJECT *edited = ui->vdata; FLI_CHOICE_SPEC *sp = edited->spec; if ( i > 0 ) { fl_set_input( ui->input, fl_get_browser_line( ui->content_br, i ) ); if ( sp->shortcut[ i ] ) fl_set_input( ui->shortcut, sp->shortcut[ i ] ); fl_set_choice_text( ui->mode, get_pupmode_name( sp->mode[ i ] ) + 3 ); } } /*************************************** ***************************************/ void clear_choice_field_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_choiceattrib *ui = ob->form->fdui; fl_set_input( ui->input, "" ); fl_set_input( ui->shortcut, "" ); fl_set_choice( ui->mode, 1 ); } /*************************************** ***************************************/ void choice_align_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_choiceattrib *ui = ob->form->fdui; const char *s = fl_get_choice_text( ob ); fl_set_choice_align( ui->vdata, align_val( s ) ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void choice_val_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { FD_choiceattrib *ui = ob->form->fdui; int v = fl_get_counter_value( ob ) + 0.1; fl_set_choice( ui->vdata, v ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void use_struct_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { choice_spec->new_menuapi = fl_get_button( ob ); } /*************************************** ***************************************/ void choiceentry_scope_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { choice_spec->global_scope = ( fl_get_choice( ob ) - 1 ) > 0; } #include "spec/choice_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_main.h0000644000175000017500000005771611317766413015444 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_main.h * * This file is the header file used in the Form Designer */ #ifndef FD_MAIN_H_ #define FD_MAIN_H_ #include #include "include/forms.h" #include "flinternal.h" #ifndef FALSE #define FALSE 0 #define TRUE ( ! FALSE ) #endif /* since MAGIC4 all coordinates are relative to the top-left */ #define MAGIC2 12321 #define MAGIC3 12322 #define MAGIC4 13000 #define MAGIC5 14000 /* since XForms 1.0.92 */ /* general limits */ #define MAX_CLASS_NAME_LEN 64 /* FL_BUTTON etc. */ #define MAX_TYPE_NAME_LEN 64 /* FL_RADIO_BUTTON etc */ #define MAX_VAR_LEN 128 /* max. length of a variable/function */ /* various options of the program */ typedef struct { int language; int emit_code; /* if emit UI code */ int emit_main; int emit_cb; int lax; int altformat; int conv_only; int show_pallete; int compensate; /* if emit font size compensation code */ int unit; char * output_dir; } FD_Opt; enum { FD_C = 1, FD_ADA95, FD_PERL, FD_PASCAL, FD_PYTHON, FD_FORTRAN, FD_PS, FD_SCM, FD_EXP }; /* We use different file selector for different tasks */ enum { SAVE_FSELECTOR, LOAD_FSELECTOR, XPM_FSELECTOR }; #define MAX_CONVERTOR ( FD_EXP + 1 ) /* Structure that will hole all forms created */ typedef struct { FL_FORM * form; /* The form */ char fname[ MAX_VAR_LEN ]; /* Its name */ } FRM; typedef struct { const char * lang_name; int ( * convert )( const char *, FRM *, int ); /* built-in convertor */ const char * extern_convertor; /* the converter itself */ const char * contact_info; /* who to contact in case of error */ int need_c_code; /* if translator works on C or .fd file */ void ( * init )( void ); /* additional initialization */ } Conv; extern Conv convertor[ ]; extern FD_Opt fdopt; #define ShiftIsDown( mask ) ( mask & ShiftMask ) /******** in fd_main.c *********/ extern long main_window; /* The identifier of the main window */ extern FL_Coord winw, winh; extern int changed; /* Whether the file has changed. */ extern char main_name[ ]; /* Main creation routine name */ /******** in fd_rubber.c *********/ /* Contains routines for drawing rubberband boxes. */ extern void set_step_size( float ); /* sets the stepsize */ extern float get_step_size( void ); /* returns the stepsize */ /* Sets the bounding box in which the drawing occurs */ extern void set_bounding_box( float, float, float, float ); /* returns the position of the mouse in world coordinates */ extern void get_mouse_pos( float *, float * ); /* drag a box around until the user releases a mouse button */ extern void move_box( float *, float *, float *, float *, int ); /* scales a box until the user releases a left mouse button */ extern void scale_box( float *, float *, float *, float * ); /******** in fd_select.c *********/ /* Contains the routines that deal with the maintenance of the current selection of objects */ extern int is_selected( FL_OBJECT * ); /* Returns whether the object is selected. */ extern void addto_selection( FL_OBJECT * ); /* Adds an object to a selection */ extern void addgroupto_selection( FL_OBJECT * ); /* Adds a group of objects to a selection */ extern void deletefrom_selection( FL_OBJECT * ); /* Deletes an object from a selection */ extern void clear_selection( void ); /* Clears the current selection */ extern void resize_selection( FL_Coord, FL_Coord ); extern void move_selection( FL_Coord, FL_Coord ); extern void deletegroupfrom_selection( FL_OBJECT * ); /* Deletes a group of objects from a selection */ extern void draw_selbox( void ); /* Draws the box around the selected objects */ extern void handle_select( const XEvent * ); /* Change the selection when user puhed mouse. */ extern void handle_move( const XEvent * ); /* Moves or scales the selection. */ extern void select_all( void ); /* Selects all objectsin the form */ extern void change_selection( void ); /* Changes the atributes of the selection */ extern void change_selected_objects( FL_OBJECT * ); extern void align_selection( int ); /* Aligns the objects in the selection */ extern void show_selection( void ); /* Makes the selection visible. */ extern void hide_selection( void ); /* Makes the selection invisible. */ extern void raise_selection( void ); /* Raises the selection */ extern void lower_selection( void ); /* Lower the selection */ extern void cut_selection( void ); /* Deletes all objects in the selection */ extern void paste_selection( void ); /* Puts elements from buffer into form */ extern void copy_selection( void ); /* Copies objects in selection to buffer */ extern void *dup_selection( void ); extern void set_selection( void * ); extern void free_dupped_selection( void * ); extern void next_selection( void ); extern void prev_selection( void ); extern void group_selection( void ); /* Turns objects in the selection into a group. */ extern void flatten_selection( void ); /* Removes begin and end groups from the selection. */ /******** in fd_attribs.c **********/ /* Contains routines to set and change attributes of objects. */ int change_object( FL_OBJECT *, /* changes the settings for object */ int ); void change_type( FL_OBJECT *, /* Changes the type of a particular object. */ int); /* sets all attributes for an object */ void set_attribs( FL_OBJECT *, int, int, int, int, int, int, int, const char * ); void set_miscattribs( FL_OBJECT *, unsigned int, unsigned int, unsigned int ); void set_label( FL_OBJECT *, /* Sets the object label (interpreting \n's). */ const char * ); void set_shortcut( FL_OBJECT *, const char * ); char *get_label( const FL_OBJECT *, /* Returns object label */ int); /* (turning NL's into \n's). */ char *get_shortcut_string( const FL_OBJECT * ); FL_OBJECT *copy_object( FL_OBJECT *, /* Make an exact copy of an object */ int keep ); /******** in fl_file_fun.c ********/ #define FF_READ_FAILURE -1 #define FF_AT_END_OF_FILE 0 #define FF_AT_START_OF_FORM 1 #define FF_AT_START_OF_OBJECT 2 extern int ff_get_fd_file( const char *, int ); extern char *ff_get_filename_copy( void ); extern int ff_read( const char *, ... ); extern void ff_close( void ); extern int ff_err( const char * ); /******** in fl_file.c ********/ /* Contains all routines that deal with saving and loading forms. */ extern int read_form( void ); extern void write_form( FILE *, FL_FORM *, char[ ] ); /******** in fl_print.c ********/ /* Contains all routines that deal with printing forms in C format. */ void print_form( FILE *, FL_FORM *, const char * ); void print_callbacks_and_globals( FILE *, FL_FORM *, int ); /* For making the header file */ void print_header( FILE *, FL_FORM *, const char * ); void output_main( FILE *, FRM *, int ); void output_callbacks( FILE *, FRM *, int ); /******** in fd_forms.c *********/ /* Contains the routines that maintain the collection of forms. */ extern FL_FORM *cur_form; /* The current form under construction */ extern void redraw_the_form( int ); /* Redraws the current form. The argument indicates whether the background should be redrawn. */ extern void reshape_form_background( FL_Coord, FL_Coord ); /* loads the forms from a file */ extern int load_forms( int, const char *, int ); extern int save_forms( const char * ); /* saves the forms to a file, returns whether actually saved */ /******** fd_groups.c *********/ /* Contains the routines that deal with groups. */ /* Fills in the groups in the current form. */ void fillin_groups( void ); /******** fd_names.c **********/ /* Contains the routines that keep track of the object names */ void get_object_name( const FL_OBJECT *, char *, char *, char * ); /* returns the names of an object */ void set_object_name( FL_OBJECT *, const char *, const char *, const char * ); /* returns the names of an object */ /******** fd_objects.c *********/ /* Contains the different object classes and types. */ #define MAXCLASSES 60 /* Max. number of object classes handled */ #define MAXTYPES 24 /* Max. number of types per class. */ /* Maximal number of object classes. */ /* The current class of object to be added */ extern int cur_class; /* Initializes all the classes and types. */ extern void init_classes( void ); /* adds an object to the current form */ extern FL_OBJECT *add_an_object( int, int, FL_Coord, FL_Coord, FL_Coord, FL_Coord ); /* Returns a pointer to the name of the class */ extern char *find_class_name( int ); extern char *find_class_name( int ); /* Returns the number of types in the class */ extern int find_class_maxtype( int ); /* Returns the default object in the class */ extern FL_OBJECT *find_class_default( int, int ); /* Returns a pointer to the name of the type in the class */ extern const char *find_type_name( int, int ); extern int find_type_value( int, const char * ); extern unsigned long fd_red, fd_black, fd_white, fd_col; extern int fd_magic; extern int fd_border; extern int fd_trackgeometry, fd_buttonLabelSize, fd_testborder; extern void color( unsigned long ); extern int getbutton( int ); extern void fd_clear( int, int, int, int ); extern void rect( FL_Coord, FL_Coord, FL_Coord, FL_Coord ); extern void rectf( FL_Coord, FL_Coord, FL_Coord, FL_Coord ); extern int fl_qtest( void ); /* attribute query routines */ extern char *class_name( int ); extern int class_val( const char * ); extern char *gravity_name( int ); extern int gravity_val( const char * ); extern char *resize_name( int ); extern int resize_val( const char * ); extern char *style_name( int ); extern int style_val( const char * ); extern const char *align_name( int, int ); extern int align_val( const char * ); extern char *lsize_name( int ); extern int lsize_val( const char * ); extern char *boxtype_name( int ); extern int boxtype_val( const char * ); extern char *loadedfile; extern char *loadedfile_fullpath; typedef struct { int val; /* value */ char * name; /* formal name */ char * shown; /* name shown */ char * hotkey; /* hotkeys */ } VN_pair; extern char *get_vn_name( VN_pair *, int ); extern int get_vn_val( VN_pair *, const char * ); extern VN_pair vn_btype[ ]; extern VN_pair vn_gravity[ ]; extern VN_pair vn_align[ ]; extern VN_pair vn_resize[ ]; extern int fd_align_fontsize, fd_type_fontsize; extern int fd_convert, fd_show_palette; extern const char *get_fd_name( const char * ); extern int fd_bwidth; extern char *unit_name( int ); extern int unit_val( const char * ); extern int convert_u( int ); extern double get_conversion_factor( void ); extern char xform_header[ ]; extern char glcanvas_header[ ]; extern void show_geometry( int, int, int, int ); extern void show_selmessage( FL_OBJECT *[ ], int ); enum { FD_LEFT = 1, FD_HCENTER = 2, FD_RIGHT = 3, FD_HEQUAL = 4, FD_BOTTOM = 5, FD_VCENTER = 6, FD_TOP = 7, FD_VEQUAL = 8 }; enum { HELP_VERSION, HELP_GENERAL, HELP_MOUSE, HELP_KEYBOARD, HELP_GROUP, HELP_TEST, HELP_SAVE }; extern FL_FORM *thetestform; extern FL_OBJECT *fl_create_simu_canvas( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); extern FL_OBJECT *fl_add_simu_canvas( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); extern FL_OBJECT *fl_create_simu_glcanvas( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); extern FL_OBJECT *fl_add_simu_glcanvas( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); /* object class specific info handler */ extern void save_objclass_spec_info( FILE *, FL_OBJECT * ); extern int load_objclass_spec_info( FL_OBJECT *, char *); extern void emit_objclass_spec_info( FILE *, FL_OBJECT * ); extern void emit_objclass_spec_header( FILE *, FL_OBJECT * ); extern void emit_objclass_spec_global( FILE *, FL_OBJECT * ); extern void set_objclass_spec_attributes( FL_OBJECT *, long ); extern int has_class_spec_info( FL_OBJECT * ); extern void modify_attrib_basic_color( FL_COLOR, FL_COLOR ); extern void show_attributes( const FL_OBJECT * ); /* Control panel etc */ #include "fd/ui_theforms.h" #include "fd/ui_attrib.h" extern FD_control *fd_control; extern FD_attrib *fd_attrib; extern FD_generic_attrib *fd_generic_attrib; extern FD_test *fd_test; extern FD_align *fd_align; extern FD_resize *fd_resize; extern FD_helpform *fd_help; extern FD_nullattrib *fd_nullattrib; extern void loadforms_cb( FL_OBJECT *, long ); extern void saveforms_cb( FL_OBJECT *, long ); extern void saveforms_as_cb( FL_OBJECT *, long ); extern void mergeforms_cb( FL_OBJECT *, long ); extern void exit_cb( FL_OBJECT *, long ); extern void changegroupname_cb( FL_OBJECT *, long ); extern void mainname_cb( FL_OBJECT *, long ); extern void create_the_forms( void ); extern void control_init( FD_control * ); extern FL_FORM *thetestform; extern void process_xevent( int ); extern int within_selection( float, float ); extern int no_selection; extern int C_output( const char *, FRM *, int ); extern int is_pasting; extern void init_align( void ); extern int auto_apply; extern void cleanup_spec( FL_OBJECT * ); /* fake stuff */ #define FL_NTABFOLDER 50 extern FL_OBJECT *fl_add_ntabfolder( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *); extern FL_OBJECT *fl_create_ntabfolder( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); extern FL_OBJECT *fl_add_nformbrowser( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); extern FL_OBJECT *fl_create_nformbrowser( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); extern void make_backup( const char * ); extern int is_var_boxtype( int cn ); extern void set_testing_pixmap( FL_OBJECT * ); extern void set_snap_size( int, int ); extern int get_snap_size( void ); extern void show_pallette( void ); extern void hide_pallette( void ); extern void reset_pallette_menu_status( void ); extern void select_pallette_entry( int ); extern void reset_pallette( void ); #define MAX_CONTENT 128 typedef struct { float min, max, xmin, xmax, ymin, ymax; float val, xval, yval; float step, sstep, lstep, xstep, ystep; float slsize; float thetai, thetaf; float ldelta, rdelta; double dval, dmin, dmax, dstep; int prec; int direction; int mbuttons; int int_val; unsigned int how_return; int align; int dx, dy; int show_focus; int h_pref, v_pref; int nlines; char filename[ 512 ]; char focus_filename[ 512 ]; char data[ MAX_VAR_LEN ]; char focus_data[ MAX_VAR_LEN ]; char width[ MAX_VAR_LEN ], height[ MAX_VAR_LEN ]; void * cspecv; int use_data; int fullpath; int xmajor, xminor; int ymajor, yminor; int xscale, yscale; float xbase, ybase; int xgrid, ygrid; char ** content; char ** shortcut; char ** callback; unsigned char * mode; int new_menuapi; int global_scope; int showsymbol; int cspecv_size; char * misc_char; int grid_linestyle; int no_title; int mark_active; int * mval; char helper[ 512 ]; int reserverd[ 12 ]; } SuperSPEC; extern SuperSPEC *get_superspec( FL_OBJECT * ); extern SuperSPEC *spec_to_superspec( FL_OBJECT * ); extern void *superspec_to_spec( FL_OBJECT * ); extern void copy_superspec( FL_OBJECT * dest, FL_OBJECT * src ); typedef struct { int align; int dx, dy; int show_focus; char filename[ 512 ]; char focus_filename[ 512 ]; char data[ MAX_VAR_LEN ]; char focus_data[ MAX_VAR_LEN ]; char width[ MAX_VAR_LEN ]; char height[ MAX_VAR_LEN ]; int use_data; int fullpath; char helper[ 512 ]; } IconInfo; #define ISBUTTON( cls ) ( ( cls ) == FL_BUTTON \ || ( cls ) == FL_LIGHTBUTTON \ || ( cls ) == FL_CHECKBUTTON \ || ( cls ) == FL_ROUNDBUTTON \ || ( cls ) == FL_ROUND3DBUTTON \ || ( cls ) == FL_PIXMAPBUTTON \ || ( cls ) == FL_BITMAPBUTTON \ || ( cls ) == FL_SCROLLBUTTON \ || ( cls ) == FL_LABELBUTTON ) #define ISCHOICE( cls ) ( ( cls ) == FL_CHOICE \ || ( cls ) == FL_MENU \ || ( cls ) == FL_BROWSER ) extern void select_object_by_class( int ); extern char *append_fd_suffix( const char * ); extern const char *get_placement( FL_FORM * ); extern void reset_dupinfo_cache( void ); extern int is_duplicate_info( FL_OBJECT *, const char * ); extern int noop_handle( FL_OBJECT *, int, FL_Coord, FL_Coord, int, void * ); extern char *get_helper( char * ); extern void setup_how_return_menu( FL_OBJECT * ); extern void reset_how_return_menu( FL_OBJECT *, unsigned int ); extern void handle_how_return_changes( FL_OBJECT *, FL_OBJECT * ); extern int get_how_return_val( const char * ); extern const char * get_how_return_name( unsigned int, int ); #endif /* FD_MAIN_H */ /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_scrollbar.c0000644000175000017500000002000211252274067016476 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_scrollbar.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting slider class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "spec/scrollbar_spec.h" extern FD_scrollbarattrib *create_form_scrollbarattrib( void ); static FD_scrollbarattrib *scb_attrib; static SuperSPEC *scb_spec; static void show_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_scrollbar_spec_fdform( void ) { if ( ! scb_attrib ) { scb_attrib = create_form_scrollbarattrib( ); setup_how_return_menu( scb_attrib->returnsetting ); fl_set_menu_item_mode( scb_attrib->returnsetting, 5, FL_PUP_BOX | FL_PUP_GRAY ); fl_set_menu_item_mode( scb_attrib->returnsetting, 6, FL_PUP_BOX | FL_PUP_GRAY ); } return scb_attrib; } /*************************************** ***************************************/ void scrollbar_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *edited = scb_attrib->vdata; superspec_to_spec( edited ); show_spec( get_superspec( edited ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec ) { set_finput_value( scb_attrib->minval, spec->min, -1 ); set_finput_value( scb_attrib->maxval, spec->max, -1 ); set_finput_value( scb_attrib->initial_val, spec->val, -1 ); set_finput_value( scb_attrib->slsize, spec->slsize, 2 ); set_finput_value( scb_attrib->step, spec->step, 3 ); set_finput_value( scb_attrib->ldelta, spec->ldelta, -1 ); set_finput_value( scb_attrib->rdelta, spec->rdelta, -1 ); reset_how_return_menu( scb_attrib->returnsetting, spec->how_return ); } #define is_vert( t ) ( t == FL_VERT_SCROLLBAR \ || t == FL_VERT_NICE_SCROLLBAR \ || t == FL_VERT_THIN_SCROLLBAR ) /*************************************** * Entry point ***************************************/ int set_scrollbar_attrib( FL_OBJECT * ob ) { scb_attrib->vdata = ob; scb_spec = get_superspec( ob ); if ( is_vert( ob->type ) ) { fl_set_object_label( scb_attrib->minval, "Value at top" ); fl_set_object_label( scb_attrib->maxval, "Value at bottom" ); } else { fl_set_object_label( scb_attrib->minval, "Value at left" ); fl_set_object_label( scb_attrib->maxval, "Value at right" ); } show_spec( scb_spec ); return 0; } /*************************************** ***************************************/ void emit_scrollbar_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *spec, *defspec; if ( ob->objclass != FL_SCROLLBAR ) return; /* create a default object */ defobj = fl_create_scrollbar( ob->type, 0, 0, 30, 30, "" ); defspec = get_superspec( defobj ); spec = get_superspec( ob ); if ( spec->min != defspec->min || spec->max != defspec->max ) fprintf( fp, " fl_set_scrollbar_bounds( obj, %g, %g );\n", spec->min, spec->max ); if ( spec->val != defspec->val ) fprintf( fp, " fl_set_scrollbar_value( obj, %g );\n", spec->val ); if ( spec->slsize != defspec->slsize ) fprintf( fp, " fl_set_scrollbar_size( obj, %.2f );\n", spec->slsize ); if ( spec->step != defspec->step ) fprintf( fp, " fl_set_scrollbar_step( obj, %g );\n", spec->step ); if ( spec->ldelta != defspec->ldelta || spec->rdelta != defspec->rdelta ) fprintf( fp, " fl_set_scrollbar_increment( obj, %g, %g );\n", spec->ldelta, spec->rdelta ); } /*************************************** ***************************************/ void save_scrollbar_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defsp, *sp; if ( ob->objclass != FL_SCROLLBAR ) return; /* create a default object */ defobj = fl_create_scrollbar( ob->type, 0, 0, 50, 50, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->min != defsp->min || sp->max != defsp->max ) fprintf( fp, " bounds: %g %g\n", sp->min, sp->max ); if ( sp->val != defsp->val ) fprintf( fp, " value: %g\n", sp->val ); if ( sp->slsize != defsp->slsize ) fprintf( fp, " slsize: %.2f\n", sp->slsize ); if ( sp->step != defsp->step ) fprintf( fp, " step: %.3f\n", sp->step ); if ( sp->rdelta != defsp->rdelta || sp->ldelta != defsp->ldelta ) fprintf( fp, " increment: %g %g\n", sp->ldelta, sp->rdelta ); } /*************************************** ***************************************/ void scb_minmax_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double min = get_finput_value( scb_attrib->minval ); double max = get_finput_value( scb_attrib->maxval ); fl_set_scrollbar_bounds( scb_attrib->vdata, min, max ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void scb_delta_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double ldelta = get_finput_value( scb_attrib->ldelta ); double rdelta = get_finput_value( scb_attrib->rdelta ); fl_set_scrollbar_increment( scb_attrib->vdata, ldelta, rdelta ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void scb_slsize_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double slsize = get_finput_value( scb_attrib->slsize ); fl_set_scrollbar_size( scb_attrib->vdata, slsize ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void scb_step_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double step = get_finput_value( scb_attrib->step ); fl_set_scrollbar_step( scb_attrib->vdata, step ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void scb_initialvalue_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double val = get_finput_value( scb_attrib->initial_val ); fl_set_scrollbar_value( scb_attrib->vdata, val ); set_finput_value( scb_attrib->initial_val, scb_spec->val, -1 ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void scb_returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( scb_attrib->returnsetting, scb_attrib->vdata ); } #include "spec/scrollbar_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_rubber.c0000644000175000017500000002117011250707072015745 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_rubber.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * This file is part of the Form Designer. * * Someday, we'll have to re-write all of these so it fits with * X event handling better. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "include/forms.h" #include "fd_main.h" extern void color( unsigned long ); extern GC fd_gc, fd_xorgc, fd_copygc; extern Colormap fd_colormap; extern Display *fd_display; /**** ROUNDING *****/ static float xmin = 0.0, ymin = 0.0, width = 1280.0, height = 1024.0; static float stepsize = 10.0; /* Step size (for alignment) */ /*************************************** * Sets the step size ***************************************/ void set_step_size( float size ) { stepsize = size < 1.0 ? 1.0 : size; } /*************************************** * Returns the step size ***************************************/ float get_step_size( void ) { return stepsize; } /*************************************** * Sets the bounding box. ***************************************/ void set_bounding_box( float x, float y, float w, float h ) { xmin = x; ymin = y; width = w; height = h; } /*************************************** * Rounds the box size to the stepsize and inside the bounding box ***************************************/ static void round_size( float * x, float * y, float * w, float * h ) { int t; if ( *w > width ) *w = width; if ( *h > height ) *h = height; if ( stepsize > 0.0 ) { t = *w / stepsize + 0.5; if ( *w >= 0.0 ) *w = stepsize * t; else *w = stepsize * ( t - 1 ); t = *h / stepsize + 0.5; *h = stepsize * t; if ( *h >= 0.0 ) *h = stepsize * t; else *h = stepsize * ( t - 1 ); } if ( *x + *w > xmin + width ) *w = xmin + width - *x; if ( *y + *h > ymin + height ) *h = ymin + height - *y; if ( *x + *w < xmin ) *w = xmin - *x; if ( *y + *h < ymin ) *h = ymin - *y; if ( *w >= 0.0f && *w < stepsize ) *w = stepsize; if ( *h >= 0.0 && *h < stepsize ) *h = stepsize; if ( *w < 0.0 && *w > -stepsize ) *w = -stepsize; if ( *h < 0.0 && *h > -stepsize ) *h = -stepsize; } /*************************************** * Rounds the position to the stepsize and inside the bounding box ***************************************/ static void round_position( float * x, float * y, float * w, float * h ) { int t; if ( *w > width ) *w = width; if ( *h > height ) *h = height; if ( stepsize > 0.0 ) { t = *x / stepsize + 0.5; *x = stepsize * t; t = *y / stepsize + 0.5; *y = stepsize * t; } if ( *x < xmin ) *x = xmin; if ( *y < ymin ) *y = ymin; if ( *x + *w > xmin + width ) *x = xmin + width - *w; if ( *y + *h > ymin + height ) *y = ymin + height - *h; } /**** DRAWING ****/ /*************************************** * Draws a box ***************************************/ static void show_box( float x, float y, float w, float h ) { XSetFunction( fd_display, fd_gc, GXxor ); color( fd_col ^ fd_black ); rect( x, y, x + w - 1, y + h - 1 ); XSetFunction( fd_display, fd_gc, GXcopy ); } #define hide_box show_box /**** THE ACTUAL ROUTINES ****/ /*************************************** * Whether we should stop ***************************************/ static int ready( void ) { XEvent xev; if ( fl_check_forms( ) == FL_EVENT ) { fl_XNextEvent( &xev ); fli_xevent_name( "ready:", &xev ); return ( xev.type == ButtonRelease || ( is_pasting && xev.type == KeyPress ) ); } fl_msleep( 10 ); return 0; } /*************************************** * Returns the position of the mouse in world coordinates ***************************************/ void get_mouse_pos( float * xx, float * yy ) { FL_Coord x, y; unsigned int kmask; fl_get_win_mouse( main_window, &x, &y, &kmask ); *xx = x; *yy = y; } /*************************************** * Drag a box around until the user releases a mouse button ***************************************/ void move_box( float * x, float * y, float * w, float * h, int offset ) { float oldx = *x, oldy = *y, oldw = *w, oldh = *h; float xoff, yoff; if ( offset ) { get_mouse_pos( &xoff, &yoff ); xoff -= *x; yoff -= *y; } else { xoff = *w / 2.0; yoff = *h / 2.0; } show_box( *x, *y, *w, *h ); while ( ! ready( ) ) { get_mouse_pos( x, y ); *x -= xoff; *y -= yoff; round_position( x, y, w, h ); if ( *x != oldx || *y != oldy ) { hide_box( oldx, oldy, oldw, oldh ); show_box( *x, *y, *w, *h ); if ( fd_trackgeometry ) show_geometry( *x, *y, *w, *h ); oldx = *x; oldy = *y; oldw = *w; oldh = *h; } } hide_box( oldx, oldy, *w, *h ); } /*************************************** * Scales a box until the user releases a mouse button ***************************************/ void scale_box( float * x, float * y, float * w, float * h ) { float oldw = 1.0, oldh = 1.0; round_position( x, y, w, h ); while ( ! ready( ) ) { get_mouse_pos( w, h ); *w -= *x; *h -= *y; round_size( x, y, w, h ); if ( *w != oldw || *h != oldh ) { if ( fd_trackgeometry ) show_geometry( *x, *y, *w, *h ); hide_box( *x - 1, *y - 1, oldw, oldh ); show_box( *x - 1, *y - 1, *w, *h ); oldw = *w; oldh = *h; } } hide_box( *x - 1, *y - 1, oldw, oldh ); if ( *w < 0.0 ) { *x += *w; *w = - *w; } if ( *h < 0.0 ) { *y += *h; *h = - *h; } } /*************************************** ***************************************/ void color( unsigned long n ) { static unsigned long oldcol; if ( fd_gc && oldcol != n ) { XSetForeground( fd_display, fd_gc, n ); oldcol = n; } } /*************************************** ***************************************/ void rectf( FL_Coord x1, FL_Coord y1, FL_Coord x2, FL_Coord y2 ) { int x = x1, y = y1, w = x2 - x1, h = y2 - y1; fli_canonicalize_rect( &x, &y, &w, &h ); XFillRectangle( fd_display, main_window, fd_gc, x, y, w, h ); } /*************************************** ***************************************/ void rect( FL_Coord x1, FL_Coord y1, FL_Coord x2, FL_Coord y2 ) { FL_Coord x = x1, y = y1, w = x2 - x1, h = y2 - y1; fli_canonicalize_rect( &x, &y, &w, &h ); XDrawRectangle( fd_display, main_window, fd_gc, x, y, w, h ); } /*************************************** ***************************************/ void fd_clear( int x, int y, int w, int h ) { static GC blk_gc; if ( main_window && w > 0 && h > 0 ) { if ( ! blk_gc ) { blk_gc = XCreateGC( fd_display, main_window, 0, 0 ); XSetForeground( fd_display, blk_gc, fd_black ); } XFillRectangle( fd_display, main_window, blk_gc, x, y, w, h ); } } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/Makefile.in0000644000175000017500000007204211377311602015720 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am bin_PROGRAMS = fdesign$(EXEEXT) subdir = fdesign ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_fdesign_OBJECTS = fd_attribs.$(OBJEXT) fd_control.$(OBJEXT) \ fd_fake.$(OBJEXT) fd_file.$(OBJEXT) fd_file_fun.$(OBJEXT) \ fd_forms.$(OBJEXT) fd_groups.$(OBJEXT) fd_help.$(OBJEXT) \ fd_initforms.$(OBJEXT) fd_main.$(OBJEXT) fd_names.$(OBJEXT) \ fd_objects.$(OBJEXT) fd_pallette.$(OBJEXT) fd_printC.$(OBJEXT) \ fd_rubber.$(OBJEXT) fd_select.$(OBJEXT) fd_spec.$(OBJEXT) \ fd_super.$(OBJEXT) fd_util.$(OBJEXT) sp_browser.$(OBJEXT) \ sp_button.$(OBJEXT) sp_choice.$(OBJEXT) sp_counter.$(OBJEXT) \ sp_spinner.$(OBJEXT) sp_dial.$(OBJEXT) sp_freeobj.$(OBJEXT) \ sp_menu.$(OBJEXT) sp_pixmap.$(OBJEXT) sp_positioner.$(OBJEXT) \ sp_scrollbar.$(OBJEXT) sp_slider.$(OBJEXT) sp_twheel.$(OBJEXT) \ sp_xyplot.$(OBJEXT) sp_util.$(OBJEXT) fdesign_OBJECTS = $(am_fdesign_OBJECTS) am__DEPENDENCIES_1 = fdesign_DEPENDENCIES = ../lib/libforms.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(fdesign_SOURCES) DIST_SOURCES = $(fdesign_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D CLEANFILES = fdesign.1 EXTRA_DIST = Change Readme fdesign.man SUBDIRS = fd fd4test notes spec xpm man_MANS = fdesign.1 # forms.h is a generated file INCLUDES = -I../lib -I../lib/include -I./xpm -I$(top_srcdir)/lib $(X_CFLAGS) fdesign_LDADD = ../lib/libforms.la $(X_LIBS) $(X_PRE_LIBS) $(XPM_LIB) -lX11 $(LIBS) $(X_EXTRA_LIBS) fdesign_SOURCES = \ fd_attribs.c \ fd_control.c \ fd_fake.c \ fd_file.c \ fd_file_fun.c \ fd_forms.c \ fd_groups.c \ fd_help.c \ fd_help.h \ fd_initforms.c \ fd_main.c \ fd_main.h \ fd_names.c \ fd_objects.c \ fd_pallette.c \ fd_printC.c \ fd_rubber.c \ fd_select.c \ fd_spec.c \ fd_spec.h \ fd_super.c \ fd_util.c \ sp_browser.c \ sp_button.c \ sp_choice.c \ sp_counter.c \ sp_spinner.c \ sp_dial.c \ sp_freeobj.c \ sp_menu.c \ sp_pixmap.c \ sp_positioner.c \ sp_scrollbar.c \ sp_slider.c \ sp_twheel.c \ sp_xyplot.c \ sp_util.c \ xpm.h all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fdesign/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fdesign/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list fdesign$(EXEEXT): $(fdesign_OBJECTS) $(fdesign_DEPENDENCIES) @rm -f fdesign$(EXEEXT) $(LINK) $(fdesign_OBJECTS) $(fdesign_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_attribs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_control.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_fake.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_file_fun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_forms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_groups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_initforms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_names.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_objects.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_pallette.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_printC.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_rubber.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_spec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_super.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_browser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_button.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_choice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_counter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_dial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_freeobj.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_pixmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_positioner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_scrollbar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_slider.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_spinner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_twheel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sp_xyplot.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(MANS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 fdesign.1: cp -p $(srcdir)/fdesign.man fdesign.1 # viewforms.c \ # viewforms.h \ # viewforms_main.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/fdesign/sp_pixmap.c0000644000175000017500000002743411250720645016025 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_pixmap.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting pixmap/bitmap class specific attributes. Should * be absorbed into button class. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include #include "spec/pixmap_spec.h" extern FD_pixmapattrib *create_form_pixmapattrib( void ); static FD_pixmapattrib *px_attrib; static SuperSPEC *pixmap_spec; static IconInfo *info; static void show_spec( SuperSPEC * ); static void get_data_name( FL_OBJECT *, IconInfo * ); static FL_OBJECT *edited; /*************************************** ***************************************/ void * get_pixmap_spec_fdform( void ) { if ( ! px_attrib ) { px_attrib = create_form_pixmapattrib( ); fl_addto_choice( px_attrib->pixalign, align_name( FL_ALIGN_CENTER, 0 ) ); fl_addto_choice( px_attrib->pixalign, align_name( FL_ALIGN_TOP, 0 ) ); fl_addto_choice( px_attrib->pixalign, align_name( FL_ALIGN_BOTTOM, 0 ) ); fl_addto_choice( px_attrib->pixalign, align_name( FL_ALIGN_LEFT, 0 ) ); fl_addto_choice( px_attrib->pixalign, align_name( FL_ALIGN_RIGHT, 0 ) ); fl_set_input_return( px_attrib->filename, FL_RETURN_END ); } return px_attrib; } /*************************************** ***************************************/ void pixmap_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *pedited = px_attrib->vdata; superspec_to_spec( pedited ); show_spec( get_superspec( pedited ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec ) { info = spec->cspecv; fl_set_button( px_attrib->use_data, spec->use_data ); fl_set_button( px_attrib->fullpath, spec->fullpath ); fl_set_choice_text( px_attrib->pixalign, align_name( info->align, 0 ) ); fl_set_input( px_attrib->filename, info->filename ); } /*************************************** ***************************************/ int set_pixmap_attrib( FL_OBJECT * ob ) { px_attrib->vdata = edited = ob; pixmap_spec = get_superspec( ob ); info = pixmap_spec->cspecv; if ( ! info ) { M_err( "PixmapAttrib", "internal error" ); return -1; } ( ob->objclass == FL_PIXMAP ? fl_show_object : fl_hide_object ) ( px_attrib->pixalign ); show_spec( pixmap_spec ); return 0; } /*************************************** ***************************************/ static FL_OBJECT * create_a_pixmap( FL_OBJECT * ob ) { FL_OBJECT *defobj = NULL; /* create a default object */ if ( ob->objclass == FL_PIXMAP ) defobj = fl_create_pixmap( ob->type, 0, 0, 0, 0, "" ); else if ( ob->objclass == FL_BITMAP ) defobj = fl_create_bitmapbutton( ob->type, 0, 0, 0, 0, "" ); else fprintf( stderr, "Unknown pixmap/bitmap Class: %d\n", ob->objclass ); return defobj; } /*************************************** ***************************************/ static char * file_tail( const char * full ) { static char tmpbuf[ 512 ]; char *p; strcpy( tmpbuf, full ); if ( ( p = strrchr( tmpbuf, '/' ) ) ) strcpy( tmpbuf, p + 1 ); return tmpbuf; } /*************************************** ***************************************/ void emit_pixmap_header( FILE * fp, FL_OBJECT * ob ) { SuperSPEC *spec; char buf[ 512 ]; spec = get_superspec( ob ); info = spec->cspecv; if ( info->use_data && *info->data && *info->filename ) { if ( info->fullpath ) sprintf( buf, "#include \"%s\"", info->filename ); else sprintf( buf, "#include \"%s\"", file_tail( info->filename ) ); if ( ! is_duplicate_info( ob, buf ) ) fprintf( fp, "%s\n", buf ); } } /*************************************** ***************************************/ void emit_pixmap_code( FILE * fp, FL_OBJECT * ob ) { SuperSPEC *btspec, *defspec; FL_OBJECT *defobj; IconInfo *definfo; if ( ! ( defobj = create_a_pixmap( ob ) ) ) return; defspec = get_superspec( defobj ); btspec = get_superspec( ob ); if ( ! ( info = btspec->cspecv ) ) return; definfo = defspec->cspecv; if ( *info->filename && ! info->use_data ) fprintf( fp, " fl_set_%s_file( obj, \"%s\" );\n", ob->objclass == FL_PIXMAP ? "pixmap" : "bitmap", info->filename ); if ( info->align != definfo->align && ob->objclass == FL_PIXMAP ) fprintf( fp, " fl_set_pixmap_align( obj, %s, %d, %d );\n", align_name( info->align | FL_ALIGN_INSIDE, 1 ), info->dx, info->dy ); if ( *info->data && info->use_data && *info->filename ) { if ( ob->objclass == FL_PIXMAP ) fprintf( fp, " fl_set_pixmap_data( obj, %s );\n", info->data ); else fprintf( fp, " fl_set_bitmap_data( obj, %s, %s, " "( unsigned char * ) %s );\n", info->width, info->height, info->data ); } fl_free_object( defobj ); } /*************************************** ***************************************/ void save_pixmap_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defspec, *btspec; IconInfo *definfo; if ( ! ( defobj = create_a_pixmap( ob ) ) ) return; defspec = get_superspec( defobj ); definfo = defspec->cspecv; btspec = get_superspec( ob ); info = btspec->cspecv; if ( ! info || ! definfo ) { M_err( "SavePixmapAttrib", "internal error" ); return; } get_data_name( ob, info ); if ( *info->filename ) { fprintf( fp, " file: %s\n", info->filename ); fprintf( fp, " fullpath: %d\n", info->fullpath ); } if ( info->align != definfo->align ) fprintf( fp, " align: %s\n", align_name( info->align | FL_ALIGN_INSIDE, 0 ) ); if ( *info->data && *info->filename ) fprintf( fp, " data: %s\n", info->data ); if ( *info->width ) fprintf( fp, " width: %s\n", info->width ); if ( *info->height ) fprintf( fp, " height: %s\n", info->height ); fl_free_object( defobj ); } /*************************************** ***************************************/ void pixmapusedata_change( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { info->use_data = fl_get_button( ob ); } /*************************************** ***************************************/ void pixmapfullpath_cb( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { info->fullpath = fl_get_button( ob ); } /*************************************** ***************************************/ void pixmap_filename_change( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { strcpy( info->filename, fl_get_input( ob ) ); if ( *info->filename ) ( edited->objclass == FL_PIXMAP ? fl_set_pixmap_file : fl_set_bitmap_file ) ( edited, info->filename ); else set_testing_pixmap( edited ); /* show the default crab */ if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void pixmapalign_change( FL_OBJECT * ob, long data FL_UNUSED_ARG ) { const char *s = fl_get_choice_text( ob ); if ( ! s ) return; info->align = align_val( s ); /* Don't allow outside align */ fl_set_pixmap_align( edited, info->align | FL_ALIGN_INSIDE, info->dx, info->dy ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ static int loadfile( const char * file, void * data FL_UNUSED_ARG ) { char buf[ 512 ]; char *cwd = fli_getcwd( buf, sizeof buf - 2 ); const char *s = strstr( file, cwd ); if ( ! s ) s = file; else s = file + strlen( cwd ) + 1; fl_set_input( px_attrib->filename, s ); fl_call_object_callback( px_attrib->filename ); return 1; } /*************************************** ***************************************/ void pixmaplookfor_pixmapfile_cb( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { fl_use_fselector( XPM_FSELECTOR ); fl_set_fselector_placement( FL_PLACE_MOUSE ); fl_set_fselector_callback( loadfile, 0 ); fl_show_fselector( edited->objclass == FL_PIXMAP ? "XPM file" : "XBM file", "", edited->objclass == FL_PIXMAP ? "*.xpm" : "*.xbm", "" ); } /*************************************** * Read the specified xpm/xbm filename, and return the data name * and size ***************************************/ static void get_xpm_stuff( IconInfo * in, FILE * fp ) { char buf[ 128 ], *p; int done = 0; while ( fgets( buf, sizeof buf - 1, fp ) && ! done ) { if ( ( p = strstr( buf, "static char" ) ) ) { char *q = in->data; *p += 11; while ( *p && *++p != '*' ) /* empty */ ; while ( *p && *++p != '[' ) /* ] */ if ( ! isspace( ( int ) *p ) ) *q++ = *p; *q = '\0'; } } } /*************************************** ***************************************/ static void get_xbm_stuff( IconInfo * in, FILE * fp FL_UNUSED_ARG ) { char buf[ 512 ], *p; strcpy( buf, in->filename ); if ( ( p = strrchr( buf, '/' ) ) ) strcpy( buf, ++p ); if ( ( p = strrchr( buf, '.' ) ) ) *p = '\0'; strcat( strcpy( in->width, buf ), "_width" ); strcat( strcpy( in->height, buf ), "_height" ); strcat( strcpy( in->data, buf ), "_bits" ); } /*************************************** ***************************************/ static void get_data_name( FL_OBJECT * ob, IconInfo * inf ) { FILE *fp; if ( ob->objclass != FL_BITMAP && ob->objclass != FL_PIXMAP ) { *inf->filename = *inf->width = *inf->height = '\0'; return; } if ( ! inf->use_data || ! *inf->filename ) { *inf->data = *inf->width = *inf->height = '\0'; return; } if ( ! ( fp = fopen( inf->filename, "r" ) ) ) { fprintf( stderr, "Can't open %s\n", inf->filename ); *inf->filename = '\0'; return; } if ( ob->objclass == FL_PIXMAP ) get_xpm_stuff( inf, fp ); else get_xbm_stuff( inf, fp ); fclose( fp ); } #include "spec/pixmap_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_main.c0000644000175000017500000007521111375052611015415 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_main.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * This is the main module of the Form Designer, a program that * helps you to design form in a fully interactive way. It * automatically generates the corresponding C-code. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "fd/ui_theforms.h" #include "fd_main.h" #include "xpm/fd_logo.xpm" #include #include #include #if defined(__EMX__) || defined(WIN32) #define strcasecmp stricmp #endif #if defined __VMS && __VMS_VER < 70000000 extern int strcasecmp( const char *, const char * ); #endif /*************************************** * Info about the program ***************************************/ static const char *fd_version[ ] = { "fdesign (FORM Designer)" "$State: Exp $ $Revision: 1.39 $ of $Date: 2010/05/19 21:18:01 $", "Copyright (c) 1996-2002 by T.C. Zhao and Mark Overmars", "GNU Lesser General Public License sinc 2002", NULL }; /*************************************** * Remove RCS keywords ***************************************/ static const char * rm_rcs_kw( const char * s ) { static unsigned char buf[ 5 ][ 255 ]; static int nbuf; unsigned char *q = buf[ ( nbuf = ( nbuf + 1 ) % 5 ) ]; int left = 0, lastc = -1; while ( *s && ( q - buf[ nbuf ] ) < ( int ) sizeof buf[ nbuf ] - 2 ) { switch ( *s ) { case '$': if ( ( left = ! left ) ) while ( *s && *s != ':' ) s++; break; default: /* copy the char and remove extra space */ if ( ! ( lastc == ' ' && *s == ' ' ) ) *q++ = lastc = *s; break; } s++; } *q = '\0'; return ( const char * ) buf[ nbuf ]; } /*************************************** ***************************************/ static void print_version( int die ) { const char **p = fd_version; for ( ; *p; p++ ) fprintf( stderr, "%s\n", rm_rcs_kw( *p ) ); if ( die ) exit( 0 ); } /*************************************** ***************************************/ static void print_xforms_version( int die ) { fprintf( stderr, "FORMS Library Version %d.%d.%s\n", FL_VERSION, FL_REVISION, FL_FIXLEVEL ); if ( die ) exit( 0 ); } char xform_header[ 128 ] = "forms.h"; char glcanvas_header[ 128 ] = "glcanvas.h"; long main_window = 0; /* The main screen window */ FL_Coord winw, winh; /* various options of the program */ FD_Opt fdopt; Conv convertor[ MAX_CONVERTOR + 1 ]; int fd_cntlborder; int fd_bwidth; int is_pasting; int fd_trackgeometry = 1; int fd_show_palette; int fd_buttonLabelSize; int fd_helpfontsize = 14; int fd_align_fontsize = FL_TINY_SIZE; int fd_type_fontsize = FL_TINY_SIZE; int no_selection = 0; GC fd_gc; Colormap fd_colormap; unsigned long fd_red, fd_black, fd_white, fd_col; Display *fd_display; int changed = 0; /* Whether something has changed. */ char main_name[ MAX_VAR_LEN ]; /* Name of the main calling routine */ char *loadedfile; char *loadedfile_fullpath; /*************************************** * Lets the user add some object to the form ***************************************/ static void add_something( void ) { FL_OBJECT *obj; float xx, yy, ww = 0.0, hh = 0.0; if ( ! cur_form ) { fl_show_alert( "Warning", "Please add a form first", "", 0 ); return; } if ( cur_class == -1 ) { fl_show_alert( "Warning", "Please select what object to add first", "", 0 ); return; } fl_winset( main_window ); get_mouse_pos( &xx, &yy ); scale_box( &xx, &yy, &ww, &hh ); if ( ww < 5.0 || hh < 5.0 ) return; obj = add_an_object( cur_class, -1, xx, yy, ww, hh ); clear_selection( ); addto_selection( obj ); changed = 1; /* reset current selection */ fl_deselect_browser( fd_control->objectbrowser ); reset_pallette( ); cur_class = -1; } /*************************************** * Changes the main calling name. ***************************************/ void mainname_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { const char *s; if ( ! ( s = fl_show_input( "Main creation routine name:", main_name ) ) ) return; if ( *s ) strcpy( main_name, s ); else strcpy( main_name, "create_the_forms" ); changed = 1; } /*************************************** ***************************************/ static int double_click( const XEvent * xev ) { static Time lasttime; static unsigned int lastbut; static int lastx, lasty; int dblclk, x = xev->xbutton.x, y = xev->xbutton.y; dblclk = xev->xbutton.button == lastbut && xev->xbutton.time - lasttime < FL_CLICK_TIMEOUT && lastx == x && lasty == y; lasttime = xev->xbutton.time; lastbut = xev->xbutton.button; lastx = x; lasty = y; return dblclk; } /*************************************** * Handle mouse click inside the working window ***************************************/ static int handle_click( XEvent * xev, void * p FL_UNUSED_ARG ) { int dblclk = double_click( xev ); if ( no_selection ) return 0; if ( dblclk ) { if ( xev->xbutton.button == 1 ) cut_selection( ); else if ( xev->xbutton.button == 3 ) change_selection( ); redraw_the_form( 0 ); return 0; } if ( xev->xbutton.button == 1 && cur_class != -1 ) { XEvent ev; XNextEvent( fl_display, &ev ); if ( ev.type == MotionNotify ) add_something( ); } else if ( is_pasting ) /* empty */; else if ( within_selection( xev->xbutton.x, xev->xbutton.y ) && xev->xbutton.button != 3 ) { XEvent ev; XNextEvent( fl_display, &ev ); if ( ev.type == MotionNotify ) handle_move( xev ); else if ( ev.type == ButtonRelease ) handle_select( &ev ); } else handle_select( xev ); redraw_the_form( 0 ); return 0; } /*************************************** ***************************************/ static void handle_keypress( const XKeyEvent * xev ) { KeySym keysym; char keybuf[ 128 ]; int stp = get_snap_size( ); int shift = ShiftIsDown( xev->state ); XLookupString( ( XKeyEvent * ) xev, keybuf, sizeof keybuf, &keysym, 0 ); if ( keysym >= XK_F1 && keysym <= XK_F12 ) func_cb( 0, keysym - XK_F1 + 1 ); else if ( IsRight( keysym ) ) ( shift ? resize_selection : move_selection )( stp, 0 ); else if ( IsLeft( keysym ) ) ( shift ? resize_selection : move_selection )( -stp, 0 ); else if ( IsUp( keysym ) ) ( shift ? resize_selection : move_selection )( 0, -stp ); else if ( IsDown(keysym ) ) ( shift ? resize_selection : move_selection )( 0, stp ); else if ( keysym == XK_Escape ) exit_cb( 0, 0 ); else if ( keysym == XK_t || keysym == XK_T ) ( fd_test->test->visible ? stoptest_cb : test_cb )( 0, 0 ); else if ( keysym == XK_s || keysym == XK_S ) saveforms_as_cb( 0, 0 ); else if ( IsTab( keysym ) ) ( shift ? prev_selection : next_selection )( ); else if ( keysym >= '0' && keysym <= '9' ) { if ( ( stp = keysym - '0' ) == 0 ) stp = 10; set_snap_size( stp, 1 ); } } /*************************************** * Process events on the main window. Since rubber band was implemented * badly, can't use buttonpress callback ***************************************/ void process_xevent( int no_add FL_UNUSED_ARG ) { XEvent xev; fl_XNextEvent( &xev ); fli_xevent_name( "fd_main", &xev ); fl_winset( main_window ); switch ( xev.type ) { case KeyPress: handle_keypress( ( XKeyEvent * ) & xev ); break; } } /*************************************** * The main event handling loop. ***************************************/ static void main_loop( void ) { FL_OBJECT *obj; char str[ 3 * MAX_VAR_LEN + 20 ], name[ MAX_VAR_LEN ]; char cbname[ MAX_VAR_LEN ], argname[ MAX_VAR_LEN ]; while ( 1 ) { obj = fl_do_forms( ); /* Check whether testing a form */ if ( thetestform != NULL && obj != FL_EVENT ) { get_object_name( obj, name, cbname, argname ); if ( ! *name ) strcpy( name, "" ); if ( ! *cbname ) sprintf( str, "Called: %s( %s, %s );", cbname, name, argname ); else sprintf( str, "Returned: %s", name ); fl_addto_browser( fd_test->browser, str ); } if ( obj == FL_EVENT ) process_xevent( 0 ); } } #define DEFGeom "320x250+150+420" /* working area geometry */ #define DEFcntlGeom "+150+1" /* control panel position */ #define DEFattribGeom "+210+25" /* Attributes panel position */ #define DEFtestGeom "-275+2" /* Test panel position */ #define DEFalignGeom "-1+1" /* align panel position */ #define DEFhelpGeom "-1+1" /* Help panel position */ static FL_CMD_OPT fd_cmdopt[ ] = { { "-geometry", "*geometry", XrmoptionSepArg, NULL }, { "-border", ".XForm.Border", XrmoptionNoArg, "1" }, { "-convert", ".convert", XrmoptionNoArg, "1" }, { "-dir", ".dir", XrmoptionSepArg, NULL }, { "-unit", "*unit", XrmoptionSepArg, NULL }, { "-altformat", "*altformat", XrmoptionNoArg, "1" }, { "-I", "*xformHeader", XrmoptionSepArg, NULL }, { "-G", "*glcanvasHeader", XrmoptionSepArg, NULL }, { "-main", "*main", XrmoptionNoArg, "1" }, { "-callback", "*callback", XrmoptionNoArg, "1" }, { "-lax", "*lax", XrmoptionNoArg, "1" }, { "-nocode", "*nocode", XrmoptionNoArg, "0" }, { "-version", ".fdversion", XrmoptionNoArg, "1" }, { "-compensate", ".compensate", XrmoptionNoArg, "1" }, { "-ada", ".language", XrmoptionNoArg, "ada95" }, { "-ada95", ".language", XrmoptionNoArg, "ada95" }, { "-perl", ".language", XrmoptionNoArg, "perl" }, { "-python", ".language", XrmoptionNoArg, "python" }, { "-fortran", ".language", XrmoptionNoArg, "fortran" }, { "-pascal", ".language", XrmoptionNoArg, "pascal" }, { "-scm", ".language", XrmoptionNoArg, "scm" }, { "-ps", ".language", XrmoptionNoArg, "ps" }, { "-filter", ".filter", XrmoptionSepArg, NULL }, { "-help", ".help", XrmoptionNoArg, "1" } }; #define Ncopt (sizeof fd_cmdopt / sizeof *fd_cmdopt ) /* resources */ #define NG 64 static char fdgeom[ NG ] = DEFGeom; static char fdcntlgeom[ NG ] = DEFcntlGeom; static char fdattribgeom[ NG ] = DEFattribGeom; static char fdtestgeom[ NG ] = DEFtestGeom; static char fdaligngeom[ NG ] = DEFalignGeom; static char fdhelpgeom[ NG ] = DEFhelpGeom; static char fd_attrib_col[ NG ]; static char fd_sunit[ 32 ]; static char fd_slanguage[ 32 ]; static char fd_sfilter[ 32 ]; static FL_resource fdres[ ] = { { "formDesign.geometry", "Geometry", FL_STRING, fdgeom, 0, NG }, { "workingArea.geometry", "Geometry", FL_STRING, fdgeom, 0, NG }, { "control.geometry", "Control.Geometry", FL_STRING, fdcntlgeom, 0, NG }, { "attributes.geometry", "Attributes.Geometry", FL_STRING, fdattribgeom, 0, NG }, { "attributes.background", "Attributes.Background", FL_STRING, fd_attrib_col, 0, NG }, { "test.geometry", "Test.Geometry", FL_STRING, fdtestgeom, 0, NG }, { "help.geometry", "Help.Geometry", FL_STRING, fdhelpgeom, 0, NG }, { "align.geometry", "Align.Geometry", FL_STRING, fdaligngeom, 0, NG }, { "control.border", "XForm.Border", FL_BOOL, &fd_cntlborder, "0", 0 }, { "convert", "Convert", FL_BOOL, &fdopt.conv_only, "0", 0 }, { "compensate", "Compensate", FL_BOOL, &fdopt.compensate, "0", 0 }, { "unit", "Unit", FL_STRING, fd_sunit, "pixel", 30 }, { "language", "Language", FL_STRING, fd_slanguage, "C", 30 }, { "filter", "Filter", FL_STRING, fd_sfilter, 0, 30 }, { "xformHeader", "XFormHeader", FL_STRING, xform_header, "forms.h", 128 }, { "glcanvasHeader", "GLCanvasHeader", FL_STRING, glcanvas_header, "glcanvas.h", 128 }, { "altformat", "AltFormat", FL_BOOL, &fdopt.altformat, "0", 0 }, { "helpFontSize", "HelpFontSize", FL_INT, &fd_helpfontsize, "12", 0 }, { "nocode", "NoCode", FL_BOOL, &fdopt.emit_code, "1", 0 }, { "main", "Main", FL_BOOL, &fdopt.emit_main, "0", 0 }, { "callback", "Callback", FL_BOOL, &fdopt.emit_cb, "0", 0 }, { "lax", "Lax", FL_BOOL, &fdopt.lax, "0", 0 }, }; #define Nropt ( sizeof fdres / sizeof *fdres ) char *helps[ ] = { "-help this message", "-display host:dpy display name", "-name appname change app name", "-border add border to control panel", "-unit {mm|point|pixel|cp|cmm} unit of measure. Default pixel", "-nocode supress code generation", "-main emit main program template", "-callback emit callback stubs", "-altformat select alternative output format", "-compensate emit font/server compensation code", "-lax go easy on syntax checking", "-I headername alternate header file (forms.h default)", "-G glcanvas headername alternate glcanvas header file (glcanvas.h default)", "-convert file-list convert .fd to code non-interactively", "-dir destdir output any generated files in destdir", "-geometry geom initial working area geometry", 0, }; /*************************************** ***************************************/ static void usage( char * s, int die ) { char **q = helps; Conv *cv = convertor; fprintf( stderr, "usage: %s: [options] [file.fd]\n", s ); fprintf( stderr, " where options are\n" ); for ( ; *q; q++ ) fprintf( stderr, " %s\n", *q ); fprintf( stderr, " Language Options\n " ); for ( cv += 2; cv->lang_name; cv++ ) fprintf( stderr, "-%s ", cv->lang_name ); fprintf( stderr, "\n -filter f filter name" ); fprintf( stderr, "\n\n See also the online Help for resources info\n" ); if ( die ) exit( 1 ); } /*************************************** ***************************************/ static int lang_val( const char *s ) { int i; for ( i = 1; i < MAX_CONVERTOR; i++ ) if ( strcasecmp( s, convertor[ i ].lang_name ) == 0 || strncmp( s, convertor[ i ].lang_name, 3 ) == 0 ) return i; return FD_C; } static int ignored_fake_configure; /*************************************** ***************************************/ static int handle_configure( XEvent * xev, void * p FL_UNUSED_ARG ) { /* Some window managers sends bogus configure events. Make a note of it */ if ( xev->xconfigure.send_event ) ignored_fake_configure = winw != xev->xconfigure.width && winh != xev->xconfigure.height; else { winw = xev->xconfigure.width; winh = xev->xconfigure.height; if ( cur_form && ( cur_form->w > winw || cur_form->h > winh ) ) { reshape_form_background( winw, winh ); redraw_the_form( 1 ); } if ( fd_resize->resize->visible ) { fl_set_spinner_value( fd_resize->width, winw ); fl_set_spinner_value( fd_resize->height, winh ); } changed = FL_TRUE; } return 1; } /*************************************** ***************************************/ static int handle_expose( XEvent * xev, void * p FL_UNUSED_ARG ) { if ( xev->xexpose.count == 0 ) { M_warn( "FD_Expose", "" ); /* If we have ignored a previous configure event, need the window size might not be correct. Re-read */ if ( ignored_fake_configure ) fl_get_winsize( main_window, &winw, &winh ); /* Change form background size */ if ( cur_form && ( cur_form->w != winw || cur_form->h != winh ) ) reshape_form_background( winw, winh ); redraw_the_form( 1 ); ignored_fake_configure = 0; return 1; } return 0; } /*************************************** * Need the ability to convert/help without requiring an X connection. ***************************************/ static void pre_connect( int argc, char * argv[ ] ) { int i, s; static char filter[ 128 ]; for ( i = 1; i < argc && *argv[ i ] == '-'; i++ ) { if ( strncmp( argv[ i ] + 1, "help", 1 ) == 0 ) usage( argv[ 0 ], 1 ); else if ( strncmp( argv[ i ] + 1, "version", 4 ) == 0 ) print_version( 1 ); else if ( strncmp( argv[ i ] + 1, "xforms_version", 4 ) == 0 ) print_xforms_version( 1 ); else if ( strncmp( argv[ i ] + 1, "altformat", 3 ) == 0 ) fdopt.altformat = 1; else if ( strncmp( argv[ i ] + 1, "callback", 3 ) == 0 ) fdopt.emit_cb = 1; else if ( strncmp(argv[ i ] + 1, "compensate", 4 ) == 0 ) fdopt.compensate = 1; else if ( strncmp( argv[ i ] + 1, "main", 3 ) == 0 ) fdopt.emit_main = 1; else if ( strncmp( argv[ i ] + 1, "noc", 3 ) == 0 ) fdopt.emit_code = 0; else if ( strncmp( argv[ i ] + 1, "unit", 4 ) == 0 && i + 1 < argc ) fdopt.unit = unit_val( argv[ ++i ] ); else if ( strncmp( argv[ i ] + 1, "filter", 4 ) == 0 && i + 1 < argc ) strcpy( filter, argv[ ++i ] ); else if ( strcmp( argv[ i ], "-I" ) == 0 && i + 1 < argc ) strcpy( xform_header, argv[ ++i ] ); else if ( strcmp( argv[ i ], "-G" ) == 0 && i + 1 < argc ) strcpy( glcanvas_header, argv[ ++i ] ); else if ( strcmp( argv[ i ], "-bw" ) == 0 && i + 1 < argc ) fd_bwidth = atoi( argv[ ++i ] ); else if ( strncmp( argv[ i ] + 1, "convert", 1 ) == 0 ) { fli_no_connection = 1; fli_internal_init( ); fdopt.conv_only = 1; } else if ( strncmp( argv[ i ] + 1, "dir", 3 ) == 0 && i + 1 < argc ) { fdopt.output_dir = malloc( strlen( argv[ ++i ] ) + 1 ); strcpy( fdopt.output_dir, argv[ i ] ); } else if ( strncmp( argv[ i ] + 1, "lang", 4 ) == 0 && i + 1 < argc ) fdopt.language = lang_val( argv[ ++i ] ); else { fdopt.language = lang_val( argv[ i ] + 1 ); } } if ( fdopt.language < FD_C || fdopt.language > FD_EXP ) fdopt.language = FD_C; if ( filter[ 0 ] ) convertor[ fdopt.language ].extern_convertor = filter; if ( convertor[ fdopt.language ].init ) convertor[ fdopt.language ].init( ); /* No need to check for C syntax if not C program */ if ( fdopt.language != FD_C ) fdopt.lax = 1; if ( fdopt.conv_only ) { fli_set_app_name( argv[ 0 ], "Fdesign" ); /* resource routine wants this */ fli_init_context( ); create_the_forms( ); init_classes( ); fli_dpi = 95; if ( i > argc - 1 ) { fprintf( stderr, "-convert requires arguments\n" ); usage( argv[ 0 ], 1 ); } for ( s = i; s < argc; s++ ) { if ( load_forms( FL_FALSE, argv[ s ], 0 ) < 0 ) { fprintf( stderr, "Unable to load %s\n", argv[ s ] ); exit( 1 ); } if ( ! save_forms( argv[ s ] ) ) { fprintf( stderr, "Unable to convert %s\n", argv[ s ] ); exit( 1 ); } } exit( 0 ); } } /*************************************** ***************************************/ static int parse_geometry( const char * gstr, int * x, int * y, unsigned int * w, unsigned int * h ) { int s; s = XParseGeometry( ( char * ) gstr, x, y, w, h ); if ( s & XValue && s & XNegative ) *x = fl_scrw - FL_abs( *x ); if ( s & YValue && s & YNegative ) *y = fl_scrh - FL_abs( *y ); return s; } #include /*************************************** ***************************************/ static void interrupted( int s FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { exit_cb( 0, 0 ); } /*************************************** * Default action for delete window client message ***************************************/ static int delete_handler( FL_FORM * form FL_UNUSED_ARG, void * data FL_UNUSED_ARG ) { if ( changed && fl_show_question( "Changes have not been saved\n" "Save them now ?", 1 ) && ! save_forms( NULL ) ) return FL_IGNORE; exit( 0 ); return 0; /* shut up compiler */ } /*************************************** * Always output perl code in altformat ***************************************/ static void perl_init( void ) { fdopt.altformat = 1; } /*************************************** ***************************************/ static void initialize( void ) { fdopt.conv_only = 0; fdopt.language = FD_C; fdopt.emit_code = 1; convertor[ FD_EXP ].lang_name = "exp"; convertor[ MAX_CONVERTOR ].lang_name = NULL; convertor[ FD_C ].lang_name = "C"; convertor[ FD_C ].convert = C_output; convertor[ FD_ADA95 ].lang_name = "ada"; convertor[ FD_ADA95 ].extern_convertor = "flc2ada"; convertor[ FD_ADA95 ].need_c_code = 1; convertor[ FD_PASCAL ].lang_name = "pascal"; convertor[ FD_PASCAL ].extern_convertor = "fd2pascal"; convertor[ FD_PS ].lang_name = "ps"; convertor[ FD_PS ].extern_convertor = "fd2ps"; convertor[ FD_PERL ].lang_name = "perl"; convertor[ FD_PERL ].need_c_code = 1; convertor[ FD_PERL ].extern_convertor = "fd2perl"; convertor[ FD_PERL ].init = perl_init; convertor[ FD_PYTHON ].lang_name = "python"; convertor[ FD_PYTHON ].extern_convertor = "fd2python"; convertor[ FD_FORTRAN ].lang_name = "fortran"; convertor[ FD_FORTRAN ].extern_convertor = "fd2fortran"; convertor[ FD_SCM ].lang_name = "scm"; convertor[ FD_SCM ].extern_convertor = "fd2scm"; } /*************************************** ***************************************/ static int ignore_close( FL_FORM *a FL_UNUSED_ARG, void *b FL_UNUSED_ARG ) { return FL_IGNORE; } /*************************************** ***************************************/ int main( int argc, char * argv[ ] ) { unsigned int w = 0, h = 0; int x = 0, y = 0, s, version, revision; FL_IOPT cntl; unsigned int mask; char *tmp = NULL; /* Before doing anything, check to make sure the library is made correctly */ if ( FL_INCLUDE_VERSION != fl_library_version( &version, &revision ) ) { fprintf( stderr, "Library and header mismatch\n" ); fprintf( stderr, " Header Version:%d.%d.%s\n", FL_VERSION, FL_REVISION, FL_FIXLEVEL ); fprintf( stderr, " Library version:%d.%d\n", version, revision ); } initialize( ); /* For conversion, version and usage help, we don't need a connection. pre_connect will exit in such circumstances. */ pre_connect( argc, argv ); /* Force fdesign to come up in default visual */ cntl.vclass = FL_DefaultVisual; cntl.doubleBuffer = 0; cntl.browserFontSize = FL_NORMAL_FONT; mask = FL_PDVisual | FL_PDDouble | FL_PDBrowserFontSize; cntl.sharedColormap = 1; mask |= FL_PDSharedMap; fl_set_defaults( mask, &cntl ); if ( ! ( fd_display = fl_initialize( &argc, argv, 0, fd_cmdopt, Ncopt ) ) ) exit( 1 ); fl_get_app_resources( fdres, Nropt ); fl_add_signal_callback( SIGINT, interrupted, 0 ); if ( argv[ 1 ] && argv[ 1 ][ 0 ] == '-' ) { fprintf( stderr, " Unknown option: %s\n", argv[ 1 ] ); usage( argv[ 0 ], 1 ); } fli_cntl.coordUnit = FL_COORD_PIXEL; fdopt.unit = unit_val( fd_sunit ); fdopt.language = lang_val( fd_slanguage ); if ( *fd_sfilter ) convertor[ fdopt.language ].extern_convertor = fd_sfilter; /* No need to check for C syntax if not C program */ if ( fdopt.language != FD_C ) fdopt.lax = 1; if ( convertor[ fdopt.language ].init ) convertor[ fdopt.language ].init( ); fd_bwidth = fli_cntl.borderWidth; M_warn( "fdesign", "UNIT=%s BW=%d", unit_name( fdopt.unit ), fd_bwidth ); create_the_forms( ); fl_set_atclose( delete_handler, 0 ); /* Must suspend user requested button label font throughout fdesign and enable it only when testing */ fd_buttonLabelSize = fli_cntl.buttonFontSize; fli_cntl.buttonFontSize = 0; /* Initialize stuff */ init_classes( ); fl_set_counter_bounds( fd_align->snapobj, 0.0, 500.0 ); fl_set_counter_step( fd_align->snapobj, 1.0, 5.0 ); fl_set_counter_value( fd_align->snapobj, 10.0 ); fl_set_counter_precision( fd_align->snapobj, 0 ); fl_set_form_atclose( fd_align->align, ignore_close, NULL ); fl_set_spinner_bounds( fd_resize->width, 1, SHRT_MAX ); fl_set_spinner_bounds( fd_resize->height, 1, SHRT_MAX ); fl_set_form_atclose( fd_resize->resize, ignore_close, NULL ); fl_set_form_atclose( fd_attrib->attrib, ignore_close, NULL ); fl_set_form_atclose( fd_attrib->attrib, ignore_close, NULL ); fl_set_form_atclose( fd_test->test, ignore_close, NULL ); fl_set_form_atclose( fd_help->helpform, ignore_close, NULL ); thetestform = NULL; strcpy( main_name, "create_the_forms" ); /* Load files */ /* If only one argument and the file does not exist, we can assume that the intention is to create a new file so we don't bother to try to load it */ if ( argc >= 2 && access( tmp = append_fd_suffix( argv[ argc - 1 ] ), R_OK ) == 0 ) { for ( s = 1; s < argc; s++ ) if ( load_forms( s == 1 ? FL_FALSE : FL_TRUE, argv[ s ], 0 ) < 0 ) break; } else { select_object_by_class( FL_BUTTON ); select_pallette_entry( FL_BUTTON ); } fl_safe_free( tmp ); /* Do auto-naming for single file only */ if ( argc == 2 ) loadedfile = fl_strdup( argv[ 1 ] ); /* See if color change */ if ( fd_attrib_col[ 0 ] ) { long c = FL_FREE_COL1 - 10; fl_mapcolor_name( c, fd_attrib_col ); modify_attrib_basic_color( c, c ); } parse_geometry( fdcntlgeom, &x, &y, &w, &h ); fl_set_form_position( fd_control->control, x, y ); fl_set_app_mainform( fd_control->control ); fli_set_form_icon_data( fd_control->control, fd_logo_pixels ); fl_show_form(fd_control->control, FL_PLACE_GEOMETRY, ( 1 || fd_cntlborder ) ? FL_FULLBORDER : FL_TRANSIENT, "Control" ); /* Other geometries */ parse_geometry( fdattribgeom, &x, &y, &w, &h ); fl_set_form_position( fd_attrib->attrib, x, y ); parse_geometry( fdtestgeom, &x, &y, &w, &h ); fl_set_form_position( fd_test->test, x, y ); parse_geometry( fdaligngeom, &x, &y, &w, &h ); fl_set_form_position( fd_align->align, x, y ); parse_geometry( fdhelpgeom, &x, &y, &w, &h ); fl_set_form_position( fd_help->helpform, x, y ); s = parse_geometry( fdgeom, &x, &y, &w, &h ); if ( s & XValue || s & YValue ) fl_winposition( x, y ); if ( s & WidthValue && s & HeightValue ) fl_initial_winsize( w, h ); /* If a form is already loaded, use that size */ if ( cur_form ) { y -= cur_form->h - h; w = cur_form->w; h = cur_form->h; fl_initial_wingeometry( x, y, w, h ); } winw = w; winh = h; fd_colormap = fl_state[ fl_vmode ].colormap; fd_white = fl_get_flcolor( FL_WHITE ); fd_red = fl_get_flcolor( FL_RED ); fd_black = fl_get_flcolor( FL_BLACK ); fd_col = fl_get_flcolor( FL_COL1 ); main_window = fli_cmap_winopen( fl_root, fd_colormap, "Form Design" ); fl_set_fselector_transient( 1 ); fl_add_event_callback( main_window, Expose, handle_expose, 0 ); fl_add_event_callback( main_window, ConfigureNotify, handle_configure, 0 ); fl_add_event_callback( main_window, ButtonPress, handle_click, 0 ); fl_addto_selected_xevent( main_window, ButtonMotionMask | PointerMotionHintMask ); fl_addto_selected_xevent( main_window, ButtonReleaseMask ); redraw_the_form( 1 ); /* GC is valid only after at least one window is created */ fd_gc = fl_state[ fl_vmode ].gc[ 8 ]; main_loop( ); return 0; } /*************************************** ***************************************/ void set_snap_size( int n, int cb ) { fl_set_counter_value( fd_align->snapobj, n > 0 ? n : 5 ); if ( cb ) fl_call_object_callback( fd_align->snapobj ); } /*************************************** ***************************************/ int get_snap_size( void ) { return 0.01 + fl_get_counter_value( fd_align->snapobj ); } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_help.c0000644000175000017500000003451611247055173015430 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_help.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * This file is part of the Form Designer. * * It contains the routines for the help feature of the designer. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "include/forms.h" #include "fd_main.h" #include "fd/ui_theforms.h" /*************************************** * Loads the help browser with specific information. ***************************************/ static void load_it( char str[ ][ 80 ] ) { int i; fl_freeze_form( fd_help->helpform ); fl_clear_browser( fd_help->browser ); for ( i = 0; str[ i ][ 0 ]; i++ ) fl_add_browser_line( fd_help->browser, str[ i ] ); fl_unfreeze_form( fd_help->helpform ); } /*************************************** * Shows the help form. ***************************************/ void help_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_show_form( fd_help->helpform, FL_PLACE_GEOMETRY, FL_FULLBORDER, "fdesign help" ); } /*************************************** * Stop showing the help window ***************************************/ void exithelp_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg FL_UNUSED_ARG ) { fl_hide_form( fd_help->helpform ); } extern char testhelp[ ][ 80 ], mainhelp[ ][ 80 ], generalhelp[ ][ 80 ], keyhelp[ ][ 80 ], grouphelp[ ][ 80 ], savehelp[ ][ 80 ], mousehelp[ ][ 80 ]; /*************************************** * Shows a particular help item. ***************************************/ void showhelp_cb( FL_OBJECT * obj FL_UNUSED_ARG, long arg ) { switch ( arg ) { case HELP_VERSION: load_it( mainhelp ); break; case HELP_GENERAL: load_it( generalhelp ); break; case HELP_MOUSE: load_it( mousehelp ); break; case HELP_KEYBOARD: load_it( keyhelp ); break; case HELP_GROUP: load_it( grouphelp ); break; case HELP_TEST: load_it( testhelp ); break; case HELP_SAVE: load_it( savehelp ); break; } } #define S( a ) #a #define LIBVERSION( a, b ) " (LibraryVersion " S( a ) "." S( b ) ")" char mainhelp[ ][ 80 ] = { " ", "@C4@M@b@cForm Designer", " ", "@C4@b@c$Revision: 1.14 $" LIBVERSION(FL_VERSION, FL_REVISION), "@C4@b@cWritten by T.C. Zhao & Mark Overmars", "@-", " ", "The Form Designer ('fdesign') is a program for interactively designing", "dialogue forms for use with the Forms Library. The prgram is very simple", "to use. Press the buttons below to get help on the different topics.", " ", "For more info on fdesign and xforms, see the complete documentation or visit", "the XForms home and project pages:", " ", "@f@b@chttp://xforms-toolkit.org/", "and", "@f@b@chttp://savannah.nongnu.org/projects/xforms/", "" }; char generalhelp[ ][ 80 ] = { " ", "@l@b@cGeneral Information", " ", "@bAdd a form", "To add a form, press the button labeled 'New Form'. You will be prompted", "for a name. After the form is created, you can start adding various objects", "such as buttons etc., to this form.", " ", "@bAdding Objects", "To add an object to the newly created form indicate what kind of object", "to add by clicking on that object under 'Objects' in the control panel.", "if you now click the left mouse button (keep it pressed) in the form, a", "rubber band will appear. The size of the rubber band is the size of the", "object you're creating. Once a satifactory size is found, release the", "left mouse button. You can change the size and position afterwards.", "Multiple objects can be added in a similar way. After objects are added", "you can move, resize and clone them as needed. See Mouse section", " ", "@bDeleting a form", "Use the button labeled 'Delete Form' to delete the current form. You", "will have to acknowledge the deletion.", " ", "@bChanging the name of a form", "This can be achieved by pressing the button labeled 'Form Name' above", "the list of forms (after selecting the form you want to change).", " ", "@bChanging the size of a form", "You either can simply resize the window showing the form or you can click", "on the button labeled 'Resize Form' to get a popup-window which allows", "you to enter the precise width and height of the currently displayed form.", " ", "@bAligning objects", "When you click on the 'Align' button a new popup window gets shown. Now", "select an object (or a group of objects) and press one of the buttons in", "the new window to align it/them left, horizontal centers, right, etc. It", "is also possible to put equal distances between objects. With this form", "you can also set the 'snap value' which tells fdesign about the number of", "pixels to which values are rounded when positioning or resizing objects in", "your forms.", " ", "@bConfiguration", "The following resources can be used to select where to place the various", "forms that control the operation of fdesign", " ", "@fformDesgin.geometry", "This resource controls the placement and size of the working area", " ", "@fcontrol.geometry", "This resource controls the placement of the control panel", " ", "@fattributes.geometry", "This resource controls the placement of Attributes panel, activated by", "double-clicking on the object or by pressing F1", " ", "@fattributes.background", "This resource controls the background color of the Attributes panel", " ", "@falign.geometry", "This resource controls the placement of the align dialog", " ", "@fxformsHeader", "This resource informs the fdesign to emit a header other than forms.h", " ", "@fcompensate", "This resource (bool) informs the fdesign to emit a font size compensation", "code", " ", "The most useful xforms resource are", "@ffdesign.XForm*FontSize", "and", "@ffdesign.XForm*PupFontSize", " ", "" }; char mousehelp[ ][80] = { " ", "@l@b@cUsing the Mouse", " ", "The mouse is used to add objects, select objects and move them around", "or scale them. Sometimes, holding down the key influences the", "action taken.", " ", "@bLeft Mouse Button", "When adding object is indicated in the Object Browser, dragging the", "left mouse button is used to add an object to a form. In normal operation", "i.e., not adding objects, left mouse is used to select, move or scale", "objects. When you click on an object, the object is selected, indicated", "by a red outline with 4 small knobs on the corners. To select more than", "one object, draw a box by dragging the mouse. All objects that fall within", "the box are selected. To move objects, select them first then drag the", "selected object. To scale an object, drag the scale knobs on the red", "selection outline. To delete an object, double click on the object.", " ", "When the key is down, selecting an object adds the newly selected", "object to the existing selection, and moving an object causes a copy of", "the object made (cloned) and moved. The cloned object will have exactly", "the same attributes as the original object except for object name and shortcut", " ", "@bRight Mouse Button", "The right mouse button works the same way as left mouse button, except", "for adding and deleting objects. Double click an object to change the", "attributes of the object.", "" }; char keyhelp[ ][ 80 ] = { " ", "@l@b@cCursor Keys", " ", "The arrow keys can be used to move the current selection. If ", "is down, the selection will be scaled instead. To adjust the number", "of pixels to move (or increment), 0-9 can be used with 0 meaning", "10 pixels.", " ", "@l@b@cFunction Keys", " ", "The function keys are used to perform certain actions on the current", "selection. You can either use the function keys on the keyboard or", "the corresponding buttons on the screen.", " ", "@bF1 Attributes", "Change the attributes of the current selection. This only works if the", "objects in the selection are all of the same class. When only one object", "is selected, also label and name can be changed.", " ", "@bF2 Lower selection", "Lowers the objects in the current selection, i.e., places them below all", "other objects on the form.", " ", "@bF3 Raise selection", "Raises all objects in the selection, i.e., places them on top of all other", "objects in the form.", " ", "@bF4 Select all", "Puts all objects in a selection.", " ", "@bF5 Show selection", "Makes the all objects in the current selection visible. You can first", "use F4 to select all objects.", " ", "@bF6 Hide selection", "Hides all objects in the current selection. Use F5 to make them", "visible again.", " ", "@bF7 Group selection", "Places all objects in the selection in a group. If the objects are", "already part of a group, they are removed from the old group. Groups", "that become empty this way are discarded. You will be asked to provide a", "name for the group. This will be the C-name under which the group is", "known to the application program.", " ", "@bF8 Ungroup selection", "Takes all objects in the current selection out of their groups. Empty", "groups will be discarded.", " ", "@bF9 Copy selection to buffer", "Copies the objects in the current selection to the buffer. They can", "later be added to the same or another form using the operation paste.", " ", "@bF10 Paste buffer into form", "Pastes the objects in the buffer (placed there by the last copy or cut", "operation) into the form. You can indicate the required position. The", "pasted objects will form the new selection.", " ", "@bF11", "Selects next object and wraps around if the current selection is the last", "object. has the same functionality", " ", "@bF12 Cut selection into the buffer", "Deletes the current selection. The deleted objects will be placed in", "the buffer and can be pasted back into the form (or another form) later.", " ", "@l@b@c Other Keys", " ", "@btstart/stop Testing", "Pressing t in the main window is the same as clicking on the Test button", "If the form is already being tested, pressing t stops testing", " ", "@bs Save the forms", "Depending on the options selected, pressing s will save the current set", "of forms to disk.", " ", "@bEsc Exit", "Quit form designer", "" }; char grouphelp[ ][ 80 ] = { " ", "@l@b@cGroups", " ", "The Form Designer has a simple mechanism for dealing with groups inside", "forms. To create a group of objects, select all of them, using the right", "mouse button, and press key . The group name you indicate is added", "to the list of groups. Whenever you select all elements in a group the", "group name is shown in red. You can also select or deselect all elements", "in a group by pressing the mouse on the group name. Groups whose", "elements get deleted automatically disappear.", " ", "@bAdding an object to a group", "It is not possible to directly add an object to an existing group. You", "should first select the group and the new object and next press to", "create a new group. The old group will be removed and a new group,", "including the new object, will be created. You will have to type in the", "group name again.", " ", "@bChanging the name of a group", "To change the name of a group, select it (and deselect the others) and", "press the button labeled 'Group Name' below the list of groups.", "" }; char savehelp[ ][ 80 ] = { " ", "@l@b@cSaving and Loading", " ", "To save the current set of forms, press the button labeled 'Save Forms'.", "The file selector will appear in which you can indicate the name under", "which to save the form. This name should end with .fd. Three files will", "be generated: .c, .h and .fd. See the", "documentation for their purpose.", " ", "A new set of forms can be loaded using the button labeled 'Load Forms'.", "It is also possible to merge the new forms with the current set using", "the button labeled 'Merge Forms'.", " ", "" }; char testhelp[ ][ 80 ] = { " ", "@l@b@cTesting Forms", " ", "To test the current form press the button labeled 'Test Form'. The form", "will be centered on the screen and in the top right corner a new form", "will appear. Now you can play with the form. In the browser the objects", "are shown that will be returned to the application program or the callback", "routines that will be called. In this way you can verify whether each", "object has got a name or callback routine associated with it. To stop", "testing press the button labeled 'Stop Testing'.", " ", "Note that changes you make to the objects, e.g. filling in an input field,", "will not be saved when saving the forms.", "" }; /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_objects.c0000644000175000017500000010102711376031433016115 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file fd_objects.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * This file is part of the Form Designer. * * It contains routines to keep track of all different object classes * and the types inside each class. To add a class of object to the * form designer, only this file has to be changed slightly: * - in init_classes() the class and types must be added. * - in add_an_object() the way of adding it should be added. * * Also to support output fully, fd_spec.c needs to be modified */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "xpm/crab.xpm" #include #include #include #define VN( a ) a,#a #define OBJNAME( a ) #a,fl_create_##a,fl_add_##a typedef struct { int defined; char tname[ MAX_TYPE_NAME_LEN ]; } TDEF; typedef FL_OBJECT * ( * FL_ADDPTR ) ( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char * ); typedef struct { int cn; FL_OBJECT * defobj; /* default */ TDEF types[ MAXTYPES ]; char cname[ MAX_CLASS_NAME_LEN ]; /* add_XXX */ char formal_cname[ MAX_CLASS_NAME_LEN ]; FL_OBJECT * defobj1; /* to specific type */ FL_ADDPTR createit, addit; int var_boxtype; /* means default boxtype may depend on type */ int default_type; const char * default_label; int bline; } CDEF; static CDEF classes[ MAXCLASSES ]; static int cnumb = 0; typedef FL_OBJECT * ( * FL_ADDFREEPTR )( int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, const char *, FL_HANDLEPTR ); /*************************************** * Adds a class definition ***************************************/ static void add_class_def( int numb, char * formal_name, char * name, FL_ADDPTR createit, FL_ADDPTR addit, int bl ) { int i; if ( cnumb == MAXCLASSES ) { fprintf( stderr, "exceeding maxclass allowed\n" ); return; } classes[ cnumb ].cn = numb; strcpy( classes[ cnumb ].cname, name ); strcpy( classes[ cnumb ].formal_cname, formal_name ); if ( createit ) classes[ cnumb ].defobj = createit( 1, 0, 0, 1, 1, "" ); classes[ cnumb ].createit = createit; classes[ cnumb ].addit = addit; classes[ cnumb ].bline = bl; for ( i = 0; i < MAXTYPES; i++ ) classes[ cnumb ].types[ i ].defined = FL_FALSE; cnumb++; } /*************************************** ***************************************/ static CDEF * find_class_struct( int n ) { int i; for ( i = 0; i < cnumb; i++ ) { if ( classes[ i ].cn == n ) return classes + i; } M_err( "find_class_struct", "Can't find class %d", n ); return NULL; } /*************************************** * Adds a type definition to a class ***************************************/ static void add_type_def( int cn, int tn, char name[ ] ) { int i; if ( tn >= MAXTYPES || tn < 0 ) { M_err( "add_type_def", "Bad type: %d", tn ); return; } for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cn ) { classes[ i ].types[ tn ].defined = FL_TRUE; strcpy( classes[ i ].types[ tn ].tname, name ); } } /*************************************** * Sets a default type and label for class cn ***************************************/ static void set_class_default( int cn, int def_type, char * label ) { int i; for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cn ) { classes[ i ].default_type = def_type; classes[ i ].default_label = label; /* note: no copy */ } } /*************************************** ***************************************/ static void set_var_boxtype( int cn, int yes FL_UNUSED_ARG ) { int i; for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cn ) classes[ i ].var_boxtype = 1; } /*************************************** ***************************************/ static FL_OBJECT * fd_create_free( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { return fl_create_free( type, x, y, w, h, l, noop_handle ); } /*************************************** ***************************************/ static FL_OBJECT * fd_add_free( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * l ) { return fl_add_free( type, x, y, w, h, l, noop_handle ); } /**** CALLBACK ROUTINES ****/ /*************************************** * Handles a class change event ***************************************/ void object_cb( FL_OBJECT * obj, long arg FL_UNUSED_ARG ) { int line = fl_get_browser( obj ); if ( line > 0 ) { const char *name = fl_get_browser_line( obj, line ); int i; for ( i = 0; classes[ i ].cname && i < MAXCLASSES; i++ ) if ( ! strcmp( classes[ i ].cname, name ) ) { cur_class = classes[ i ].cn; break; } } else cur_class = -1; select_pallette_entry( cur_class ); } /**** INITIALIZING THE CLASSES ****/ int cur_class = -1; /* The current class used */ /*************************************** ***************************************/ static void add_button_types( int button_class ) { add_type_def( button_class, FL_NORMAL_BUTTON, "NORMAL_BUTTON" ); add_type_def( button_class, FL_PUSH_BUTTON, "PUSH_BUTTON" ); add_type_def( button_class, FL_RADIO_BUTTON, "RADIO_BUTTON" ); add_type_def( button_class, FL_TOUCH_BUTTON, "TOUCH_BUTTON" ); add_type_def( button_class, FL_HIDDEN_BUTTON, "HIDDEN_BUTTON" ); add_type_def( button_class, FL_INOUT_BUTTON, "INOUT_BUTTON" ); add_type_def( button_class, FL_MENU_BUTTON, "MENU_BUTTON" ); add_type_def( button_class, FL_RETURN_BUTTON, "RETURN_BUTTON" ); add_type_def( button_class, FL_HIDDEN_RET_BUTTON, "HIDDEN_RET_BUTTON" ); } /*************************************** ***************************************/ static void add_frame_types( int frame_class ) { add_type_def( frame_class, FL_NO_FRAME, "NO_FRAME" ); add_type_def( frame_class, FL_UP_FRAME, "UP_FRAME" ); add_type_def( frame_class, FL_DOWN_FRAME, "DOWN_FRAME" ); add_type_def( frame_class, FL_BORDER_FRAME, "BORDER_FRAME" ); add_type_def( frame_class, FL_ENGRAVED_FRAME, "ENGRAVED_FRAME" ); add_type_def( frame_class, FL_ROUNDED_FRAME, "ROUNDED_FRAME" ); add_type_def( frame_class, FL_EMBOSSED_FRAME, "EMBOSSED_FRAME" ); add_type_def( frame_class, FL_SHADOW_FRAME, "SHADOW_FRAME" ); add_type_def( frame_class, FL_OVAL_FRAME, "OVAL_FRAME" ); } /*************************************** ***************************************/ static void add_slider_types( int sclass ) { add_type_def( sclass, FL_VERT_SLIDER, "VERT_SLIDER" ); add_type_def( sclass, FL_HOR_SLIDER, "HOR_SLIDER" ); add_type_def( sclass, FL_VERT_FILL_SLIDER, "VERT_FILL_SLIDER" ); add_type_def( sclass, FL_HOR_FILL_SLIDER, "HOR_FILL_SLIDER" ); add_type_def( sclass, FL_VERT_NICE_SLIDER, "VERT_NICE_SLIDER" ); add_type_def( sclass, FL_HOR_NICE_SLIDER, "HOR_NICE_SLIDER" ); add_type_def( sclass, FL_VERT_BROWSER_SLIDER, "VERT_BROWSER_SLIDER" ); add_type_def( sclass, FL_HOR_BROWSER_SLIDER, "HOR_BROWSER_SLIDER" ); } /*************************************** ***************************************/ static void add_scrollbar_types( int sclass ) { add_type_def( sclass, FL_VERT_SCROLLBAR, "VERT_SCROLLBAR" ); add_type_def( sclass, FL_HOR_SCROLLBAR, "HOR_SCROLLBAR" ); add_type_def( sclass, FL_VERT_THIN_SCROLLBAR, "VERT_THIN_SCROLLBAR" ); add_type_def( sclass, FL_HOR_THIN_SCROLLBAR, "HOR_THIN_SCROLLBAR" ); add_type_def( sclass, FL_VERT_NICE_SCROLLBAR, "VERT_NICE_SCROLLBAR" ); add_type_def( sclass, FL_HOR_NICE_SCROLLBAR, "HOR_NICE_SCROLLBAR" ); add_type_def( sclass, FL_VERT_PLAIN_SCROLLBAR, "VERT_PLAIN_SCROLLBAR" ); add_type_def( sclass, FL_HOR_PLAIN_SCROLLBAR, "HOR_PLAIN_SCROLLBAR" ); } /*************************************** ***************************************/ static void add_chart_types( int cclass ) { add_type_def( cclass, FL_BAR_CHART, "BAR_CHART" ); add_type_def( cclass, FL_HORBAR_CHART, "HORBAR_CHART" ); add_type_def( cclass, FL_LINE_CHART, "LINE_CHART" ); add_type_def( cclass, FL_FILLED_CHART, "FILLED_CHART" ); add_type_def( cclass, FL_SPIKE_CHART, "SPIKE_CHART" ); add_type_def( cclass, FL_PIE_CHART, "PIE_CHART" ); add_type_def( cclass, FL_SPECIALPIE_CHART, "SPECIALPIE_CHART" ); } /*************************************** ***************************************/ static void add_xyplot_types( int xyclass ) { add_type_def( xyclass, FL_NORMAL_XYPLOT, "NORMAL_XYPLOT" ); add_type_def( xyclass, FL_ACTIVE_XYPLOT, "ACTIVE_XYPLOT" ); add_type_def( xyclass, FL_SQUARE_XYPLOT, "SQUARE_XYPLOT" ); add_type_def( xyclass, FL_CIRCLE_XYPLOT, "CIRCLE_XYPLOT" ); add_type_def( xyclass, FL_POINTS_XYPLOT, "POINTS_XYPLOT" ); add_type_def( xyclass, FL_LINEPOINTS_XYPLOT, "LINEPOINTS_XYPLOT" ); add_type_def( xyclass, FL_DASHED_XYPLOT, "DASHED_XYPLOT" ); add_type_def( xyclass, FL_DOTTED_XYPLOT, "DOTTED_XYPLOT" ); add_type_def( xyclass, FL_DOTDASHED_XYPLOT, "DOTDASHED_XYPLOT" ); add_type_def( xyclass, FL_LONGDASHED_XYPLOT, "LONGDASHED_XYPLOT" ); add_type_def( xyclass, FL_FILL_XYPLOT, "FILL_XYPLOT" ); add_type_def( xyclass, FL_IMPULSE_XYPLOT, "IMPULSE_XYPLOT" ); add_type_def( xyclass, FL_EMPTY_XYPLOT, "EMPTY_XYPLOT" ); } /*************************************** * Initializes all the classes and types. Must be adapted * to add new classes and types. ***************************************/ void init_classes( void ) { static int initialized; VN_pair *vp; int bl = 0; if ( initialized ) return; initialized = 1; fl_set_browser_fontstyle( fd_control->objectbrowser, FL_TIMES_STYLE ); fl_add_browser_line( fd_control->objectbrowser, "box" ); add_class_def( VN( FL_BOX ), OBJNAME( box ), ++bl ); for ( vp = vn_btype; vp->val >= 0; vp++ ) add_type_def( FL_BOX, vp->val, vp->name + 3 ); set_class_default( FL_BOX, FL_UP_BOX, "" ); fl_add_browser_line( fd_control->objectbrowser, "frame" ); add_class_def( VN( FL_FRAME ), OBJNAME( frame ), ++bl ); add_frame_types( FL_FRAME ); set_class_default( FL_FRAME, FL_ENGRAVED_FRAME, "" ); fl_add_browser_line( fd_control->objectbrowser, "labelframe" ); add_class_def( VN( FL_LABELFRAME ), OBJNAME( labelframe ), ++bl ); add_frame_types( FL_LABELFRAME ); set_class_default( FL_LABELFRAME, FL_ENGRAVED_FRAME, "frame" ); fl_add_browser_line( fd_control->objectbrowser, "text" ); add_class_def( VN( FL_TEXT ), OBJNAME( text ), ++bl ); add_type_def( FL_TEXT, FL_NORMAL_TEXT, "NORMAL_TEXT" ); set_class_default( FL_TEXT, FL_NORMAL_TEXT, "text" ); fl_add_browser_line( fd_control->objectbrowser, "bitmap" ); add_class_def( VN( FL_BITMAP ), OBJNAME( bitmap ), ++bl ); add_type_def( FL_BITMAP, FL_NORMAL_BITMAP, "NORMAL_BITMAP" ); fl_add_browser_line( fd_control->objectbrowser, "pixmap" ); add_class_def(VN( FL_PIXMAP ), OBJNAME( pixmap ), ++bl ); add_type_def( FL_PIXMAP, FL_NORMAL_PIXMAP, "NORMAL_PIXMAP" ); fl_add_browser_line( fd_control->objectbrowser, "chart" ); add_class_def( VN( FL_CHART ), OBJNAME( chart ), ++bl ); add_chart_types( FL_CHART ); fl_add_browser_line( fd_control->objectbrowser, "clock" ); add_class_def( VN( FL_CLOCK ), OBJNAME( clock ), ++bl ); add_type_def( FL_CLOCK, FL_ANALOG_CLOCK, "ANALOG_CLOCK" ); add_type_def( FL_CLOCK, FL_DIGITAL_CLOCK, "DIGITAL_CLOCK" ); set_class_default( FL_CLOCK, FL_ANALOG_CLOCK, "" ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "button" ); add_class_def( VN( FL_BUTTON ), OBJNAME( button ), ++bl ); add_button_types( FL_BUTTON ); set_class_default( FL_BUTTON, FL_NORMAL_BUTTON, "button" ); fl_add_browser_line( fd_control->objectbrowser, "roundbutton" ); add_class_def( VN( FL_ROUNDBUTTON ), OBJNAME( roundbutton ), ++bl ); add_button_types( FL_ROUNDBUTTON ); set_class_default( FL_ROUNDBUTTON, FL_PUSH_BUTTON, "button" ); fl_add_browser_line( fd_control->objectbrowser, "round3dbutton" ); add_class_def( VN( FL_ROUND3DBUTTON ), OBJNAME( round3dbutton ), ++bl ); add_button_types( FL_ROUND3DBUTTON ); set_class_default( FL_ROUND3DBUTTON, FL_PUSH_BUTTON, "button" ); fl_add_browser_line( fd_control->objectbrowser, "checkbutton" ); add_class_def( VN( FL_CHECKBUTTON ), OBJNAME( checkbutton ), ++bl ); add_button_types( FL_CHECKBUTTON ); set_class_default( FL_CHECKBUTTON, FL_PUSH_BUTTON, "button" ); fl_add_browser_line( fd_control->objectbrowser, "lightbutton" ); add_class_def( VN( FL_LIGHTBUTTON ), OBJNAME( lightbutton ), ++bl ); add_button_types( FL_LIGHTBUTTON ); set_class_default( FL_LIGHTBUTTON, FL_PUSH_BUTTON, "button" ); fl_add_browser_line( fd_control->objectbrowser, "scrollbutton" ); add_class_def( VN( FL_SCROLLBUTTON ), OBJNAME( scrollbutton ), ++bl ); add_button_types( FL_SCROLLBUTTON ); set_class_default( FL_SCROLLBUTTON, FL_TOUCH_BUTTON, "8" ); fl_add_browser_line( fd_control->objectbrowser, "bitmapbutton" ); add_class_def( VN( FL_BITMAPBUTTON ), OBJNAME( bitmapbutton ), ++bl ); add_button_types( FL_BITMAPBUTTON ); fl_add_browser_line( fd_control->objectbrowser, "pixmapbutton" ); add_class_def( VN( FL_PIXMAPBUTTON ), OBJNAME( pixmapbutton ), ++bl ); add_button_types( FL_PIXMAPBUTTON ); fl_add_browser_line( fd_control->objectbrowser, "labelbutton" ); add_class_def( VN( FL_LABELBUTTON ), OBJNAME( labelbutton ), ++bl ); add_button_types( FL_LABELBUTTON ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "slider" ); add_class_def( VN( FL_SLIDER ), OBJNAME( slider ), ++bl ); add_slider_types( FL_SLIDER ); fl_add_browser_line( fd_control->objectbrowser, "valslider" ); add_class_def( VN( FL_VALSLIDER ), OBJNAME( valslider ), ++bl ); add_slider_types( FL_VALSLIDER ); fl_add_browser_line( fd_control->objectbrowser, "scrollbar" ); add_class_def( VN( FL_SCROLLBAR ), OBJNAME( scrollbar ), ++bl ); add_scrollbar_types( FL_SCROLLBAR ); fl_add_browser_line( fd_control->objectbrowser, "dial" ); add_class_def( VN( FL_DIAL ), OBJNAME( dial ), ++bl ); add_type_def( FL_DIAL, FL_NORMAL_DIAL, "NORMAL_DIAL" ); add_type_def( FL_DIAL, FL_LINE_DIAL, "LINE_DIAL" ); add_type_def( FL_DIAL, FL_FILL_DIAL, "FILL_DIAL" ); set_var_boxtype( FL_DIAL, 1 ); fl_add_browser_line( fd_control->objectbrowser, "positioner" ); add_class_def( VN( FL_POSITIONER ), OBJNAME( positioner ), ++bl ); add_type_def( FL_POSITIONER, FL_NORMAL_POSITIONER, "NORMAL_POSITIONER" ); add_type_def( FL_POSITIONER, FL_OVERLAY_POSITIONER, "OVERLAY_POSITIONER" ); add_type_def( FL_POSITIONER, FL_INVISIBLE_POSITIONER, "INVISIBLE_POSITIONER" ); set_var_boxtype( FL_POSITIONER, 1 ); fl_add_browser_line( fd_control->objectbrowser, "thumbwheel" ); add_class_def( VN( FL_THUMBWHEEL ), OBJNAME( thumbwheel ), ++bl ); add_type_def( FL_THUMBWHEEL, FL_HOR_THUMBWHEEL, "HOR_THUMBWHEEL" ); add_type_def( FL_THUMBWHEEL, FL_VERT_THUMBWHEEL, "VERT_THUMBWHEEL" ); fl_add_browser_line( fd_control->objectbrowser, "counter" ); add_class_def( VN( FL_COUNTER ), OBJNAME( counter ), ++bl ); add_type_def( FL_COUNTER, FL_NORMAL_COUNTER, "NORMAL_COUNTER" ); add_type_def( FL_COUNTER, FL_SIMPLE_COUNTER, "SIMPLE_COUNTER" ); fl_add_browser_line( fd_control->objectbrowser, "spinner" ); add_class_def( VN( FL_SPINNER ), OBJNAME( spinner ), ++bl ); add_type_def( FL_SPINNER, FL_INT_SPINNER, "INT_SPINNER" ); add_type_def( FL_SPINNER, FL_FLOAT_SPINNER, "FLOAT_SPINNER" ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "input" ); add_class_def( VN( FL_INPUT ), OBJNAME( input ), ++bl ); add_type_def( FL_INPUT, FL_NORMAL_INPUT, "NORMAL_INPUT" ); add_type_def( FL_INPUT, FL_FLOAT_INPUT, "FLOAT_INPUT" ); add_type_def( FL_INPUT, FL_INT_INPUT, "INT_INPUT" ); add_type_def( FL_INPUT, FL_HIDDEN_INPUT, "HIDDEN_INPUT" ); add_type_def( FL_INPUT, FL_MULTILINE_INPUT, "MULTILINE_INPUT" ); add_type_def( FL_INPUT, FL_SECRET_INPUT, "SECRET_INPUT" ); add_type_def( FL_INPUT, FL_DATE_INPUT, "DATE_INPUT" ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "menu" ); add_class_def( VN( FL_MENU ), OBJNAME( menu ), ++bl ); add_type_def( FL_MENU, FL_PUSH_MENU, "PUSH_MENU" ); add_type_def( FL_MENU, FL_PULLDOWN_MENU, "PULLDOWN_MENU" ); add_type_def( FL_MENU, FL_TOUCH_MENU, "TOUCH_MENU" ); set_var_boxtype( FL_MENU, 1 ); fl_add_browser_line( fd_control->objectbrowser, "choice" ); add_class_def( VN( FL_CHOICE ), OBJNAME( choice ), ++bl ); add_type_def( FL_CHOICE, FL_NORMAL_CHOICE, "NORMAL_CHOICE" ); add_type_def( FL_CHOICE, FL_NORMAL_CHOICE2, "NORMAL_CHOICE2" ); add_type_def( FL_CHOICE, FL_DROPLIST_CHOICE, "DROPLIST_CHOICE" ); set_var_boxtype( FL_CHOICE, 1 ); fl_add_browser_line( fd_control->objectbrowser, "browser" ); add_class_def( VN( FL_BROWSER), OBJNAME( browser ), ++bl ); add_type_def( FL_BROWSER, FL_NORMAL_BROWSER, "NORMAL_BROWSER" ); add_type_def( FL_BROWSER, FL_SELECT_BROWSER, "SELECT_BROWSER" ); add_type_def( FL_BROWSER, FL_HOLD_BROWSER, "HOLD_BROWSER" ); add_type_def( FL_BROWSER, FL_MULTI_BROWSER, "MULTI_BROWSER" ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "timer" ); add_class_def( VN( FL_TIMER ), OBJNAME( timer ), ++bl ); add_type_def( FL_TIMER, FL_NORMAL_TIMER, "NORMAL_TIMER" ); add_type_def( FL_TIMER, FL_VALUE_TIMER, "VALUE_TIMER" ); add_type_def( FL_TIMER, FL_HIDDEN_TIMER, "HIDDEN_TIMER" ); set_class_default( FL_TIMER, FL_NORMAL_TIMER, "timer" ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "xyplot" ); add_class_def( VN( FL_XYPLOT ), OBJNAME( xyplot ), ++bl ); add_xyplot_types( FL_XYPLOT ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "canvas" ); add_class_def( VN( FL_CANVAS ), "canvas", fl_create_simu_canvas, fl_add_simu_canvas, ++bl ); add_type_def( FL_CANVAS, FL_NORMAL_CANVAS, "NORMAL_CANVAS" ); add_type_def( FL_CANVAS, FL_SCROLLED_CANVAS, "SCROLLED_CANVAS" ); set_class_default( FL_CANVAS, FL_NORMAL_CANVAS, "" ); fl_add_browser_line( fd_control->objectbrowser, "glcanvas" ); add_class_def( VN( FL_GLCANVAS ), "glcanvas", fl_create_simu_glcanvas, fl_add_simu_glcanvas, ++bl ); add_type_def( FL_GLCANVAS, FL_NORMAL_CANVAS, "NORMAL_CANVAS" ); add_type_def( FL_GLCANVAS, FL_SCROLLED_CANVAS, "SCROLLED_CANVAS" ); set_class_default( FL_GLCANVAS, FL_NORMAL_CANVAS, "" ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "tabfolder" ); add_class_def( FL_NTABFOLDER, "FL_TABFOLDER", "tabfolder", fl_create_ntabfolder, fl_add_ntabfolder, ++bl ); add_type_def( FL_NTABFOLDER, FL_TOP_TABFOLDER, "TOP_TABFOLDER" ); add_type_def( FL_NTABFOLDER, FL_BOTTOM_TABFOLDER, "BOTTOM_TABFOLDER" ); set_class_default( FL_NTABFOLDER, FL_TOP_TABFOLDER, "" ); fl_add_browser_line( fd_control->objectbrowser, "formbrowser" ); add_class_def( FL_FORMBROWSER, "FL_FORMBROWSER", "formbrowser", fl_create_nformbrowser, fl_add_nformbrowser, ++bl ); add_type_def( FL_FORMBROWSER, FL_NORMAL_FORMBROWSER, "NORMAL_FORMBROWSER" ); fl_add_browser_line( fd_control->objectbrowser, "@-" ); bl++; fl_add_browser_line( fd_control->objectbrowser, "freeobject" ); add_class_def( VN( FL_FREE ), "free", fd_create_free, fd_add_free, ++bl ); add_type_def( FL_FREE, FL_NORMAL_FREE, "NORMAL_FREE" ); add_type_def( FL_FREE, FL_INACTIVE_FREE, "INACTIVE_FREE" ); add_type_def( FL_FREE, FL_INPUT_FREE, "INPUT_FREE" ); add_type_def( FL_FREE, FL_CONTINUOUS_FREE, "CONTINUOUS_FREE" ); add_type_def( FL_FREE, FL_ALL_FREE, "ALL_FREE" ); /* ADD NEW CLASSES HERE */ /* Group must be last, palette.c need this */ add_class_def( VN( FL_BEGIN_GROUP ), "group", 0, 0, 0 ); add_type_def( FL_BEGIN_GROUP, 0, "0" ); add_class_def( VN( FL_END_GROUP ), "endgroup", 0, 0, 0 ); add_type_def( FL_END_GROUP, 0, "0" ); } /*************************************** ***************************************/ void select_object_by_class( int cn ) { int i; for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cn ) { fl_select_browser_line( fd_control->objectbrowser, classes[ i ].bline ); fl_show_browser_line( fd_control->objectbrowser, classes[ i ].bline ); cur_class = cn; break; } } /**** GETTING INFORMATION ABOUT CLASSES AND TYPES ****/ /*************************************** * Returns a pointer to the (short) name of the class ***************************************/ char * find_class_name( int cln ) { int i; static char buf[ MAX_CLASS_NAME_LEN ]; for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cln ) return classes[ i ].cname; sprintf( buf, "%d", cln ); return buf; } /*************************************** * Return a pointer to the formal name of the class ***************************************/ char * class_name( int cls ) { int i; static char buf[ MAX_CLASS_NAME_LEN ]; for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cls ) return classes[ i ].formal_cname; sprintf( buf, "%d", cls ); return buf; } /*************************************** * Return the class value ***************************************/ int class_val( const char * name ) { int i; for ( i = 0; i < cnumb; i++ ) { if ( strcmp( classes[ i ].cname, name ) == 0 || strcmp( classes[ i ].formal_cname, name ) == 0 ) return classes[ i ].cn; } return atoi( name ); } /*************************************** * Returns a pointer to the default object of the class. var_boxtype * means different type may have different boxtypes ***************************************/ FL_OBJECT * find_class_default( int cln, int t ) { int i; CDEF *c = classes; for ( i = 0; i < cnumb; i++, c++ ) if ( c->cn == cln ) { if ( c->var_boxtype ) { if ( c->defobj1 ) fl_free_object( c->defobj1 ); return c->defobj1 = c->createit( t, 0, 0, 1, 1, "" ); } else return c->defobj; } return NULL; } /*************************************** * Returns the number of types in the class ***************************************/ int find_class_maxtype( int cln ) { int i, j, n = 0; for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cln ) for ( j = 0; j < MAXTYPES; j++ ) if ( classes[ i ].types[ j ].defined ) n++; return n; } /*************************************** * Returns a pointer to the name of the type in the class ***************************************/ const char * find_type_name( int cln, int tyn ) { int i; static char buf[ MAX_TYPE_NAME_LEN ]; for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cln ) return classes[ i ].types[ tyn ].tname; sprintf( buf, "%d", tyn ); return buf; } /*************************************** * Returns a integer indicating the value of a type ***************************************/ int find_type_value( int cln, const char * tyname ) { int i, jmax = find_class_maxtype( cln ), j; for ( i = 0; i < cnumb; i++ ) if ( classes[ i ].cn == cln ) for ( j = 0; j < jmax; j++ ) if ( ! strcmp( classes[ i ].types[ j ].tname, tyname ) || ( ! strncmp( tyname, "FL_", 3 ) && ! strcmp( classes[ i ].types[ j ].tname, tyname + 3 ) ) ) return j; M_err( "TypeValue", "type %s is unknown", tyname ); return -1; } /**** ADDING OBJECTS ****/ #define bm1_width 16 #define bm1_height 16 static unsigned char bm1_bits[ ] = { 0x00, 0x00, 0x00, 0x57, 0x7c, 0x72, 0xc4, 0x52, 0xc4, 0x00, 0x44, 0x01, 0x44, 0x1f, 0xfc, 0x22, 0x40, 0x42, 0x40, 0x44, 0x40, 0x43, 0xc0, 0x40, 0x70, 0x40, 0x8c, 0x20, 0x00, 0x1f, 0x00, 0x00 }; #define pm_width 28 #define pm_height 28 /*************************************** ***************************************/ void set_testing_pixmap( FL_OBJECT * ob ) { fl_set_pixmap_data( ob, crab ); } /*************************************** * Adds an object to the current form type = -1 means default type ***************************************/ FL_OBJECT * add_an_object( int objclass, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h ) { FL_OBJECT *obj = NULL; CDEF *cls; static FL_FORM *cf = NULL; if ( cur_form == NULL ) return NULL; /* This routine is called with X coordinate system, need to translate to up-right coordinate system */ if ( ! ( cls = find_class_struct( objclass ) ) ) { fprintf( stderr, "unknown class %d\n", objclass ); return 0; } if ( ! cf ) fl_addto_form( cur_form ); switch ( objclass ) { case FL_BEGIN_GROUP: cf = cur_form; obj = fl_bgn_group( ); break; case FL_END_GROUP: obj = fli_end_group( ); break; case FL_BITMAP: if ( type == -1 ) type = FL_NORMAL_BITMAP; obj = cls->addit( type, x, y, w, h, "" ); if ( ! fdopt.conv_only ) fl_set_bitmap_data( obj, bm1_width, bm1_height, bm1_bits ); break; case FL_PIXMAP: if ( type == -1 ) type = FL_NORMAL_PIXMAP; obj = cls->addit( type, x, y, w, h, "" ); if ( ! fdopt.conv_only ) fl_set_pixmap_data( obj, crab ); break; case FL_CHART: if ( type == -1 ) type = FL_BAR_CHART; obj = cls->addit( type, x, y, w, h, "" ); fl_add_chart_value( obj, 4.0, "item 1", 2 ); fl_add_chart_value( obj, 8.0, "item 2", 3 ); fl_add_chart_value( obj, 2.0, "item 3", 4 ); fl_add_chart_value( obj, 5.0, "item 4", 5 ); break; case FL_BITMAPBUTTON: if ( type == -1 ) type = FL_NORMAL_BUTTON; obj = cls->addit( type, x, y, w, h, "" ); if ( ! fdopt.conv_only ) fl_set_bitmapbutton_data( obj, bm1_width, bm1_height, bm1_bits ); break; case FL_PIXMAPBUTTON: if ( type == -1 ) type = FL_NORMAL_BUTTON; obj = cls->addit( type, x, y, w, h, "" ); if ( ! fdopt.conv_only ) fl_set_pixmapbutton_data( obj, crab ); break; case FL_SLIDER: if ( type == -1 ) type = h > w ? FL_VERT_BROWSER_SLIDER : FL_HOR_BROWSER_SLIDER; obj = cls->addit( type, x, y, w, h, "" ); break; case FL_VALSLIDER: if ( type == -1 ) type = h > w ? FL_VERT_BROWSER_SLIDER : FL_HOR_BROWSER_SLIDER; obj = cls->addit( type, x, y, w, h, "" ); break; case FL_SCROLLBAR: if ( type == -1 ) type = h > w ? FL_VERT_SCROLLBAR : FL_HOR_SCROLLBAR; obj = cls->addit( type, x, y, w, h, "" ); break; case FL_THUMBWHEEL: if ( type == -1 ) type = h > w ? FL_VERT_THUMBWHEEL : FL_HOR_THUMBWHEEL; obj = cls->addit( type, x, y, w, h, "" ); break; case FL_INPUT: if ( type == -1 ) type = h < 60 ? FL_NORMAL_INPUT : FL_MULTILINE_INPUT; obj = cls->addit( type, x, y, w, h, "Input" ); fl_set_input_hscrollbar( obj, FL_OFF ); fl_set_input_vscrollbar( obj, FL_OFF ); break; case FL_MENU: if ( type == -1 ) type = FL_PULLDOWN_MENU; obj = cls->addit( type, x, y, w, h, "Menu" ); get_superspec( obj ); /* super spec must exist for testing */ break; case FL_CHOICE: if ( type == -1 ) type = FL_NORMAL_CHOICE2; obj = cls->addit( type, x, y, w, h, "" ); get_superspec( obj ); /* super spec must exist for testing */ break; case FL_BROWSER: if ( type == -1 ) type = FL_NORMAL_BROWSER; obj = cls->addit( type, x, y, w, h, "" ); get_superspec( obj ); /* super spec must exist for testing */ break; case FL_XYPLOT: if (type == -1) type = FL_NORMAL_XYPLOT; { float xx[ 30 ], yy[ 30 ]; int i; for ( i = 0; i < 30; i++ ) { xx[ i ] = 3.1415 * ( i + 0.5 ) / 8.0; yy[ i ] = FL_abs( sin( 2 * xx[ i ] ) + cos( xx[ i ] ) ); } obj = cls->addit(type, x, y, w, h, ""); fl_set_xyplot_data( obj, xx, yy, 30, "", "", "" ); } break; case FL_FREE: if ( type == -1 ) type = FL_NORMAL_FREE; obj = fl_add_free( type, x, y, w, h, "", noop_handle ); break; default: if ( type == -1 ) type = cls->default_type; obj = cls->addit( type, x, y, w, h, cls->default_label ); break; } if ( ! obj ) fprintf( stderr, "Unknown object (class = %d type = %d)\n", objclass, type ); obj->fl1 = obj->x; obj->fr1 = cur_form->w_hr - obj->fl1; obj->ft1 = obj->y; obj->fb1 = cur_form->h_hr - obj->ft1; obj->fl2 = obj->x + obj->w; obj->fr2 = cur_form->w - obj->fl2; obj->ft2 = obj->y + obj->h; obj->fb2 = cur_form->h - obj->ft2; if ( ! cf || objclass == FL_END_GROUP ) { fl_end_form( ); cf = NULL; } obj->active = 1; return obj; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/sp_twheel.c0000644000175000017500000001635511252274114016014 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file sp_twheel.c * * This file is part of XForms package * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * Settting twheel class specific attributes. */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "fd_main.h" #include "fd_spec.h" #include "spec/twheel_spec.h" extern FD_twheelattrib *create_form_twheelattrib( void ); static FD_twheelattrib *twheel_attrib; static SuperSPEC *twheel_spec; static void show_spec( SuperSPEC * ); /*************************************** ***************************************/ void * get_twheel_spec_fdform( void ) { if ( ! twheel_attrib ) { twheel_attrib = create_form_twheelattrib( ); setup_how_return_menu( twheel_attrib->returnsetting ); fl_set_menu_item_mode( twheel_attrib->returnsetting, 5, FL_PUP_BOX | FL_PUP_GRAY ); fl_set_menu_item_mode( twheel_attrib->returnsetting, 6, FL_PUP_BOX | FL_PUP_GRAY ); } return twheel_attrib; } /*************************************** ***************************************/ void twheel_spec_restore( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { FL_OBJECT *edit_obj = twheel_attrib->vdata; superspec_to_spec( edit_obj ); show_spec( get_superspec( edit_obj ) ); redraw_the_form( 0 ); } /*************************************** ***************************************/ static void show_spec( SuperSPEC * spec ) { set_finput_value( twheel_attrib->minval, spec->min, spec->prec ); set_finput_value( twheel_attrib->maxval, spec->max, spec->prec ); set_finput_value( twheel_attrib->initial_val, spec->val, spec->prec ); set_finput_value( twheel_attrib->step, spec->step, 3 ); fl_set_counter_value( twheel_attrib->prec, spec->prec ); /* fl_call_object_callback( twheel_attrib->prec ); */ reset_how_return_menu( twheel_attrib->returnsetting, spec->how_return ); } /*************************************** ***************************************/ int set_twheel_attrib( FL_OBJECT * ob ) { twheel_attrib->vdata = ob; twheel_spec = get_superspec( ob ); fl_freeze_form( twheel_attrib->twheelattrib ); fl_set_counter_step( twheel_attrib->prec, 1, 2 ); fl_set_counter_precision( twheel_attrib->prec, 0 ); fl_set_counter_bounds( twheel_attrib->prec, 0, 6 ); fl_hide_object( twheel_attrib->prec ); show_spec( twheel_spec ); fl_unfreeze_form( twheel_attrib->twheelattrib ); return 0; } /*************************************** ***************************************/ void emit_twheel_code( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *sp, *defsp; if ( ob->objclass != FL_THUMBWHEEL ) return; /* create a default object */ defobj = fl_create_thumbwheel( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->prec != defsp->prec ) fprintf( fp, " fl_set_thumbwheel_precision( obj, %d );\n", sp->prec ); if ( sp->min != defsp->min || sp->max != defsp->max ) fprintf( fp, " fl_set_thumbwheel_bounds( obj, %g, %g );\n", sp->min, sp->max ); if ( sp->val != defsp->val ) fprintf( fp, " fl_set_thumbwheel_value( obj, %g );\n", sp->val ); if ( sp->step != defsp->step ) fprintf( fp, " fl_set_thumbwheel_step( obj, %g );\n", sp->step ); } /*************************************** ***************************************/ void save_twheel_attrib( FILE * fp, FL_OBJECT * ob ) { FL_OBJECT *defobj; SuperSPEC *defsp, *sp; if ( ob->objclass != FL_THUMBWHEEL ) return; /* create a default object */ defobj = fl_create_thumbwheel( ob->type, 0, 0, 0, 0, "" ); defsp = get_superspec( defobj ); sp = get_superspec( ob ); if ( sp->min != defsp->min || sp->max != defsp->max ) fprintf( fp, " bounds: %g %g\n", sp->min, sp->max ); if ( sp->prec != defsp->prec ) fprintf( fp, " precision: %d\n", sp->prec ); if ( sp->val != defsp->val ) fprintf( fp, " value: %g\n", sp->val ); if ( sp->ldelta != defsp->ldelta || sp->rdelta != defsp->rdelta ) fprintf( fp, " increment: %g %g\n", sp->ldelta, sp->rdelta ); if ( sp->slsize != defsp->slsize ) fprintf( fp, " slsize: %.2f\n", sp->slsize ); if ( sp->step != defsp->step ) fprintf( fp, " step: %g\n", sp->step ); } /*************************************** ***************************************/ void twheel_minmax_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double min = get_finput_value( twheel_attrib->minval ); double max = get_finput_value( twheel_attrib->maxval ); fl_set_thumbwheel_bounds( twheel_attrib->vdata, min, max ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void twheel_step_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double step = get_finput_value( twheel_attrib->step ); fl_set_thumbwheel_step( twheel_attrib->vdata, step ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void twheel_initialvalue_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { double val = get_finput_value( twheel_attrib->initial_val ); fl_set_thumbwheel_value( twheel_attrib->vdata, val ); twheel_spec->val = fl_get_thumbwheel_value( twheel_attrib->vdata ); set_finput_value( twheel_attrib->initial_val, twheel_spec->val, twheel_spec->prec ); if ( auto_apply ) redraw_the_form( 0 ); } /*************************************** ***************************************/ void twheel_returnsetting_change( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { handle_how_return_changes( twheel_attrib->returnsetting, twheel_attrib->vdata ); } /*************************************** ***************************************/ void twheel_adjust_precision( FL_OBJECT * ob FL_UNUSED_ARG, long data FL_UNUSED_ARG ) { } #include "spec/twheel_spec.c" /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd_file_fun.c0000644000175000017500000006032111250474437016262 0ustar jensjens/* * This file is part of XForms. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include "include/forms.h" #include "flinternal.h" #include "fd_main.h" #include #include #include #include #include #include #include static struct { FILE * fp; char * fname; size_t line_no; char * line; char * pos; int merge; } ff = { NULL, NULL, 0, NULL, NULL, 0 }; /*************************************** * Returns a pointer to the first position in a string * that's not a white-space character ***************************************/ static char * ff_skip_spaces( const char * cp ) { while ( *cp && isspace( ( unsigned char ) *cp ) ) cp++; return ( char * ) cp; } /*************************************** ***************************************/ char * ff_get_filename_copy( void ) { if ( ! ff.fname || ! ff.fp ) return NULL; return fl_strdup( ff.fname ); } /*************************************** ***************************************/ static int ff_is_comment( void ) { ff.pos = ff_skip_spaces( ff.pos ); return ! *ff.pos || *ff.pos == ';' || *ff.pos == '#' || *ff.pos == '-' || *ff.pos == '='; } /*************************************** ***************************************/ void ff_close( void ) { if ( ff.fp ) { fclose( ff.fp ); ff.fp = NULL; } fl_safe_free( ff.fname ); fl_safe_free( ff.line ); ff.pos = NULL; ff.line_no = 0; ff.merge = 0; } /*************************************** ***************************************/ int ff_err( const char * message ) { if ( ! fdopt.conv_only ) fl_show_alert2( 0, "Error:\f%s\n%s:%lu.%lu", message, ff.fname, ( unsigned long ) ff.line_no, ff.line ? ( unsigned long ) ( ff.pos - ff.line ) : 0 ); else M_err( "Error", "%s at %s:%lu.%lu", message, ff.fname, ( unsigned long ) ff.line_no, ff.line ? ( unsigned long ) ( ff.pos - ff.line ) : 0 ); ff_close( ); return FF_READ_FAILURE; } /*************************************** ***************************************/ static int ff_get_line( void ) { if ( ff.fp ) do { fl_safe_free( ff.line ); if ( ! ( ff.line = fli_read_line( ff.fp ) ) ) { if ( feof( ff.fp ) ) { ff.line_no++; return 0; } return ff_err( "Error while reading from file" ); } ff.line_no++; ff.pos = ff.line; } while ( ff_is_comment( ) ); return 0; } /*************************************** ***************************************/ int ff_get_fd_file( const char * str, int merge ) { ff_close( ); ff.merge = merge; fl_use_fselector( LOAD_FSELECTOR ); /* Get the filename if necessary */ if ( ! str || ! *str ) { str = fl_show_fselector( merge ? "Filename to merge forms from" : "Filename to load forms from", "", "*.fd", "" ); if ( ! str || ! *str ) return -1; } /* Append ".fd" if required. */ ff.fname = append_fd_suffix( str ); /* Open the file for reading */ if ( ! ( ff.fp = fopen( ff.fname, "r" ) ) ) { if ( ! fdopt.conv_only ) fl_show_alert( "Can't open file for reading", ff.fname, "", 0 ); else M_err( "ff_get_fd_file", "Can't open '%s' for reading", ff.fname ); ff_close( ); return -1; } if ( ff_get_line( ) < 0 ) { if ( ! fdopt.conv_only ) fl_show_alert( "Nothing to be read from", ff.fname, "", 0 ); else M_err( "ff_get_fd_file", "Nothing to be read from '%s'", ff.fname ); ff_close( ); return -1; } return 0; } /*************************************** * Checks if an input text matches text read from the file * - with multiple white-spaces treated as a single space ***************************************/ static const char * ff_match_text( const char *txt ) { char *src = ff.pos; txt = ff_skip_spaces( txt ); while ( *src && *txt ) { if ( *src != *txt && ! ( isspace( ( unsigned char ) *src ) && isspace( ( unsigned char ) *txt ) ) ) return NULL; if ( isspace( ( unsigned char ) *src ) ) { src = ff_skip_spaces( src ); txt = ff_skip_spaces( txt ); } else { src++; txt++; } } txt = ff_skip_spaces( txt ); if ( *txt ) return NULL; ff.pos = src; return txt; } /*************************************** ***************************************/ static int ff_match_long( long * p ) { long val; char *ep; val = strtol( ff.pos, &ep, 10 ); if ( ep == ff.pos ) return -1; if ( *ep != '\0' && ! isspace( ( unsigned char ) *ep ) ) return -1; if ( ( val == LONG_MAX || val == LONG_MIN ) && errno == ERANGE ) return -1; ff.pos = ep; *p = val; return 0; } /*************************************** ***************************************/ static int ff_match_ulong( unsigned long * p ) { unsigned long val; char *ep; if ( *ff.pos == '-' ) return -1; val = strtoul( ff.pos, &ep, 10 ); if ( ep == ff.pos || ( *ep != '\0' && ! isspace( ( unsigned char ) *ep ) ) || ( val == ULONG_MAX && errno == ERANGE ) ) return -1; ff.pos = ep; *p = val; return 0; } /*************************************** ***************************************/ static int ff_match_int( int * p ) { long val; char *old_pos = ff.pos; if ( ff_match_long( &val ) < 0 ) return -1; if ( ( val > INT_MAX || val < INT_MIN ) ) { ff.pos = old_pos; return -1; } *p = val; return 0; } /*************************************** ***************************************/ static int ff_match_uint( unsigned int * p ) { unsigned long val; char *old_pos = ff.pos; if ( ff_match_ulong( &val ) < 0 ) return -1; if ( val > UINT_MAX ) { ff.pos = old_pos; return -1; } *p = val; return 0; } /*************************************** ***************************************/ static int ff_match_double( double * p ) { double val; char *ep; val = strtod( ff.pos, &ep ); if ( ep == ff.pos || ( *ep != '\0' && ! isspace( ( unsigned char ) *ep ) ) || ( ( val == HUGE_VAL || val == - HUGE_VAL ) && errno == ERANGE ) ) return -1; ff.pos = ep; *p = val; return 0; } /*************************************** ***************************************/ static int ff_match_float( float * p ) { double val; char *old_pos = ff.pos; if ( ff_match_double( &val ) < 0 || val < - FLT_MAX || val > FLT_MAX) { ff.pos = old_pos; return -1; } *p = val; return 0; } /*************************************** ***************************************/ static int ff_match_coord( FL_Coord * p, int need_positive ) { int val; char *old_pos = ff.pos; if ( ff_match_int( &val ) < 0 || ( need_positive && val < 0 ) ) { ff.pos = old_pos; return -1; } *p = val; return 0; } /*************************************** ***************************************/ static int ff_match_string( char ** p ) { /* Backtrack to start of line or last ':' */ while ( ff.pos > ff.line && isspace( ( unsigned char ) *--ff.pos ) ) /* empty */ ; /* If we're at a ':' skip the next space if if exists */ if ( ff.pos > ff.line && *ff.pos == ':' && isspace( ( unsigned char ) *++ff.pos ) ) ff.pos++; *p = ff.pos + strlen( ff.pos ) - 1; if ( **p == '\n' ) **p = '\0'; *p = fl_strdup( ff.pos ); while ( *ff.pos ) ff.pos++; return 0; } /*************************************** ***************************************/ static int ff_match_trimmed_string( char ** p ) { char *ep = ff.pos + strlen( ff.pos ) - 1, *fp = ep + 1; char old_c; if ( ! *ff.pos ) { *p = fl_strdup( ff.pos ); return 0; } *p = NULL; while ( ep > ff.pos && isspace( ( unsigned char ) *ep ) ) ep--; old_c = *ep; *++ep = '\0'; *p = fl_strdup( ff.pos ); *ep = old_c; ff.pos = fp; return 0; } /*************************************** ***************************************/ static int ff_match_spaceless_string( char ** p ) { char *ep = ff.pos; while ( *ep && ! isspace( ( unsigned char ) *ep ) ) ep++; if ( ep == ff.pos ) *p = fl_strdup( "" ); else { *p = fl_malloc( ep - ff.pos + 1 ); fli_sstrcpy( *p, ff.pos, ep - ff.pos + 1 ); ff.pos = ep; } return 0; } /*************************************** ***************************************/ static int ff_match_var( char ** p ) { char *ep = ff.pos; char old_c; if ( ! *ep ) { *p = fl_strdup( ff.pos ); return -1; } *p = NULL; if ( ! isascii( ( unsigned char ) *ep ) || ! ( isalpha( ( unsigned char ) *ep ) || *ep == '_' ) ) { *p = fl_strdup( "" ); return -1; } while ( *++ep && isascii( ( unsigned char ) *ep ) && ( isalnum( ( unsigned char ) *ep ) || *ep == '_' ) ) /* empty */ ; if ( *ep && ! isspace( ( unsigned char ) *ep ) ) { *p = fl_strdup( "" ); return -1; } /* Currently variable, function etc. names can't be longer... */ if ( ep - ff.pos >= MAX_VAR_LEN ) { *p = fl_strdup( "" ); return -1; } old_c = *ep; *ep = '\0'; *p = fl_strdup( ff.pos ); *ep = old_c; ff.pos = ep + 1; return 0; } /*************************************** ***************************************/ static int ff_match_objclass( int * p ) { char *class_name; int class; char * old_pos = ff.pos; if ( ff_match_spaceless_string( &class_name ) < 0 ) return -1; if ( ! *class_name || ( class = class_val( class_name ) ) == -1 ) { ff.pos = old_pos; fl_safe_free( class_name ); return -1; } *p = class; fl_safe_free( class_name ); return 0; } /*************************************** ***************************************/ static int ff_match_boxtype( int * p ) { char *boxtype_name; char *old_pos = ff.pos; int boxtype; if ( ff_match_spaceless_string( &boxtype_name ) < 0 ) return -1; if ( ! *boxtype_name || ( boxtype = boxtype_val( boxtype_name ) ) == -1 ) { ff.pos = old_pos; fl_safe_free( boxtype_name ); return -1; } *p = boxtype; fl_safe_free( boxtype_name ); return 0; } /*************************************** ***************************************/ static int ff_match_color( FL_COLOR * p ) { char *color_name; char *old_pos = ff.pos; FL_COLOR color; if ( ff_match_spaceless_string( &color_name ) < 0 ) return -1; if ( ! *color_name || ( ( color = fli_query_namedcolor( color_name ) ) > FL_MAX_COLORS && color != FL_NoColor ) ) { ff.pos = old_pos; fl_safe_free( color_name ); return -1; } *p = color; if ( *p == 0x8fffffff ) *p = FL_NoColor; fl_safe_free( color_name ); return 0; } /*************************************** * align may consist of two values, separated by a '|' or '+' ***************************************/ static int ff_match_align( int * p ) { char *align_name; char *old_pos = ff.pos; char *sp = strchr( ff.pos, '|' ); int align; if ( ! sp ) sp = strchr( ff.pos, '+' ); if ( ! sp || ( sp > ff.pos && ! isspace( ( unsigned char ) sp[ -1 ] ) && ! isspace( ( unsigned char ) sp[ 1 ] ) ) ) { if ( ff_match_spaceless_string( &align_name ) < 0 ) return -1; } else { char *a1 = NULL, *a2 = NULL, o = *sp; *sp = '\0'; if ( ff_match_spaceless_string( &a1 ) < 0 || ! *a1 ) { fl_safe_free( a1 ); ff.pos = old_pos; *sp = o; return -1; } *sp = o; ff.pos = sp + 1; ff.pos = ff_skip_spaces( ff.pos ); if ( ff_match_spaceless_string( &a2 ) < 0 || ! *a2 ) { fl_safe_free( a1 ); fl_safe_free( a2 ); ff.pos = old_pos; return -1; } align_name = fli_print_to_string( "%s|%s", a1, a2 ); fl_safe_free( a1 ); fl_safe_free( a2 ); } if ( ! *align_name || ( align = align_val( align_name ) ) == -1 ) { ff.pos = old_pos; fl_safe_free( align_name ); return -1; } *p = align; fl_safe_free( align_name ); return 0; } /*************************************** * lstyle may consist of two values, separated by a '|' or '+' ***************************************/ static int ff_match_lstyle( int * p ) { char *lstyle_name; int lstyle; char *old_pos = ff.pos; char *sp = strchr( ff.pos, '|' ); if ( ! sp ) sp = strchr( ff.pos, '+' ); if ( ! sp || ( sp > ff.pos && ! isspace( ( unsigned char ) sp[ -1 ] ) && ! isspace( ( unsigned char ) sp[ 1 ] ) ) ) { if ( ff_match_spaceless_string( &lstyle_name ) < 0 ) return -1; } else { char *l1, *l2, *old_pos = ff.pos, o = *sp; *sp = '\0'; if ( ff_match_spaceless_string( &l1 ) < 0 ) { *sp = o; return -1; } *sp = o; ff.pos = sp + 1; ff.pos = ff_skip_spaces( ff.pos ); if ( ff_match_spaceless_string( &l2 ) < 0 || ! *l2 ) { ff.pos = old_pos; fl_safe_free( l1 ); return -1; } lstyle_name = fli_print_to_string( "%s|%s", l1, l2 ); fl_safe_free( l1 ); fl_safe_free( l2 ); } if ( ! *lstyle_name || ( lstyle = style_val( lstyle_name ) ) == -1 ) { ff.pos = old_pos; fl_safe_free( lstyle_name ); return -1; } *p = lstyle; fl_safe_free( lstyle_name ); return 0; } /*************************************** ***************************************/ static int ff_match_lsize( int * p ) { char *lsize_name; char *old_pos = ff.pos; int lsize; if ( ff_match_spaceless_string( &lsize_name ) < 0 ) return -1; if( ! *lsize_name || ( lsize = lsize_val( lsize_name ) ) == -1 ) { fl_safe_free( lsize_name ); ff.pos = old_pos; return -1; } *p = lsize; fl_safe_free( lsize_name ); return 0; } /*************************************** ***************************************/ static int ff_match_resize( int * p ) { char *resize_name; char *old_pos = ff.pos; int resize; if ( ff_match_spaceless_string( &resize_name ) < 0 ) return -1; if ( ! *resize_name || ( resize = resize_val( resize_name ) ) == -1 ) { fl_safe_free( resize_name ); ff.pos = old_pos; return -1; } *p = resize; fl_safe_free( resize_name ); return 0; } /*************************************** ***************************************/ static int ff_match_gravity( int * p ) { char *gravity_name; char *old_pos = ff.pos; int gravity; if ( ff_match_spaceless_string( &gravity_name ) < 0 ) return -1; if ( ! *gravity_name || ( gravity = gravity_val( gravity_name ) ) == -1 ) { ff.pos = old_pos; fl_safe_free( gravity_name ); return -1; } *p = gravity; fl_safe_free( gravity_name ); return 0; } /*************************************** ***************************************/ static int ff_match_unit( int * p ) { char *unit_name; char *old_pos = ff.pos; int unit; if ( ff_match_spaceless_string( &unit_name ) < 0 ) return -1; if ( ! *unit_name || ( unit = unit_val( unit_name ) ) == -1 ) { ff.pos = old_pos; fl_safe_free( unit_name ); return -1; } *p = unit; fl_safe_free( unit_name ); return 0; } /*************************************** ***************************************/ static int ff_match_key( char ** p ) { char *ep = ff.pos; char *np; char old_c; *p = NULL; while ( *ep && *ep != ':' ) ep++; if ( ! *ep ) return -1; np = ep-- + 1; while ( ep > ff.pos && isspace( ( unsigned char ) *ep ) ) ep--; if ( ep == ff.pos ) return -1; old_c = *++ep; *ep = '\0'; *p = fl_strdup( ff.pos ); *ep = old_c; ff.pos = np; return 0; } /*************************************** ***************************************/ static int ff_match_type( char ** p ) { return ff_match_var( p ); } /*************************************** * Function for reading data from .fd files in a fscanf()-like way. * * The format string may contain the following: * a) text which must match the text in the string at that position * b) %l match long (requires long *) * b) %d match int (requires int *) * c) %u match unsigned int (requires int *) * d) %D match FL_Coord (requires FL_Coord *) * e) %U match FL_Coord with positive value (requires FL_Coord *) * f) %s match string (trimmed of spaces at start and end) (requires char **) * g) %S match string (with all spaces) (requires char **) * h) %f match single-precision floating point value (requires float *) * i) %D match double floating point value (requires double *) * j) %o match object class (requires int *) * k) %t match type (requires char **) * l) %b match boxtype (requires int *) * m) %c match color (requires FL_COLOR *) * n) %a match align (requires int *) * o) %p match lstyle (requires int *) * p) %q match lsize (requires int *) * q) %r match resize (requires int *) * r) %g match gravity (requires int *) * s) %x match unit (requires int *) * t) %v match C variable (requires char **) * u) %k match a key (word(s) with a final colon) (requires char **) * * In case a string gets returned a copy must be made before the next * call of this function. * The function returns the number of items matched or a negative * value on failure (in that case an error message is output). ***************************************/ int ff_read( const char * format, ... ) { va_list ap; char *fmt; const char *fp; int cnt = 0; char last = '\0'; if ( ! ff.line ) return -1; format = ff_skip_spaces( format ); if ( ! format || ! *format ) { M_err( "ff_read", "Invalid argument(s)" ); return -1; } fp = fmt = fl_strdup( format ); va_start( ap, format ); while ( *fp ) { if ( *fp != '%' ) { if ( ! ( fp = ff_match_text( fp ) ) ) { va_end( ap ); return -1; } last = '\0'; } else { int r; switch ( *++fp ) { case 'l' : /* long int */ r = ff_match_long( va_arg( ap, long * ) ); break; case 'd' : /* int */ r = ff_match_int( va_arg( ap, int * ) ); break; case 'u' : /* unsigned int */ r = ff_match_uint( va_arg( ap, unsigned int * ) ); break; case 'D' : /* FL_Coord ('U' for positive) */ case 'U' : r = ff_match_coord( va_arg( ap, FL_Coord * ), *fp == 'U' ); break; case 's' : /* trimmed string */ r = ff_match_trimmed_string( va_arg( ap, char ** ) ); break; case 'S' : /* string (with spaces) */ r = ff_match_string( va_arg( ap, char ** ) ); break; case 'f' : /* float */ r = ff_match_float( va_arg( ap, float * ) ); break; case 'F' : /* double */ r = ff_match_double( va_arg( ap, double * ) ); break; case 'o' : /* object class */ r = ff_match_objclass( va_arg( ap, int * ) ); break; case 't' : /* object type */ r = ff_match_type( va_arg( ap, char ** ) ); break; case 'b' : /* box type */ r = ff_match_boxtype( va_arg( ap, int * ) ); break; case 'c' : /* color */ r = ff_match_color( va_arg( ap, FL_COLOR * ) ); break; case 'a' : /* alignment value */ r = ff_match_align( va_arg( ap, int * ) ); break; case 'p' : /* lstyle value */ r = ff_match_lstyle( va_arg( ap, int * ) ); break; case 'q' : /* lsize value */ r = ff_match_lsize( va_arg( ap, int * ) ); break; case 'r' : /* resize value */ r = ff_match_resize( va_arg( ap, int * ) ); break; case 'g' : /* gravity value */ r = ff_match_gravity( va_arg( ap, int * ) ); break; case 'x' : /* unit value */ r = ff_match_unit( va_arg( ap, int * ) ); break; case 'v' : /* C variable name */ r = ff_match_var( va_arg( ap, char ** ) ); break; case 'k' : /* key with trailing colon */ r = ff_match_key( va_arg( ap, char ** ) ); break; default : /* error, wrong format */ va_end( ap ); fl_free( fmt ); M_err( "ff_read", "Invalid argument(s)" ); return -1; } last = *fp; if ( r < 0 ) break; cnt++; fp++; } ff.pos = ff_skip_spaces( ff.pos ); fp = ff_skip_spaces( fp ); } va_end( ap ); fl_free( fmt ); /* If we're at the end of the line read in the next - except when the last request was for a key, in that case the next one will be for a value and it's allowed that no value exists even when there's a key... */ if ( last != 'k' && ! *ff.pos ) ff_get_line( ); return cnt; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/fdesign/fd4test/0000755000175000017500000000000011377311602015223 5ustar jensjensxforms-1.0.93sp1/fdesign/fd4test/inittest.fd0000644000175000017500000001242711171560225017406 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: form0 Width: 591 Height: 341 Number of Objects: 13 -------------------- class: FL_BOX type: UP_BOX box: 0 0 591 341 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_PIXMAPBUTTON type: NORMAL_BUTTON box: 20 20 70 70 boxtype: FL_UP_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: align: FL_ALIGN_TOP|FL_ALIGN_INSIDE -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 155 20 50 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: SetButton shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: value: 1 -------------------- class: FL_VALSLIDER type: HOR_BROWSER_SLIDER box: 10 110 140 20 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: slider at 0.55 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: null_cb argument: 0 value: 0.55 increment: 0.02 0.01 slsize: 0.25 -------------------- class: FL_COUNTER type: NORMAL_COUNTER box: 130 70 130 20 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Counter at 101.00 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: null_cb argument: 0 precision: 2 value: 101.00 -------------------- class: FL_POSITIONER type: NORMAL_POSITIONER box: 285 15 100 80 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_RED alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: null_cb argument: 0 xvalue: 0.7 yvalue: 0.7 -------------------- class: FL_DIAL type: NORMAL_DIAL box: 430 20 70 50 boxtype: FL_UP_BOX colors: FL_COL1 FL_RIGHT_BCOL alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Dail at 3 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: null_cb argument: 0 value: 0.75 -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 150 135 120 120 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: 5 lines in browser. SCB on shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: null_cb argument: 0 h_pref: FL_ON v_pref: FL_ON content: Browser Line 1 content: Browser line 2 content: Browser Line3 content: @C1Line4 content: @bBold Line 5 -------------------- class: FL_SCROLLBAR type: VERT_THIN_SCROLLBAR box: 110 160 20 155 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: null_cb argument: 0 slsize: 0.25 -------------------- class: FL_BITMAPBUTTON type: NORMAL_BUTTON box: 15 195 85 80 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: file: /home/zhao/xforms/DESIGN/nomail.xbm fullpath: 1 -------------------- class: FL_XYPLOT type: NORMAL_XYPLOT box: 295 100 220 190 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_TINY_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: ytics: 2 2 xscale: FL_LOG 5 -------------------- class: FL_CHOICE type: NORMAL_CHOICE2 box: 170 285 110 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: null_cb argument: 0 align: FL_ALIGN_LEFT content: LeftChoice 1 shortcut: #LL content: Choice item 2 shortcut: C content: Disabled Choice Items mode: FL_PUP_GRAY shortcut: D content: More Items shortcut: M value: 2 -------------------- class: FL_MENU type: PULLDOWN_MENU box: 310 290 80 20 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_BOLD_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Menu shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: null_cb argument: 0 content: menu item 1 shortcut: 1 content: menu item 2 shortcut: 2 content: menu item 3 -inactive mode: FL_PUP_GRAY shortcut: 3 content: menu item 4 -set mode: FL_PUP_CHECK shortcut: 4 content: menu item 5 shortcut: 5 ============================== create_the_forms xforms-1.0.93sp1/fdesign/fd4test/Makefile.am0000644000175000017500000000011311171560225017251 0ustar jensjensinclude $(top_srcdir)/config/common.am EXTRA_DIST = inittest.fd testfd.fd xforms-1.0.93sp1/fdesign/fd4test/.cvsignore0000644000175000017500000000002511171560225017217 0ustar jensjensMakefile Makefile.in xforms-1.0.93sp1/fdesign/fd4test/Makefile.in0000644000175000017500000002403611377311602017275 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/config/common.am subdir = fdesign/fd4test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D EXTRA_DIST = inittest.fd testfd.fd all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fdesign/fd4test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fdesign/fd4test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xforms-1.0.93sp1/fdesign/fd4test/testfd.fd0000644000175000017500000000476311171560225017040 0ustar jensjensMagic: 13000 Internal Form Definition File (do not change) Number of forms: 1 Unit of measure: FL_COORD_centiPOINT SnapGrid: 5 =============== FORM =============== Name: form0 Width: 30164 Height: 23495 Number of Objects: 7 -------------------- class: FL_BOX type: UP_BOX box: 0 0 30164 23495 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BEGIN_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: buttgrp callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 3789 6669 9626 2880 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button\Bott shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: bottom callback: but_cb argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 3789 3789 9626 2880 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button"Top" shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: butttop callback: butt_cb argument: 0 -------------------- class: FL_END_GROUP type: 0 box: 0 0 0 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 20160 19175 8564 2880 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Done shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 3789 12429 18266 4851 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Button\nnewline shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: butt_cb argument: 0 ============================== create_the_forms xforms-1.0.93sp1/.cvsignore0000644000175000017500000000015611171634032014226 0ustar jensjensMakefile Makefile.in configure libtool autom4te* xforms.spec acinclude.m4 aclocal.m4 stamp-h1 .git .gitignore xforms-1.0.93sp1/Copyright0000644000175000017500000000033411171560225014121 0ustar jensjens All files distributed in this package are Copyright (c) 1996-2000 by T.C. Zhao and Mark Overmars Parts Copyright (c) 1999-2002 T.C. Zhao and Steve Lamont ALL RIGHTS RESERVED. See the file COPYING.LIB for your rights. xforms-1.0.93sp1/xforms.spec.in0000644000175000017500000001067711304544467015050 0ustar jensjensSummary: XForms library Name: @PACKAGE@ Version: @VERSION@ Release: 1 Source0: http://savannah.nongnu.org/download/xforms/%{name}-%{version}.tar.gz License: LGPL Group: System/Libraries BuildRequires: xpm BuildRequires: xpm-devel BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} URL: http://www.nongnu.org/xforms/ %description XForms is a GUI toolkit based on Xlib for X Window Systems. It features a rich set of objects, such as buttons, sliders, and menus etc. integrated into an easy and efficient object/event callback execution model that allows fast and easy construction of X-applications. In addition, the library is extensible and new objects can easily be created and added to the library. %package -n %{name}-devel Summary: XForms development header files Group: System/Libraries Provides: %{name} %description -n %{name}-devel XForms header files for development. %prep %setup -q -n %{name}-%{version} %build ./configure --prefix=%{_prefix} --mandir=%{_mandir} --bindir=%{_bindir} \ --without-warnings --disable-debug --enable-optimization=-O2 make %install rm -rf ${RPM_BUILD_ROOT} install -d -m 755 ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install gzip -f9 ${RPM_BUILD_ROOT}%{_mandir}/man?/* allfiles=`find ${RPM_BUILD_ROOT}/usr -type f -print | sed "s@^${RPM_BUILD_ROOT}@@g"` echo "$allfiles" | grep -v "^/usr/include/" > \ %{_tmppath}/%{name}-%{version}-binfiles echo "$allfiles" | grep "^/usr/include/" > \ %{_tmppath}/%{name}-%{version}-devfiles %clean rm -rf $RPM_BUILD_ROOT rm -f %{_tmppath}/%{name}-%{version}-binfiles rm -f %{_tmppath}/%{name}-%{version}-devfiles %files -n %{name} -f %{_tmppath}/%{name}-%{version}-binfiles %defattr(-,root,root) %doc COPYING.LIB Copyright ChangeLog INSTALL NEWS README %files -n %{name}-devel -f %{_tmppath}/%{name}-%{version}-devfiles %defattr(-,root,root) %post -n %{name} # # Create symbolic links from libforms.so.1.1.0 to libforms.so, libforms.so.1 # # 1. Create a list of files that require symbolic links. # lib_prefix=${RPM_INSTALL_PREFIX}/lib sofiles="" for file in \ "${lib_prefix}/libforms.so"* \ "${lib_prefix}/libformsGL.so"* \ "${lib_prefix}/libflimage.so"* do test -L "${file}" || sofiles="${sofiles} ${file}" done # # 2. Create the links. # for file in ${sofiles} do test -f "${file}" || continue symlink=`echo "${file}" | sed 's/\(\.so\.[0-9]\).*/\1/'` test "${file}" != "${symlink}" && ln -fs "${file}" "${symlink}" symlink=`echo "${symlink}" | sed 's/\(\.so\).*/\1/'` test "${file}" != "${symlink}" && ln -fs "${file}" "${symlink}" done # # Modify libforms.la et al. to prevent libtool from complaining # that the files have been moved. # test "${RPM_INSTALL_PREFIX}" = "/usr" && exit for la_name in libforms.la libformsGL.la libflimage.la do la_path="${lib_prefix}/${la_name}" tmp=`sed "/^libdir=/s@/usr@${RPM_INSTALL_PREFIX}@" ${la_path}` echo "${tmp}" > ${la_path} done %postun -n %{name} # # Remove symbolic links libforms.so, libforms.so.1, etc # lib_prefix=${RPM_INSTALL_PREFIX}/lib for file in \ "${lib_prefix}/libforms.so"* \ "${lib_prefix}/libformsGL.so"* \ "${lib_prefix}/libflimage.so"* do test -L "${file}" && rm -f "${file}" done %changelog * Sa Nov 22 2008 Jens Thoms Toerring 1.0.91 - New release 1.0.91 - lots of bug fixes * Wed Oct 6 2004 Angus Leeming 1.0.90 - Re-write the 'post' and 'postun' scripts to create the symbolic links correctly without requiring the SO_VERSION hack. * Fri May 7 2004 Angus Leeming 1.0.90 - add code to the 'post' script to modify libforms.la et al. to prevent libtool from complaining that the files have been moved. * Thu May 6 2004 Angus Leeming 1.0.90 - fix 'Release' and 'Source0' info. - add 'post' and 'postun' scripts to create and remove symbolic links, respectively. * Thu May 6 2004 Angus Leeming 1.0.90 - no longer place devfiles and binfiles in ${RPM_BUILD_ROOT}. Prevents rpm from bombing with a "Checking for unpackaged files" error. * Sat Aug 31 2002 Duncan Haldane 1.0-RC4 - mv fdesign, fd2ps to devel. restore xforms name of rpm. * Sun Jul 14 2002 Greg Hosler 1.0-RC4 - Pass DESTDIR to makeinstall_std. * Thu Jul 11 2002 Peter Galbraith 1.0-RC4 - Move from libxforms to libforms to match other distros. * Tue Jul 8 2002 Chris Freeze 1.0-RC4 - First stab at spec file. xforms-1.0.93sp1/README.OS20000644000175000017500000000356211171560225013516 0ustar jensjensNotes on using and recompiling xforms-0.88 on OS/2 -------------------------------------------------- Holger.Veit@gmd.de 14 Dec 97 1. XForms is only supported for XFree86/OS2 3.2 or later, not for PMX or eXceed. 2. You must have XPM installed. This package is available from the XFree86/OS2 ported software page http://set.gmd.de/~veit/os2/xf86ported.html 3. You must have a complete EMX 0.9C fix2 development environment installed, including X331prog.zip or later 3a. If you get the access to these sources for compiling to OS/2, the distribution might contain a UNIX-style 'os2move.cmd' file. Use an appropriate unix2os2 conversion program to make it usable (since it is unlikely that you will ever get access to the sources, this is just a reminder for me :-) 4. Since Dr. Zhao has moved and renamed a few things in a non-standard way, e.g. Imakefile to Imakefile.os2 which won't work, run the script os2move.cmd from this top directory; this should move the things back to the places where they were meant to be. 5. The config mechanism to compile XForms is not supported; instead use the Imakefiles: xmkmf -a make all make install make install.man 6. Note the imake process will overwrite provided Makefiles in the subdirectories. This is no problem unless you want to use special targets. The Imakefiles will build everything which you can get, so there is no selection among library only, forms design tool and demos. See the Imakefile in the FORMS directory for selecting shared vs. static libs. By default, this Imakefile is setup to build both shared and static libraries. 7. Demo executables are installed in \XFree86\bin\xforms_demo, the source for these demos is in \XFree86\src\xforms. The code there is not the source code of Xforms! 8. Currently, only the pmbrowse demo does not work, the others should function as expected. xforms-1.0.93sp1/gl/0000755000175000017500000000000011377311602012631 5ustar jensjensxforms-1.0.93sp1/gl/Makefile.am0000644000175000017500000000062211236627673014701 0ustar jensjensinclude $(top_srcdir)/config/common.am # forms.h is a generated file INCLUDES = -DMAKING_FORMS -I../lib -I$(top_srcdir)/lib $(X_CFLAGS) include_HEADERS = glcanvas.h lib_LTLIBRARIES = libformsGL.la libformsGL_la_LDFLAGS = -no-undefined -Wl,--no-undefined -version-info @SO_VERSION@ libformsGL_la_LIBADD = ../lib/libforms.la $(X_LIBS) -lGL -lX11 libformsGL_la_SOURCES = \ glcanvas.c \ glcanvas.h xforms-1.0.93sp1/gl/glcanvas.c0000644000175000017500000002274511320115063014574 0ustar jensjens/* * This file is part of the XForms library package. * * XForms is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1, or * (at your option) any later version. * * XForms is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with XForms. If not, see . */ /** * \file glcanvas.c * * This file is part of the XForms library package. * Copyright (c) 1996-2002 T.C. Zhao and Mark Overmars * All rights reserved. * * A sample implementation of OpenGL/Mesa canvas class. * * For typical objects, ob->spec is the place for the * object specific info. For OpenGL canvas, however, the * ob->spec is already used by the generic canvas. We use * ob->c_vdata to hang the OpenGL specific stuff. * * See ../DEMOS/gl.c for an example use of glcanvas. * See ../DEMOS/glwin.c for an example use of fl_glwinopen */ #ifdef HAVE_CONFIG_H #include #endif #include "GL/glx.h" #include "GL/gl.h" #include "include/forms.h" #include "glcanvas.h" #include #define MAXATTRIB 34 typedef struct { XVisualInfo * xvinfo; GLXContext context; int direct; int glconfig[ MAXATTRIB ]; } CSPEC; /*************************************** * Default GL canvas configuration. The user can modify this default * using fl_set_glcanvas_defaults(const int *config) or * fl_set_glcanvas_attributes(FL_OBJECT *, const int *config) ***************************************/ static int glconfig[ MAXATTRIB ] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None }; #define GLPROP( ob ) ( ( CSPEC * ) ( ob )->c_vdata ) #define ISGLC( ob ) ( ( ob ) && ( ob )->objclass == FL_GLCANVAS ) static int glx_init( FL_OBJECT * ); static int glx_activate( FL_OBJECT * ); static int glx_cleanup( FL_OBJECT * ); static void copy_attributes( int *, const int * ); /*************************************** * Add a GL canvas to the form ***************************************/ FL_OBJECT * fl_add_glcanvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT * ob = fl_create_glcanvas( type, x, y, w, h, label ); fl_add_object( fl_current_form, ob ); return ob; } /*************************************** * Modify the global defaults ***************************************/ void fl_set_glcanvas_defaults( const int * config ) { copy_attributes( glconfig, config ); } /*************************************** ***************************************/ void fl_get_glcanvas_defaults( int * config ) { copy_attributes( config, glconfig ); } /*************************************** * Modify the default configuration of a particular canvas ***************************************/ void fl_set_glcanvas_attributes( FL_OBJECT * ob, const int * config ) { if ( ! ISGLC( ob ) ) fprintf( stderr, "object %s is not glcanvas\n", ob ? ob->label : "null" ); copy_attributes( GLPROP( ob )->glconfig, config ); if ( ob->visible ) { fl_hide_object( ob ); fl_show_object( ob ); } } /*************************************** ***************************************/ void fl_get_glcanvas_attributes( FL_OBJECT * ob, int * attributes ) { copy_attributes( attributes, GLPROP( ob )->glconfig ); } /*************************************** ***************************************/ void fl_set_glcanvas_direct( FL_OBJECT * ob, int direct ) { if ( direct != GLPROP( ob )->direct ) { GLPROP( ob )->direct = direct ? GL_TRUE : GL_FALSE; if ( ob->visible ) { fl_hide_object( ob ); fl_show_object( ob ); } } } /*************************************** ***************************************/ GLXContext fl_get_glcanvas_context( FL_OBJECT * ob ) { return GLPROP( ob )->context; } /*************************************** ***************************************/ XVisualInfo * fl_get_glcanvas_xvisualinfo( FL_OBJECT * ob ) { return GLPROP( ob )->xvinfo; } /*************************************** ***************************************/ void fl_activate_glcanvas( FL_OBJECT * ob ) { if ( FL_ObjWin( ob ) ) glx_activate( ob ); } /*************************************** * Interface routines ***************************************/ FL_OBJECT * fl_create_glcanvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob = fl_create_canvas( type, x, y, w, h, label ); ob->objclass = FL_GLCANVAS; fl_modify_canvas_prop( ob, glx_init, glx_activate, glx_cleanup ); /* Initialize glcanvas specific stuff */ ob->c_vdata = fl_calloc( 1, sizeof( CSPEC ) ); memcpy( GLPROP( ob )->glconfig, glconfig, sizeof glconfig ); GLPROP( ob )->direct = GL_TRUE; return ob; } /*************************************** * Initialize the OpenGL stuff before window creation ***************************************/ static int glx_init( FL_OBJECT * ob ) { XVisualInfo *vi; GLXContext context; /* Query for OpenGL capabilities */ if ( ! glXQueryExtension( fl_display, 0, 0 ) ) { fprintf( stderr, "GLCanvas: OpenGL not supported\n" ); return -1; } /* Quit if we can't get a visual */ if ( ! ( vi = glXChooseVisual( fl_display, fl_screen, GLPROP( ob )->glconfig ) ) ) { fprintf( stderr, "GLCanvas: Can't get visual\n" ); return -1; } /* Change canvas defaults */ fl_set_canvas_visual( ob, vi->visual ); fl_set_canvas_depth( ob, vi->depth ); fl_set_canvas_colormap( ob, fl_create_colormap( vi, 1 ) ); context = glXCreateContext( fl_display, vi, None, GLPROP( ob )->direct ); if ( ! context ) { fprintf( stderr, "Can't create GLX context!\n" ); return -1; } /* Under some conditions the parent of the gl canvas might go away, leaving the old context and vi hanging. */ glx_cleanup( ob ); GLPROP( ob )->context = context; GLPROP( ob )->xvinfo = vi; return 0; } /*************************************** * This routine is called after a valid window is created. It simply * binds the OpenGL context to the canvas window ***************************************/ static int glx_activate( FL_OBJECT * ob ) { glXMakeCurrent( fl_display, FL_ObjWin( ob ), GLPROP( ob )->context ); return 0; } /*************************************** * Cleanup is called before destroying the window. Might be called * more than once ***************************************/ static int glx_cleanup( FL_OBJECT * ob ) { if ( GLPROP( ob )->context ) { glXDestroyContext( fl_display, GLPROP( ob )->context ); XFree( GLPROP( ob )->xvinfo ); GLPROP( ob )->context = 0; GLPROP( ob )->xvinfo = 0; } return 0; } /*************************************** ***************************************/ static void copy_attributes( int * dest, const int * src ) { while ( *src != None ) *dest++ = *src++; *dest = None; } /************************************************************* * Open a top-level OpenGL window. * * fl_winset won't work for switching OpenGL windows. * Use glXMakeCurrent ************************************************************/ Window fl_glwincreate( int * config, GLXContext * context, int w, int h ) { XVisualInfo *xvi; XSetWindowAttributes xswa; unsigned int mask; Window win; if ( ! glXQueryExtension( fl_display, 0, 0 ) ) return None; if ( ! ( xvi = glXChooseVisual( fl_display, fl_screen, config ? config : glconfig ) ) ) return None; *context = glXCreateContext( fl_display, xvi, None, GL_TRUE ); xswa.colormap = fl_create_colormap( xvi, 1 ); xswa.border_pixel = 0; mask = CWColormap | CWBorderPixel; xswa.event_mask = ExposureMask | StructureNotifyMask; mask |= CWEventMask; win = XCreateWindow( fl_display, RootWindow( fl_display, fl_screen ), 0, 0, w, h, 0, xvi->depth, InputOutput, xvi->visual, mask, &xswa ); if ( win ) glXMakeCurrent( fl_display, win, *context ); return win; } /*************************************** ***************************************/ Window fl_glwinopen( int * config, GLXContext * context, int w, int h ) { Window win; if ( ( win = fl_glwincreate( config, context, w, h ) ) ) fl_winshow( win ); return win; } /* * Local variables: * tab-width: 4 * indent-tabs-mode: nil * End: */ xforms-1.0.93sp1/gl/glcanvas.h0000644000175000017500000000273011320114711014570 0ustar jensjens#ifndef FL_GLCANVAS_H #define FL_GLCANVAS_H #if defined( __cplusplus ) extern "C" { #endif #include /* OpenGL canvases */ FL_EXPORT FL_OBJECT * fl_create_glcanvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT FL_OBJECT * fl_add_glcanvas( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ); FL_EXPORT void fl_set_glcanvas_defaults( const int * config ); FL_EXPORT void fl_get_glcanvas_defaults( int * cconfig ); FL_EXPORT void fl_set_glcanvas_attributes( FL_OBJECT * ob, const int * config ); FL_EXPORT void fl_get_glcanvas_attributes( FL_OBJECT * ob, int * attributes ); FL_EXPORT void fl_set_glcanvas_direct( FL_OBJECT * ob, int direct ); FL_EXPORT void fl_activate_glcanvas( FL_OBJECT * ob ); FL_EXPORT XVisualInfo * fl_get_glcanvas_xvisualinfo( FL_OBJECT * ob ); FL_EXPORT GLXContext fl_get_glcanvas_context( FL_OBJECT * ob ); FL_EXPORT Window fl_glwincreate( int * config, GLXContext * context, int w, int h ); FL_EXPORT Window fl_glwinopen( int * config, GLXContext * context, int w, int h ); #if defined( __cplusplus ) } #endif #endif /* NOT FL_GLCANVAS_H */ xforms-1.0.93sp1/gl/.cvsignore0000644000175000017500000000006211171560225014626 0ustar jensjenslibformsGL* Makefile Makefile.in .deps .libs *.lo xforms-1.0.93sp1/gl/Makefile.in0000644000175000017500000004413511377311602014705 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/config/common.am subdir = gl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libformsGL_la_DEPENDENCIES = ../lib/libforms.la $(am__DEPENDENCIES_1) am_libformsGL_la_OBJECTS = glcanvas.lo libformsGL_la_OBJECTS = $(am_libformsGL_la_OBJECTS) libformsGL_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libformsGL_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libformsGL_la_SOURCES) DIST_SOURCES = $(libformsGL_la_SOURCES) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D # forms.h is a generated file INCLUDES = -DMAKING_FORMS -I../lib -I$(top_srcdir)/lib $(X_CFLAGS) include_HEADERS = glcanvas.h lib_LTLIBRARIES = libformsGL.la libformsGL_la_LDFLAGS = -no-undefined -Wl,--no-undefined -version-info @SO_VERSION@ libformsGL_la_LIBADD = ../lib/libforms.la $(X_LIBS) -lGL -lX11 libformsGL_la_SOURCES = \ glcanvas.c \ glcanvas.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign gl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libformsGL.la: $(libformsGL_la_OBJECTS) $(libformsGL_la_DEPENDENCIES) $(libformsGL_la_LINK) -rpath $(libdir) $(libformsGL_la_OBJECTS) $(libformsGL_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glcanvas.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES # 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: xforms-1.0.93sp1/README0000644000175000017500000001225211375543457013126 0ustar jensjens XForms Version 1.0.93 This is the Free Software distribution of the XForms Library, a graphical user interface toolkit for X Window Systems. It should work under X11 R4, R5 & R6. XForms is free software. It is licensed under the GNU LGPL (Lesser General Public License) version 2.1. See the file COPYING.LIB for the gory details. What's new? ----------- XForms 1.0.93 is a version in preparation for XForms 1.1.0. While it is labeled as a "development version" we believe that it per- forms correctly and has less bugs than older versions. For more information, read the file ChangeLog. Getting XForms -------------- The XForms homepage is accessible at http://xforms-toolkit.org/ The sources can be downloaded from the project page at http://www.nongnu.org/xforms/ See the "Download Area" on that page. On this page you should select the file named 'xforms.latest_stable.tar.gz' (which will point to the latest stable release, including bug-fixes that may have become necessary) to download the sources - unless you're prepared to take part in testing the "bleeding edge" versions that have a name containing '-preX' (where X is some number), indicating that it is a pre-release on the way to a new stable release. Keeping in touch ---------------- There is a mailing list for XForms. To subscribe (or unsubscribe) go to http://lists.nongnu.org/mailman/listinfo/xforms-development or send an email to xforms-development-request@nongnu.org with a subject line consisting of just 'subscribe' or 'unsubscribe'. To use the mailing list, send your message to xforms-development@nongnu.org Remember your message will be sent to many people. Please DO NOT send subscribe/unsubscribe messages to the list, send it to xforms-request@nongnu.org The archive of the mailing list can be found at http://lists.gnu.org/archive/html/xforms-development/ Messages sent to the mailing list before August 2009 are at http://xforms-toolkit.org/old-archive/ Compiling XForms ---------------- You should be able to compile XForms on any 'reasonable' flavour of unix. XForms relies on some other libraries, namely * libX11 * libXpm, version 4.7 or newer. * libjpeg, 6.0b or newer. * libGL (optional) You will find generic installation instructions common to all autoconf-based packages in the file INSTALL. In general, all it takes to compile and install XForms is ./configure make make install There are some features that you may want to control: o --disable-gl that makes sure that gl support is not built even if you have proper GL libraries installed. o --enable-demos that adds "demos/" to the list of directories to build. It contains various program demonstrating the use of the XForms library. For more complicated cases, ./configure takes the following specific flags: o --with-extra-lib=DIRECTORY that specifies the path where XForms will find extra libraries (Xpm, jpeg...) it needs. Defaults to NONE (i.e. search in standard places). You can specify several directories, separated by colons. o --with-extra-inc=DIRECTORY that gives the place where XForms will find headers. Defaults to NONE (i.e. search in standard places). You can specify several directories, separated by colons. o --with-extra-prefix[=DIRECTORY] that is equivalent to --with-extra-lib=DIRECTORY/lib --with-extra-inc=DIRECTORY/include If DIRECTORY is not specified, the current prefix is used. o --enable-optimization=VALUE enables you to set optimization to a higher level as the default (-O), for example --enable-optimization=-O3. o --disable-optimization - you can use this to disable compiler optimization of LyX. The compile may be much quicker with some compilers, but XForms applications will run more slowly. o --enable-debug will add debug information to your binary. This requires a lot more disk space, but is a must if you want to try to debug problems in XForms. The default is to have debug information for development versions and prereleases only. o --enable-bwc-bs-hack enables some workarounds for incompatibilities that may keep very old programs using XForms from working correctly. Please only use as a last resort. Moreover, the following generic configure flags may be useful: o --prefix=DIRECTORY specifies the root directory to use for installation. [defaults to /usr/local] o --enable-maintainer-mode enables some code that automatically rebuilds the configure script, makefiles templates and other useful files when needed. This is off by default, to avoid surprises. Note that the --with-extra-* commands are not really robust when it comes to use of relative paths. If you really want to use a relative path here, you can prepend it with "`pwd`/". If you do not like the default compile flags used (-g -O on gcc), you can set CFLAGS variable to other values as follows: ./configure CFLAGS='-O2' Similarly, if you want to force the use of some specific compiler, you can give a value to the CC variable. The following option might be useful in desperate cases: o --enable-warnings that make the compiler output more warnings during the compilation. Opposite is --disable-warnings. xforms-1.0.93sp1/acinclude.m40000644000175000017500000074472411377311576014454 0ustar jensjensdnl Some useful functions for xforms configure.in -*- sh -*- dnl Author: Jean-Marc Lasgouttes (lasgouttes@lyx.org) dnl Lars Gullik Bjønnes (larsbj@lyx.org) dnl Allan Rae (rae@lyx.org) dnl Usage XFORMS_CHECK_VERSION dnl Sets variables VERSION, FL_VERSION, FL_REVISION, FL_FIXLEVEL and dnl xforms_devel_version. AC_DEFUN([XFORMS_CHECK_VERSION],[ AC_SUBST(PACKAGE, $PACKAGE_NAME) AC_SUBST(VERSION, $PACKAGE_VERSION) [eval] `echo $PACKAGE_VERSION | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/FL_VERSION=\1; FL_REVISION=\2; FL_FIXLEVEL=\3/'` AC_SUBST(FL_VERSION) AC_SUBST(FL_REVISION) AC_SUBST(FL_FIXLEVEL) echo "configuring xforms version $VERSION" xforms_devel_version=no case $VERSION in dnl ( *.[[5-9]][[0-9]]) xforms_devel_version=yes AC_DEFINE(DEVEL_VERSION, 1, Define if you are building a development version of xforms) echo "WARNING: This is a development version. Expect bugs." ;; esac]) dnl Usage XFORMS_CHECK_LIB_JPEG: Checks for jpeg library AC_DEFUN([XFORMS_CHECK_LIB_JPEG],[ ### Check for Jpeg library AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, JPEG_LIB="-ljpeg", [XFORMS_LIB_ERROR(libjpeg,jpeg)]) AC_SUBST(JPEG_LIB) ]) dnl Usage XFORMS_PATH_XPM: Checks for xpm library and header AC_DEFUN([XFORMS_PATH_XPM],[ ### Check for Xpm library SAVE_LIBS="$LIBS" LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage, XPM_LIB="-lXpm", [XFORMS_LIB_ERROR(libXpm,Xpm)]) AC_SUBST(XPM_LIB) LIBS="$SAVE_LIBS" ### Check for Xpm headers SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" xforms_cv_xpm_h_location="" AC_CHECK_HEADER(X11/xpm.h,[ ac_cv_header_xpm_h=yes xforms_cv_xpm_h_location=""],[ AC_CHECK_HEADER(xpm.h,[],[ XFORMS_LIB_ERROR(xpm.h,Xpm)])]) AC_DEFINE_UNQUOTED(XPM_H_LOCATION,$xforms_cv_xpm_h_location, [define this to the location of xpm.h to be used with #include, e.g. ]) CPPFLAGS="$SAVE_CPPFLAGS" ### Test for the header version if test $ac_cv_header_xpm_h = yes; then AC_CACHE_CHECK([xpm header version],xforms_cv_xpmversion, [ cat > conftest.$ac_ext <&5 | \ grep '^"%%%"' 2>/dev/null | \ sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'` case "$xforms_cv_xpmr" in changequote(,) [0-9]) xformsxpmr_alpha=`echo $xforms_cv_xpmr |tr 123456789 abcdefghi` xformsxpmv_alpha=" (aka 3.$xforms_cv_xpmv$xformsxpmr_alpha)";; changequote([,]) *) ;; esac xforms_cv_xpmversion="$xforms_cv_xpmv.$xforms_cv_xpmr$xformsxpmv_alpha" rm -f conftest*]) XPM_VERSION=${xforms_cv_xpmversion} case "$xforms_cv_xpmr" in changequote(,) [789]|[0-9][0-9]*) ;; changequote([,]) *) XFORMS_WARNING([Version $xforms_cv_xpmversion of the Xpm library is a bit old. If you experience strange crashes with xforms, try to upgrade to at least version 4.7 (aka 3.4g). If you have installed a newer version of the library, check whether you have an old xpm.h header file in your include path.]);; esac fi]) dnl Usage: XFORMS_ERROR(message) Displays the warning "message" and sets the dnl flag xforms_error to yes. AC_DEFUN([XFORMS_ERROR],[ xforms_error_txt="$xforms_error_txt ** $1 " xforms_error=yes]) dnl Usage: XFORMS_WARNING(message) Displays the warning "message" and sets the dnl flag xforms_warning to yes. AC_DEFUN([XFORMS_WARNING],[ xforms_warning_txt="$xforms_warning_txt == $1 " xforms_warning=yes]) dnl Usage: XFORMS_LIB_ERROR(file,library) Displays an error message indication dnl that 'file' cannot be found because 'lib' may be uncorrectly installed. AC_DEFUN([XFORMS_LIB_ERROR],[ XFORMS_ERROR([Cannot find $1. Please check that the $2 library is correctly installed on your system.])]) dnl Usage: XFORMS_CHECK_ERRORS Displays a warning message if a XFORMS_ERROR dnl has occured previously. AC_DEFUN([XFORMS_CHECK_ERRORS],[ if test x$xforms_error = xyes; then cat </dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then if test $ac_cv_cxx_compiler_gnu = yes ; then $1="${$1} -Wl[,]-R$2" else $1="${$1} -R$2" fi fi]) dnl Usage: XFORMS_ADD_INC_DIR(var-name,dir) Adds a -I directive to variable dnl var-name. AC_DEFUN([XFORMS_ADD_INC_DIR],[$1="${$1} -I$2 "]) dnl this is used by the macro below to general a proper config.h.in entry m4_define([XFORMS_AH_CHECK_DECL], [AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_$1), [Define if you have the prototype for function `$1'])]) dnl Check things are declared in headers to avoid errors or warnings. dnl Called like XFORMS_CHECK_DECL(function, header1 header2...) dnl Defines HAVE_DECL_{FUNCTION} AC_DEFUN([XFORMS_CHECK_DECL], [XFORMS_AH_CHECK_DECL($1) for ac_header in $2 do AC_MSG_CHECKING([if $1 is declared by header $ac_header]) AC_EGREP_HEADER($1, $ac_header, [AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_DECL_$1)) break], [AC_MSG_RESULT(no)]) done]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, ## 2008 Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## ## This file is free software; the Free Software Foundation gives ## unlimited permission to copy and/or distribute it, with or without ## modifications, as long as this notice is preserved. # serial 52 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [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]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--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([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])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 $CC]) 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. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname 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(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" 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]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=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't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi 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]].*|aix[[5-9]]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; 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. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # Macro added for some Cygwin-specific support -*- sh -*- # @author@: Kayvan Sylvan AC_DEFUN([CHECK_WITH_CYGWIN], [ case $host_os in cygwin* | mingw* | pw32* ) if test "$GCC" = yes; then # Ensure MSVC-compatible struct packing convention. # Depends on GCC version. gcc2 uses -fnative-struct while # gcc3 uses -mms-bitfields. # msnative_struct='' AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) case `$CC --version | sed -e 's,\..*,.,' -e q` in 2.) if $CC -v --help 2>/dev/null | grep fnative-struct > /dev/null; then msnative_struct='-fnative-struct' fi ;; *) if $CC -v --help 2>/dev/null | grep ms-bitfields > /dev/null; then msnative_struct='-mms-bitfields' fi ;; esac if test x"$msnative_struct" = x; then AC_MSG_RESULT([no way]) AC_MSG_WARN([produced libraries might be incompatible with MSVC libs]) else CXXFLAGS="$CXXFLAGS $msnative_struct" AC_MSG_RESULT([${msnative_struct}]) fi fi # Export all symbols to Win32 DLL using MinGW 2.0 ld. WIN32_LD_EXPORT_ALL_SYMBOLS='' AC_MSG_CHECKING([whether ld accepts --export-all-symbols]) if $LD --help 2>&1 | egrep 'export-all-symbols' > /dev/null; then WIN32_LD_EXPORT_ALL_SYMBOLS='-Wl,--export-all-symbols' AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi if test x"$WIN32_LD_EXPORT_ALL_SYMBOLS" != x; then LDFLAGS="$LDFLAGS $WIN32_LD_EXPORT_ALL_SYMBOLS" fi ;; esac ]) xforms-1.0.93sp1/INSTALL0000644000175000017500000002232311253425450013262 0ustar jensjensCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. To create the documenation in PDF or HTML format 'cd' into the 'doc' subdirectory and type 'make pdf' or 'make html'. For that 'texinfo' or 'texi2html' must be installed. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. xforms-1.0.93sp1/Makefile.in0000644000175000017500000005570111377311601014303 0ustar jensjens# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/xforms.spec.in \ $(top_srcdir)/config/common.am $(top_srcdir)/configure \ COPYING.LIB ChangeLog INSTALL NEWS subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = xforms.spec CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = config lib image gl fdesign fd2ps demos doc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FL_FIXLEVEL = @FL_FIXLEVEL@ FL_REVISION = @FL_REVISION@ FL_VERSION = @FL_VERSION@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ XPM_LIB = @XPM_LIB@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES = *.orig *.rej *~ *.bak core makelog xforms.spec \ config.status config.cache config.log config.h MAINTAINERCLEANFILES = $(srcdir)/Makefile.in makelog \ $(srcdir)/aclocal.m4 $(srcdir)/configure \ $(srcdir)/acinclude.m4 $(srcdir)/config.h.in AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D @BUILD_DEMOS_FALSE@DEMOS = @BUILD_DEMOS_TRUE@DEMOS = demos @BUILD_GL_FALSE@GL = @BUILD_GL_TRUE@GL = gl @BUILD_DOCS_FALSE@DOCS = @BUILD_DOCS_TRUE@DOCS = doc SUBDIRS = config lib image $(GL) fdesign fd2ps $(DEMOS) $(DOCS) # xforms.spec is needed as well as xforms.spec.in or else 'make rpmdist' # will fail. EXTRA_DIST = ChangeLog COPYING.LIB Copyright INSTALL README README.OS2 \ autogen.sh xforms.spec.in xforms.spec all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/common.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): xforms.spec: $(top_builddir)/config.status $(srcdir)/xforms.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__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 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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am rpmdist: dist if [ -z "`type -path rpmbuild`" ]; \ then \ RPMBUILD=rpm; \ else \ RPMBUILD=rpmbuild; \ fi; $$RPMBUILD -ta $(PACKAGE)-$(VERSION).tar.gz ; saved_status=$$?; \ exit $$saved_status # 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: xforms-1.0.93sp1/NEWS0000644000175000017500000001747711171560225012745 0ustar jensjens------------------------------------------ V1.1 ??????????? o Reset the horizontal offset of a browser to zero if the horizontal scrollbar is turned off (Bug #3205.) o Add a fl_replace_xyplot_point_in_overlay function that generalizes the existing fl_replace_xyplot_point. o Add new accessor functions to query and modify the timeouts that control the behaviour of the slider and counter widgets. o Enable input widgets to (partially) display characters larger than the input height. o Pass the associated (XEvent * xev) to fl_handle_object on an FL_DRAW event, allowing an FL_FREE object to make use of this info to redraw only the part of the window that has changed. o Fix compilation on SCO OpenServer, AIX and systems without GNU make. ------------------------------------------ V1.0.91pre7 May xx, 2008 o New function fl_show_msg() that takes a printf()-like format string an then as many arguments as there are format specifiers in the format string. o Message boxes created via fl_show_message(), fl_show_messages(0 and fl_show_nsg() automatically have a size that allows all text to be shown. Amount of text isn't limited anymore. o Vertical scrollbars only ge resized in y-direction, horizontal ones only in x-direction. o Date input fields now handle leap years correctly. o can now also be used to "jump" out of multi-line input objects. o In file selectors that have a callback the input box for entering a file name isnt shown anymore - the text entered there could never be used. ------------------------------------------ V1.0.91pre5 April 9, 2008 o Memory allocation bug in fl_initialize() fixed. o Output of fdesign should now be valid C (ANSI 89) o Number of symbols and length of names not limited anymore. o Public functions added to set or query for buttons to which mouse buttons they react: fl_set_button_mouse_buttons() fl_get_button_mouse_buttons() Per default buttons again react to all mouse buttons. o Removed restriction that required one of a set of radio buttons to be always active active. o Changes to fdesign to set this behaviour. ------------------------------------------ V1.0.91pre4 March 31, 2008 o Just some bug fixes ------------------------------------------ V1.0.91pre3 March 26, 2008 o If input object has focus and another object gets clicked on the input object loses the focus, resulting in an evaluation of the content of the input object. o Timeouts got a higher priority to make them more precise. o Some reorganization of memory allocation handling in lots of places to be able to really deallocate unused memory. o Buttons now only react to the left mouse button. o Enforcing that always one of a set of radio buttons is active. ------------------------------------------ V1.0.91pre2 March 20, 2008 o Cleanup of popup code. o Scroll wheel can now be used for dials. o Scrollbars on textbrowsers etc. now have correct size and position. o FL_DROPLIST_CHOICE choice objects now work. o Scroll wheel support to walk through the items of a menu. o New public function: fl_get_choice_item_mode() ------------------------------------------ V1.0.91pre1 March 12, 2008 o Resizing code rewritten, several redraw bugs removed. o Double clicking on a file in the file selector repaired. o Three new public functions: functions fl_get_object_bw() fl_get_object_gravity() fl_get_object_resize() o Bugs fixed that resulted in attempts to draw on non-existent windows which then resulted in X errors. o Corrections to make sliders on text browsers work correctly o Number of forms that can be created is now not limited anymore. o Object and event queue code rewritten to allow queues that grow dynamically if necessary. o Fixed bug that sometimes resulted in fl_do_forms() return an object when the scroll wheel was used. ------------------------------------------ V1.0.90 March 30, 2004 o Migrate from Imake to the GNU autotools. o "Composite" widgets, such as the browser, can now display tooltips. o Prevent a crash when rotating grayscale images by 90 degree multiples. o Enable xforms to handle XPixmaps containing colour "opaque". o Tabfolder widgets are now resizable. o Re-add fl_lookup_RGBcolor which fell off the dist at 1.0pre3. o fl_init_RGBdatabase is no longer needed, does nothing and is retained for compatibility only. o Pass KeyRelease events to the widgets. o Display the tab forms correctly when using bottom tab folders. o Enable xforms to read a wider variety of gif and jpeg images. o Enable fdesign to work correctly with paths like ../foo/bar/your_file.fd. o Add a -dir option to fdesign to place generated files in destdir. o Add an RPM spec file. The XForms rpms can be built with a simple "make rpmdist". o Get rid of the separate snprintf compatibility library. o Removal of lots of little pieces of cruft that crept into the xforms 1.0 release. ------------------------------------------ V1.0RC6.1 November 19, 2002 o. Fixed early tooltip hide causing recursive fl_free_forms() entry. o. Fixed typo in `lib/Imakefile'. ------------------------------------------ V1.0RC6 November 16, 2002 o. TabFolder coordinate update corrected. (Angus Leeming) o. Tooltips could be orphaned when form hidden. (Angus Leeming) ------------------------------------------ V1.0RC5.2 October 2, 2002 o. Documented `InstallNonstandard' procedure. ------------------------------------------ V1.0RC5.1 October 1, 2002 o. Mac OS X build support. ------------------------------------------ V1.0RC3 June 5, 2002 o. Fixed condition in forms.c preventing use of cursor keys. o. Fumigated with -Wall, eliminating all complaints in xforms sources. ------------------------------------------ V1.0RC2 June 1, 2002 o. Picked up some missing prototypes in `flimage.h'. o. Deleted fl_snprintf() with snprintf() and changed all references thereto. Added a new library for those lacking the latter function, filched from the SpamAssassin distributon, of all things. Had to hack it a bit to get it to work. Others, on other systems, may have to as well. ------------------------------------------ V1.0RC1 May 30, 2002 o. Very minor API changes. `FL_ERROR_FUNC' has been typedef'd for fl_set_error_handler() function. `FL_VAL_FILTER' has also been typedef'd for use by fl_set_{counter,slider}_filter(). Neither of these changes should affect much of anything. o. The flimage functions are in their own library now: libflimage. They should be usable standalone, but I have not had an opportunity to test them. o. The OpenGL functions are in their own library now: libformsGL fl_add_glcanvas() and its ilk live there. Application build scripts/ Makefiles should include -lformsGL. o. The Xpm library is no longer built or distributed with XForms. o. The majority of the function prototypes in `forms.h' have been expanded to include variable names. o. various bug fixes. ------------------------------------------ V0.89 o. No API changes. V0.89 is source API compatible with V0.86 and v0.88 o. Added image support: reads and writes a variety of image formats (gif, jpeg, tiff, bmp, postscript). o. Added thumbwheel object o. Added formbrowser object o. Added tooltips o. many fixes and enhancement to tabfolder object o. allows arbitary tic marks (label and location) for xyplot. o. various bug fixes. ------------------------------------------ V0.88.1 Janurary 1998 Compatible, source and binary, with V0.88. Bug fixed version: fixed a couple of menu problems. fixed a couple of xyplot problems slightly better documenttion of fl_set_menu_entries(). enhanced fl_create_colormap Changes since public release V0.86 March 1997 ******* No API changes! ******